-
1. Re: JBoss AS 7 ClassCastException when lookup Local ejb from war
jaikiran Nov 25, 2011 5:09 AM (in response to gonchar)Are you packaging the TestClientLocal (and other bean interfaces) in multiple locations (like the EJB jar and the war)?
-
2. Re: JBoss AS 7 ClassCastException when lookup Local ejb from war
gonchar Nov 25, 2011 5:16 AM (in response to jaikiran)Thanks for answering!
Yes, ofcourse. If i hadn't packed TestClientLocal interfcace it wouldn't have been seen in war.
-
3. Re: JBoss AS 7 ClassCastException when lookup Local ejb from war
jaikiran Nov 25, 2011 5:19 AM (in response to gonchar)Vitaliy Gonchar wrote:
Yes, ofcourse. If i hadn't packed TestClientLocal interfcace it wouldn't have been seen in war.
(By default) The war can see the classes in the EJB jar if the war and the EJB jar are packaged in the same .ear (like your case). So remove those interfaces from the runtime packaging of the .war. Or alternatively, package those EJB interfaces is a separate jar and place that jar in the .ear/lib so that those are accessible to both the EJB jar and the war in the .ear.
-
4. Re: JBoss AS 7 ClassCastException when lookup Local ejb from war
gonchar Nov 25, 2011 5:25 AM (in response to jaikiran)Thank you very much!! It works now.
-
5. Re: JBoss AS 7 ClassCastException when lookup Local ejb from war
gg.svce Jan 3, 2013 3:06 AM (in response to jaikiran)Hi Jaikiran,
I am facing similar problem when i deploy the app on Jboss 7.1.1 Final and lookup for the local inetrface it gives me proxy view for that class and that results in class cast exception.
i have posted the problem:
https://community.jboss.org/message/787022
please do suggest?
Thanks in advance:)