users@glassfish.java.net

RE: JDBC Pool unavailable induce failed deployment

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Mon, 11 Mar 2013 07:49:50 -0400

decrease steadypoolsize
 
then set
poolresize=0
 
http://docs.oracle.com/cd/E19683-01/816-6443/6mch3fo6p/index.html

Martin
______________________________________________
Note de déni et de confidentialitéCe message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

  




From: lapsus63_at_gmail.com
Date: Fri, 8 Mar 2013 15:42:17 +0100
Subject: JDBC Pool unavailable induce failed deployment
To: users_at_glassfish.java.net

Hello,

My domain contains 2 JDBC pools. One is used for 99,99% of the transactions, and the other one for 0.01% for other stuff.
I configured the persistence.xml with both persistence units.

This other pool is located in a remote server that is not 100% available for network restrictions.

When I deploy my EAR, if the secondary pool isn't available (that means ping timeout), the deployment fails with the following errors.

How can I set my pool "optional" and allow deployment even if the jdbc server is not reachable ? I'd like to keep the connection parameters to MySQL server side.

Thanks a lot for help.
Olivier.

----
ATTENTION: RAR5114 : Error allocating connection : [Erreur lors de l'allocation d'une connexion. Cause : Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.]
GRAVE: Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Erreur lors de l'allocation d'une connexion. Cause : Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Error Code: 0
    at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
    at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
...
Caused by: java.sql.SQLException: Erreur lors de l'allocation d'une connexion. Cause : Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:120)
    at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
    ... 53 more
Caused by: javax.resource.spi.ResourceAllocationException: Erreur lors de l'allocation d'une connexion. Cause : Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
    at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
    ... 54 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:103)
 ...
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:924)
    at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
    at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
    ... 70 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:110)
    at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
    ... 72 more
Caused by: javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:129)
    at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
    ... 73 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at sun.reflect.GeneratedConstructorAccessor189.newInstance(Unknown Source)
...