TomEE PolicyConfigurationFactory & TransactionManagerImpl 错误

Posted

技术标签:

【中文标题】TomEE PolicyConfigurationFactory & TransactionManagerImpl 错误【英文标题】:TomEE PolicyConfigurationFactory & TransactionManagerImpl error 【发布时间】:2020-05-15 10:17:12 【问题描述】:

我在尝试启动服务器 TomEE PluME 8.0.1 时遇到问题。以下是我的日志。

我正在为一个客户做 POC,以了解我们是否可以将他们的一个应用程序从 weblogic 传递到 TomEE。 我在应用程序中部署此应用程序 (EAR),但出现了 2 个错误。

你能告诉我你是否知道如何解决这个问题? 我没能在 WEB 上找到有用的东西。

我尝试在 system.properties 中配置 TransactionManager,但它没有任何改变。

提前感谢您的帮助。

这是我的日志:

May 15, 2020 10:57:35 AM org.apache.openejb.util.OpenEJBErrorHandler handleUnknownError
SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following stack trace and this message to users@tomee.apache.org :
 org.apache.xbean.recipe.ConstructionException: Error invoking factory method: public static org.apache.geronimo.transaction.manager.GeronimoTransactionManager org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(java.lang.Integer,org.apache.openejb.util.Duration,boolean,byte[],java.lang.String,int,boolean,boolean,java.lang.Integer,org.apache.openejb.util.Duration,java.lang.String,java.lang.String,java.lang.String,int,int,int,int,int) throws java.lang.Exception
    at org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1017)
    at org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:279)
    at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
    at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
    at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
    at org.apache.openejb.assembler.classic.Assembler.createTransactionManager(Assembler.java:3570)
    at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:574)
    at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:494)
    at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
    at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
    at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:245)
    at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:169)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:137)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:584)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:607)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:303)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.lang.NoClassDefFoundError: org.apache.geronimo.transaction.manager.TransactionManagerImpl
    at org.apache.openejb.resource.GeronimoTransactionManagerFactory.create(GeronimoTransactionManagerFactory.java:116)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1007)
    ... 22 more

...

SEVERE: Error destroying child
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/docs]] in state [STARTING_PREP]
    at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:430)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:316)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:817)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1656)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1636)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:769)
    at org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2413)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1100)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:759)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
    at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5051)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1867)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)

May 15, 2020 10:57:36 AM org.apache.tomee.catalina.TomcatWebAppBuilder startInternal
SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/docs]
org.apache.openejb.OpenEJBException: Creating application failed: C:\Users\fnsanzabandi\tools\apache-tomee-plume-8.0.1\webapps\docs: PolicyConfigurationFactory class not found: Property javax.security.jacc.PolicyConfigurationFactory.provider not set
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1104)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:759)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
    at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5051)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1867)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
Caused by: org.apache.openejb.OpenEJBException: PolicyConfigurationFactory class not found: Property javax.security.jacc.PolicyConfigurationFactory.provider not set
    at org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:73)
    at org.apache.openejb.assembler.classic.Assembler.initEjbs(Assembler.java:1505)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:962)
    ... 45 more
Caused by: java.lang.ClassNotFoundException: Property javax.security.jacc.PolicyConfigurationFactory.provider not set
    at javax.security.jacc.PolicyConfigurationFactory$1.run(PolicyConfigurationFactory.java:86)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.jacc.PolicyConfigurationFactory.getPolicyConfigurationFactory(PolicyConfigurationFactory.java:80)
    at org.apache.openejb.assembler.classic.JaccPermissionsBuilder.install(JaccPermissionsBuilder.java:59)
    ... 47 more

【问题讨论】:

【参考方案1】:

我添加了这些罐子,因为我的应用程序需要它们: - jcl104-over-slf4j-1.4.1 - slf4j-api-1.4.1

我不得不更改他们的版本来解决问题。将版本 1.4.1 更改为 1.7.21。

【讨论】:

以上是关于TomEE PolicyConfigurationFactory & TransactionManagerImpl 错误的主要内容,如果未能解决你的问题,请参考以下文章

是否可以将 tomee 与更新版本的 tomcat 一起使用?

JMS 主题订阅 Tomee 1.7.1

如何解决 TomEE 8.x、Hibernate 5.4 和 Java 8 的 ASM 问题?

TomEE 中的 Spring Durable JMS 订阅者(不允许在使用的连接上设置 clientID)

TomEE1.7.x 推荐的 JSF 依赖项是啥?

为啥我在本地 TomEE 1.6 中收到 HsqlException?