I am learning the hibernate. I got the follwoing error and I don't know how
to fix it.  Can someone help me?  Thanks.

1. middlegen-hibernate examples finally run successfully. I got three java
and three hbm files (ie Person, Flight, and Reservation).

2. I put the hibernate.properties file in the root of classpath as
instructed. This is my properties file:
### Oracle Database
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:MYDB
hibernate.connection.username=MYNAME
hibernate.connection.password=MYPWD
hibernate.default_schema=NYNAME
hibernate.dialect=net.sf.hibernate.dialect.OracleDialect
hibernate.show_sql=true
hibernate.connection.pool_size 1
## connection pool
hibernate.dbcp.maxActive 100
hibernate.dbcp.whenExhaustedAction 1
hibernate.dbcp.maxWait 120000
hibernate.dbcp.maxIdle 10

3. Use the Hibernate2Session.java from hibernate-examples;

       cfg = new Configuration()
                .addClass(com.brownbear.hibernate.java.Person.class)
                .addClass(com.brownbear.hibernate.java.Flight.class)
                .addClass(com.brownbear.hibernate.java.Reservation.class);

When this line of code is reached, I got the error:

java.lang.NoClassDefFoundError: org/dom4j/Attribute
        at
com.gm.brownbear.hibernate.session.Hibernate2Session.init(Hibernate2Session.java:113)
        at
com.gm.brownbear.hibernate.session.Hibernate2Session.<clinit>(Hibernate2Session.java:21)
Exception in thread "main"


----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------





-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to