facebook

Tomcat 5.5 – jndi lookup – datasource in context.xml

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #246327 Reply

    javaman777me
    Member

    I have a web application that runs fine when i start tomcat from the command line but when i start Tomcat with MyEclipse i get this error:

    SEVERE: Null component Catalina:type=DataSource,path=/LTNRegistration,host=localhost,class=javax.sql.DataSource,name=”jdbc/SocietyCentralDS”
    Naming Exception Getting Environment
    javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:769)

    I have a DataSource configured in Context.xml in CATALINA/Conf directory. When i startup Tomcat via My Eclipse it appears this does not get read…

    Does anyone have JNDI / Context.xml working in Tomcat 5.5 with MyEclipse.

    I am using

    MyEclipse 4.1
    Tomcat 5.5.12
    JDK 1.5_06

    #246354

    Riyad Kalla
    Member

    The file should be in your conf/Catalina/localhost directory, it should also have the same name as your web application (myapp.xml, Somesite.xml, etc.) if you app is named Context.xml then I suppose that is fine.

    #246380

    kyrylkov
    Member

    We have this working but context.xml is placed in WebRoot/META-INF of your Web project.

    #246387

    Riyad Kalla
    Member

    Ahhh, that is different. You need to double check the Tomcat docs on how to do this. There was a thread started a while back about this, and it turned out a certain point release of Tomcat broke support for the context files, but then another release re-enabled it so two users were going back and forth in this thread (myself as well) while one had it working just fine and the other couldn’t get it working at all. Was really frustrating once we figured out what the problem was.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Tomcat 5.5 – jndi lookup – datasource in context.xml

You must be logged in to post in the forum log in