Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

com.ibm.websphere.naming.CannotInstantiateObjectException

566 views
Skip to first unread message

roberto...@datatex.it

unread,
Sep 14, 2009, 5:23:55 AM9/14/09
to
Hi

I have an ear application composed by a war and ejb jars.

I recieve this exception trying to access a local ejb session.

{code}
raccia di stack dell'eccezione: com.ibm.websphere.naming.CannotInstantiateObjectException: A NameNotFoundException occurred on an indirect lookup on the name java:comp/env/ejb/ABSUserDefSession. The name java:comp/env/ejb/ABSUserDefSession maps to a JNDI name in deployment descriptor bindings for the application performing the JNDI lookup. Make sure that the JNDI name mapping in the deployment descriptor binding is correct. If the JNDI name mapping is correct, make sure the target resource can be resolved with the specified name relative to the default initial context. [Root exception is javax.naming.NameNotFoundException: Context: nowmasterNode01Cell/nodes/nowmasterNode01/servers/server1, name: com.dat.abs.run.ABSUserDefSession: First component in name com.dat.abs.run.ABSUserDefSession not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:998)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:175)
at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:402)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1249)
at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:394)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:214)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:154)
at javax.naming.InitialContext.lookup(InitialContext.java:455)
{code}

ejb-jar
{code}

ABSUserDefSession
ABSUserDefSession
com.dat.abs.run.ABSUserDefSessionHome
com.dat.abs.run.ABSUserDefSession
com.dat.abs.run.ABSUserDefSessionEJB
Stateless
Container

ejb/ABSUserDef
Entity
com.dat.abs.run.ABSUserDefHome
com.dat.abs.run.ABSUserDefLocal


ejb/ABSCompany
Entity
com.dat.abs.run.ABSCompanyHome
com.dat.abs.run.ABSCompanyLocal


ejb/ABSCompanyHandling
Entity
com.dat.abs.run.ABSCompanyHandlingHome
com.dat.abs.run.ABSCompanyHandlingLocal


Reference to the DataSource used by ABSUserDefSession
jdbc/ABSUserDef
javax.sql.DataSource
Container


everyone
everyone


{code}

ibm-ejb-jar-bnd.xmi
{code}















{code}

In the wAR I have:

web.xml

{code}

ejb/ABSUserDefSession
Session
com.dat.abs.run.ABSUserDefSessionHome
com.dat.abs.run.ABSUserDefSession

{code}

ibm-web-bnd.xmi
{code}


$AdminControl invoke $mbean dumpLocalNameSpace {{-report short}}
" "
==============================================================================
"Dump spazio nome"
" Contesto di avvio: (top)=local:"
" Ora di esecuzione dump: Fri Sep 11 17:16:15 CEST 2009"
==============================================================================
" "
" "
==============================================================================
"Inizio dump spazio nome"
==============================================================================
" "
" 1 (top) "
" 2 (top)/ejb javax.naming.Context"
" 3 (top)/ejb/com.dat.abs.run.ABSUserDefSession"
" 3 com.dat.abs.run.ABSUserDefSessionHome"
" 4 ....

{code}

Probably I make same mistake in some part.... but I don't recognize it...
Can someone help me ?

Thanks
Roberto

Sujit_Kale

unread,
Sep 14, 2009, 9:19:33 AM9/14/09
to
EJB JNDI names

and check he Target Resource JNDI Name field it should match with the value in tag

i hope this resolves the issue

roberto...@datatex.it

unread,
Sep 14, 2009, 9:36:53 AM9/14/09
to
Ty Kale

ejb/ABSUserDef is an entity ejb reference used by the Session ejb/ABSUserDefSession.

I try to undeploy and regenerate all and now it is working fine.

So I can consider it closed.


Ty anyway to all

0 new messages