-->
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.  [ 1 post ] 
Author Message
 Post subject: Connection problem
PostPosted: Mon Apr 12, 2004 4:10 am 
Newbie

Joined: Mon Apr 12, 2004 4:06 am
Posts: 1
Hi,

Sorry if asking stupid questions, but I am quite new to Hibernate ...
I tried to use Hibernate 2.1 in some PostgreSql and Eclipse 2.1.2 (on XP, SDK 1.4.1_03, J2EE 1.4 ) test project,
but after getting some NullPointer exceptions on connection I startet back with Examples ...

But he only thing that I can make work there is by using following bat fiile:

> set JDBC_DRIVER=lib/pg74jdbc3.jar
> set CP=lib/ant-1.5.3.jar;lib/ant-optional-1.5.3.jar;lib/junit-3.8.1.jar;lib/xerces-2.4.0.jar;%JAVA_HOME%/lib/tools.jar
> java -cp %CP% org.apache.tools.ant.Main -Ddriver.jar=%JDBC_DRIVER% -f run_eg.xml run_eg

where xpl file is:

<!-- Hibernate ANT Run Script. -->
<project name="Hibernate" default="jar" basedir=".">

<!-- set global properties for this build -->
<property name="src.dir" value="src"/>
<property name="lib.dir" value="lib"/>
<property name="jdbc.dir" value="lib"/>
<property name="egsrc.dir" value="eg"/>
<property name="jar.name" value="hibernate2"/>
<property name="javac.debug" value="on"/>
<property name="javac.optimize" value="off"/>
<target name="run_eg" description="Run simple (eg) example">
<echo message="*** Run eg application"/>
<java
classname="org.hibernate.auction.Main"
fork="true"
failonerror="true">
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<pathelement path="${jar.name}.jar"/>
<pathelement path="${src.dir}"/> <!-- properties files live here -->
<pathelement path="${egsrc.dir}"/>
</classpath>
</java>
<echo message="for more examples, download the hibernate-examples package"/>
</target>

</project>

Here I get:

C:\AppDevelop\hibernate-2.1>java -cp lib/ant-1.5.3.jar;lib/ant-optional-1.5.3.jar;lib/junit-3.8.1.jar;lib/xerces-2.4.0.j
ar;g:\j2sdk1.4.1_03/lib/tools.jar org.apache.tools.ant.Main -Ddriver.jar=lib/pg74jdbc3.jar -f run_eg.xml run_eg
Buildfile: run_eg.xml

==================================================================================
run_eg:
[echo] *** Run eg application
[java] 11:47:49,913 INFO Environment:462 - Hibernate 2.1.2
[java] 11:47:49,933 INFO Environment:496 - loaded properties from resource hibernate.properties: {hibernate.connec
tion.driver_class=org.postgresql.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=n
et.sf.hibernate.cache.HashtableCacheProvider, hibernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hiberna
te.default_shema=public , hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.jdbc.use_streams_for_b
inary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=poo
l1, hibernate.connection.username=karpoal, hibernate.connection.url=jdbc:postgresql://localhost:5432/work, hibernate.con
nection.password=, hibernate.connection.pool_size=1}
[java] 11:47:49,943 INFO Environment:518 - using java.io streams to persist binary types
[java] 11:47:49,943 INFO Environment:519 - using CGLIB reflection optimizer
[java] 11:47:49,953 INFO Configuration:329 - Mapping resource: org/hibernate/auction/AuctionItem.hbm.xml
[java] 11:47:50,594 INFO Binder:229 - Mapping class: org.hibernate.auction.AuctionItem -> AuctionItem
[java] 11:47:50,725 INFO Configuration:329 - Mapping resource: org/hibernate/auction/Bid.hbm.xml
[java] 11:47:50,765 INFO Binder:229 - Mapping class: org.hibernate.auction.Bid -> Bid
[java] 11:47:50,825 INFO Binder:169 - Mapping subclass: org.hibernate.auction.BuyNow -> Bid
[java] 11:47:50,835 INFO Configuration:329 - Mapping resource: org/hibernate/auction/User.hbm.xml
[java] 11:47:50,905 INFO Binder:229 - Mapping class: org.hibernate.auction.User -> AuctionUser
[java] 11:47:51,145 INFO ReflectHelper:160 - reflection optimizer disabled for: org.hibernate.auction.Name, Illega
lArgumentException: Cannot find matching method/constructor
[java] 11:47:51,145 INFO Configuration:595 - processing one-to-many association mappings
[java] 11:47:51,145 INFO Binder:1154 - Mapping collection: org.hibernate.auction.AuctionItem.bids -> Bid
[java] 11:47:51,145 INFO Binder:1154 - Mapping collection: org.hibernate.auction.User.bids -> Bid
[java] 11:47:51,145 INFO Binder:1154 - Mapping collection: org.hibernate.auction.User.auctions -> AuctionItem
[java] 11:47:51,145 INFO Configuration:604 - processing one-to-one association property references
[java] 11:47:51,165 INFO Configuration:629 - processing foreign key constraints
[java] 11:47:51,195 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] 11:47:51,195 INFO SettingsFactory:58 - Maximim outer join fetch depth: 1
[java] 11:47:51,195 INFO SettingsFactory:62 - Use outer join fetching: true
[java] 11:47:51,195 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for pr
oduction use!)
[java] 11:47:51,195 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
[java] 11:47:51,215 INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:pos
tgresql://localhost:5432/work
[java] 11:47:51,215 INFO DriverManagerConnectionProvider:72 - connection properties: {user=karpoal, password=}
[java] 11:47:51,215 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA envir
onment, use of process level read-write cache is not recommended)
[java] 11:47:51,576 INFO SettingsFactory:102 - Use scrollable result sets: true
[java] 11:47:51,576 INFO SettingsFactory:105 - Use JDBC3 getGeneratedKeys(): false
[java] 11:47:51,576 INFO SettingsFactory:108 - Optimize cache for minimal puts: false
[java] 11:47:51,586 INFO SettingsFactory:117 - Query language substitutions: {no='N', yes='Y'}
[java] 11:47:51,586 INFO SettingsFactory:128 - cache provider: net.sf.hibernate.cache.HashtableCacheProvider
[java] 11:47:51,586 INFO Configuration:1080 - instantiating and configuring caches
[java] 11:47:51,626 INFO SessionFactoryImpl:119 - building session factory
[java] 11:47:52,127 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
[java] 11:47:52,137 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] 11:47:52,137 INFO Configuration:595 - processing one-to-many association mappings
[java] 11:47:52,137 INFO Configuration:604 - processing one-to-one association property references
[java] 11:47:52,137 INFO Configuration:629 - processing foreign key constraints
[java] 11:47:52,137 INFO Configuration:595 - processing one-to-many association mappings
[java] 11:47:52,137 INFO Configuration:604 - processing one-to-one association property references
[java] 11:47:52,137 INFO Configuration:629 - processing foreign key constraints
[java] 11:47:52,147 INFO SchemaExport:98 - Running hbm2ddl schema export
[java] 11:47:52,147 INFO SchemaExport:117 - exporting generated schema to database
[java] 11:47:52,147 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for pr
oduction use!)
[java] 11:47:52,157 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
[java] 11:47:52,157 INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:pos
tgresql://localhost:5432/work
[java] 11:47:52,157 INFO DriverManagerConnectionProvider:72 - connection properties: {user=karpoal, password=}
...........................................................................................................................................................................................
...........................................................................................................................................................................................
[java] Viewing auctions containing: DESC with condition: 8/10
[java] Item: 8 - new description

[java] 11:47:55,531 INFO SessionFactoryImpl:531 - closing
[java] 11:47:55,531 INFO DriverManagerConnectionProvider:137 - cleaning up connection pool: jdbc:postgresql://loca
lhost:5432/work
[echo] for more examples, download the hibernate-examples package

BUILD SUCCESSFUL
Total time: 8 seconds
==================================================================================



But when I try to use external Ant (in process I upgraded up to 1.6.1):

> set JDBC_DRIVER=lib/pg74jdbc3.jar
> set CP=lib/xerces-2.4.0.jar;%JAVA_HOME%/lib/tools.jar
>set CLASS_PATH=%CP%;%CLASS_PATH%
> ant -Ddriver.jar=%JDBC_DRIVER% -f run_eg.xml run_eg

Then I get:
==================================================================================
C:\AppDevelop\hibernate-2.1>run_eg_antExt

C:\AppDevelop\hibernate-2.1>set JDBC_DRIVER=lib/pg74jdbc3.jar

C:\AppDevelop\hibernate-2.1>set CP=lib/xerces-2.4.0.jar;g:\j2sdk1.4.1_03/lib/tools.jar

C:\AppDevelop\hibernate-2.1>set CLASS_PATH=lib/xerces-2.4.0.jar;g:\j2sdk1.4.1_03/lib/tools.jar;lib/xerces-2.4.0.jar;g:\j
2sdk1.4.1_03/lib/tools.jar;

C:\AppDevelop\hibernate-2.1>ant -Ddriver.jar=lib/pg74jdbc3.jar -f run_eg.xml run_eg
Buildfile: run_eg.xml

run_eg:
[echo] *** Run eg application
[java] 11:53:56,581 INFO Environment:462 - Hibernate 2.1.2
[java] 11:53:56,601 INFO Environment:496 - loaded properties from resource hibernate.properties: {hibernate.connec
tion.driver_class=org.postgresql.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=n
et.sf.hibernate.cache.HashtableCacheProvider, hibernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hiberna
te.default_shema=public , hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.jdbc.use_streams_for_b
inary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=poo
l1, hibernate.connection.username=karpoal, hibernate.connection.url=jdbc:postgresql://localhost:5432/work, hibernate.con
nection.password=, hibernate.connection.pool_size=1}
[java] 11:53:56,601 INFO Environment:518 - using java.io streams to persist binary types
[java] 11:53:56,601 INFO Environment:519 - using CGLIB reflection optimizer
[java] 11:53:56,621 INFO Configuration:329 - Mapping resource: org/hibernate/auction/AuctionItem.hbm.xml
[java] 11:53:57,232 INFO Binder:229 - Mapping class: org.hibernate.auction.AuctionItem -> AuctionItem
[java] 11:53:57,352 INFO Configuration:329 - Mapping resource: org/hibernate/auction/Bid.hbm.xml
[java] 11:53:57,422 INFO Binder:229 - Mapping class: org.hibernate.auction.Bid -> Bid
[java] 11:53:57,532 INFO Binder:169 - Mapping subclass: org.hibernate.auction.BuyNow -> Bid
[java] 11:53:57,532 INFO Configuration:329 - Mapping resource: org/hibernate/auction/User.hbm.xml
[java] 11:53:57,622 INFO Binder:229 - Mapping class: org.hibernate.auction.User -> AuctionUser
[java] 11:53:57,902 INFO ReflectHelper:160 - reflection optimizer disabled for: org.hibernate.auction.Name, Illega
lArgumentException: Cannot find matching method/constructor
[java] 11:53:57,912 INFO Configuration:595 - processing one-to-many association mappings
[java] 11:53:57,912 INFO Binder:1154 - Mapping collection: org.hibernate.auction.AuctionItem.bids -> Bid
[java] 11:53:57,912 INFO Binder:1154 - Mapping collection: org.hibernate.auction.User.bids -> Bid
[java] 11:53:57,912 INFO Binder:1154 - Mapping collection: org.hibernate.auction.User.auctions -> AuctionItem
[java] 11:53:57,912 INFO Configuration:604 - processing one-to-one association property references
[java] 11:53:57,912 INFO Configuration:629 - processing foreign key constraints
[java] 11:53:57,943 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] 11:53:57,953 INFO SettingsFactory:58 - Maximim outer join fetch depth: 1
[java] 11:53:57,953 INFO SettingsFactory:62 - Use outer join fetching: true
[java] 11:53:57,953 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for pr
oduction use!)
[java] 11:53:57,953 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
[java] 11:53:57,973 INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:pos
tgresql://localhost:5432/work
[java] 11:53:57,973 INFO DriverManagerConnectionProvider:72 - connection properties: {user=karpoal, password=}
[java] 11:53:58,003 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA envir
onment, use of process level read-write cache is not recommended)
[java] 11:53:58,283 WARN SettingsFactory:95 - Could not obtain connection metadata
[java] java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

[java] at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
[java] at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProv
ider.java:97)
[java] at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
[java] at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1119)
[java] at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:748)
[java] at org.hibernate.auction.Main.main(Main.java:363)
[java] 11:53:58,283 INFO SettingsFactory:102 - Use scrollable result sets: false
[java] 11:53:58,283 INFO SettingsFactory:105 - Use JDBC3 getGeneratedKeys(): false
[java] 11:53:58,283 INFO SettingsFactory:108 - Optimize cache for minimal puts: false
[java] 11:53:58,293 INFO SettingsFactory:117 - Query language substitutions: {no='N', yes='Y'}
[java] 11:53:58,293 INFO SettingsFactory:128 - cache provider: net.sf.hibernate.cache.HashtableCacheProvider
[java] 11:53:58,293 INFO Configuration:1080 - instantiating and configuring caches
[java] 11:53:58,373 INFO SessionFactoryImpl:119 - building session factory
[java] 11:53:58,874 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
[java] 11:53:58,874 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] 11:53:58,884 INFO Configuration:595 - processing one-to-many association mappings
[java] 11:53:58,884 INFO Configuration:604 - processing one-to-one association property references
[java] 11:53:58,884 INFO Configuration:629 - processing foreign key constraints
[java] 11:53:58,884 INFO Configuration:595 - processing one-to-many association mappings
[java] 11:53:58,884 INFO Configuration:604 - processing one-to-one association property references
[java] 11:53:58,884 INFO Configuration:629 - processing foreign key constraints
[java] 11:53:58,894 INFO SchemaExport:98 - Running hbm2ddl schema export
[java] 11:53:58,894 INFO SchemaExport:117 - exporting generated schema to database
[java] 11:53:58,894 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for pr
oduction use!)
[java] 11:53:58,894 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
[java] 11:53:58,894 INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:pos
tgresql://localhost:5432/work
[java] 11:53:58,894 INFO DriverManagerConnectionProvider:72 - connection properties: {user=karpoal, password=}
[java] 11:53:59,104 ERROR SchemaExport:165 - schema export unsuccessful
[java] java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

[java] at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
[java] at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProv
ider.java:97)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:119)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:84)
[java] at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:198)
[java] at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
[java] at org.hibernate.auction.Main.main(Main.java:363)
[java] 11:53:59,124 INFO UpdateTimestampsCache:35 - starting update timestamps cache at region: net.sf.hibernate.c
ache.UpdateTimestampsCache
[java] 11:53:59,124 INFO QueryCache:39 - starting query cache at region: net.sf.hibernate.cache.QueryCache
[java] Setting up some test data
[java] 11:53:59,164 INFO DriverManagerConnectionProvider:137 - cleaning up connection pool: jdbc:postgresql://loca
lhost:5432/work
[java] 11:53:59,365 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
[java] 11:53:59,375 ERROR JDBCExceptionReporter:46 - ERROR: SET AUTOCOMMIT TO OFF is no longer supported

[java] 11:53:59,375 ERROR JDBCExceptionReporter:38 - Cannot open connection
[java] java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported
[java] net.sf.hibernate.JDBCException: Cannot open connection
[java] at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:281)
[java] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
[java] at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
[java] at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
[java] at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
[java] at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195)

[java] at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
[java] at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProv
ider.java:97)
[java] at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
[java] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
[java] at org.hibernate.auction.Main.createTestAuctions(Main.java:284)
[java] at org.hibernate.auction.Main.main(Main.java:365)
[java] Caused by: java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

[java] at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
[java] at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
[java] at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProv
ider.java:97)
[java] at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
[java] at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
[java] at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
[java] at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195)
[java] at org.hibernate.auction.Main.createTestAuctions(Main.java:284)
[java] at org.hibernate.auction.Main.main(Main.java:365)
[java] at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
[java] ... 7 more
[java] Exception in thread "main"


BUILD FAILED
C:\AppDevelop\hibernate-2.1\run_eg.xml:24: Java returned: 1

Total time: 4 seconds
C:\AppDevelop\hibernate-2.1>
==================================================================================



Quite similar picture got from under Eclipse:
==================================================================================

12:01:40,588 INFO Environment:462 - Hibernate 2.1.2
12:01:40,648 INFO Environment:496 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.postgresql.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, hibernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hibernate.default_shema=public , hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=karpoal, hibernate.connection.url=jdbc:postgresql://localhost:5432/work, hibernate.connection.password=, hibernate.connection.pool_size=1}
12:01:40,648 INFO Environment:518 - using java.io streams to persist binary types
12:01:40,648 INFO Environment:519 - using CGLIB reflection optimizer
12:01:40,678 INFO Configuration:329 - Mapping resource: org/hibernate/auction/AuctionItem.hbm.xml
12:01:41,559 INFO Binder:229 - Mapping class: org.hibernate.auction.AuctionItem -> AuctionItem
12:01:42,000 INFO Configuration:329 - Mapping resource: org/hibernate/auction/Bid.hbm.xml
12:01:42,060 INFO Binder:229 - Mapping class: org.hibernate.auction.Bid -> Bid
12:01:42,501 INFO Binder:169 - Mapping subclass: org.hibernate.auction.BuyNow -> Bid
12:01:42,501 INFO Configuration:329 - Mapping resource: org/hibernate/auction/User.hbm.xml
12:01:42,631 INFO Binder:229 - Mapping class: org.hibernate.auction.User -> AuctionUser
12:01:43,001 INFO ReflectHelper:160 - reflection optimizer disabled for: org.hibernate.auction.Name, IllegalArgumentException: Cannot find matching method/constructor
12:01:43,021 INFO Configuration:595 - processing one-to-many association mappings
12:01:43,021 INFO Binder:1154 - Mapping collection: org.hibernate.auction.AuctionItem.bids -> Bid
12:01:43,021 INFO Binder:1154 - Mapping collection: org.hibernate.auction.User.bids -> Bid
12:01:43,021 INFO Binder:1154 - Mapping collection: org.hibernate.auction.User.auctions -> AuctionItem
12:01:43,021 INFO Configuration:604 - processing one-to-one association property references
12:01:43,021 INFO Configuration:629 - processing foreign key constraints
12:01:43,172 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
12:01:43,172 INFO SettingsFactory:58 - Maximim outer join fetch depth: 1
12:01:43,172 INFO SettingsFactory:62 - Use outer join fetching: true
12:01:43,212 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:01:43,212 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:01:43,222 INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost:5432/work
12:01:43,222 INFO DriverManagerConnectionProvider:72 - connection properties: {user=karpoal, password=}
12:01:43,272 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
12:01:43,522 WARN SettingsFactory:95 - Could not obtain connection metadata
java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:97)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1119)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:748)
at org.hibernate.auction.Main.main(Main.java:363)
12:01:43,532 INFO SettingsFactory:102 - Use scrollable result sets: false
12:01:43,532 INFO SettingsFactory:105 - Use JDBC3 getGeneratedKeys(): false
12:01:43,532 INFO SettingsFactory:108 - Optimize cache for minimal puts: false
12:01:43,532 INFO SettingsFactory:117 - Query language substitutions: {no='N', yes='Y'}
12:01:43,532 INFO SettingsFactory:128 - cache provider: net.sf.hibernate.cache.HashtableCacheProvider
12:01:43,562 INFO Configuration:1080 - instantiating and configuring caches
12:01:43,772 INFO SessionFactoryImpl:119 - building session factory
12:01:44,594 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
12:01:44,644 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
12:01:44,644 INFO Configuration:595 - processing one-to-many association mappings
12:01:44,644 INFO Configuration:604 - processing one-to-one association property references
12:01:44,644 INFO Configuration:629 - processing foreign key constraints
12:01:44,644 INFO Configuration:595 - processing one-to-many association mappings
12:01:44,644 INFO Configuration:604 - processing one-to-one association property references
12:01:44,644 INFO Configuration:629 - processing foreign key constraints
12:01:44,664 INFO SchemaExport:98 - Running hbm2ddl schema export
12:01:44,674 INFO SchemaExport:117 - exporting generated schema to database
12:01:44,674 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:01:44,674 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:01:44,674 INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost:5432/work
12:01:44,674 INFO DriverManagerConnectionProvider:72 - connection properties: {user=karpoal, password=}
12:01:44,864 ERROR SchemaExport:165 - schema export unsuccessful
java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:97)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:119)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:84)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:198)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
at org.hibernate.auction.Main.main(Main.java:363)
12:01:44,874 INFO UpdateTimestampsCache:35 - starting update timestamps cache at region: net.sf.hibernate.cache.UpdateTimestampsCache
12:01:44,894 INFO QueryCache:39 - starting query cache at region: net.sf.hibernate.cache.QueryCache
Setting up some test data
12:01:45,064 INFO DriverManagerConnectionProvider:137 - cleaning up connection pool: jdbc:postgresql://localhost:5432/work
12:01:45,285 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
12:01:45,285 ERROR JDBCExceptionReporter:46 - ERROR: SET AUTOCOMMIT TO OFF is no longer supported

12:01:45,285 ERROR JDBCExceptionReporter:38 - Cannot open connection
java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:97)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195)
at org.hibernate.auction.Main.createTestAuctions(Main.java:284)
at org.hibernate.auction.Main.main(Main.java:365)
net.sf.hibernate.JDBCException: Cannot open connection
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:281)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195)
at org.hibernate.auction.Main.createTestAuctions(Main.java:284)
at org.hibernate.auction.Main.main(Main.java:365)
Caused by: java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:97)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
... 7 more
Exception in thread "main"
==================================================================================


Could somebody help? The situation seems quite silly :-(((
Sorry for quite long logs .....

BR,
Alexander Karpov


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

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.