-->
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: Socket creation error.
PostPosted: Mon Mar 17, 2008 8:04 am 
Newbie

Joined: Mon Mar 17, 2008 7:46 am
Posts: 3
Location: Oxford University Computing Laboratory
Hi,

I'm new to Hibernate and trying to walk through the tutorial example, under WIN XP. I simply copy doc/tutorial, import it as a project in eclipse, and then run build.xml with ant.

However, I got the following errors. I'd really appreciate if someone can guide me through these errors:

1. hibernate.properties not found
2. Configured SessionFactory: null
3. Could not obtain connection metadata
4. java.sql.SQLException: socket creation error
5. schema export unsuccessful

Buildfile:
-- clean and compile
run:
[java] 11:57:07,093 INFO Environment:514 - Hibernate 3.2.6
[java] 11:57:07,109 INFO Environment:547 - hibernate.properties not found
[java] 11:57:07,109 INFO Environment:681 - Bytecode provider name : cglib
[java] 11:57:07,109 INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling
[java] 11:57:07,171 INFO Configuration:1432 - configuring from resource: /hibernate.cfg.xml
[java] 11:57:07,171 INFO Configuration:1409 - Configuration resource: /hibernate.cfg.xml
[java] 11:57:07,484 INFO Configuration:559 - Reading mappings from resource : events/Event.hbm.xml
[java] 11:57:07,578 INFO HbmBinder:300 - Mapping class: events.Event -> EVENTS
[java] 11:57:07,593 INFO HbmBinder:1419 - Mapping collection: events.Event.participants -> PERSON_EVENT
[java] 11:57:07,593 INFO Configuration:559 - Reading mappings from resource : events/Person.hbm.xml
[java] 11:57:07,671 INFO HbmBinder:300 - Mapping class: events.Person -> PERSON
[java] 11:57:07,687 INFO HbmBinder:1419 - Mapping collection: events.Person.events -> PERSON_EVENT
[java] 11:57:07,687 INFO HbmBinder:1419 - Mapping collection: events.Person.emailAddresses -> PERSON_EMAIL_ADDR
[java] 11:57:07,687 INFO Configuration:1547 - Configured SessionFactory: null
[java] 11:57:07,843 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
[java] 11:57:07,843 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
[java] 11:57:07,843 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
[java] 11:57:07,843 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost
[java] 11:57:07,859 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
[java] 11:57:08,906 WARN SettingsFactory:117 - Could not obtain connection metadata
[java] java.sql.SQLException: socket creation error

[java] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
[java] at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
[java] at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
[java] at org.hsqldb.jdbcDriver.connect(Unknown Source)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:154)
[java] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
[java] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
[java] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2073)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1298)
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] 11:57:08,921 INFO Dialect:152 - Using dialect: org.hibernate.dialect.HSQLDialect
[java] 11:57:08,921 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
[java] 11:57:08,921 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[java] 11:57:08,921 INFO SettingsFactory:143 - Automatic flush during beforeCompletion(): disabled
[java] 11:57:08,937 INFO SettingsFactory:147 - Automatic session close at end of transaction: disabled
[java] 11:57:08,937 INFO SettingsFactory:162 - Scrollable result sets: disabled
[java] 11:57:08,937 INFO SettingsFactory:170 - JDBC3 getGeneratedKeys(): disabled
[java] 11:57:08,937 INFO SettingsFactory:178 - Connection release mode: auto
[java] 11:57:08,937 INFO SettingsFactory:205 - Default batch fetch size: 1
[java] 11:57:08,937 INFO SettingsFactory:209 - Generate SQL with comments: disabled
[java] 11:57:08,937 INFO SettingsFactory:213 - Order SQL updates by primary key: disabled
[java] 11:57:08,937 INFO SettingsFactory:217 - Order SQL inserts for batching: disabled
[java] 11:57:08,937 INFO SettingsFactory:386 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[java] 11:57:08,937 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
[java] 11:57:08,937 INFO SettingsFactory:225 - Query language substitutions: {}
[java] 11:57:08,937 INFO SettingsFactory:230 - JPA-QL strict compliance: disabled
[java] 11:57:08,937 INFO SettingsFactory:235 - Second-level cache: enabled
[java] 11:57:08,937 INFO SettingsFactory:239 - Query cache: disabled
[java] 11:57:08,937 INFO SettingsFactory:373 - Cache provider: org.hibernate.cache.NoCacheProvider
[java] 11:57:08,937 INFO SettingsFactory:254 - Optimize cache for minimal puts: disabled
[java] 11:57:08,937 INFO SettingsFactory:263 - Structured second-level cache entries: disabled
[java] 11:57:08,953 INFO SettingsFactory:283 - Echoing all SQL to stdout
[java] 11:57:08,953 INFO SettingsFactory:290 - Statistics: disabled
[java] 11:57:08,953 INFO SettingsFactory:294 - Deleted entity synthetic identifier rollback: disabled
[java] 11:57:08,953 INFO SettingsFactory:309 - Default entity-mode: pojo
[java] 11:57:08,953 INFO SettingsFactory:313 - Named query checking : enabled
[java] 11:57:08,968 INFO SessionFactoryImpl:161 - building session factory
[java] 11:57:09,328 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
[java] 11:57:09,328 INFO SchemaExport:154 - Running hbm2ddl schema export
[java] 11:57:09,328 DEBUG SchemaExport:170 - import file not found: /import.sql
[java] 11:57:09,328 INFO SchemaExport:179 - exporting generated schema to database
[java] 11:57:10,312 ERROR SchemaExport:202 - schema export unsuccessful
[java] java.sql.SQLException: socket creation error

[java] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
[java] at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
[java] at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
[java] at org.hsqldb.jdbcDriver.connect(Unknown Source)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:154)
[java] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
[java] at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:27)
[java] at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:180)
[java] at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
[java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] 11:57:10,312 INFO SessionFactoryImpl:769 - closing
[java] 11:57:10,312 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:hsql://localhost
BUILD SUCCESSFUL
Total time: 5 seconds


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 26, 2008 4:32 pm 
Newbie

Joined: Wed Mar 26, 2008 4:30 pm
Posts: 1
I'm having this exact problem as well.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 26, 2008 5:50 pm 
Newbie

Joined: Mon Mar 17, 2008 7:46 am
Posts: 3
Location: Oxford University Computing Laboratory
I finally figured that out - you have to first invoke HSQL DB and keep it on while you run the ANT build.

Jackie


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2008 9:23 am 
Newbie

Joined: Tue Sep 16, 2008 7:44 am
Posts: 3
jackie.chenwei.wang wrote:
I finally figured that out - you have to first invoke HSQL DB and keep it on while you run the ANT build.

Jackie


You're right Jackie, I had the same problem and your advise works.

Many thanks,

J.

_________________
J.


Top
 Profile  
 
 Post subject: Re: Socket creation error.
PostPosted: Tue Feb 23, 2010 9:25 am 
Newbie

Joined: Tue Feb 23, 2010 9:07 am
Posts: 1
Hi,
I am practicing Spring, I am getting same problem. I am fallowing this link to learn
http://static.springsource.org/docs/Spr ... part5.html

I am getting problem like this,
Buildfile: C:\SpringApp\build.xml
build:
buildtests:
[javac] Compiling 5 source files to C:\SpringApp\war\WEB-INF\classes
[javac] Note: C:\SpringApp\test\springapp\repository\JdbcProductDaoTests.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
dropTables:
[echo] DROP TABLES USING: org.hsqldb.jdbcDriver jdbc:hsqldb:hsql://localhost

BUILD FAILED
C:\SpringApp\build.xml:240: java.sql.SQLException: socket creation error

Total time: 2 seconds

C:\SpringApp\db>java -classpath C:\SpringApp\war\WEB-INF\lib\hsqldb.jar org.hsql
db.Server -database test
[Server@1d58aae]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@1d58aae]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@1d58aae]: Startup sequence initiated from main() method
[Server@1d58aae]: Loaded properties from [C:\SpringApp\db\server.properties]
[Server@1d58aae]: Initiating startup sequence...
[Server@1d58aae]: Server socket opened successfully in 15 ms.
[Server@1d58aae]: Database [index=0, id=0, db=file:test, alias=] opened sucessfu
lly in 125 ms.
[Server@1d58aae]: Startup sequence completed in 140 ms.
[Server@1d58aae]: 2010-02-23 18:52:57.866 HSQLDB server 1.8.0 is online
[Server@1d58aae]: To close normally, connect and execute SHUTDOWN SQL
[Server@1d58aae]: From command line, use [Ctrl]+[C] to abort abruptly


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.