[EJB 3.0] - ClassCastException calling EJB3 from Portal
by cuoz
Hi all,
I'm trying to use my EJB3 application from a JBoss Portal portlet and getting the infamous ClassCastException. I have read all the wiki & other resources on classloading, etc, but have not been able to solve this one.
Specifics are: JBoss 4.0.4GA, Portal 2.4-CR2, EJB3 RC7 (I just noticed RC8 was released last week, so haven't tried it yet).
I have packaged the ejb3 application and the portlet application in separate ear files, and have also tried scoped loader repositories. The portlet includes a jar file of only the client parts of my ejb3 application. I have JBossAS configured for call by value, etc.
Here are application specifics:
ClientEJB is an entity that implements Client interface
ClientSessionBean is a SLSB
ClientSessionLocal is the local interface to the session bean
The method I am calling on the session bean is:
Client createClient(String username, String password)
It creates an instance of ClientEJB, persists it, and returns it as a Client interface.
The call to the session bean works fine. I get the CCE when I try to use the returned object as a Client and not a ClientEJB.
What should I be doing to make this work? I'm sure if I package it all in the same ear file it will work, but I don't want that (though I haven't tried that yet).
Hopefully somebody already ran into this scenario and can help. Let me know if you need more information.
Thank you in advance,
Gary.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960986#3960986
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960986
19 years, 9 months
[JBossWS] - xsi:type not supported in JBossAP?
by cfaucher
Hi,
We have a data structure, defined in XSDs. Using JAXB'x (the one from JWSDP 1.6), we generate JAXB stubs for the XSDs structure.
Outside JBoss (e.g. standalone main), we can marshal to XML/unmarshal from XML the JAXB object tree.
We invoked a Axis Web Service, deployed in JBoss 4.0.4, that is Message-type. Using the Request SOAPEnvelope's body, we retrieve the our XML and try to unmarshal it into the JAXB object tree.
However, inside JBoss, JAXB does not recognize our complex types?! Is it possible that the xsi:type are not supported in JBoss?! Without that, it seems it cannot map the complex types to the given XSD, and JAXB fails to load.
Thanks in advance for any input!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960985#3960985
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960985
19 years, 9 months