users@glassfish.java.net

Re: Unable to find suitable MySQL driver class for Hibernate schema update

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Aug 2009 18:01:44 PDT

I was able to work around this by copying the JAR file which contains the driver class from my application's WEB-INF/lib directory ($GLASSFISH_HOME/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/lib) into the top-level lib directory ($GLASSFISH_HOME/lib). Placing the JAR file into the domain-level lib directory ($GLASSFISH_HOME/domains/domain1) had no effect.

Can anyone comment on why this is happening. My expectation was that all classes needed by my application would first be searched for first in the application's WEB-INF/lib/*.jar files before looking into *.jar files present in the domain and server level lib directories, but this doesn't seem to be the behavior in this case. Is this perhaps an issue with Spring and/or Hibernate monkeying with class loader ordering or something of that nature?

--James
[Message sent by forum member 'monocongo' (monocongo)]

http://forums.java.net/jive/thread.jspa?messageID=359328