• Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.naming.NameNotFoundException  RSS feed

Krishna Chaitanya Reddy Balam
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use a scriplet is jsp and place it in a web application on TOmcat 6.

This is the error I got.

Nested exception is:javax.naming.NameNotFoundException
javax.naming.NameNotFoundException: Name com.vignette.as.client.ejb.SiteOps is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.vignette.util.HomeFactory.lookupAnyHome(HomeFactory.java:329)
at com.vignette.util.HomeFactory.lookupHome(HomeFactory.java:272)
at com.vignette.util.HomeFactory.getHome(HomeFactory.java:189)
at com.vignette.as.client.javabean.OpsFactory.createRemote(OpsFactory.java:232)
at com.vignette.as.client.javabean.OpsFactory.create(OpsFactory.java:96)
at com.vignette.as.client.javabean.Site.getLocalOps(Site.java:1018)
at com.vignette.as.client.javabean.Site.findByName(Site.java:438)

I tried the same code is an independent Java Class and it is executed perfectly.
"com.vignette.as.client.javabean.Site" is a class in one of the jar files I use.
PLease advice if I am missing something here.

Thank you,
Krishna Balam
Amit Ghorpade
Posts: 2856
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like an EJB question to me, moving to an appropriate place.
please choose an appropriate forum for your posts to ensure you get the most appropriate answers.
Reza Rahman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue seems to be that you are connecting to the wrong JNDI instance on Tomcat. Keep in mind, Tomcat JNDI does not honor the jndi.properties file since it is not a Java EE compliant implementation: http://mail-archives.apache.org/mod_mbox/tomcat-users/200606.mbox/%3C447FEE8F.8010205@man.poznan.pl%3E. In Tomcat's case, you will need to explicitly pass the JNDI parameters.

Hope it helps,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!