JNDI problem...

From: Julien Vignali (julien.vignal..im.hcuge.ch)
Date: Wed May 25 2005 - 10:02:30 EDT

  • Next message: Cris Daniluk: "Re: Self-Join query"

    Hi there,
    I have a strange problem with JNDI Datasource & cayenne. My webapp runs under Tomcat 5.5.9 with
    DBCP. I've set up my resources in the context.xml of my webapp, not in the Tomcat's server.xml.

    When I deploy my webapp for the first time, everything runs perfectly.
    If I undeploy my webapp and redeploy it without stopping tomcat, I randomly get this JNDI error:

    [..]
    DEBUG 25/05 15:41 RuntimeLoadDelegate : loading <node name='PacsNode' datasource='jdbc/PacsDB'
    factory='org.objectstyle.cayenne.conf.JNDIDataSourceFactory'>.
    DEBUG 25/05 15:41 RuntimeLoadDelegate : using factory:
    org.objectstyle.cayenne.conf.JNDIDataSourceFactory
    DEBUG 25/05 15:41 QueryLogger : Connecting. JNDI path: jdbc/PacsDB
    DEBUG 25/05 15:41 QueryLogger : *** Connecting: FAILURE.
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
             at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
    [...]

    Is it possible that Cayenne tries to lookup JNDI resources that aren't already setup by the
    application server ?
    Note that if I do a clean undeploy/redeploy (with tomcat killed) I don't get this error...

    Any idea ?

    Regards,
    Julien Vignali



    This archive was generated by hypermail 2.0.0 : Wed May 25 2005 - 10:02:40 EDT