[jboss-user] [EJB 3.0] New message: "Re: EJB 3.0 - Injection via annotation into a servlet"

Riccardo Blumenthal do-not-reply at jboss.com
Wed Jan 27 03:29:35 EST 2010


User development,

A new message was posted in the thread "EJB 3.0 - Injection via annotation into a servlet":

http://community.jboss.org/message/522455#522455

Author  : Riccardo Blumenthal
Profile : http://community.jboss.org/people/neron17

Message:
--------------------------------------------------------------
I have checked the EAR and I think it isn't packed correctly. Let me try to show the structure:
 
tutorialEAR.ear: + META-INF
                 |    |
                 |     --- MANIFEST.MF
                 |
                 + tutorial.WAR
                        |    
                        + META-INF
                        |     |
                        |      --- MANIFEST.MF
                        |      --- persitence.xml
                        |
                        + WEB-INF
                        |    |
                        |    + classes
                        |    + lib
                        |     --- web.xml
                        |
                         --- *.jsp

 
That's my EAR as it is created by Eclipse. Actually I assumed Eclipse would perform the right file regarding the the fact that it optimizes for JBoss as runtim. But from what I learned the JAR is missing in the root directory right? So i created a tutorial.JAR manually from eclipse and put it into the EAR but still that didn't help. I am getting the following error message:
 
 
09:20:08,656 INFO  [JBossASKernel] Created KernelDeployment for: tutorial.jar
09:20:08,656 INFO  [JBossASKernel] installing bean: jboss.j2ee:jar=tutorial.jar,name=tutorial,service=EJB3
09:20:08,656 INFO  [JBossASKernel]   with dependencies:
09:20:08,656 INFO  [JBossASKernel]   and demands:
09:20:08,656 INFO  [JBossASKernel]   and supplies:
09:20:08,656 INFO  [JBossASKernel] Added bean(jboss.j2ee:jar=tutorial.jar,name=tutorial,service=EJB3) to KernelDeployment of: tutorial.jar
09:20:08,671 INFO  [ClientENCInjectionContainer] STARTED CLIENT ENC CONTAINER: tutorial
09:20:08,828 INFO  [TomcatDeployment] deploy, ctxPath=/admin-console
09:20:09,109 INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'
09:20:13,562 INFO  [TomcatDeployment] deploy, ctxPath=/
09:20:13,734 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
09:20:14,203 INFO  [TomcatDeployment] deploy, ctxPath=/tutorial
09:20:14,265 ERROR [Ejb3ClientDeployer] Could not deploy vfszip:/C:/Programme/jboss-5.1.0.GA/server/default/deploy/tutorialEAR.ear/tutorial.jar/
javax.naming.NameAlreadyBoundException: classPathEntries
        at org.jnp.server.NamingServer.bind(NamingServer.java:209)
        at org.jnp.server.NamingServer.bind(NamingServer.java:167)
        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:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        at org.jnp.server.NamingServer_Stub.bind(Unknown Source)
        at org.jnp.interfaces.NamingContext.bind(NamingContext.java:650)
        at org.jnp.interfaces.NamingContext.bind(NamingContext.java:611)
        at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:150)
        at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:61)


 
Not sure if the WAR and the JAR must be named differently?

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/522455#522455




More information about the jboss-user mailing list