[JBoss JIRA] (ARQ-1479) NoSuchMethodError with weld se container and junit continer 1.1.1
by Romain Pelisse (JIRA)
[ https://issues.jboss.org/browse/ARQ-1479?page=com.atlassian.jira.plugin.s... ]
Romain Pelisse commented on ARQ-1479:
-------------------------------------
Ok, forget my last comment, thanks to Aslak Knutsen I was able to fix my issue, by changing the type of the deps from 'bom' to 'pom'.
> NoSuchMethodError with weld se container and junit continer 1.1.1
> -----------------------------------------------------------------
>
> Key: ARQ-1479
> URL: https://issues.jboss.org/browse/ARQ-1479
> Project: Arquillian
> Issue Type: Bug
> Components: Weld Containers
> Affects Versions: weld_1.0.0.CR7
> Reporter: Shay Matasaro
> Assignee: Aslak Knutsen
>
> when using the weld-se 1.0.0.cr7 container with junit 1.1.1 container an exception is thrown:
> java.lang.NoSuchMethodError: org.jboss.arquillian.container.spi.client.deployment.Validate.archiveHasExpectedFileExtension(Lorg/jboss/shrinkwrap/api/Archive;)Z
> at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.logWarningIfArchiveHasUnexpectedFileExtension(AnnotationDeploymentScenarioGenerator.java:130)
> at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeployment(AnnotationDeploymentScenarioGenerator.java:100)
> at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generate(AnnotationDeploymentScenarioGenerator.java:62)
> at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:79)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:100)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
> at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 8 months
[JBoss JIRA] (ARQ-1943) Deployment fails with weld-servlet >= 2.2.5.Final because of duplicate CDI beans when deployment contains bean archive
by Chris Rankin (JIRA)
[ https://issues.jboss.org/browse/ARQ-1943?page=com.atlassian.jira.plugin.s... ]
Chris Rankin resolved ARQ-1943.
-------------------------------
Resolution: Done
Martin Kouba has revealed to me that I need to configure maven-failsafe-plugin as follows before the bean archive will work in an embedded container:
{code:XML}
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<classpathDependencyExcludes>
<classpathDependencyExclude>testing:test-weld</classpathDependencyExclude>
</classpathDependencyExcludes>
</configuration>
...
</plugin>
{code}
> Deployment fails with weld-servlet >= 2.2.5.Final because of duplicate CDI beans when deployment contains bean archive
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1943
> URL: https://issues.jboss.org/browse/ARQ-1943
> Project: Arquillian
> Issue Type: Bug
> Components: Tomcat Containers
> Affects Versions: tomcat_1.0.0.CR7
> Environment: Windows 7 x64, Linux x64, JDK7
> Reporter: Chris Rankin
> Attachments: arquillian-test.tar.xz, arquillian-test.tar.xz
>
>
> Using arquillian-tomcat-embedded-7, arquillian-bom 1.1.7.Final, WELD 2.2.10.Final:
> I have created a simple WAR file that contains WELD and a single servlet. There is also a dependent JAR that contains the following:
> - a @Dependent bean with a @Produces method
> - a META-INF/beans.xml file.
> When I try to test this servlet using Arquillian's TestNG container, the deployment fails with this error:
> SEVERE: Servlet threw load() exception
> org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type String with qualifiers @Trouble
> at injection point [BackedAnnotatedField] @Trouble @Inject private org.testing.web.TroubleServlet.trouble
> at org.testing.web.TroubleServlet.trouble(TroubleServlet.java:0)
> Possible dependencies:
> - Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()],
> - Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 8 months
[JBoss JIRA] (ARQ-1943) Deployment fails with weld-servlet >= 2.2.5.Final because of duplicate CDI beans when deployment contains bean archive
by Chris Rankin (JIRA)
[ https://issues.jboss.org/browse/ARQ-1943?page=com.atlassian.jira.plugin.s... ]
Chris Rankin reopened ARQ-1943:
-------------------------------
> Deployment fails with weld-servlet >= 2.2.5.Final because of duplicate CDI beans when deployment contains bean archive
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1943
> URL: https://issues.jboss.org/browse/ARQ-1943
> Project: Arquillian
> Issue Type: Bug
> Components: Tomcat Containers
> Affects Versions: tomcat_1.0.0.CR7
> Environment: Windows 7 x64, Linux x64, JDK7
> Reporter: Chris Rankin
> Attachments: arquillian-test.tar.xz, arquillian-test.tar.xz
>
>
> Using arquillian-tomcat-embedded-7, arquillian-bom 1.1.7.Final, WELD 2.2.10.Final:
> I have created a simple WAR file that contains WELD and a single servlet. There is also a dependent JAR that contains the following:
> - a @Dependent bean with a @Produces method
> - a META-INF/beans.xml file.
> When I try to test this servlet using Arquillian's TestNG container, the deployment fails with this error:
> SEVERE: Servlet threw load() exception
> org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type String with qualifiers @Trouble
> at injection point [BackedAnnotatedField] @Trouble @Inject private org.testing.web.TroubleServlet.trouble
> at org.testing.web.TroubleServlet.trouble(TroubleServlet.java:0)
> Possible dependencies:
> - Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()],
> - Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 8 months
[JBoss JIRA] (ARQ-1943) Deployment fails with weld-servlet >= 2.2.5.Final because of duplicate CDI beans when deployment contains bean archive
by Chris Rankin (JIRA)
[ https://issues.jboss.org/browse/ARQ-1943?page=com.atlassian.jira.plugin.s... ]
Chris Rankin resolved ARQ-1943.
-------------------------------
Resolution: Rejected
> Deployment fails with weld-servlet >= 2.2.5.Final because of duplicate CDI beans when deployment contains bean archive
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1943
> URL: https://issues.jboss.org/browse/ARQ-1943
> Project: Arquillian
> Issue Type: Bug
> Components: Tomcat Containers
> Affects Versions: tomcat_1.0.0.CR7
> Environment: Windows 7 x64, Linux x64, JDK7
> Reporter: Chris Rankin
> Attachments: arquillian-test.tar.xz, arquillian-test.tar.xz
>
>
> Using arquillian-tomcat-embedded-7, arquillian-bom 1.1.7.Final, WELD 2.2.10.Final:
> I have created a simple WAR file that contains WELD and a single servlet. There is also a dependent JAR that contains the following:
> - a @Dependent bean with a @Produces method
> - a META-INF/beans.xml file.
> When I try to test this servlet using Arquillian's TestNG container, the deployment fails with this error:
> SEVERE: Servlet threw load() exception
> org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type String with qualifiers @Trouble
> at injection point [BackedAnnotatedField] @Trouble @Inject private org.testing.web.TroubleServlet.trouble
> at org.testing.web.TroubleServlet.trouble(TroubleServlet.java:0)
> Possible dependencies:
> - Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()],
> - Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 8 months