I am a newbie and am attempting to configure the Cat example program working with Oracle9ias app server (actually within JDeveloper, but hopefully that won't matter) and an Oracle9i database (using the JDBC OracleDriver from classes12.jar)
Contents of the hibernate.cfg.xml file:
<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory name="java:comp/env/intelinoDS">
<!-- properties -->
<property name="connection.datasource">jdbc/intelinoDS</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="show_sql">true</property>
<!-- mapping files -->
<mapping resource="ex/cat.hbm.xml"/>
</session-factory>
</hibernate-configuration>
============================================
Contents of the Cat.hbm.xml file:
<hibernate-mapping>
<class name="ex.Cat" table="CATS" discriminator-value="C">
<id name="id" column="id" >
<generator class="sequence"/>
</id>
<discriminator column="subclass" type="character"/>
<property name="birthdate" type="date"/>
<property name="color" not-null="true"/>
<property name="sex" not-null="true" update="false"/>
<property name="weight"/>
<subclass name="ex.DomesticCat" discriminator-value="D">
<property name="name" type="string"/>
</subclass>
</class>
</hibernate-mapping>
============================================
Here are the results:
631 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.0.2
872 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Environment - hibernate.properties not found
882 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Environment - using CGLIB reflection optimizer
892 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Environment - JVM proxy support: true
912 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
1392 [HttpRequestHandler-56] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to locate
http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath under net/sf/hibernate/
1603 [HttpRequestHandler-56] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath
1853 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Configuration - connection.datasource=jdbc/intelinoDS
1853 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Configuration - dialect=net.sf.hibernate.dialect.Oracle9Dialect
1853 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Configuration - show_sql=true
1863 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Configuration - java:comp/env/intelinoDS<-org.dom4j.tree.DefaultAttribute@5d [Attribute: name resource value "ex/cat.hbm.xml"]
1863 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Configuration - Mapping resource: ex/cat.hbm.xml
2474 [HttpRequestHandler-56] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
2934 [HttpRequestHandler-56] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
3105 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Binder - Mapping class: ex.Cat -> CATS
3605 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id -> id, type: string
3686 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: birthdate -> birthdate, type: date
3686 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: color -> color, type: string
3686 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: sex -> sex, type: character
3686 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: weight -> weight, type: float
4427 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Binder - Mapping subclass: ex.DomesticCat -> CATS
4427 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: name -> name, type: string
4427 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Configuration - Configured SessionFactory: java:comp/env/intelinoDS
4467 [HttpRequestHandler-56] DEBUG net.sf.hibernate.cfg.Configuration - properties: {show_sql=true, java.vendor=Sun Microsystems Inc., oracle.j2ee.container.version=9.0.3.0.0, connection.datasource=jdbc/intelinoDS, oracle.jms.j2eeCompliant=true, os.name=Windows XP, sun.boot.class.path=C:\jdk1.3.1_08\jre\lib\rt.jar;C:\jdk1.3.1_08\jre\lib\i18n.jar;C:\jdk1.3.1_08\jre\lib\sunrsasign.jar;C:\jdk1.3.1_08\jre\lib\jsse.jar;C:\jdk1.3.1_08\jre\lib\jce.jar;C:\jdk1.3.1_08\jre\lib\charsets.jar;C:\jdk1.3.1_08\jre\classes, oracle.xdkjava.compatibility.version=9.0.3, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.3.1_08-b03, user.name=Norman Klein, hibernate.session_factory_name=java:comp/env/intelinoDS, oc4j.iiop.trustStorePass=123456, user.language=en, java.naming.factory.initial=com.evermind.server.ApplicationInitialContextFactory, sun.boot.library.path=C:\jdk1.3.1_08\jre\bin, com.sun.CORBA.activation.DbDir=C:\ora9ias\jdev\jdev\system9.0.3.1.1107\oc4j-config\orb.db, dialect=net.sf.hibernate.dialect.Oracle9Dialect, java.version=1.3.1_08, user.timezone=America/Los_Angeles, oc4j.iiop.trustStoreLoc=truststore.jks, javax.rmi.CORBA.UtilClass=com.sun.corba.ee.internal.POA.ShutdownUtilDelegate, java.endorsed.dirs=C:\jdk1.3.1_08\jre\lib\endorsed, sun.cpu.isalist=pentium i486 i386, file.encoding.pkg=sun.io, file.separator=\, java.specification.name=Java Platform API Specification, oracle.jms.stronglyTypedSelectors=true, hibernate.cglib.use_reflection_optimizer=true, java.class.version=47.0, java.vm.vendor.url=http://www.oracle.com/, java.home=C:\jdk1.3.1_08\jre, java.vm.info=Copyright (c) 1998-2002 Oracle Corp., nojit, os.version=5.1, oc4j.iiop.keyStorePass=123456, hibernate.connection.datasource=jdbc/intelinoDS, java.awt.fonts=, path.separator=;, java.vm.version=9.0.3.744 cdov, java.protocol.handler.pkgs=com.evermind.protocol, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, com.sun.jts.pi.INTEROP_MODE=false, awt.toolkit=sun.awt.windows.WToolkit, user.home=C:\Documents and Settings\Norman Klein, java.specification.vendor=Sun Microsystems Inc., java.library.path=C:\oracle9i\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\ora9ias\bin;C:\ora9ias\jlib;C:\Program Files\Oracle\jre\1.3.1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\jdk1.3.1_08\bin;C:\Program Files\cvsnt, java.vendor.url=http://java.sun.com/, javax.rmi.CORBA.StubClass=com.sun.corba.se.internal.javax.rmi.CORBA.StubDelegateImpl, oracle.j2ee.dont.use.memory.archive=true, java.vm.vendor=Oracle Corp., hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, oracle.jdbc.J2EE13Compliant=true, java.class.path=C:\ora9ias\jdev\j2ee\home\oc4j.jar, oracle.j2ee.home=C:\ora9ias\jdev\jdev\system9.0.3.1.1107, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, javax.rmi.CORBA.PortableRemoteObjectClass=com.oracle.iiop.javax.rmi.PortableRemoteObjectImpl, sun.cpu.endian=little, oracle.j2ee.container.name=Oracle9iAS (9.0.3.0.0) Containers for J2EE, oracle.vector.deepCopy=false, java.io.tmpdir=C:\DOCUME~1\NORMAN~1\LOCALS~1\Temp\, com.sun.jts.pi.CLIENT_POLICY_CHECKING=false, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\jdk1.3.1_08\jre\lib\ext, oc4j.iiop.keyStoreLoc=keystore.jks, user.dir=C:\ora9ias\jdev\jdev\system9.0.3.1.1107\oc4j-config, line.separator=
, java.vm.name=OJVM Client VM, user.region=US, file.encoding=Cp1252, org.omg.CORBA.ORBClass=com.oracle.iiop.server.OC4JORB, java.specification.version=1.3, hibernate.show_sql=true}
4577 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Configuration - processing one-to-many association mappings
4587 [HttpRequestHandler-56] INFO net.sf.hibernate.cfg.Configuration - processing foreign key constraints
============================================
Unfortunately this results in the following backtrace:
java.lang.NoClassDefFoundError: net/sf/cglib/KeyFactory
void net.sf.hibernate.impl.SessionFactoryImpl.<clinit>()
SessionFactoryImpl.java:297
net.sf.hibernate.SessionFactory net.sf.hibernate.cfg.Configuration.buildSessionFactory()
Configuration.java:627
void ex.TestServlet.initHibernate()
TestServlet.java:117
===========================================
Any help would be appreciated.
thanks, pugmaster