3 Replies Latest reply on Sep 17, 2012 2:48 AM by Xin Zhang

    There are some error message when get a db connection by JNDI

    Xin Zhang Novice

      Hi All

       

      There are some error message when get a db connection by JNDI,

      Here are those message:

       

      14:24:25,349 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "JNDI_Client_WAR.war"

      14:24:29,458 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http-localhost-127.0.0.1-8080-1) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection

                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)

                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)

                at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)

                at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)

                at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)

                at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)

                at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)

                at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)

                at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)

                at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)

                at com.broadvision.jndi.client.JNDI_Client.getDBConnection(JNDI_Client.java:68) [classes:]

                at com.broadvision.jndi.client.JNDI_Client.doGet(JNDI_Client.java:37) [classes:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_33]

      Caused by: java.sql.SQLException: Invalid argument in JDBC call

                at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

                at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

                at org.hsqldb.jdbc.Util.invalidArgument(Unknown Source)

                at org.hsqldb.jdbc.jdbcConnection.setTransactionIsolation(Unknown Source)

                at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.<init>(BaseWrapperManagedConnection.java:194)

                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnection.<init>(LocalManagedConnection.java:61)

                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:262)

                ... 26 more

       

      This is code of get connection:

       

        Connection dbConn ;

        InitialContext ic = new InitialContext();

        DataSource ds = (DataSource)ic.lookup("java:/bv/bv_framework/dataSource/bvdbPool");

        ic.close();

        dbConn = ds.getConnection();

       

      and this is the configure of standalone.xml

                

                 <datasources>

                      <datasource jta="true" jndi-name="java:jboss/datasources/bv/bv_framework/dataSource/bvdbPool" pool-name="DefaultDS" enabled="true" use-java-context="true" use-ccm="true">

                          <connection-url>jdbc:hsqldb:hsql://094edb8502c94aa:7139;toupper_column_name=true</connection-url>

                          <driver>hsqldb</driver>

                          <transaction-isolation>TRANSACTION_NONE</transaction-isolation>

                          <pool>

                              <min-pool-size>5</min-pool-size>

                              <max-pool-size>20</max-pool-size>

                              <prefill>false</prefill>

                              <use-strict-min>false</use-strict-min>

                              <flush-strategy>FailingConnectionOnly</flush-strategy>

                          </pool>

                          <security>

                              <user-name>sa</user-name>

                          </security>

                          <validation>

                              <validate-on-match>false</validate-on-match>

                              <background-validation>false</background-validation>

                              <use-fast-fail>false</use-fast-fail>

                          </validation>

                          <timeout>

                              <idle-timeout-minutes>15</idle-timeout-minutes>

                          </timeout>

                          <statement>

                              <track-statements>true</track-statements>

                              <prepared-statement-cache-size>32</prepared-statement-cache-size>

                          </statement>

                      </datasource>

                      <drivers>

                          <driver name="hsqldb" module="org.hsqldb">

                              <driver-class>org.hsqldb.jdbcDriver</driver-class>

                          </driver>

                      </drivers>

                  </datasources>

       

      I have no idea for this, Can someone give me advice?

       

      Thanks

       

      Xin