• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help! Serialization problems?

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm making a call into a stateful session ejb and an ArrayOutOfBoundsException is being thrown. As a result, the ejb is trying to roll back the transaction. However, it is unable to do so and I am getting the following embedded exception...

Embedded Exception:
java.rmi.NoSuchObjectException: Could not activate; nested exception is:
java.io.FileNotFoundException: D:\Programs\JBoss-2.4.3\jboss\db\sessions\myEJB\1087576880475.ser (The system cannot find the file specified)
at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:211)
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:194)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:307)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:341)
at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:489)
at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
at org.jboss.ejb.plugins.jrmp.interfaces.StatefulSessionProxy.invoke(StatefulSessionProxy.java:136)
at $Proxy16.getWorkSessions(Unknown Source)


Typically when I see this, some Java class is not serializable. I've checked all of my value objects, exception and everything else that is defined in my ejb API along with its data members that are not transient. I'm going to put 'implements Serializable' in everything in an attempt to figure this out but here's a couple of questions?

1. What about singletons? I have a few of these classes that hold a static reference to themselves that the ejb and other classes make calls on.

2. Local variables?

3. My ejb has a data member that is a remote interface to another stateful session ejb. Is this a problem?

Thanks!

- Kelly
 
Kelly Dolan
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured it out....and I should have known better...

Earlier in my log files a runtime exception was being thrown by my session ejb. As a result (per the ejb spec), the container kills the session ejb. I was getting the above exception the next time my interface was trying to access the session ejb and rightly so.

Kelly
 
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic