This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

exception in jndi configuration - spring framework

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read this and read this.
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 AM MIGHTY! Especially when I hold this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic