I have a User class that performs a number of Authentication
  and user maintenace functions using LDAP to our Corporate Directory,
  with the javax.naming.directory package.
  This all works fine and is used by folks from their JSP pages etc
  under Tomcat V3.2.

  I have a Session Bean that I'd like to use this User class from.
  There is a authenticate() and a getUser() method, the getUser()
  as you can imagine returns an instance of the above User class.
  When I compile the code as part of the EJB all is fine, if I use
  the .jar (after moving it into orion/lib/) file then I always get
  the following

500 Internal Server Error
java.lang.ClassCastException: Assigning instance of class
javax.naming.InitialContext to field
au.edu.nsw.det.comptech.mw.User#LdapCtx at
java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java,
Compiled Code)  at
java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java,
Compiled Code)  at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java, Compiled
Code)   at java.io.ObjectInputStream.readObject(ObjectInputStream.java,
Compiled Code)  at
java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled
Code)   at com.evermind[Orion/1.5.2 (build
10460)].server.ejb.EJBUtils.cloneObject(Unknown Source) at
Security_StatefulSessionBeanWrapper0.getUser(Security_StatefulSessionBea
nWrapper0.java, Compiled Code)  at
au.edu.nsw.det.comptech.mw.ced.ContractorFacadeBean.logIn(ContractorFaca
deBean.java, Compiled Code)     at
/Contractor.jsp._jspService(/Contractor.jsp.java, Compiled Code)        at
com.orionserver[Orion/1.5.2 (build
10460)].http.OrionHttpJspPage.service(Unknown Source)   at
com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source)        at
com.evermind[Orion/1.5.2 (build
10460)].server.http.JSPServlet.service(Unknown Source)  at
com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source)       at
com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source)       at
com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)        at
com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source) at
com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source)

   the attribute LdapCtx is of type 
        private javax.naming.directory.DirContext


   Any thoughts of who, what, where, why is going here??? 

   Many thanx
    Scott.



Reply via email to