Subject Scrollable Cursors & NotSerializableException
Author Carl Boshoff
Hey ppl

I'm using JBoss 4, and a standard Session Bean to execute the code I'm
having problems with.

I connect to my db using the jaybird 2.0.0 driver, now I have figured out
that Firebird does not have scrollable cursers

so I used - con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);

after the scroll insensitive part I can do this:
CachedRowSetImpl crs = new CachedRowSetImpl();
crs.setPageSize(20);
crs.populate(resultset, 30);

and then the next error comes up:

java.lang.reflect.UndeclaredThrowableException
at $Proxy1.fetchRowSet(Unknown Source)
at
GenericLookupClientController.fetchRowSet(GenericLookupClientController.java
:41)
at GenericLookupTestGUI.search(GenericLookupTestGUI.java:54)
at
GenericLookupTestGUI.actionPerformed(GenericLookupTestGUI.java:87)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4
20)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener
.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1766)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.io.NotSerializableException:
org.jboss.resource.adapter.jdbc.WrappedResultSet
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at java.rmi.MarshalledObject.<init>(MarshalledObject.java:92)
at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:410)
at sun.reflect.GeneratedMethodAccessor88.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:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
01)
at java.lang.Thread.run(Thread.java:595)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:247)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
Source)
at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProx
y.java:118)
at
org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.jav
a:163)
at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46
)
at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInter
ceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
... 28 more


I've checked every class I created is now serializable, and still it gives
me this error. (it's not like I can go and make
org.jboss.resource.adapter.jdbc.WrappedResultSet serializable, there has to
be another way)

does anyone know how to fix this???



[Non-text portions of this message have been removed]