[JBoss JIRA] (WFLY-1028) Log more helpful message when duplicate jars prevent injection
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-1028?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar closed WFLY-1028.
-----------------------------
Resolution: Out of Date
Whole web container was replaced & many related things.
I am marking this as out of date as it does not represent current state.
If you still feel that WildFly 8 does not have sufficient reporting, please create new issue.
> Log more helpful message when duplicate jars prevent injection
> --------------------------------------------------------------
>
> Key: WFLY-1028
> URL: https://issues.jboss.org/browse/WFLY-1028
> Project: WildFly
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Randahl Fink Isaksen
>
> If you package your business interfaces with both your ejb.jar and your web.war, EJB injection into the JSF backing beans of the web.war does not work. The reason is class loading issues - the bean implementing the business interface packaged in the ejb.jar is not assignment compatible with the other business interface found in the web.war.
> Removing the business interface classes from both the ejb.jar and web.war and packaging these in an EAR containing just 1 set of business interfaces will fix this problem. However, I just spend 24 hours trying to figure this out because the exception I got from JBoss AS 7 was not very helpful (as can be seen below).
> If multiple instances of the same jar lead to assignment incompatibilities that prevent EJB injection, I request that a much more developer friendly message is logged, such as the following:
> "It was not possible to inject EJB SurveillanceFunctionalityBean into AlarmEventView because the EJB SurveillanceFunctionalityBean implements a interface SurveillanceFunctionality loaded from another jar than the jar containing the interface used in AlarmEventView. As a result, the EJB instance is not assignment compatible with the field found in AlarmEventView. This can be solved by placing the interface SurveillanceFunctionality in its own jar inside an EAR and ensuring that no modules of the EAR contain duplicates the this particular jar."
> The original, less helpful exception
>
> 18:17:24,880 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http--10.0.0.110-8080-2) Error Rendering View[/iphone/alarms.xhtml]: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
> at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:95) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.web.deployment.component.WebComponentInstantiator$2.<init>(WebComponentInstantiator.java:96) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.web.deployment.component.WebComponentInstantiator.initializeInstance(WebComponentInstantiator.java:94) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:86) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.web.deployment.jsf.JsfInjectionProvider.invokePostConstruct(JsfInjectionProvider.java:69) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:72) [jbossweb-7.0.13.Final.jar:]
> at org.apache.el.parser.AstValue.getTarget(AstValue.java:94) [jbossweb-7.0.13.Final.jar:]
> at org.apache.el.parser.AstValue.getType(AstValue.java:82) [jbossweb-7.0.13.Final.jar:]
> at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:176) [jbossweb-7.0.13.Final.jar:]
> at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at org.primefaces.component.datatable.DataTable.isLazy(DataTable.java:922) [primefaces-3.1.1.jar:]
> at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:177) [primefaces-3.1.1.jar:]
> at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:103) [primefaces-3.1.1.jar:]
> at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285) [myfaces-impl-2.1.6.jar:2.1.6]
> at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.7-jbossorg-2.jar:]
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
> at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
> at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]
> Caused by: java.lang.IllegalArgumentException: Can not set com.wefend.services.surveillance.SurveillanceFunctionality field com.wefend.web.events.AlarmEventView.surveillanceFunctionality to com.wefend.services.surveillance.SurveillanceFunctionality$$$view19
> at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146) [classes.jar:1.6.0_29]
> at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150) [classes.jar:1.6.0_29]
> at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63) [classes.jar:1.6.0_29]
> at java.lang.reflect.Field.set(Field.java:657) [classes.jar:1.6.0_29]
> at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:111) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:106) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
> ... 50 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (WFLY-852) bean-validation quickstart fails to start managed container
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-852?page=com.atlassian.jira.plugin.s... ]
Tomaz Cerar resolved WFLY-852.
------------------------------
Assignee: Tomaz Cerar
Fix Version/s: 8.0.0.Final
Resolution: Done
Fixed,
Tested with latest wildfly quickstarts
> bean-validation quickstart fails to start managed container
> -----------------------------------------------------------
>
> Key: WFLY-852
> URL: https://issues.jboss.org/browse/WFLY-852
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: Tests performed on 64-bit Oracle Java 7 on Ubuntu
> Reporter: David Salter
> Assignee: Tomaz Cerar
> Labels: quickstart
> Fix For: 8.0.0.Final
>
>
> The Arquillian tests fail on the bean-validation quickstart when run against a managed JBoss server as in the following output.
> Updating to use the jboss-javaee-6.0-with-tools version 1.0.0.M4 in pom.xml seems to fix the issue.
> $ export JBOSS_HOME=/home/david/Apps/jboss-as-7.1.1.Final/
> $ mvn clean test -Parq-jbossas-managed
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building JBoss AS Quickstarts: Bean Validation 7.1.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ bean-validation ---
> [INFO] Deleting /home/david/Development/Java/quickstart/quickstart/bean-validation/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ bean-validation ---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.1:compile (default-compile) @ bean-validation ---
> [INFO] Compiling 1 source file to /home/david/Development/Java/quickstart/quickstart/bean-validation/target/classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ bean-validation ---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.1:testCompile (default-testCompile) @ bean-validation ---
> [INFO] Compiling 1 source file to /home/david/Development/Java/quickstart/quickstart/bean-validation/target/test-classes
> [INFO]
> [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ bean-validation ---
> [INFO] Surefire report directory: /home/david/Development/Java/quickstart/quickstart/bean-validation/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running org.jboss.as.quickstarts.kitchensink.test.MemberValidationTest
> log4j:WARN No appenders could be found for logger (org.jboss.logging).
> log4j:WARN Please initialize the log4j system properly.
> Mar 15, 2012 19:43:25 AM org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal
> INFO: Starting container with: [/usr/local/java/jdk1.7.0_03/bin/java, -Xmx512m, -XX:MaxPermSize=128m, -Djboss.home.dir=/home/david/Apps/jboss-as-7.1.1.Final/, -Dorg.jboss.boot.log.file=/home/david/Apps/jboss-as-7.1.1.Final//standalone/log/boot.log, -Dlogging.configuration=file:/home/david/Apps/jboss-as-7.1.1.Final//standalone/configuration/logging.properties, -Djboss.modules.dir=/home/david/Apps/jboss-as-7.1.1.Final//modules, -jar, /home/david/Apps/jboss-as-7.1.1.Final/jboss-modules.jar, -mp, /home/david/Apps/jboss-as-7.1.1.Final//modules, -logmodule, org.jboss.logmanager, -jaxpmodule, javax.xml.jaxp-provider, -mbeanserverbuildermodule, org.jboss.as.jmx, org.jboss.as.standalone, -server-config, standalone.xml]
> WARNING: -logmodule is deprecated. Please use the system property 'java.util.logging.manager' or the 'java.util.logging.LogManager' service loader.
> Invalid option '-mbeanserverbuildermodule'
> Usage: java [-jvmoptions...] -jar jboss-modules.jar [-options...] <module-spec> [args...]
> java [-jvmoptions...] -jar jboss-modules.jar [-options...] -jar <jar-name> [args...]
> java [-jvmoptions...] -jar jboss-modules.jar [-options...] -cp <class-path> <class-name> [args...]
> java [-jvmoptions...] -jar jboss-modules.jar [-options...] -class <class-name> [args...]
> where <module-spec> is a valid module specification string
> and options include:
> -help Display this message
> -modulepath <search path of directories>
> -mp <search path of directories>
> A list of directories, separated by ':', where modules may be located
> If not specified, the value of the "module.path" system property is used
> -class Specify that the final argument is a
> class to load from the class path; not compatible with -jar
> -cp,-classpath <search path of archives or directories>
> A search path for class files; implies -class
> -dep,-dependencies <module-spec>[,<module-spec>,...]
> A list of module dependencies to add to the class path;
> requires -class or -cp
> -jar Specify that the final argument is the name of a
> JAR file to run as a module; not compatible with -class
> -config <config-location>
> The location of the module configuration. Either -mp or -config
> may be specified, but not both
> -jaxpmodule <module-name>
> The default JAXP implementation to use of the JDK
> -version Print version and exit
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.13 sec <<< FAILURE!
> Results :
> Tests in error:
> org.jboss.as.quickstarts.kitchensink.test.MemberValidationTest: Could not start container
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (WFLY-849) Arquillian Managed Container fails to build
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-849?page=com.atlassian.jira.plugin.s... ]
Tomaz Cerar resolved WFLY-849.
------------------------------
Assignee: Paul Gier (was: Chao Wang)
Fix Version/s: 8.0.0.Final
Resolution: Done
Was fixed in 0e84bcf51ac1930e61b2362e06541f843ed2a96b by Paul.
> Arquillian Managed Container fails to build
> -------------------------------------------
>
> Key: WFLY-849
> URL: https://issues.jboss.org/browse/WFLY-849
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: Fedora 16
> Reporter: Tejas Mehta
> Assignee: Paul Gier
> Fix For: 8.0.0.Final
>
>
> When building the application server the arquillian managed container fails to build if there is space in the path to the source code, e.g. /home/jboss as/jboss-as. Specifically, createComponent() in ManagedInContainerTestCase fails because of the path with a space in it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months