users@glassfish.java.net

Error while Resizing pool PostgreSqLPool

From: <glassfish_at_javadesktop.org>
Date: Thu, 16 Sep 2010 02:09:52 PDT

Hi to all,

I have an application with spring, hibernate, postgres and glassfish that after few hours launch this exception:
[#|2010-09-13T17:27:13.709+0200|WARNING|glassfishv3.0|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool.resizer|_ThreadID=52;_ThreadName=Thread-1;|RAR5058: Error while Resizing pool PostgreSqLPool. Exception : null|#]

We have activate more logging and we have found before the resizing pool problem this one:

[#|2010-09-13T17:27:13.699+0200|FINE|glassfishv3.0|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=52;_ThreadName=Thread-1;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=createSingleResource;|Connection creation failed for 1 time. It will be retried, if connection creation retrial is enabled.
java.lang.NullPointerException
        at org.postgresql.Driver.parseURL(Driver.java:601)
        at org.postgresql.Driver.connect(Driver.java:248)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:87)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:70)
        at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102)
        at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:72)
        at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:834)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1087)
        at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:121)
        at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:268)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1381)
        at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1101)
        at com.sun.enterprise.resource.pool.resizer.Resizer.ensureSteadyPool(Resizer.java:131)
        at com.sun.enterprise.resource.pool.resizer.Resizer.resizePool(Resizer.java:117)
        at com.sun.enterprise.resource.pool.resizer.Resizer.run(Resizer.java:90)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
|#]

it seams that there are problem during connection pool resize. we have used the standard configuration:
  <jdbc-connection-pool datasource-classname="org.postgresql.ds.PGSimpleDataSource" res-type="javax.sql.DataSource" name="postgresql-itw2">
      <property name="Compatible" value="true" />
      <property name="DatabaseName" value="itw2" />
      <property name="LoginTimeout" value="0" />
      <property name="Password" value="xxxxxxxxxx" />
      <property name="PortNumber" value="5432" />
      <property name="PrepareThreshold" value="5" />
      <property name="ServerName" value="localhost" />
      <property name="SocketTimeout" value="0" />
      <property name="Ssl" value="false" />
      <property name="TcpKeepAlive" value="true" />
      <property name="UnknownLength" value="2147483647" />
      <property name="User" value="itw" />
    </jdbc-connection-pool>

Any idea why glassfish doesn't resize the pool?
regards Lorenzo
[Message sent by forum member 'xarnorx']

http://forums.java.net/jive/thread.jspa?messageID=482910