users@glassfish.java.net

How to deploy twice the same enterprise application (EAR) on single domain.

From: <forums_at_java.net>
Date: Tue, 28 Jun 2011 03:17:57 -0500 (CDT)

I want to deploy same EAR with different names, one for tesing and one for
developing. For accessing I want to use global names where there is a
application name prefix, but due the second deploying there is an error:

[#|2011-06-27T16:33:23.890+0200|INFO|glassfish3.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=46;_ThreadName=Thread-1;|Portable
JNDI names for EJB TestEJB1C :
[java:global/s/testEJB1/TestEJB1C!com.tst.TestEJB1I,
java:global/s/testEJB1/TestEJB1C]|#]
[#|2011-06-27T16:33:23.890+0200|INFO|glassfish3.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=46;_ThreadName=Thread-1;|Glassfish-specific
(Non-portable) JNDI names for EJB TestEJB1C :
[com.tst.TestEJB1I#com.tst.TestEJB1I, com.tst.TestEJB1I]|#]
[#|2011-06-27T16:33:24.000+0200|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=46;_ThreadName=Thread-1;|s
was successfully deployed in 1 141 milliseconds.|#]
[#|2011-06-27T16:33:34.656+0200|WARNING|glassfish3.1|org.apache.catalina.connector.Request|_ThreadID=21;_ThreadName=Thread-1;|PWC4011:
Unable to set request character encoding to UTF-8 from context , because
request parameters have already been read, or ServletRequest.getReader() has
already been called|#]
[#|2011-06-27T16:33:34.765+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=46;_ThreadName=Thread-1;|=====
GUI deployment: needUploadToTempfile ======|#]
[#|2011-06-27T16:33:34.765+0200|INFO|glassfish3.1|org.glassfish.admingui|_ThreadID=21;_ThreadName=Thread-1;|=======
uploadFileName=Test.ear|#]
[#|2011-06-27T16:33:34.781+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=46;_ThreadName=Thread-1;|=====
filePath=C:\Documents and Settings\Admin\Local
Settings\Temp\Test6252062670364191099.ear origPath=Test|#]
[#|2011-06-27T16:33:35.046+0200|SEVERE|glassfish3.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=46;_ThreadName=Thread-1;|Exception
while invoking class org.glassfish.ejb.startup.EjbDeployer load method
java.lang.RuntimeException: EJB Container initialization error
    [...]
Caused by: java.lang.RuntimeException: Error while binding JNDI name
com.tst.TestEJB1I__3_x_Internal_RemoteBusinessHome__ for EJB : TestEJB1C
    [...]
Caused by: javax.naming.NameAlreadyBoundException [Root exception is
org.omg.CosNaming.NamingContextPackage.AlreadyBound:
IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0]
    [...]
Caused by: org.omg.CosNaming.NamingContextPackage.AlreadyBound:
IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0
    [...]
 

Is there problem with "glassfish-specific (Non-portable) JNDI name" with no
any application name prefix? Should it be turn off in some way?

Piotrek


--
[Message sent by forum member 'pichur']
View Post: http://forums.java.net/node/816664