Problem using sapd with xa datasource
neitzel1 Dec 6, 2002 2:40 AMHi everybody,
now I tried to use:
- JBoss 3.0.4
- SapDB 7.4
- xa-Datasource (sapdb-xa-service.xmlis shown below)
When deploying my Application, the Tables will be created fine. But when I try to create a bean, I get an java.lang.NullPointerException.
Maybe somebody could show me, where my mistake can be found.
=====================================================================================
2002-12-06 08:31:47,418 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.JLevel] Error checking if entity exists
java.lang.NullPointerException
at org.jboss.resource.adapter.jdbc.BaseManagedConnection.fireConnectionEvent(BaseManagedConnection.java:147)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.fireConnectionEvent(XAManagedConnection.java:215)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection$1.connectionClosed(XAManagedConnection.java:127)
at com.sap.dbtech.jdbcext.ConnectionListenerBag.sendCloseEvent(ConnectionListenerBag.java:62)
at com.sap.dbtech.jdbcext.XAConnectionSapDB.sendCloseEvent(XAConnectionSapDB.java:378)
at com.sap.dbtech.jdbcext.XAConnectionSapDB$XAClientConnectionSapDB.close(XAConnectionSapDB.java:522)
at com.sap.dbtech.jdbcext.XAConnectionSapDB.closeLastOpenClient(XAConnectionSapDB.java:423)
at com.sap.dbtech.jdbcext.XAConnectionSapDB.close(XAConnectionSapDB.java:90)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.destroy(XAManagedConnection.java:189)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:273)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:160)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:335)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:494)
at org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener.connectionErrorOccurred(XATxConnectionManager.java:390)
at org.jboss.resource.adapter.jdbc.BaseManagedConnection.fireConnectionEvent(BaseManagedConnection.java:156)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.fireConnectionEvent(XAManagedConnection.java:215)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection$1.connectionErrorOccurred(XAManagedConnection.java:140)
at com.sap.dbtech.jdbcext.ConnectionListenerBag.sendErrorEvent(ConnectionListenerBag.java:80)
at com.sap.dbtech.jdbcext.XAConnectionSapDB.sendErrorEvent(XAConnectionSapDB.java:372)
at com.sap.dbtech.jdbcext.XAConnectionSapDB$XAClientConnectionSapDB.exceptionOccurred(XAConnectionSapDB.java:468)
at com.sap.dbtech.jdbcext.ClientConnectionSapDB.prepareStatement(ClientConnectionSapDB.java:191)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.entityExists(JDBCCreateEntityCommand.java:148)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:127)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580)
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:1119)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:206)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
at $Proxy100.create(Unknown Source)
at de.jadv.server.JEditorSessionBean.newLevel(JEditorSessionBean.java:101)
at de.jadv.server.JEditorSessionBean.newLevel(JEditorSessionBean.java:142)
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.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:817)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:268)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:255)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
========================================================================================
my sapdb-xa-service.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!--make the rar deploy! hack till better deployment-->
jboss.jca:service=RARDeployer
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC XATransaction ResourceAdapter
<!--real attributes-->
<config-property name="XADataSourceProperties" type="java.lang.String">DatabaseName=JADV;ServerName=localhost</config-property>
<config-property name="XADataSourceClass"
type="java.lang.String">com.sap.dbtech.jdbcext.XADataSourceSapDB</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName"
type="java.lang.String">dba</config-property>
<config-property name="Password"
type="java.lang.String">dba</config-property>
JADV
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
10
50
5000
15
ByContainer
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager
java:/TransactionManager