When my jboss 3.2.4RC1 / jvm 1.3.1_02 app is installed on multiprocessor windows machines (2000/xp), I get some really weird behavior.
First of all, my app will run for hours and sometime days.
Then I start getting ClassCastException's thrown by home.create () for stateless session beans.
This is the code in question. Basically, I am using a cached SiteManagerHome to create a SiteManager stateless session bean remote interface:
public static SiteManager getSiteManager () throws Exception {
final HomeFactory homeFactory = (HomeFactory) SingletonManager.getInstance (HomeFactory.class);
final SiteManagerHome home = (SiteManagerHome) homeFactory.getHome (SiteManager.class);
return home.create ();
}
home.create () throws this exception:
java.lang.ClassCastException: java.lang.String
at $Proxy72.create(Unknown Source)
at com.syncvoice.vxtracker.util.EjbManager.getSiteManager(EjbManager.java:224)
It looks as if instead of returning a SiteManager object, home.create () is returning a java.lang.String!
FYI, when this happens, our system is performing a lot of home.create ()'s as it's performing some backend processing. Note, however, that I do cache the home interfaces (that's what the HomeFactory above does).
I have also seen the same behavior for cmp's, where a cmp home.findByPrimaryKey () should return a cmp local interface, but ends up returning a java.lang.String instead. As in the above case, the system works fine for hours/days, and then it just starts to happen.
Any help/clues greatly appreciated!