-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: "ant eg" - failed :(
PostPosted: Tue Dec 21, 2004 6:16 pm 
Newbie

Joined: Tue Dec 21, 2004 6:03 pm
Posts: 4
Hibernate version: 2.1
Name and version of the DB: Apache Tomcat 5.5


I'm a first time user of hibernate...

Ant works fine, but when I fire the command "ant eg"; It fails - marked in red below :( -

As a first time user, I searched the web a few hours, but it seems that step 2 ->edit etc/hibernate.properties, specifying values for your database (Hibernate will create a schema for the demo automatically) is natural for everyone, except me? I didn't edited this file. I'm using Tomcat en Tomcat is running.

Can someone help me any further?

Thanks in advance!!

Rising Sun



Buildfile: build.xml
[taskdef] Could not load definitions from resource clovertasks. It could not be found.

eg:
[echo] Remember to place your JDBC driver in the lib directory!
[echo] This target is not runable from a CVS export/checkout!
[java] 22:52:07,458 INFO Environment:478 - Hibernate 2.1.7
[java] 22:52:07,468 INFO Environment:512 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=net.sf.hibernate.cache.EhCacheProvider, hibernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.HSQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=sa, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:hsqldb:., hibernate.connection.password=, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1}
[java] 22:52:07,478 INFO Environment:537 - using java.io streams to persist binary types
[java] 22:52:07,478 INFO Environment:538 - using CGLIB reflection optimizer
[java] 22:52:07,478 INFO Environment:567 - using JDK 1.4 java.sql.Timestamp handling
[java] 22:52:07,488 INFO Configuration:350 - Mapping resource: org/hibernate/auction/AuctionItem.hbm.xml
[java] 22:52:08,008 INFO Binder:230 - Mapping class: org.hibernate.auction.AuctionItem -> AuctionItem
[java] 22:52:08,099 INFO Configuration:350 - Mapping resource: org/hibernate/auction/Bid.hbm.xml
[java] 22:52:08,139 INFO Binder:230 - Mapping class: org.hibernate.auction.Bid -> Bid
[java] 22:52:08,179 INFO Binder:170 - Mapping subclass: org.hibernate.auction.BuyNow -> Bid
[java] 22:52:08,189 INFO Configuration:350 - Mapping resource: org/hibernate/auction/User.hbm.xml
[java] 22:52:08,249 INFO Binder:230 - Mapping class: org.hibernate.auction.User -> AuctionUser
[java] 22:52:08,419 INFO ReflectHelper:186 - reflection optimizer disabled for: org.hibernate.auction.Name, IllegalArgumentException: Cannot find matching method/constructor
[java] 22:52:08,419 INFO Configuration:632 - processing one-to-many association mappings
[java] 22:52:08,419 INFO Binder:1182 - Mapping collection: org.hibernate.auction.AuctionItem.bids -> Bid
[java] 22:52:08,419 INFO Binder:1182 - Mapping collection: org.hibernate.auction.User.bids -> Bid
[java] 22:52:08,419 INFO Binder:1182 - Mapping collection: org.hibernate.auction.User.auctions -> AuctionItem
[java] 22:52:08,419 INFO Configuration:641 - processing one-to-one association property references
[java] 22:52:08,419 INFO Configuration:666 - processing foreign key constraints
[java] 22:52:08,449 INFO Dialect:86 - Using dialect: net.sf.hibernate.dialect.HSQLDialect
[java] 22:52:08,459 INFO SettingsFactory:70 - Maximim outer join fetch depth: 1
[java] 22:52:08,469 INFO SettingsFactory:74 - Use outer join fetching: true
[java] 22:52:08,479 INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!)
[java] 22:52:08,479 INFO DriverManagerConnectionProvider:43 - Hibernate connection pool size: 1
[java] 22:52:08,479 FATAL DriverManagerConnectionProvider:62 - JDBC Driver class not found: org.hsqldb.jdbcDriver
[java] Exception in thread "main" net.sf.hibernate.HibernateException: JDBC Driver class not found: org.hsqldb.jdbcDriver
[java] at net.sf.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:63)
[java] at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
[java] at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
[java] at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
[java] at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
[java] at org.hibernate.auction.Main.main(Main.java:363)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 21, 2004 6:18 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
[echo] Remember to place your JDBC driver in the lib directory!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2004 5:00 am 
Newbie

Joined: Tue Dec 21, 2004 6:03 pm
Posts: 4
Yes

But is the driver for Tomcat DB not included in the hibernate package?

I guess not :s

Where can I find it?
Is copying enough?
Do I need the edit the hibernate.properties? (what to change?)

Greets and thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2004 3:32 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Read the first chapter of the reference documentation for a Tomcat example. Beware, you should first try to learn Hibernate standalone, as it seems you also don't know much about Tomcat. Make things simple when complexity fails.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2004 4:13 pm 
Newbie

Joined: Tue Dec 21, 2004 6:03 pm
Posts: 4
Thx Christian.

That's what I did these evening...

Next problem:

[b][java] Exception in thread "main" net.sf.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.[b]

I've set the property in the file etc/hibernate.properties
Code:
hibernate.dialect net.sf.hibernate.dialect.MySQLDialect


But it gives an exception??? Do I miss something?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2004 4:17 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Yes, very likely. Please spend more time on your code and setup before coming back to this forum. Read the instructions for the forum as well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.