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.
|