1 Reply Latest reply on Sep 27, 2005 12:47 PM by Howard Lewis Ship

    Connection pool failure - 2nd HSQLDB database (JBoss 4.0.2)

    Howard Lewis Ship Newbie

      I'm attempting to deploy a second HSQLDB database to store my application's data.

      I've done this by creating a vlib-ds.xml file in servers/default/deploy. I'll attach that.

      It's important for me to run the HSQLDB service in TCP mode, so that I can access it using outside tools.

      I've verified that the HSQLDB instance does start up, and is accessible via TCP.

      However, I get exceptions deploying my Entity EJBs:

      12:30:33,718 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA to JNDI name 'java:JmsXA
      '
      12:30:33,978 INFO [STDOUT] [Server@33c78b]: [Thread[hypersonic-vlib,5,jboss]]: checkRunning(false) entered
      12:30:33,978 INFO [STDOUT] [Server@33c78b]: [Thread[hypersonic-vlib,5,jboss]]: checkRunning(false) exited
      12:30:33,978 INFO [STDOUT] [Server@33c78b]: Startup sequence initiated from main() method
      12:30:33,988 INFO [STDOUT] [Server@33c78b]: Loaded properties from [C:\jboss-4.0.2\server.properties]
      12:30:33,988 INFO [STDOUT] [Server@33c78b]: [Thread[hypersonic-vlib,5,jboss]]: start() entered
      12:30:33,998 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=VlibDS to JNDI name 'java:VlibDS'
      12:30:34,048 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C:/jboss-4.0.2/server/default/deploy/jmx-console.war/
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: run() entered
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: Initiating startup sequence...
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.database=C:\jboss-4.0.2\server\default\data\hypersonic\vlib
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.tls=false
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.port=1701
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.trace=true
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.database.0=C:\jboss-4.0.2\server\default\data\hypersonic\vlib
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.restart_on_shutdown=false
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.no_system_exit=true
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.silent=false
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.default_page=index.html
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.address=0.0.0.0
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.dbname.0=
      12:30:34,118 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: server.root=.
      12:30:34,208 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: openServerSocket() entered
      12:30:34,208 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: Got server socket: ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=1701]
      12:30:34,208 INFO [STDOUT] [Server@33c78b]: Server socket opened successfully in 0 ms.
      12:30:34,208 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: openServerSocket() exiting
      12:30:34,208 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: openDatabases() entered
      12:30:34,218 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: Opening database: [file:C:\jboss-4.0.2\server\default\data\hypersonic\vlib]
      12:30:34,309 INFO [STDOUT] [Server@33c78b]: Database [index=0, id=1, db=file:C:\jboss-4.0.2\server\default\data\hypersonic\vlib, alias=] opened sucessfully in 91 ms.
      12:30:34,309 INFO [STDOUT] [Server@33c78b]: [Thread[HSQLDB Server @33c78b,5,jboss]]: openDatabases() exiting
      12:30:34,309 INFO [STDOUT] [Server@33c78b]: Startup sequence completed in 101 ms.
      12:30:34,309 INFO [STDOUT] [Server@33c78b]: 2005-09-27 12:30:34.309 HSQLDB server 1.8.0 is online
      12:30:34,309 INFO [STDOUT] [Server@33c78b]: To close normally, connect and execute SHUTDOWN SQL
      12:30:34,309 INFO [STDOUT] [Server@33c78b]: From command line, use [Ctrl]+[C] to abort abruptly
      12:30:34,309 INFO [STDOUT] [Server@33c78b]: [Thread[hypersonic-vlib,5,jboss]]: start() exiting
      12:30:34,339 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.2/server/default/deploy/vlib.ear
      12:30:36,612 INFO [EjbModule] Deploying Person
      12:30:36,822 INFO [EjbModule] Deploying Book
      12:30:36,832 INFO [EjbModule] Deploying Publisher
      12:30:36,852 INFO [EjbModule] Deploying KeyAllocator
      12:30:36,882 INFO [EjbModule] Deploying BookQuery
      12:30:36,922 INFO [EjbModule] Deploying Operations
      12:30:38,094 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: No matching credentials in Subject!
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.getConnectionProperties(BaseWrapperManagedConnectionFactory.java:425)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:130)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:395)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:297)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:447)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:874)


      I've deduced that there's an issue creating new connections. I'm not sure why ... there is certainly a user ("sa", password ""). I can connect from outside JBoss (using QuantumDB plugin for Eclipse).

      Is it a problem to run DefaultDS and VlibDS in the same JVM?

      Any suggestions for narrowing down the problem, or any solutions?



        • 1. Connection pool failure - 2nd HSQLDB database (JBoss 4.0.2)
          Howard Lewis Ship Newbie

          Here's the vlib-ds.xml file:

           <datasources>
           <local-tx-datasource>
          
          
           <jndi-name>VlibDS</jndi-name>
          
          
           <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
          
           <driver-class>org.hsqldb.jdbcDriver</driver-class>
          
           <user-name>sa</user-name>
           <password></password>
          
           <min-pool-size>5</min-pool-size>
          
           <max-pool-size>20</max-pool-size>
          
           <idle-timeout-minutes>0</idle-timeout-minutes>
           <track-statements/>
           <security-domain>HsqlDbRealm</security-domain>
           <metadata>
           <type-mapping>Hypersonic SQL</type-mapping>
           </metadata>
          
          
           <depends>jboss:service=Hypersonic,database=vlib</depends>
           </local-tx-datasource>
          
           <mbean code="org.jboss.jdbc.HypersonicDatabase"
           name="jboss:service=Hypersonic,database=vlib">
           <attribute name="Port">1701</attribute>
           <attribute name="Silent">false</attribute>
           <attribute name="Database">vlib</attribute>
           <attribute name="Trace">true</attribute>
           <attribute name="No_system_exit">true</attribute>
           </mbean>
          
           </datasources>