You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2012/04/01 09:55:40 UTC

Re: call ejb from other application

Did you try putting it in common classloader?

- Romain

Le 1 avr. 2012 00:09, "slawek" <s....@gmail.com> a écrit :

> Hello,
> I have deployed on this same tomee two applications. First contains ejb and
> domain class. Ejb class has method return ArrayList of domain class:
> public ArrayList<DomainClasss> getPerson
> ..
> ..
> ..
> Second application is a local client ejb, with has class that call method
> getPerson from Ejb class in first application. To do it second application
> has to have set in path Domain class. I do it by set path to domain class
> in
> catatlina.properties shared.loader section. Unfortunetly, when I call ejb
> from client i got error:
> javax.ejb.EJBException: java.lang.ClassCastException:
> my.packed.TestBean$LocalBeanProxy cannot be cast to my.packed.TestBean
> I have try add interface to Ejb, but then I got error:
> javax.ejb.EJBException: java.lang.ClassCastException: $Proxy69 cannot be
> cast to my.packed.TestBean
>
> What should i do to correct recive domain?
>
> Best regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/call-ejb-from-other-application-tp4522310p4522310.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: call ejb from other application

Posted by slawek <s....@gmail.com>.
Hello,

Here http://iem.pw.edu.pl/~wojciecs/wtpwebapps.zip i have share my tests
project. There are two project ejb and client, so there are more test -
especial jpa - but it works. 

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/call-ejb-from-other-application-tp4522310p4523474.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: call ejb from other application

Posted by Romain Manni-Bucau <rm...@gmail.com>.
With only the error i think testbean is not deployed in common and has no
interface. Can you share some project?

Le 1 avr. 2012 14:25, "slawek" <s....@gmail.com> a écrit :

> No, class and interface both are set to common loader. Is it incorrect?
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/call-ejb-from-other-application-tp4522310p4523274.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: call ejb from other application

Posted by slawek <s....@gmail.com>.
No, class and interface both are set to common loader. Is it incorrect?

Best Regards
sw 

--
View this message in context: http://openejb.979440.n4.nabble.com/call-ejb-from-other-application-tp4522310p4523274.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: call ejb from other application

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Is the interface only in common?

Le 1 avr. 2012 13:09, "slawek" <s....@gmail.com> a écrit :

> Yes, i did. Result is this same.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/call-ejb-from-other-application-tp4522310p4523173.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: call ejb from other application

Posted by slawek <s....@gmail.com>.
Yes, i did. Result is this same.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/call-ejb-from-other-application-tp4522310p4523173.html
Sent from the OpenEJB User mailing list archive at Nabble.com.