users@glassfish.java.net

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

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Wed, 11 Oct 2006 09:24:58 -0400

Hi, Hans
   The error message seems to indicate that you didn't start derby
database server (its default listening port is 1527). "jdbc/_default" is
a default datasource that comes with the glassfish installation, so the
server needs to connect to it too.
   Now for the datasource jdbc_smsrouter you used in your application,
you will need to creat a datasource by this name with the server before
you try to deploy the application. But that should be a separate problem
from the error message you are seeing..

 
- Hong

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
>