Firstly, I am using the all configuration (haven't tried this yet in any other 
configurations).  And I am accessing a Stateful Session Bean from a web app.  It works 
good before hot deploy of the ejb, but throws ClassCastException after hot deploy of 
the ejb.

This code is the code to access the ejb from the web app:

Context ctx = new InitialContext();
  | Object ref = 
ctx.lookup("ejb/business/teacherapplication/TeacherApplicationSession");
  | teacherApplicationSessionHome = (TeacherApplicationSessionHome) ref; // <-- this 
is the line throwing the ClassCastException

I added this code to try to figure out what is going on inside jboss:

log.debug("CLASS LOADER="+TeacherApplicationSessionHome.class.getClassLoader());
  | log.debug("CLASS LOADER="+ref.getClass().getClassLoader());

This is what I get before hot deploying:

anonymous wrote : CLASS [EMAIL PROTECTED] 
url=file:/D:/Jboss/jboss-3.2.4/server/default/tmp/deploy/tmp10294teacherapplication-deployment.ear
 ,addedOrder=58}  
  | CLASS [EMAIL PROTECTED] 
url=file:/D:/Jboss/jboss-3.2.4/server/default/tmp/deploy/tmp10294teacherapplication-deployment.ear
 ,addedOrder=58}

I noticed the class loaders are exactly the same.

Now, this is what I get after hot deploying the ejb:

anonymous wrote : CLASS [EMAIL PROTECTED] url=null ,addedOrder=58}
  | CLASS [EMAIL PROTECTED] 
url=file:/D:/Jboss/jboss-3.2.4/server/default/tmp/deploy/tmp10295teacherapplication-deployment.ear
 ,addedOrder=59}

For some reason they are different now.  I'm not sure what this means myself, but I 
think it would expose a problem to a jboss expert.

I have tried packaging the web app seperatly or in the same ear as the ejb, both with 
the same results.

Any ideas?  Anything I can try?  Thanks for you help.






View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838722#3838722

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838722


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to