问题描述
从这个问题
虽然我明白他们在说什么,但我不知道如何将该解决方案应用于TomEE。该链接解释说,这个错误应该通过使用开放的Web 1.2.1来消除。我可以看到TomEE已经使用了开放的网页1.2.1,所以
我如何摆脱这个错误?
I get the following error when I try to start the TomEE 1.6.0 plus server.What should i do? I have searched on the internet and found that this is because of Google Guava 15.0
While I understand what they are talking about I don't know how I can apply the solution to TomEE. The link explains that this error should go away by using open web 1.2.1. I can see that TomEE already uses open web 1.2.1, so
How do I get rid of this error?
INFO: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@43958fc2
Mar 02, 2014 11:01:24 PM org.apache.openejb.cdi.OpenEJBLifecycle startApplication
INFO: OpenWebBeans Container is starting...
Mar 02, 2014 11:01:24 PM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
Mar 02, 2014 11:01:24 PM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
Mar 02, 2014 11:01:26 PM org.apache.openejb.cdi.OpenEJBLifecycle startApplication
SEVERE: CDI Beans module deployment failed
org.apache.webbeans.exception.inject.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [java.util.Set] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Constructor Injection Point, constructor name : com.google.common.util.concurrent.ServiceManager, Bean Owner : [ServiceManager, Name:null, WebBeans Type:MANAGED, API Types: [java.lang.Object,com.google.common.util.concurrent.ServiceManager], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:213)
at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:187)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:162)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:799)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:612)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:503)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:409)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [java.util.Set] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Constructor Injection Point, constructor name : com.google.common.util.concurrent.ServiceManager, Bean Owner : [ServiceManager, Name:null, WebBeans Type:MANAGED, API Types: [java.lang.Object,com.google.common.util.concurrent.ServiceManager], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
at org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:60)
at org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:195)
at org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:954)
at org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:470)
at org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:420)
at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:200)
... 24 more
Mar 02, 2014 11:01:26 PM org.apache.openejb.assembler.classic.Assembler destroyApplication
INFO: Undeploying app: /Users/ajayamrite/Downloads/apache-tomee-plus-1.6.0/apps/DakiaCoreEAR
Mar 02, 2014 11:01:28 PM org.apache.openejb.assembler.classic.Assembler buildContainerSystem
SEVERE: Application could not be deployed: /Users/ajayamrite/Downloads/apache-tomee-plus-1.6.0/apps/DakiaCoreEAR
org.apache.openejb.OpenEJBException: Creating application failed: /Users/ajayamrite/Downloads/apache-tomee-plus-1.6.0/apps/DakiaCoreEAR: couldn't start owb context
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:897)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:612)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:503)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:409)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.openejb.OpenEJBRuntimeException: couldn't start owb context
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:164)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:799)
... 20 more
Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.inject.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [java.util.Set] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Constructor Injection Point, constructor name : com.google.common.util.concurrent.ServiceManager, Bean Owner : [ServiceManager, Name:null, WebBeans Type:MANAGED, API Types:[java.lang.Object,com.google.common.util.concurrent.ServiceManager], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:190)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:162)
... 22 more
Caused by: org.apache.webbeans.exception.inject.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [java.util.Set] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Constructor Injection Point, constructor name : com.google.common.util.concurrent.ServiceManager, Bean Owner : [ServiceManager, Name:null, WebBeans Type:MANAGED, API Types:[java.lang.Object,com.google.common.util.concurrent.ServiceManager], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:213)
at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:187)
... 23 more
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [java.util.Set] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Constructor Injection Point, constructor name : com.google.common.util.concurrent.ServiceManager, Bean Owner : [ServiceManager, Name:null, WebBeans Type:MANAGED, API Types:[java.lang.Object,com.google.common.util.concurrent.ServiceManager], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
at org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:60)
at org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:195)
at org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:954)
at org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:470)
at org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:420)
at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:200)
... 24 more
Mar 02, 2014 11:01:28 PM org.apache.openejb.assembler.classic.Assembler createApplication
INFO: Assembling app: openejb
Mar 02, 2014 11:01:28 PM org.apache.openejb.util.OptionsLog info
INFO: Using 'openejb.jndiname.format={deploymentId}{interfaceType.openejbLegacyName}'
Mar 02, 2014 11:01:28 PM org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=openejb/UserBusinessRemote) --> Ejb(deployment-id=openejb/User)
Mar 02, 2014 11:01:28 PM org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=global/openejb/openejb/User!org.apache.openejb.assembler.util.User) --> Ejb(deployment-id=openejb/User)
Mar 02, 2014 11:01:28 PM org.apache.openejb.assembler.classic.JndiBuilder bind
推荐答案
此问题在。
添加一个beans.xml,如适用于我。
This issue is discussed on https://code.google.com/p/guava-libraries/issues/detail?id=1668&thanks=1668&ts=1392364120. Adding a beans.xml like described on https://code.google.com/p/guava-libraries/issues/detail?id=1433#c9 works for me.
这似乎是固定在番石榴16.0.1。
This seems to be fixed in guava 16.0.1.
这篇关于如何解决'Api类型[java.util.Set]找不到限定符'启动TomEE 1.6.0加错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!