-
1. Re: Referencing EJBs in a JAR file from a WAR
adrian.brock Apr 23, 2003 8:31 AM (in response to betaniik)The error message suggests it is not
parsing the ejb-ref in jboss-web.xml
Do you have it in the correct place?
If you redeploy an ejb interface in an ejb jar
while a war is still holding a reference to the
class, it will classcast. The war is using
the old version of the class from the previous
ejb deployment.
Regards,
Adrian -
2. Re: Referencing EJBs in a JAR file from a WAR
betaniik Apr 23, 2003 9:04 AM (in response to betaniik)No, apparently I didn't. The ejb-ref is now working.
Unfortunately, the redeploy problem is still there, and it bears a striking resemblance to this:
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= ClassCastException still occurs even if I redeploy both JAR and WAR files. I've tried wrapping them up in an EAR to see if that helps things, but no luck.
Also, I removed the Home and Remote interface classes from the WAR file. I suspected that this would prevent my application working even on startup, but miraculously JBoss finds the classes.
Now there is only ever one instance of the classes (in the JAR), but this ClassCastException remains.
Tried deploying on 3.0.7 instead, no luck either.
Any ideas?
B -
3. Re: Referencing EJBs in a JAR file from a WAR
adrian.brock Apr 23, 2003 7:50 PM (in response to betaniik)Are you using jdk 1.4?
Is there a JBossRMIClassloader in run.jar?
I think the 3.0.7 is compiled with 1.3 so it
doesn't include that class.
It has a workaround for some ill conceived caching
in the RMI classloader that appear in 1.4
What this actually means is that your naming is
going over RMI, probably because you have
a jndi.properties in one of your deployments.
Remove the jndi.properties.
Regards,
Adrian -
4. Re: Referencing EJBs in a JAR file from a WAR
betaniik Apr 24, 2003 5:33 AM (in response to betaniik)Hallelujah! That did the trick.
Did figure that something wrong was going on with caching, but wasn't sure how to fix it.
There is strangely enough also a thread which proposes to add a jndi.properties file to force lookup over RMI. For some reason, this gets rid of a similar problem for others.
B