aspose file tools*
The moose likes JBoss/WildFly and the fly likes IllegaStateException using java.sql.Blob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "IllegaStateException using java.sql.Blob" Watch "IllegaStateException using java.sql.Blob" New topic
Author

IllegaStateException using java.sql.Blob

Bob Ghorbani
Greenhorn

Joined: Mar 16, 2009
Posts: 3
Hi, I asked this question in the official JBOSS forums, but I doubt I will get any response from there and was hoping someone here can help me out. I've researched this on google but have come up empty.

I have a simple client accessing a JNDI connection pool from a JBOSS server. The problem I'm running into is when I attempt to convert a java.sql.Blob to an inputstream using:


I don't believe this is a class version problem as the client is using the jbossall-client.jar from jboss/client dir. This is the only library being used by the client (other than jre 5)

I'm testing the client in Eclipse.

The exception is listed below. This also happens when I try to get the length of the blob. Also, this error occurs only when accessing blobs, or clobs from the database.

Any help would be appreciated!

----------------------------------------------------------------------------
java.lang.IllegalStateException: Failed to find method for hash:-4232490789266248516 (THIS 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.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.GeneratedMethodAccessor80.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
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.getBinaryStream(Unknown Source)
at com.cgi.cdist.main.Distribute.SFTPSender(Distribute.java:107)
at com.cgi.cdist.main.Distribute.main(Distribute.java:172)

Bob Ghorbani
Greenhorn

Joined: Mar 16, 2009
Posts: 3
Would this have anything to do with the fact that I'm using <use-java-context>false</use-java-context> ??


Bob Ghorbani
Greenhorn

Joined: Mar 16, 2009
Posts: 3
I *THINK* I've solved the problem by using:




JBOSS doesn't seem to like java.sql.Blob :/

I guess I'll never understand why the original code works fine inside an axis2 module running in jboss but not in an external client.
 
 
subject: IllegaStateException using java.sql.Blob