Hi all,
        I have a constructor in DAO(Data Access Object) which gets
InitialContext.
I am using this DAO in my EJB.
its working fine if i use this DAO independently.
The problem is when i use this DAO in my EJB it couldn't get me the context
and giving the following exception.

java.rmi.RemoteException: Weblogic RemoteException(weblogic.rmi.ServerError)
remapped from:weblogic.rmi.ServerError: A RemoteException occurred in the
server method
 - with nested exception:
[java.lang.NoClassDefFoundError: javax/naming/NamingException]; nested
exception is:
        weblogic.rmi.ServerError: A RemoteException occurred in the server
method
 - with nested exception:
[java.lang.NoClassDefFoundError: javax/naming/NamingException]
java.lang.NoClassDefFoundError: javax/naming/NamingException
        at
com.qpi.components.instrument.entity.InstrumentDAO.<init>(InstrumentDAO.java
:35)
        at
com.qpi.components.instrument.entity.InstrumentEntityEJB.ejbFindByPrimaryKey
(InstrumentEntityEJB.java:140)
        at
com.qpi.components.instrument.entity.InstrumentEntityEJBHomeImpl.findByPrima
ryKey(InstrumentEntityEJBHomeImpl.java:81)
        at
com.qpi.components.instrument.entity.InstrumentEntityEJBHomeImpl_WLSkel.invo
ke(InstrumentEntityEJBHomeImpl_WLSkel.java:90)
        at
weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAda
pter.java, Compiled Code)
        at
weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandle
r.java:69)
        at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1
5)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)

--------------- nested within: ------------------
weblogic.rmi.ServerError: A RemoteException occurred in the server method
 - with nested exception:
[java.lang.NoClassDefFoundError: javax/naming/NamingException]
        at
weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76)
        at
com.qpi.components.instrument.entity.InstrumentEntityEJBHomeImpl_WLStub.find
ByPrimaryKey(InstrumentEntityEJBHomeImpl_WLStub.java:222)
        at
com.qpi.components.instrument.entity.GetInstrumentEntityDetails.main(GetInst
rumentEntityDetails.java:25)


CODE FOR THIS:
-----------------------
   public InstrumentDAO() throws InstrumentDAOException{
            try {
                        System.out.println("before ic context");
                        InitialContext ic1 = new  InitialContext();
                        System.out.println("after ic context");
                        ds = (DataSource)
ic1.lookup("weblogic.jdbc.jts.MCRSPool");
                } catch(NamingException ne) {
                          throw new InstrumentDAOException("Naming Exception
while looking "+
                           " up DataSource Connection
weblogic.jdbc.jts.MCRSPool: \n" +
                           ne.getMessage());
            }
   }


in ejb i am instantiating DAO like this
InstrumentDAO iDao = new InstrumentDAO();

can anybody help me....

Thanx in advance
chandra.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to