users@glassfish.java.net

Re: Problem when deploying EJB2.1 (CMP) .ear to glassfish

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Wed, 11 Oct 2006 00:27:25 -0700

Hi Hans,

This is strange. Can you send us the sun-ejb-jar.xml?

thanks,
-marina

Hans Prueller wrote:
> Hi together,
>
> meanwhile I can successfully deploy my j2ee1.4 application to glassfish,
> unfortunately I
> did not succeed in configurating a working database access for the CMP
> beans.
>
> On deployment, the following message is logged into server.log:
>
> [#|2006-10-11T07:58:16.218+0200|WARNING|sun-appserver-pe9.1|javax.enterprise.resource.resourceadapter|_ThreadID=11;_ThreadName=Thread-31;Connection
> could not be allocated because: java.net.ConnectException : Error
> opening socket to server localhost on port 1527 with message :
> Connection refused: no further
> information;_RequestID=5adceee8-665a-4419-82a4-34b8de2d8d06;|RAR5114 :
> Error allocating connection : [Connection could not be allocated
> because: java.net.ConnectException : Error opening socket to server
> localhost on port 1527 with message : Connection refused: no further
> information]|#]
>
> [#|2006-10-11T07:58:16.218+0200|WARNING|sun-appserver-pe9.1|javax.enterprise.resource.jdo.codegen.ejb|_ThreadID=11;_ThreadName=Thread-31;_RequestID=5adceee8-665a-4419-82a4-34b8de2d8d06;|JDO76611:
> Cannot connect to database via JNDI name 'jdbc/__default':
> java.sql.SQLException: Connection could not be allocated because:
> java.net.ConnectException : Error opening socket to server localhost on
> port 1527 with message : Connection refused: no further information.|#]
>
> It seems that GlassFish attempts to use a connected with a JNDI name
> "jdbc/__default". This is strange because the ejb-jar.jar file (within
> the .ear)
> does contain a sun-ejb-jar.xml file, in which I configured the following:
>
>
> <cmp-resource>
>
> <jndi-name>jdbc_smsrouter</jndi-name>
>
> </cmp-resource>
>
>
>
> So if I understood that right, GF should try to use the jdbc_smsrouter
> JNDI name and not jdbc/__default. On the GF Admin console I can see the
>
> deployed application, on the tab "Descriptors" I do only see the
> application.xml, ejb-jar.xml and web.xml - the sun-XXX .xml specific
> descriptors are
>
> missing here - so I am not sure if glassfish parsed them on deployment.
>
>
>
> Any tips?
>
>
>
> Hans
>