[EJB 3.0] - JBoss Unified ClassLoader Hell? even with EJB3 ?
by xnuandax
Hi all,
I am trying something usually unadvisable in JBoss which is to deploy a WAR and an EAR in the same JBoss instance (where the WAR accesses the EAR via JNDI/RMI).
I am using JBoss 4.0.5.GA EJB3RC9, and as one might expect I am swimming in a soup of ClassCastExceptions whilst trying to use the object (remote interface) retrieved by a context.lookup().
I have turned everything to Pass-by-Value (Naming, etc.) in jboss-service and ejb-deployer.
My remote interface is:
@Remote
| public Interface ManagerRemote extends Serializable {
| ...
My SFSB is:
| @Stateful
| @Remote ({ManagerRemote.class}
| @RemoteBinding (jndiBinding="MYAPP/Manager/remote")
| public class ManagerBean implements ManagerRemote {
| ...
|
The client in the WAR attempts to access this remote interface by:
| Context context = new InitialContext();
| object = context.lookup("MYAPP/Manager/remote");
| ManagerRemote mr = (ManagerRemote) object;
|
I have printed the interfaces implemented by the object retrieved over JNDI, and it definitely implements "ManagerRemote" as hoped. Sadly "ManagerRemote" will not cast to "ManagerRemote", presumably because the JBoss classloader is distinguishing between the ManagerRemote interface packaged in the EAR and the same interface packaged in the WAR.
Investigations have shown alot of issues around this, and people talking about having to play with settings like "Java2ClassLoadingCompliance", "UseJBossWebLoader" and "java2ParentDelegation" to get any joy (although I have not).
Is it really still that hard to have a WAR and an EAR in the same JBoss instance with the same interfaces classes in each? (we are building this way as eventually the WAR and EAR won't be colocated). Are there some instructions on how to achieve this kind of setup in JBoss 4.0.5 EJB3 without an endless struggle of ClassCastExceptions ?
Thanks!
David
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984796#3984796
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984796
19Â years, 6Â months
[JBossWS] - Axis problems on jboss 4.0.1sp1
by mvitale
Hi folks.
I'm trying to deploy the Apache Axis jars into JBoss 4.0.1sp1 on HP/UX, and I'm running into a few issues. I'm trying to have my JBoss server interact with a SOAP Server at Melissa Data corporation (an Address Validation service.) It shouldn't matter, but in the interest of full information...They're running IIS at MD, and their SOAP server is written in .NET. My code is, obviously, Java.
First, the error that I'm receiving in the server logs is:
16:33:30,713 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.NoSuchMethodError: org.apache.axis.description.TypeDesc.(Ljava/lang/Class;Z)V
I have removed the jboss-ws4ee.sar directory from the $JBOSS_HOME/server/default/deploy directory.
I have followed Vishal's instructions noted in http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3866172#3866172
Neither of the above seem to help.
I have deployed the Apache Axis version 1.4 JARs inside my war file.
For various reasons, we are unable to upgrade JBoss past version 4.0.1sp1 at this time.
If anyone has any ideas about something that might help me out, I'm very interested in hearing them.
Thanks,
Mike Vitale
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984788#3984788
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984788
19Â years, 6Â months