Quantcast
Channel: GlassFish Related Items on Java.net
Viewing all articles
Browse latest Browse all 1091

Web Application stubbornly uses jdbc/__default instead of my own JDBC resource

$
0
0

Hello, I've deployed a web application on GlassFish 4. This web application has several resource references configured in its web.xml, for example this one:

<resource-ref>
    <res-ref-name>jdbc/LITDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

I've also added the corresponding JDBC resources and JDBC connection pools via the GlassFish Console. Pinging the connection pools is successful. But when I run the web application it doesn't work and there are several warnings and errors in the GlassFish log, basically saying that the connection to DerbyPool was refused:

RAR5038:Unexpected exception while creating resource for pool DerbyPool. Exception : javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused.).

At the moment I don't understand why the application tries to connect to the default pool and not to the resources/pools that are configured in the web.xml. Is there some GlassFish property that I have to change in order to use my own JDBC resource instead of jdbc/__default?

Any input would be greatly appreciated!


Viewing all articles
Browse latest Browse all 1091

Latest Images

Trending Articles



Latest Images