-->
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.  [ 5 posts ] 
Author Message
 Post subject: doesn't work "ant eg",
PostPosted: Mon Jul 05, 2004 6:08 am 
Newbie

Joined: Mon Jul 05, 2004 5:49 am
Posts: 6
i've dowloaded hibernate 2.1.4, extracted it, and then did the folowing:

Demo:

(1) copy your JDBC driver to the lib directory
(2) edit src/hibernate.properties
(3) run "ant eg" or "build eg"
(4) browse the sourcecode in eg/org/hibernate/auction

(1) dont copy anything, (i want to use jsqldb.jar)
(2) don't edit src/hibernate.properties
(3) run "ant eg"
-------------> And got this:


D:\or_mapping\hibernate\hibernate-2.1>build eg

D:\or_mapping\hibernate\hibernate-2.1>set JDBC_DRIVER=C:\mysql\mysql-connector-j
ava-3.0.8-stable-bin.jar

D:\or_mapping\hibernate\hibernate-2.1>java -cp "lib/ant-1.5.3.jar;lib/ant-option
al-1.5.3.jar;lib/junit-3.8.1.jar;lib/xerces-2.4.0.jar;C:\jdk1.3.1/lib/tools.jar"
org.apache.tools.ant.Main -Ddriver.jar=C:\mysql\mysql-connector-java-3.0.8-stab
le-bin.jar eg
Buildfile: build.xml
[taskdef] Could not load definitions from resource clovertasks. It could not b
e found.

eg:
[echo] remember to place your JDBC driver in the lib directory
[java] 16:06:36,050 INFO Environment:462 - Hibernate 2.1.4
[java] 16:06:36,080 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=n
et.sf.ehcache.hibernate.Provider, hibernate.cache.use_query_cache=true, hibernat
e.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.HSQLDialect, hib
ernate.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_ali
as=pool1, hibernate.connection.username=sa, hibernate.cache.region_prefix=hibern
ate.test, hibernate.connection.url=jdbc:hsqldb:., hibernate.connection.password=
, hibernate.connection.pool_size=1}
[java] 16:06:36,090 INFO Environment:521 - using java.io streams to persis
t binary types
[java] 16:06:36,090 INFO Environment:522 - using CGLIB reflection optimize
r
[java] 16:06:36,090 INFO Environment:533 - JVM does not support Statement.
getGeneratedKeys()
[java] 16:06:36,100 INFO Environment:544 - JVM does not support LinkedHasM
ap, LinkedHashSet - ordered maps and sets disabled
[java] 16:06:36,110 INFO Environment:547 - using workaround for JVM bug in
java.sql.Timestamp
[java] 16:06:36,130 INFO Configuration:347 - Mapping resource: org/hiberna
te/auction/AuctionItem.hbm.xml
[java] 16:06:38,073 INFO Binder:229 - Mapping class: org.hibernate.auction
.AuctionItem -> AuctionItem
[java] 16:06:38,504 INFO Configuration:347 - Mapping resource: org/hiberna
te/auction/Bid.hbm.xml
[java] 16:02:25,029 INFO Dialect:82 - Using dialect: net.sf.hibernate.dial
ect.HSQLDialect
[java] 16:02:25,029 INFO SettingsFactory:58 - Maximim outer join fetch dep
th: 1
[java] 16:02:25,039 INFO SettingsFactory:62 - Use outer join fetching: fal
se
[java] 16:02:25,059 INFO DriverManagerConnectionProvider:42 - Using Hibern
ate built-in connection pool (not for production use!)
[java] 16:02:25,059 INFO DriverManagerConnectionProvider:43 - Hibernate co
nnection pool size: 1
[java] 16:02:25,079 INFO DriverManagerConnectionProvider:77 - using driver
: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
[java] 16:02:25,079 INFO DriverManagerConnectionProvider:78 - connection p
roperties: {user=sa, password=}
[java] 16:02:25,109 INFO TransactionManagerLookupFactory:33 - No Transacti
onManagerLookup configured (in JTA environment, use of process level read-write
cache is not recommended)
[java] java.lang.NoClassDefFoundError: java/sql/Savepoint
[java] at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
[java] at org.hsqldb.jdbcDriver.connect(Unknown Source)
[java] at java.sql.DriverManager.getConnection(Unknown Source)
[java] at java.sql.DriverManager.getConnection(Unknown Source)
[java] at net.sf.hibernate.connection.DriverManagerConnectionProvider.g
etConnection(DriverManagerConnectionProvider.java:101)
[java] at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFa
ctory.java:72)
[java] at net.sf.hibernate.cfg.Configuration.buildSettings(Configuratio
n.java:1132)
[java] at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Config
uration.java:766)
[java] at org.hibernate.auction.Main.main(Main.java:363)
[java] Exception in thread "main"

BUILD FAILED
file:D:/or_mapping/hibernate/hibernate-2.1/build.xml:458: Java returned: 1

Total time: 18 seconds


What the problem , i can't understand.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 05, 2004 9:47 pm 
Newbie

Joined: Mon Jul 05, 2004 5:49 am
Posts: 6
up


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 18, 2004 11:58 pm 
Newbie

Joined: Sun Jul 18, 2004 11:54 pm
Posts: 2
Hi Allex,

I'm having the same problem, please share with me how to solve that problem?

Thank u very much in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 12:04 am 
Senior
Senior

Joined: Sat Jul 17, 2004 5:16 pm
Posts: 143
this: java.lang.NoClassDefFoundError: java/sql/Savepoint
makes me think you are using Java 1.3, but some library jar was compiled with 1.4. Savepoint is a 1.4 class and not 1.3. If convenient, just upgrade to Java 1.4 SE. Otherwise, use a different driver than "org.hsqldb". Configure your config file if you want to use a different driver...

For the java version, type: java -version


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 3:56 am 
Newbie

Joined: Tue Jul 06, 2004 4:30 pm
Posts: 6
as a sidenote,
I recently ran the demo with mysql (after giving up on hsql),
and it ran easily (within minutes).
just remember to use 3.0 connector.


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