Hi I am new to hibernate and trying to execute sample tutorial given on hibernate.org site.
I have followed the steps and getting socket creation error.
C:\Java\Hybernate\hibernate-3.2\doc\tutorial>ant run -Daction=store
Buildfile: build.xml
clean:
[delete] Deleting directory C:\Java\Hybernate\hibernate-3.2\doc\tutorial\bin
[mkdir] Created dir: C:\Java\Hybernate\hibernate-3.2\doc\tutorial\bin
copy-resources:
[copy] Copying 12 files to C:\Java\Hybernate\hibernate-3.2\doc\tutorial\bin
[copy] Copied 3 empty directories to 1 empty directory under C:\Java\Hybernate\hibernate-3.2\doc\tutorial\bin
compile:
[javac] Compiling 2 source files to C:\Java\Hybernate\hibernate-3.2\doc\tutorial\bin
run:
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Environment <clinit>
[java] INFO: Hibernate 3.2.3
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Environment <clinit>
[java] INFO: loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cache.prov
rovider, hibernate.max_fetch_depth=1, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.forma
'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=sa, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.
rnate.bytecode.use_reflection_optimizer=false, hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Environment <clinit>
[java] INFO: using java.io streams to persist binary types
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Environment buildBytecodeProvider
[java] INFO: Bytecode provider name : cglib
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Environment <clinit>
[java] INFO: using JDK 1.4 java.sql.Timestamp handling
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Configuration configure
[java] INFO: configuring from resource: /hibernate.cfg.xml
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Configuration getConfigurationInputStream
[java] INFO: Configuration resource: /hibernate.cfg.xml
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Configuration addResource
[java] INFO: Reading mappings from resource : events/Event.hbm.xml
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[java] INFO: Mapping class: events.Event -> EVENTS
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.HbmBinder bindCollection
[java] INFO: Mapping collection: events.Event.participants -> PERSON_EVENT
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Configuration addResource
[java] INFO: Reading mappings from resource : events/Person.hbm.xml
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[java] INFO: Mapping class: events.Person -> PERSON
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.HbmBinder bindCollection
[java] INFO: Mapping collection: events.Person.events -> PERSON_EVENT
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.HbmBinder bindCollection
[java] INFO: Mapping collection: events.Person.emailAddresses -> PERSON_EMAIL_ADDR
[java] Apr 25, 2007 11:11:21 AM org.hibernate.cfg.Configuration doConfigure
[java] INFO: Configured SessionFactory: null
[java] Apr 25, 2007 11:11:21 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[java] INFO: Using Hibernate built-in connection pool (not for production use!)
[java] Apr 25, 2007 11:11:21 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[java] INFO: Hibernate connection pool size: 1
[java] Apr 25, 2007 11:11:21 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[java] INFO: autocommit mode: false
[java] Apr 25, 2007 11:11:21 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[java] INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost
[java] Apr 25, 2007 11:11:21 AM org.hibernate.connection.DriverManagerConnectionProvider configure
[java] INFO: connection properties: {user=sa, password=****}
[java] Apr 25, 2007 11:11:22 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] WARNING: 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:525)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[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:2009)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.createAndStoreEvent(EventManager.java:43)
[java] at events.EventManager.main(EventManager.java:15)
[java] Apr 25, 2007 11:11:22 AM org.hibernate.dialect.Dialect <init>
[java] INFO: Using dialect: org.hibernate.dialect.HSQLDialect
[java] Apr 25, 2007 11:11:23 AM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
[java] INFO: Using default transaction strategy (direct JDBC transactions)
[java] Apr 25, 2007 11:11:23 AM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
[java] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Automatic flush during beforeCompletion(): disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Automatic session close at end of transaction: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Scrollable result sets: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: JDBC3 getGeneratedKeys(): disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Connection release mode: auto
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Maximum outer join fetch depth: 1
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Default batch fetch size: 1
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Generate SQL with comments: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Order SQL updates by primary key: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
[java] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[java] Apr 25, 2007 11:11:23 AM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
[java] INFO: Using ASTQueryTranslatorFactory
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Query language substitutions: {no='N', yes='Y'}
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: JPA-QL strict compliance: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Second-level cache: enabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Query cache: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory createCacheProvider
[java] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Optimize cache for minimal puts: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Cache region prefix: hibernate.test
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Structured second-level cache entries: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Echoing all SQL to stdout
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Statistics: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Deleted entity synthetic identifier rollback: disabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Default entity-mode: pojo
[java] Apr 25, 2007 11:11:23 AM org.hibernate.cfg.SettingsFactory buildSettings
[java] INFO: Named query checking : enabled
[java] Apr 25, 2007 11:11:23 AM org.hibernate.impl.SessionFactoryImpl <init>
[java] INFO: building session factory
[java] Apr 25, 2007 11:11:23 AM org.hibernate.impl.SessionFactoryObjectFactory addInstance
[java] INFO: Not binding factory to JNDI, no JNDI name configured
[java] Apr 25, 2007 11:11:23 AM org.hibernate.tool.hbm2ddl.SchemaExport execute
[java] INFO: Running hbm2ddl schema export
[java] Apr 25, 2007 11:11:23 AM org.hibernate.tool.hbm2ddl.SchemaExport execute
[java] INFO: exporting generated schema to database
[java] Apr 25, 2007 11:11:24 AM org.hibernate.tool.hbm2ddl.SchemaExport execute [java] SEVERE: 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:525)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[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:1294)
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.createAndStoreEvent(EventManager.java:43)
[java] at events.EventManager.main(EventManager.java:15)
[java] Apr 25, 2007 11:11:25 AM org.hibernate.util.JDBCExceptionReporter logExceptions
[java] WARNING: SQL Error: -80, SQLState: 08000
[java] Apr 25, 2007 11:11:25 AM org.hibernate.util.JDBCExceptionReporter logExceptions
[java] SEVERE: socket creation error
[java] Exception in thread "main" org.hibernate.exception.JDBCConnectionException: Cannot open connection
[java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
[java] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
[java] at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
[java] at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
[java] at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
[java] at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
[java] at $Proxy0.beginTransaction(Unknown Source)
[java] at events.EventManager.createAndStoreEvent(EventManager.java:44)
[java] at events.EventManager.main(EventManager.java:15)
[java] Caused by: 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:525)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[java] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
[java] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
[java] ... 12 more
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 7 seconds
C:\Java\Hybernate\hibernate-3.2\doc\tutorial>
|