-->
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.  [ 3 posts ] 
Author Message
 Post subject: Ant eg task problem on Mac OS X, classloader problem?
PostPosted: Tue Jun 15, 2004 8:03 am 
Newbie

Joined: Tue Jun 15, 2004 7:58 am
Posts: 2
Location: Ann Arbor, MI
Hello,

We're evaluating new persistance tools, and have encountered a problem with the "ant eg" task for Hibernate. We're using Java 1.4.2 on Mac OS X. Can anyone offer a solution to this exception?

Code:
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
     [java] 08:01:18,911  INFO Environment:462 - Hibernate 2.1.4
     [java] 08:01:18,932  INFO Environment:496 - 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.ehcache.hibernate.Provider, 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.connection.pool_size=1}
     [java] 08:01:18,937  INFO Environment:521 - using java.io streams to persist binary types
     [java] 08:01:18,938  INFO Environment:522 - using CGLIB reflection optimizer
     [java] 08:01:18,991  INFO Configuration:347 - Mapping resource: org/hibernate/auction/AuctionItem.hbm.xml
     [java] 08:01:19,920  INFO Binder:229 - Mapping class: org.hibernate.auction.AuctionItem -> AuctionItem
     [java] 08:01:20,165  INFO Configuration:347 - Mapping resource: org/hibernate/auction/Bid.hbm.xml
     [java] 08:01:20,254  INFO Binder:229 - Mapping class: org.hibernate.auction.Bid -> Bid
     [java] 08:01:20,356  INFO Binder:169 - Mapping subclass: org.hibernate.auction.BuyNow -> Bid
     [java] 08:01:20,359  INFO Configuration:347 - Mapping resource: org/hibernate/auction/User.hbm.xml
     [java] 08:01:20,430  INFO Binder:229 - Mapping class: org.hibernate.auction.User -> AuctionUser
     [java] 08:01:20,717  INFO ReflectHelper:176 - reflection optimizer disabled for: org.hibernate.auction.Name, IllegalArgumentException: Cannot find matching method/constructor
     [java] 08:01:20,720  INFO Configuration:613 - processing one-to-many association mappings
     [java] 08:01:20,721  INFO Binder:1168 - Mapping collection: org.hibernate.auction.AuctionItem.bids -> Bid
     [java] 08:01:20,722  INFO Binder:1168 - Mapping collection: org.hibernate.auction.User.bids -> Bid
     [java] 08:01:20,727  INFO Binder:1168 - Mapping collection: org.hibernate.auction.User.auctions -> AuctionItem
     [java] 08:01:20,728  INFO Configuration:622 - processing one-to-one association property references
     [java] 08:01:20,728  INFO Configuration:647 - processing foreign key constraints
     [java] 08:01:20,779  INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.HSQLDialect
     [java] 08:01:20,786  INFO SettingsFactory:58 - Maximim outer join fetch depth: 1
     [java] 08:01:20,794  INFO SettingsFactory:62 - Use outer join fetching: false
     [java] 08:01:20,817  INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!)
     [java] 08:01:20,823  INFO DriverManagerConnectionProvider:43 - Hibernate connection pool size: 1
     [java] 08:01:20,867  INFO DriverManagerConnectionProvider:77 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
     [java] 08:01:20,873  INFO DriverManagerConnectionProvider:78 - connection properties: {user=sa, password=}
     [java] 08:01:20,884  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
     [java] 08:01:21,441  INFO SettingsFactory:102 - Use scrollable result sets: true
     [java] 08:01:21,444  INFO SettingsFactory:105 - Use JDBC3 getGeneratedKeys(): false
     [java] 08:01:21,446  INFO SettingsFactory:108 - Optimize cache for minimal puts: false
     [java] 08:01:21,448  INFO SettingsFactory:117 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
     [java] 08:01:21,449  INFO SettingsFactory:128 - cache provider: net.sf.ehcache.hibernate.Provider
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/hibernate/cache/CacheProvider
     [java]     at java.lang.ClassLoader.defineClass0(Native Method)
     [java]     at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
     [java]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
     [java]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
     [java]     at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
     [java]     at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:99)
     [java]     at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:130)
     [java]     at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
     [java]     at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
     [java]     at org.hibernate.auction.Main.main(Main.java:363)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2004 11:45 am 
Newbie

Joined: Tue Jun 01, 2004 8:06 pm
Posts: 9
Location: Hamilton, Ontario, Canada
Make sure ehcache jar file (for example: ehcache-0.7.jar) is in your classpath environment variable.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 5:52 am 
Newbie

Joined: Tue Jun 15, 2004 7:58 am
Posts: 2
Location: Ann Arbor, MI
Hi, ehcache.jar is in the classpath. We are using Hibernate 2.1.4, with the environment variables being set to:
Code:
JAVA_HOME=/Library/Java/Home
CLASSPATH=.:/opt/lib
CAYENNE_HOME=/Developer/OpenSourceTools/cayenne-1.1M6
CATALINA_HOME=/usr/local/jakarta-tomcat-5.0.24
ANT_HOME=/opt/ant


All Hibernate jars are in opt/lib/.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.