Hey Emmanuel,
Well, you are right (of course) ... this was one of the problems. I've fixed it. But I think there is something else missing.... (sorry )
This line in HibernatePlugIn is causing it grief:
configuration = (new Configuration()).configure(configFileURL);
_factory = configuration.buildSessionFactory();
I then tried to do it differently. So I wrote:
configuration = new Configuration().addClass(GuavaUser.class);
_factory = configuration.buildSessionFactory();
The thing is, when I looked at the log, it clearly indicated that Hibernate is able to connect to my database. But now I am getting a different type of error:
Below is a piece of the log output ...
INFO: Server startup in 42047 ms
13:04:40,312 INFO Configuration:858 - configuring from url: file:/C:/Apache%20Software/Tomcat%205.0/webapps/build/WEB-INF/classes/hibernate.cfg.xml
13:04:40,328 DEBUG DTDEntityResolver:20 - trying to locate
http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath under net/sf/hibernate/
13:04:40,328 DEBUG DTDEntityResolver:29 - found
http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath
13:04:40,328 DEBUG Configuration:801 - dialect=net.sf.hibernate.dialect.MySQLDialect
13:04:40,343 DEBUG Configuration:801 - connection.username=root
13:04:40,343 DEBUG Configuration:801 - connection.password=
13:04:40,343 DEBUG Configuration:801 - connection.url=jdbc:mysql:///guava
13:04:40,343 DEBUG Configuration:801 - connection.driver_class=com.mysql.jdbc.Driver
13:04:40,343 DEBUG Configuration:801 - show_sql=true
13:04:40,343 DEBUG Configuration:801 - use_outer_join=true
13:04:40,343 DEBUG Configuration:801 - transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory
13:04:40,343 DEBUG Configuration:801 - dbcp.minIdle=1
13:04:40,343 DEBUG Configuration:801 - cache.use_query_cache=true
13:04:40,343 DEBUG Configuration:952 - guava:/hibernate/SessionFactory<-org.dom4j.tree.DefaultAttribute@6691da [Attribute: name resource value "com/tjgrp/guava/timesheet/GuavaUser.hbm.xml"]
13:04:40,343 INFO Configuration:300 - Mapping resource: com/tjgrp/guava/timesheet/GuavaUser.hbm.xml
13:04:40,343 DEBUG DTDEntityResolver:20 - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
13:04:40,359 DEBUG DTDEntityResolver:29 - found
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
13:04:40,375 INFO Binder:225 - Mapping class: com.tjgrp.guava.timesheet.GuavaUser -> guavauser
13:04:40,375 DEBUG Binder:449 - Mapped property: objId -> objId, type: long
13:04:40,375 DEBUG Binder:449 - Mapped property: identifier -> identifier, type: string
13:04:40,375 DEBUG Binder:449 - Mapped property: password -> password, type: string
13:04:40,375 DEBUG Binder:449 - Mapped property: firstName -> firstName, type: string
13:04:40,375 DEBUG Binder:449 - Mapped property: lastName -> lastName, type: string
13:04:40,375 INFO Configuration:998 - Configured SessionFactory: guava:/hibernate/SessionFactory
13:04:40,375 DEBUG Configuration:999 - properties: {show_sql=true, java.vendor=Sun Microsystems Inc., catalina.base=C:\Apache Software\Tomcat 5.0, hibernate.connection.url=jdbc:mysql:///guava, catalina.useNaming=true, os.name=Windows XP, sun.boot.class.path=C:\Apache Software\Tomcat 5.0\common\endorsed\xercesImpl.jar;C:\Apache Software\Tomcat 5.0\common\endorsed\xmlParserAPIs.jar;C:\Program Files\Java\j2re1.4.2_03\lib\rt.jar;C:\Program Files\Java\j2re1.4.2_03\lib\i18n.jar;C:\Program Files\Java\j2re1.4.2_03\lib\sunrsasign.jar;C:\Program Files\Java\j2re1.4.2_03\lib\jsse.jar;C:\Program Files\Java\j2re1.4.2_03\lib\jce.jar;C:\Program Files\Java\j2re1.4.2_03\lib\charsets.jar;C:\Program Files\Java\j2re1.4.2_03\classes, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.4.2_03-b02, user.name=SYSTEM, shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar, hibernate.session_factory_name=guava:/hibernate/SessionFactory, connection.driver_class=com.mysql.jdbc.Driver, user.language=en, java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory, sun.boot.library.path=C:\Program Files\Java\j2re1.4.2_03\bin, dialect=net.sf.hibernate.dialect.MySQLDialect, java.version=1.4.2_03, user.timezone=America/New_York, sun.arch.data.model=32, hibernate.use_outer_join=true, java.endorsed.dirs=C:\Apache Software\Tomcat 5.0\common\endorsed, sun.cpu.isalist=pentium i486 i386, file.encoding.pkg=sun.io, cache.use_query_cache=true, package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans., file.separator=\, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, hibernate.dbcp.minIdle=1, user.country=US, connection.url=jdbc:mysql:///guava, java.home=C:\Program Files\Java\j2re1.4.2_03, java.vm.info=mixed mode, os.version=5.1, transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory, hibernate.transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory, path.separator=;, connection.password=, java.vm.version=1.4.2_03-b02, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, hibernate.connection.password=, user.variant=, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=root, package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper., java.naming.factory.url.pkgs=org.apache.naming, user.home=C:\Documents and Settings\LocalService, java.specification.vendor=Sun Microsystems Inc., java.library.path=C:\Program Files\Java\j2re1.4.2_03\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32;C:\j2sdk1.4.2_03\bin, java.vendor.url=http://java.sun.com/, hibernate.connection.driver_class=com.mysql.jdbc.Driver, connection.username=root, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, common.loader=${catalina.home}/common/classes,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=C:\Apache Software\Tomcat 5.0\bin\bootstrap.jar, use_outer_join=true, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, catalina.home=C:\Apache Software\Tomcat 5.0, hibernate.cache.use_query_cache=true, sun.cpu.endian=little, sun.os.patch.level=Service Pack 1, java.io.tmpdir=C:\WINDOWS\TEMP\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, server.loader=${catalina.home}/server/classes,${catalina.home}/server/lib/*.jar, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\Program Files\Java\j2re1.4.2_03\lib\ext, user.dir=C:\Apache Software\Tomcat 5.0, dbcp.minIdle=1, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, file.encoding=Cp1252, java.specification.version=1.4, hibernate.show_sql=true}
13:04:40,390 INFO Configuration:584 - processing one-to-many association mappings
13:04:40,390 INFO Configuration:593 - processing one-to-one association property references
13:04:40,406 INFO Configuration:618 - processing foreign key constraints
13:04:40,406 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect
13:04:40,406 INFO SettingsFactory:62 - Use outer join fetching: true
13:04:40,406 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
13:04:40,406 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
13:04:40,406 INFO DriverManagerConnectionProvider:71 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql:///guava
13:04:40,406 INFO DriverManagerConnectionProvider:72 - connection properties: {user=root, password=}
13:04:40,406 INFO TransactionFactoryFactory:31 - Transaction strategy: net.sf.hibernate.transaction.JDBCTransactionFactory
13:04:40,421 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
13:04:40,421 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
13:04:40,421 DEBUG DriverManagerConnectionProvider:94 - opening new JDBC connection
13:04:40,437 DEBUG DriverManagerConnectionProvider:100 - created connection to: jdbc:mysql:///guava, Isolation Level: 4
13:04:40,437 DEBUG DriverManagerConnectionProvider:114 - returning connection to pool, pool size: 1
13:04:40,437 INFO SettingsFactory:89 - Use scrollable result sets: true
13:04:40,437 INFO SettingsFactory:90 - JDBC 2 max batch size: 15
13:04:40,437 INFO SettingsFactory:96 - echoing all SQL to stdout
13:04:40,437 INFO SettingsFactory:99 - Query language substitutions: {}
13:04:40,437 INFO SettingsFactory:110 - cache provider: net.sf.ehcache.hibernate.Provider
13:04:40,437 INFO Configuration:1057 - instantiating and configuring caches
AT THIS POINT (I get the following exception, which is the line I mentioned at the beginning of this message):
13:04:40,453 ERROR HibernatePlugIn:121 - Exception while initializing Hibernate.
13:04:40,453 ERROR HibernatePlugIn:122 - Rethrowing exception...
java.lang.NoClassDefFoundError
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:739)
at edu.arbor.util.plugin.HibernatePlugIn.initHibernate(HibernatePlugIn.java:113)
at edu.arbor.util.plugin.HibernatePlugIn.init(HibernatePlugIn.java:91)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:868)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:712)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:187)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
13:04:40,484 INFO DriverManagerConnectionProvider:137 - cleaning up connection pool: jdbc:mysql:///guava
Thank you so much for all your help...