[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - IllegalStateException when calling Blob.length()
strmer15
do-not-reply at jboss.com
Mon Apr 21 16:51:33 EDT 2008
Hello All,
I just started using JBoss AS 4.2.2.GA and ran into an issue while running unit tests on an Oracle DataSource. When I retrieve a java.sql.Blob with a remote connection, everything is fine until I ask for the length() - I immediately get this exception:
java.lang.IllegalStateException: Failed to find method for hash:4251558039896971575 available={-1025107772787057126=public abstract java.sql.PreparedStatement .... [goes on for a while]}
at org.jboss.invocation.MarshalledInvocation.getMethod(MarshalledInvocation.java:407)
at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:190)
at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy4.length(Unknown Source)
at com.me.test.TestBlob.main(TestBlob.java:57)
When I looked into this, it seems that the WrappedDataSourceService is adding various methods to the method hash in MarshalledInvocation from javax.sql.DataSource, java.sql.Connection, etc. in order to invoke them remotely. However, it never adds any java.sql.Blob methods into the MarshalledInvocation, so when I call Blob.length(), it can't find the hash for the function (and I did check, MarshalledInvocation.calculateHash() for that method returns the hash code in the exception above).
I don't think this is a classpath issue (as it seems other people have with remote EJB look ups) since I ran a simple main() on a test class with only the JBOSS_HOME/client JAR files on my classpath and it still happened (and I haven't changed them since installing). If somebody wants to see the test code, I'm happy to provide it.
Should I create a bug report? Or is this an issue with something I've done in my JBoss setup? Or maybe there's a simpler workaround? Thanks,
-- strmer15
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145633#4145633
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145633
More information about the jboss-user
mailing list