aspose file tools*
The moose likes Other Application Frameworks and the fly likes exception in jndi configuration - spring framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "exception in jndi configuration - spring framework" Watch "exception in jndi configuration - spring framework" New topic
Author

exception in jndi configuration - spring framework

Rajkishore Pujari
Ranch Hand

Joined: Sep 03, 2005
Posts: 46
I am getting this error while starting the spring application. I am new to Spring. Please help

E SRVE0020E: [Servlet Error]-[ECRTestWeb]: Failed to load servlet: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OrderExceptionDestination' defined in class path resource [com/support/orderflowmanager/common/util/config/ofmmessaging-context.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: jms/OFM_OE: First component in name jms/OFM_OE not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0]
javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: jms/OFM_OE: First component in name jms/OFM_OE not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:1983)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1320)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:2425)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:2890)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1391)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3491)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1519)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:124)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:86)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:122)

[ April 03, 2007: Message edited by: Rajkishore Pujari ]
[ April 03, 2007: Message edited by: Rajkishore Pujari ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Please read this and read this.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Rajkishore,

In a nutshell what Spring does first is to initialize the application context loading the beans from your configuration file. There are several type of application context instances you can use with spring, but I could only assume that in your case you have a web context that you probably try to initialize it usin the servlet listener and the contextConfigLocation context parameter settings. Remember unless you don't explicitly tell to Spring it will load all your beans as singletons (hence you don't necessarily have to build java singletons with Spring since they are already there, but this is another story...)

What Spring is telling you is that it cannot initialize the OrderExceptionDestination bean define within the ofmmessaging-context.xml configuration file. As far as I could tell this bean in turn tries to do some jndi lookup in order to get a reference to a jms artifact, maybe a jms destination (queue or topic) or probably a queue/topic factory. Nevertheless the lookup fails and here there is why your application could not start up. Basically you don't necessarily have a Spring issue here, but rather a jndi configuration issue.

My next question is this: are you using IMB MQ? If that's the case then I may help you to lookup up your jms artifacts, but I would need the entire configuration settings.

Regards.


I think, therefore I exist -- Rene Descartes
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: exception in jndi configuration - spring framework