2 Replies Latest reply on May 2, 2003 10:10 AM by Richard Begg

    mssql driver + jboss 3.2 causes NullPointerException

    Ijonas Kisselbach Newbie

      Hi,

      I've got the following -ds.xml in my deploy folder:


      <local-tx-datasource>
      <jndi-name>jdbc/Powerbuild</jndi-name>
      <!-- <connection-url>jdbc:inetdae7:vamosa:1433?database=powerbuild</connection-url> -->
      <connection-url>jdbc:microsoft:sqlserver://vamosa:1433;DatabaseName=powerbuild;User=sa;Password=XXX;SelectMethod=Cursor</connection-url>
      <!-- <driver-class>com.inet.tds.XDataSource</driver-class> -->
      <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
      powerbuild
      <user-name>sa</user-name>
      XXX
      <min-pool-size>100</min-pool-size>
      <max-pool-size>1000</max-pool-size>
      <blocking-timeout-millis>5000</blocking-timeout-millis>
      </local-tx-datasource>



      Which doesn't cause any deploy-time exception, but when I try and create an CMP entity bean the following exception is thrown...

      10:48:28,214 ERROR [PBObject] Could not create entity
      java.lang.NullPointerException
      at com.microsoft.jdbc.sqlserver.tds.TDSRPCParameter.initializeUserParam(Unknown Source)
      at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.addUserParametersToRPC(Unknown Source)
      at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
      at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:308)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:289)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:182)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:569)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:225)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
      at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:571)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:188)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477)
      at org.jboss.ejb.Container.invoke(Container.java:694)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:272)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy78.create(Unknown Source)

      When I use the i-Opta driver the code works fine, so this points to a problem between MSSQL driver and the JBoss connection pool. Any ideas ?

      Cheers,
      Ijonas Kisselbach.
      -----------------------------------------------------------------------------------
      Vamosa - Structured Solutions for an Unstructured World
      -----------------------------------------------------------------------------------