Description

I put my application together with the classes from the weld-se-XXX.jar archive and get on startup the following exception. If i'm using separate jars with a Classpath-Entry to the weld-se-XXX.jar in the manifest it works fine but not with a fat jar including a beans.xml.

Exception in thread "main" org.jboss.weld.exceptions.DeploymentException: Exception List with 3 exceptions:
Exception 0 :
org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous dependency between [Managed Bean [class org.jboss.weld.Weld] with qualifiers [@Any @Default], Implicit Bean [javax.enterprise.inject.Instance] with qualifiers [@Default]]
at org.jboss.weld.manager.BeanManagerImpl.resolve(BeanManagerImpl.java:1137)
at org.jboss.weld.bootstrap.Validator.validatePseudoScopedInjectionPoint(Validator.java:689)
at org.jboss.weld.bootstrap.Validator.reallyValidatePseudoScopedBean(Validator.java:669)
at org.jboss.weld.bootstrap.Validator.validatePseudoScopedInjectionPoint(Validator.java:695)
at org.jboss.weld.bootstrap.Validator.reallyValidatePseudoScopedBean(Validator.java:669)
at org.jboss.weld.bootstrap.Validator.validatePseudoScopedBean(Validator.java:647)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:168)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:427)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:74)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:72)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [Instance<Object>] with qualifiers [@Default] at injection point [[BackedAnnotatedField] @Inject org.jboss.weld.environment.se.beans.InstanceManager.instances]. Possible dependencies [[Managed Bean [class org.jboss.weld.Weld] with qualifiers [@Any @Default], Implicit Bean [javax.enterprise.inject.Instance] with qualifiers [@Default]]]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:299)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:271)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:148)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:168)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:427)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:74)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:72)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [Instance<ConversationContext>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject public org.jboss.weld.context.conversation.ConversationImpl(Instance<ConversationContext>)]. Possible dependencies [[Managed Bean [class org.jboss.weld.Weld] with qualifiers [@Any @Default], Implicit Bean [javax.enterprise.inject.Instance] with qualifiers [@Default]]]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:299)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:271)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:148)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:168)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:427)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:74)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:72)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

at org.jboss.weld.bootstrap.ConcurrentValidator.validateBeans(ConcurrentValidator.java:82)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:399)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:431)
at org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.validateBeans(ForwardingBootstrap.java:85)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:134)
at org.jboss.weld.environment.se.StartMain.go(StartMain.java:41)
at org.jboss.weld.environment.se.StartMain.main(StartMain.java:52)