Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Call EJB from RAP on JBoss
Call EJB from RAP on JBoss [message #63628] Fri, 30 November 2007 13:48 Go to next message
Valer Roman is currently offline Valer RomanFriend
Messages: 36
Registered: July 2009
Member
Hi

I have deployed RAP as a war on Jboss
I want to call EJBs through the local interface which are deployed in
an ear on JBoss.

When trying to get an instance of the EJB I have an ClassCastError

Here is the code I use :

InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("TestLocal");
TestLocalHome home = (TestLocalHome) obj;

and the error :

java.lang.ClassCastException: $Proxy85 cannot be cast to
test.interfaces.TestLocalHome

in the file launch.ini of the war I have :

osgi.parentClassloader=app
osgi.contextClassLoaderParent=ccl

Thanks for your help
Val
Re: Call EJB from RAP on JBoss [message #65519 is a reply to message #63628] Tue, 11 December 2007 12:14 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
For those who are interested: this problem was discussed on the equinox
newsgroup.

Val - do you have any interest to share your experiences with the other
RAP devs? Like adding a new FAQ (http://wiki.eclipse.org/RapFaq) entry? :)

Greets
Benny

Val wrote:
> Hi
>
> I have deployed RAP as a war on Jboss
> I want to call EJBs through the local interface which are deployed in
> an ear on JBoss.
>
> When trying to get an instance of the EJB I have an ClassCastError
>
> Here is the code I use :
>
> InitialContext ctx = new InitialContext();
> Object obj = ctx.lookup("TestLocal");
> TestLocalHome home = (TestLocalHome) obj;
>
> and the error :
>
> java.lang.ClassCastException: $Proxy85 cannot be cast to
> test.interfaces.TestLocalHome
>
> in the file launch.ini of the war I have :
>
> osgi.parentClassloader=app
> osgi.contextClassLoaderParent=ccl
>
> Thanks for your help
> Val
Re: Call EJB from RAP on JBoss [message #65708 is a reply to message #65519] Tue, 11 December 2007 19:07 Go to previous messageGo to next message
Valer Roman is currently offline Valer RomanFriend
Messages: 36
Registered: July 2009
Member
Hi

I was glad to help, have added a new faq with name : "How do I remote
call EJB's from an Jboss 4.x AS"

Cheers,
Val

Benjamin Muskalla wrote:
> For those who are interested: this problem was discussed on the equinox
> newsgroup.
>
> Val - do you have any interest to share your experiences with the other
> RAP devs? Like adding a new FAQ (http://wiki.eclipse.org/RapFaq) entry? :)
>
> Greets
> Benny
>
> Val wrote:
>> Hi
>>
>> I have deployed RAP as a war on Jboss
>> I want to call EJBs through the local interface which are deployed in
>> an ear on JBoss.
>>
>> When trying to get an instance of the EJB I have an ClassCastError
>>
>> Here is the code I use :
>>
>> InitialContext ctx = new InitialContext();
>> Object obj = ctx.lookup("TestLocal");
>> TestLocalHome home = (TestLocalHome) obj;
>>
>> and the error :
>>
>> java.lang.ClassCastException: $Proxy85 cannot be cast to
>> test.interfaces.TestLocalHome
>>
>> in the file launch.ini of the war I have :
>>
>> osgi.parentClassloader=app
>> osgi.contextClassLoaderParent=ccl
>>
>> Thanks for your help
>> Val
Re: Call EJB from RAP on JBoss [message #66622 is a reply to message #65708] Fri, 14 December 2007 22:57 Go to previous message
Eclipse UserFriend
Originally posted by: b.muskalla.gmx.net

Thanks!

Val wrote:
> Hi
>
> I was glad to help, have added a new faq with name : "How do I remote
> call EJB's from an Jboss 4.x AS"
>
> Cheers,
> Val
>
> Benjamin Muskalla wrote:
>> For those who are interested: this problem was discussed on the equinox
>> newsgroup.
>>
>> Val - do you have any interest to share your experiences with the other
>> RAP devs? Like adding a new FAQ (http://wiki.eclipse.org/RapFaq) entry? :)
>>
>> Greets
>> Benny
>>
>> Val wrote:
>>> Hi
>>>
>>> I have deployed RAP as a war on Jboss
>>> I want to call EJBs through the local interface which are deployed in
>>> an ear on JBoss.
>>>
>>> When trying to get an instance of the EJB I have an ClassCastError
>>>
>>> Here is the code I use :
>>>
>>> InitialContext ctx = new InitialContext();
>>> Object obj = ctx.lookup("TestLocal");
>>> TestLocalHome home = (TestLocalHome) obj;
>>>
>>> and the error :
>>>
>>> java.lang.ClassCastException: $Proxy85 cannot be cast to
>>> test.interfaces.TestLocalHome
>>>
>>> in the file launch.ini of the war I have :
>>>
>>> osgi.parentClassloader=app
>>> osgi.contextClassLoaderParent=ccl
>>>
>>> Thanks for your help
>>> Val
Previous Topic:Obtain bundle context
Next Topic:Shell-Windows
Goto Forum:
  


Current Time: Sat Dec 21 18:30:19 GMT 2024

Powered by FUDForum. Page generated in 0.03963 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top