I am using XDoclet 1.2.0 beta2, Ant 1.5.1, and JBoss 3.0.6 (Jetty).
 
When I generate a util object for my Stateless Session Bean and call Util.getHome() I get a ClassCastException as noted below. I grabbed the Object reference and it is an Object ($Proxy) that implements EjbStoreRemoteHome, but the narrow still fails.  I am deploying an EAR.  It contains a WAR and a JAR with my EJB.  EJBs are excluded from the WAR. 
 
This happens when running a local JUnit test from the command line connecting to a JBoss server on my local machine.
 
Thanks for any help,
Frank
 
My xdoclet class comments are as such:
/**
 * @ejb.bean name="EjbStore"
 *     type="Stateless"
 *    view-type="both"
 * @ejb.transaction type="Required"
 * @ejb.util  generate="physical"
 * @ejb.home  extends="javax.ejb.EJBHome"    //these are needed becasue I extend a base class
 *      local-extends="javax.ejb.EJBLocalHome"
 * @ejb.interface extends="javax.ejb.EJBObject"
 *      local-extends="javax.ejb.EJBLocalObject"
 */
public class EjbStore extends SessionBeanAdapter
 
Any clue?
 
     [java] java.lang.ClassCastException
     [java]     at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
     [java]     at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
     [java]     at xxx.util.EjbStoreUtil.getHome(EjbStoreUtil.java:36)
     [java]     at xxx.ejb.test.EjbStoreTest.test(EjbStoreTest.java:35)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:324)
     [java]     at junit.framework.TestCase.runTest(TestCase.java:154)
     [java]     at junit.framework.TestCase.runBare(TestCase.java:127)
     [java]     at junit.framework.TestResult$1.protect(TestResult.java:106)
     [java]     at junit.framework.TestResult.runProtected(TestResult.java:124)
     [java]     at junit.framework.TestResult.run(TestResult.java:109)
     [java]     at junit.framework.TestCase.run(TestCase.java:118)
     [java]     at junit.framework.TestSuite.runTest(TestSuite.java:208)
     [java]     at junit.framework.TestSuite.run(TestSuite.java:203)
     [java]     at junit.swingui.TestRunner$16.run(TestRunner.java:623)
 
 

Reply via email to