Re: JNDI problem...

From: Julien Vignali (julien.vignal..im.hcuge.ch)
Date: Wed May 25 2005 - 11:27:12 EDT

  • Next message: McDaniel, Joe R.: "Generated ID in 1.2?"

    Cris,
    Grr, Tomcat again!
    I'll eventually try my webapp with versions 5.5.8 and 5.5.7... Unfortunately, I can't relocate my
    JNDI resources to the server.xml because of our access policies to production environment in our
    structure ;-)
    By the way, the main goal of using JNDI resources was to use DBCP, so I will also try to use the
    DBCPDataSourceFactory of Cayenne instead of the JNDIDataSourceFactory...

    Thanks
    Julien Vignali

    Cris Daniluk a écrit :
    > This sounds like a Tomcat bug to me. I've actually had a few similar
    > bugs to this using Tomcat 5.5.x - so much so that I gave up and rolled
    > back to 5.0. If you need something in 5.5, try 5.5.7 or 5.5.8 maybe?
    >
    > Incidentally, I've had problems with some of the 5.0.x releases as
    > well... various things that behave entirely different between
    > sub-releases such as JSP compiling. I am starting to get nervous about
    > the future of Tomcat..
    >
    > As a bandaid, try relocating the JNDI context to the server.xml. It's
    > obviously not the best solution, but it should work.
    >
    > On 5/25/05, Julien Vignali <julien.vignal..im.hcuge.ch> wrote:
    >
    >>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 - 11:27:21 EDT