[JBoss-user] [EJB/JBoss] - Re: ClassCastException with LocalHome casting
erinol0,so you mean that you will call a SLSB from the web module? If so,that will be the same problem as I've mentioned before. I believe you will get a ClassCastException if your web module and the EJB module don't belong to the same EAR while trying to pass instances by reference,for the Java2 defines a unique class as the combination of its classloader and its FQN. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879796#3879796 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879796 --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: ClassCastException with LocalHome casting
I've solve this problem by changing options of jboss-service.xml in deploy/jbossweb-tomcat55.sar: | true | true | This is a class loader issue of Java2. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879712#3879712 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879712 --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - ClassCastException with LocalHome casting
I have a CommandEJB,which local interface and home is CommandLocal and CommandLocalHome.I use this CommandEJB to execute classes that implements the Command interface: interface Command{ void execute() throws CommandExecuteException; } here is the CommandEJB: public class CommandEJB implements SessionBean { public void execute(Command command) throws CommandException{ command.execute(); } } I put CommandEJB.class,Command.class,CommandException.class,CommandLocal.class and CommandLocalHome.class into my-ejb.jar and deploy it as an EJB. And I put Command.class,CommandException.class,CommandLocal.class and CommandLocalHome.class into my-client.jar and place it into web module's WEB-INF/lib. Now I test it from my test.jsp: 1 Context ctx=new InitialContext(); 2 Object home1=ctx.lookup(CommandLocalHome.JNDI_NAME); 3 out.println(home1.getClass().getInterfaces()[0]); 4 CommandLocalHome home2=(CommandLocalHome)home1; If line 4 is deleted, the jsp runs successfully,but if line 4 exists,ClassCastException will be raised. Is it a bug of JBoss' class loader? How to resolve it? Thanks. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879254#3879254 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879254 --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user