File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "IllegaStateException using java.sql.Blob" Watch "IllegaStateException using java.sql.Blob" New topic

IllegaStateException using java.sql.Blob

Bob Ghorbani

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(
at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(
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.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(
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$ Source)
at Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ Source)
at 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(
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(
at org.jboss.invocation.InvokerInterceptor.invoke(
at org.jboss.proxy.ClientMethodInterceptor.invoke(
at org.jboss.proxy.ClientContainer.invoke(
at $Proxy4.getBinaryStream(Unknown Source)
at com.cgi.cdist.main.Distribute.SFTPSender(
at com.cgi.cdist.main.Distribute.main(

Bob Ghorbani

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

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.
I agree. Here's the link:
subject: IllegaStateException using java.sql.Blob
It's not a secret anymore!