David Jencks, pls help... ManagedConnection prob.
vman Dec 18, 2002 8:14 AMDear David,
I have posted a question on this topic before, but no one has an answer as of yet...
I'm hoping that you can shed some light on this issue, as you are the JBoss team
expert on this, and no one else seems informed enough to help.
I have exhausted just about every option on this, including searching the forums
[http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ have tried the suggestions by Jan Ying, which included the option to change the code of the IdentityWrapper
class to include Thread in the equals method for id purposes.
I have deployed this on JBoss 3.0.0, 3.0.3, 3.0.4 and 3.2.0beta2, with the same error appearing
in all 4 versions.
The problem occurs when I try to instantiate a BMP Bean from another BMP bean; the curious thing is
that this scenario (instantiating a bean through another bean's business method) works perfectly
fine with other beans in the same application... AND, even more troubling, the whole application
works without any glitches in Sun's reference implementation...
I'm really stumped with this... The database connection seems to be fine, the login on the
Java client and with the Database Login module seems to work fine as well, the GUI starts, I can
create, for example, Customer beans, and can (from a customer bean) add a new contact (a bean),
but when I try to add an order from customer, it gives me this:
13:26:28,171 ERROR [LogInterceptor] EJBException, causedBy:
java.sql.SQLException: Connection handle is not currently associated with a ManagedConnection
at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:774)
at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:188)
at Beans.OrderBean.storeOrder(OrderBean.java:451)
at Beans.OrderBean.ejbStore(OrderBean.java:120)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.plugins.BMPPersistenceManager.storeEntity(BMPPersistenceManager.java:472)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:388)
at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:700)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:332)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:91)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:210)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:101)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:206)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:481)
at org.jboss.ejb.Container.invoke(Container.java:680)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1026)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:340)
at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
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)
Another interesting item of note: when the server shuts down, there is a problem with shutting down the
connection:
13:28:55,826 INFO [LocalTxConnectionManager] Stopping
13:28:55,829 INFO [LocalTxConnectionManager] shutting down pool: org.jboss.resource.connectionmanager.LocalTxConnectionManager@fb9fb3
13:28:55,833 INFO [LocalTxConnectionManager] Stopped
13:28:55,837 INFO [LocalTxConnectionManager] Stopping
13:28:55,839 ERROR [LocalTxConnectionManager] could not unbind managedConnectionFactory from jndi: DefaultDS
javax.naming.NameNotFoundException: DefaultDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.unbind(NamingServer.java:228)
at org.jnp.interfaces.NamingContext.unbind(NamingContext.java:630)
at org.jnp.interfaces.NamingContext.unbind(NamingContext.java:618)
at javax.naming.InitialContext.unbind(InitialContext.java:371)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.stopService(BaseConnectionManager2.java:467)
at org.jboss.resource.connectionmanager.TxConnectionManager.stopService(TxConnectionManager.java:249)
at org.jboss.system.ServiceMBeanSupport.stop(ServiceMBeanSupport.java:232)
at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:962)
at $Proxy9.stop(Unknown Source)
at org.jboss.system.ServiceController.stop(ServiceController.java:460)
at org.jboss.system.ServiceController.stop(ServiceController.java:452)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy5.stop(Unknown Source)
at org.jboss.deployment.SARDeployer.stop(SARDeployer.java:555)
at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:478)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:452)
at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:340)
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.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.system.server.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:737)
at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:720)
at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:708)
Could this have anything to do with the above-mentioned problem I'm having ?!?
I really hope that you can at least suggest some things to look at...
Also, if you want to see the code, of course I'll post that asap.
Best regards,
Volkmar