How can I use <p:uploadFile> with mode simple? [duplicate] - jsf-2

This question already has answers here:
How to use PrimeFaces p:fileUpload? Listener method is never invoked or UploadedFile is null / throws an error / not usable
(11 answers)
Closed 6 years ago.
I am using <p:fileUpload> to upload a file from my jsf page to a backing bean and getting following eror:
22:39:06,942 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "myweb.war"
22:39:07,341 INFO [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for mywebPU
22:39:07,399 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."myweb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myweb.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myweb.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.primefaces.webapp.filter.FileUploadFilter with ClassLoader ModuleClassLoader for Module "deployment.myweb.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_21]
at java.lang.Class.privateGetDeclaredFields(Class.java:2317) [rt.jar:1.7.0_21]
at java.lang.Class.getDeclaredFields(Class.java:1762) [rt.jar:1.7.0_21]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory from [Module "deployment.myweb.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more
22:39:07,429 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "myweb.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myweb.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myweb.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myweb.war\""}}
22:39:07,433 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."myweb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myweb.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myweb.war"
22:39:07,441 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myweb.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myweb.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myweb.war\""}}}}
22:39:07,818 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment myweb.war in 381ms
My jsf page:
<h:form enctype="multipart/form-data">
<p:messages showDetail="true"/>
<p:fileUpload value="#{admin_post.uploadFile}" mode="simple" />
<p:commandButton value="Submit" ajax="false" actionListener="#{admin_post.upload}"/>
</h:form>
My web.xml: (The error occurs while using PrimeFaces FileUpload Filter)
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
<init-param>
<param-name>thresholdSize</param-name>
<param-value>51200</param-value>
</init-param>
<init-param>
<param-name>uploadDirectory</param-name>
<param-value>/tmp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
How can I solve this problem?

For those who didn't read comments:
Adding commons-fileupload-xx.jar
and common-io-xx.jar to the classpath solved the problem perfectly.

Related

PrimeFaces Push 5.0 with Wildfly 8.1 not working

I'm planning to start using PrimeFaces Push coming with PrimeFaces 5.0.
I've tried to run the same example found here http://www.primefaces.org/showcase/push/notify.xhtml using Wildfly 8.1 but I can't receive any push message from backend bean.
Here is what I've on wildfly console :
01:50:34,926 INFO [org.atmosphere.cpr.AtmosphereFramework] (Thread-261) Latest version of Atmosphere's JavaScript Client 2.2.2
01:50:34,926 INFO [org.atmosphere.cpr.AtmosphereFramework] (Thread-261)
Current version of Atmosphere 2.2.0-RC3
Newest version of Atmosphere available 2.1.7
01:50:37,447 ERROR [org.atmosphere.interceptor.JavaScriptProtocol] (default task-61) Invalid Atmosphere Version 2.2.0-javascript
01:50:37,448 WARN [org.atmosphere.websocket.protocol.SimpleHttpProtocol] (default task-61) Status code higher or equal than 400 Status 501 Message OK
01:50:41,957 INFO [stdout] (default task-62) sending message
01:55:37,760 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (default task-63) Failed to cancel resource: 8cf3d711-00c2-4e52-9d78-97cd04c0b585: java.lang.NullPointerException
at org.primefaces.push.impl.PushEndpointHandlerProxy.onStateChange(PushEndpointHandlerProxy.java:241) [primefaces-5.0.jar:5.0]
at org.atmosphere.cpr.AsynchronousProcessor.invokeAtmosphereHandler(AsynchronousProcessor.java:492) [atmosphere-runtime-2.2.0-RC3.jar:2.2.0-RC3]
at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:444) [atmosphere-runtime-2.2.0-RC3.jar:2.2.0-RC3]
at org.atmosphere.cpr.AsynchronousProcessor.endRequest(AsynchronousProcessor.java:548) [atmosphere-runtime-2.2.0-RC3.jar:2.2.0-RC3]
at org.atmosphere.websocket.DefaultWebSocketProcessor.executeClose(DefaultWebSocketProcessor.java:676) [atmosphere-runtime-2.2.0-RC3.jar:2.2.0-RC3]
at org.atmosphere.websocket.DefaultWebSocketProcessor.close(DefaultWebSocketProcessor.java:628) [atmosphere-runtime-2.2.0-RC3.jar:2.2.0-RC3]
at org.atmosphere.container.JSR356Endpoint.onClose(JSR356Endpoint.java:221) [atmosphere-runtime-2.2.0-RC3.jar:2.2.0-RC3]
at io.undertow.websockets.jsr.UndertowSession.close(UndertowSession.java:181) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.websockets.jsr.UndertowSession.close(UndertowSession.java:171) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.websockets.jsr.FrameHandler$1.run(FrameHandler.java:93) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.websockets.jsr.ServerWebSocketContainer$1.run(ServerWebSocketContainer.java:303) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.websockets.jsr.OrderedExecutor$ExecutorTask.run(OrderedExecutor.java:49) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
Here is my web.xml configuration for PrimeFaces push:
<context-param>
<param-name>primefaces.PUSH_SERVER_URL</param-name>
<param-value>http://127.0.0.1:8080</param-value>
</context-param>
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
<load-on-startup>0</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
I appreciate your help to solve this issue.
I had the same problem using Primefaces 5.0 and Atmosphere Runtime 2.2.0.
Solved it, by changing to Atmosphere 2.1.7 (which is still the newest version according to log output). Now push messages work fine...

Running jsf 2.2 on jboss eap 6.0

When I am trying to update the jboss 6.0 eap to work with jsf 2.2 i am getting the following error. I have updated the jars and the appropriate module.xml files in javax/faces/api/main and com/sun/jsf-impl/main to jsf-impl-2.2.4 and jsf-api-2.2.4.
15:54:11,888 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Critical error during deployment: : org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.faces.flow.builder.FlowDefinition
at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:578) [weld-core-1.1.10.Final-redhat-1.jar:1.1.10.Final-redhat-1]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:323) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.processEvent(ApplicationAssociate.java:303) [jsf-impl-2.2.4.jar:2.2.4]
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jsf-api-2.2.4.jar:2.2]
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) [jsf-impl-2.2.4.jar:2.2.4]
at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.4.jar:2.2.4]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
15:54:11,888 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/DWP]] (MSC service thread 1-5) Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.faces.flow.builder.FlowDefinition
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273) [jsf-impl-2.2.4.jar:2.2.4]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.faces.flow.builder.FlowDefinition
at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:578) [weld-core-1.1.10.Final-redhat-1.jar:1.1.10.Final-redhat-1]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:323) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.processEvent(ApplicationAssociate.java:303) [jsf-impl-2.2.4.jar:2.2.4]
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jsf-api-2.2.4.jar:2.2]
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) [jsf-impl-2.2.4.jar:2.2.4]
at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.4.jar:2.2.4]
... 8 more
15:54:11,888 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Error listenerStart
15:54:11,888 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Context [/DWP] startup failed due to previous errors
15:54:11,904 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.web.deployment.default-host./DWP: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./DWP: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:94)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
JBoss WELD container is not up to date to use JSF 2.2.
I upgraded the WELD modules in pretty much the same way JSF was upgraded using this and that
WELD was upgraded by adding new versions(slots) of the modules in
1. $JBOSS_HOME/modules/system/layers/base/org/jboss/weld/api,
2. $JBOSS_HOME/modules/system/layers/base/org/jboss/weld/core and
3. $JBOSS_HOME/modules/system/layers/base/org/jboss/weld/spi
Be careful to make backups of the current modules before making changes and also not to replace the "main" version(slot) but to create new slots(versions) instead.
Found on
api,
core and
spi respectively.
Notice the version chosen is 2.1, it was the highest common version at time of writing this.
For more on modules try going through the official docs.
I added the following in standalone.xml
<subsystem xmlns="urn:jboss:domain:ee:1.1">
<global-modules>
<module name="javax.faces.api" slot="main"/>
<module name="com.sun.jsf-impl" slot="main"/>
</global-modules>
...
</subsystem>

conflict or error with richfaces-component-ui 4.0

when I add richfaces-component-ui4.0.jar to my artifact I get this error
I use jboss ap7
what this error means ?
i think it's about some conflict
14:59:53,333 WARN [org.jboss.modules] (MSC service thread 1-4) Failed to define class org.richfaces.renderkit.ComponentControlBehaviorRenderer in Module "deployment.EAR_ear_exploded.ear:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/richfaces/renderkit/ComponentControlBehaviorRenderer (Module "deployment.EAR_ear_exploded.ear:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.Module.loadModuleClass(Module.java:527) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
at org.jboss.as.web.deployment.jsf.JsfAnnotationProcessor.deploy(JsfAnnotationProcessor.java:115)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.NoClassDefFoundError: javax/faces/render/ClientBehaviorRenderer
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_45]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_45]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.3.GA]
... 15 more
Caused by: java.lang.ClassNotFoundException: javax.faces.render.ClientBehaviorRenderer from [Module "deployment.EAR_ear_exploded.ear:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
... 21 more
14:59:53,347 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."EAR_ear_exploded.ear".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."EAR_ear_exploded.ear".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "EAR_ear_exploded.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018045: Failed to load annotated class: org.richfaces.renderkit.ComponentControlBehaviorRenderer
at org.jboss.as.web.deployment.jsf.JsfAnnotationProcessor.deploy(JsfAnnotationProcessor.java:117)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
... 5 more
14:59:53,568 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "EAR_ear_exploded.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"EAR_ear_exploded.ear\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"EAR_ear_exploded.ear\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"EAR_ear_exploded.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018045: Failed to load annotated class: org.richfaces.renderkit.ComponentControlBehaviorRenderer"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp.Validator Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp.Validator Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO.Validator Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO.Validator Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO.Validator Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp.Validator Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp]","jboss.deployment.subunit.\"EAR_ear_exploded.ear\".\"EJB.jar\".INSTALL Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO]","jboss.deployment.subunit.\"EAR_ear_exploded.ear\".\"WEB.war\".INSTALL Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO]","jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp]"]}
14:59:53,576 INFO [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO (missing) dependents: [service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO.ValidatorFactory, service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO.Validator]
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp (missing) dependents: [service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp.Validator, service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp.ValidatorFactory]
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO (missing) dependents: [service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO.ValidatorFactory, service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO.Validator]
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp (missing) dependents: [service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp.Validator, service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp.ValidatorFactory]
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO (missing) dependents: [service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO.ValidatorFactory, service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO.Validator]
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp (missing) dependents: [service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp.ValidatorFactory, service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp.Validator]
JBAS014777: Services which failed to start: service jboss.deployment.unit."EAR_ear_exploded.ear".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."EAR_ear_exploded.ear".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "EAR_ear_exploded.ear"
14:59:53,613 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment EJB.jar in 38ms
14:59:53,626 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment WEB.war in 52ms
14:59:53,666 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment EAR_ear_exploded.ear in 95ms
14:59:53,668 INFO [org.jboss.as.controller] (MSC service thread 1-2) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerDAO (new available)
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerFacadeImp (new available)
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeDAO (new available)
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.ServerTypeFacadeImp (new available)
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserDAO (new available)
service jboss.naming.context.java.comp.EAR_ear_exploded.EJB.UserFacadeImp (new available)
My guess was true and it is a conflict
jboss AP has lots of libraries for it's own
and when I added libraries related to jsf some conflicted happend .
the best way is to using maven for dependencies , you can easily say which dependency is for compile or which is for developing and ...
an other way is when you add library to IDE specify that just use it for developing and not for run time or compiling
and a bad way is to delete libraries that made conflict , from JBOSS AP

java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener

15:06:38,636 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."myapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myapp.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_13]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_13]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011093: Could not load component class org.apache.struts2.tiles.StrutsTilesListener
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:113)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.myapp.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111)
... 7 more
15:06:39,542 ERROR [org.jboss.as] (MSC service thread 1-10) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 92339ms - Started 144 of 219 services (2 services failed or missing dependencies, 71 services are passive or on-demand)
15:06:39,543 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "myapp.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myapp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myapp.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myapp.war\""}}
15:06:40,397 INFO [org.jboss.as.server.deployment] (MSC service thread 1-16) JBAS015877: Stopped deployment myapp.war in 853ms
15:06:40,398 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."myapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myapp.war"
15:06:40,399 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myapp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myapp.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myapp.war\""}}}}
I had added more dependencies than those that were needed.
The only dependency is
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>2.3.12</version>
</dependency>

Error performing resource injection on glassfish

This is my problem:
I'm learning Java EE development and I wanted to build up a WebApplication using Ejb. First of all I tried developing on the same machine, creating a EJB module on a glassfish domain and accessing it through a web application running on the same machine but on different domain: all worked fine. I was able, using glassfish 3.1, to access to the EJBmodule from the webapp thanks to the definition of glassfish-web.xml in my WEB-ING folder:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<ejb-ref>
<ejb-ref-name>ejb/FirstBeanRemote</ejb-ref-name>
<jndi-name>corbaname:iiop:127.0.0.1:3700#java:global/EJBModule/FirstBean!ejb.FirstBeanRemote</jndi-name>
</ejb-ref>
</glassfish-web-app>
After this, I wanted to change experiment, using different machines for the ejb module and the webapp. First of all I installed on a debian machine glassfish 3.1 and deployed my module including the required interfaces. No errors returned in the deploying so I proceeded starting the domain and again all seems to work fine. In server.log I copied the portable jndi names for my EJB FirstBean:
Portable JNDI names for EJB FirstBean: [java:global/EJBModule/FirstBean, java:global/EJBModule/FirstBean!ejb.FirstBeanRemote]
So now on another machine using Netbeans ( under windows 7 ) I created the same webapp as the previous one just changing the glassfish-web.xml in this way:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<ejb-ref>
<ejb-ref-name>ejb/FirstBeanRemote</ejb-ref-name>
<jndi-name>corbaname:iiop:192.168.1.110:3700#java:global/EJBModule/FirstBean!ejb.FirstBeanRemote</jndi-name>
</ejb-ref>
</glassfish-web-app>
I'm sure about Ip(static in my lan) and port (I create a default domain on glassfish).
The problem comes now. When I start the webapplication I get the error:
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean prova
at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:211)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:103)
at com.sun.el.parser.AstValue.getValue(AstValue.java:179)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
at javax.faces.component.UIOutput.getValue(UIOutput.java:169)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1764)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.sun.faces.spi.InjectionProviderException: com.sun.enterprise.container.common.spi.util.InjectionException: Eccezione durante il tentativo di inserire Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session in class ciao.Prova: Lookup failed for 'java:comp/env/ejb/FirstBeanRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}
at org.glassfish.faces.integration.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:194)
at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:205)
... 51 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Eccezione durante il tentativo di inserire Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session in class ciao.Prova: Lookup failed for 'java:comp/env/ejb/FirstBeanRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:703)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:470)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:171)
at org.glassfish.faces.integration.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:184)
... 52 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/ejb/FirstBeanRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__' [Root exception is org.omg.CORBA.BAD_PARAM: Buono: IOP00100009: string_to_object conversion failed due to bad schema specific part in name java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__ vmcid: SUN minor code: 9 completed: No]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:599)
... 55 more
Caused by: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=ejb/FirstBeanRemote,Remote 3.x interface =ejb.FirstBeanRemote,ejb-link=null,lookup=,mappedName=,jndi-name=corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean!ejb.FirstBeanRemote,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'corbaname:iiop:192.168.1.110:3700#java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__' [Root exception is org.omg.CORBA.BAD_PARAM: Buono: IOP00100009: string_to_object conversion failed due to bad schema specific part in name java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__ vmcid: SUN minor code: 9 completed: No]
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:191)
at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy.create(ComponentEnvManagerImpl.java:1109)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:776)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:744)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:169)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:498)
... 59 more
Caused by: org.omg.CORBA.BAD_PARAM: Buono: IOP00100009: string_to_object conversion failed due to bad schema specific part in name java:global/EJBModule123/FirstBean__3_x_Internal_RemoteBusinessHome__ vmcid: SUN minor code: 9 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy151.soBadSchemaSpecific(Unknown Source)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOperationImpl.java:227)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveINSURL(INSURLOperationImpl.java:154)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:145)
at com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:976)
at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:184)
... 64 more
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
at org.omg.CosNaming._NamingContextExtStub.resolve_str(_NamingContextExtStub.java:165)
at com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOperationImpl.java:222)
... 68 more
It seems to me a jndi problem, infact in the exception list I can read "Lookup failed for 'java:comp/env/ejb/FirstBeanRemote', so the webapp is not even able to access to the EJBModule. But I'm wondering why, since I'm using the portable jndi provided me by the glassfish server itself!
I hope I was clear and someone can help me.
Max

Resources