Exactly.  The problem will be more apparent with source code for the
servlet.  The class cast exception when using the PRO.narrow() happens
most often when you are confused about what JNDI is sending you back. 
Here is should be the Home interface of your session bean (or LocalHome
if you went that route).  You'll need to narrow that properly, then use
the Home interface to create() your session bean.

The above needs to be cross-ref'd with your ejb-ref stuff in web.xml
(and jboss-web.xml).

Please include source for Servlet and those two deployment descriptors.

--- bhw

On Sat, 2004-01-24 at 14:45, __matthewHawthorne wrote:
> Arup Sarkar wrote:
>  > It would be great if anyone can help. I am trying to build a stateless
>  > session bean with DAO and a servlet accessing the session bean,
>  > compilation, packaging and deployment is working fine, but when I am
>  > hitting the url for the servlet I am getting the following error.My
>  > environment is JBoss 3.2.1, XDoclet1.2
>  >
>  > /************************************************/
>  >
>  > 2004-01-24 13:23:28,078 INFO  [STDOUT] Entering
>  > AccessControllerServlet.init()
>  > 2004-01-24 13:23:28,125 ERROR [STDERR] java.lang.ClassCastException
>  > 2004-01-24 13:23:28,125 ERROR [STDERR]  at
>  > com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow
> 
> 
> I don't find the build files to be very useful in debugging this problem.
> 
> What about the code in your servlet?
> 
> And your deployment descriptors?  Are you using ejb-refs in your web.xml 
> -- if so, maybe the  JNDI names and classes don't match?
> 
> There are too many variables in this situation, you need to eliminate 
> them one by one.
> 
> Can you lookup the EJB outside of the servlet container?
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to