Subject | Help with Jaybird and Hibernate (inside MyEclipse) |
---|---|
Author | Francisco Antonio Vieira Souza |
Post date | 2005-05-09T09:22Z |
Hi guys,
I wonder if some of you could tell me why I am getting this problem when
trying a very simple application using MyEsclipse, Hibernate and Jaybird.
When I use DB Browser in MyEclipse (to create mapping files) everything
works fine, it connects with success.
My hibernate.cfg.xml file:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="connection.username">SYSDBA</property>
<property
name="connection.url">jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb</property>
<property
name="dialect">net.sf.hibernate.dialect.InterbaseDialect</property>
<property name="connection.password">987</property>
<property
name="connection.driver_class">org.firebirdsql.jdbc.FBDriver</property>
<!-- mapping files -->
<!-- The following mapping element was auto-generated in -->
<!-- order for this file to conform to the Hibernate DTD -->
<mapping resource="br/com/livraria/Cliente.hbm.xml"/>
<mapping resource="br/com/livraria/Livro.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Exception ocurred:
0 [main] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.1.7
10 [main] INFO net.sf.hibernate.cfg.Environment - hibernate.properties
not found
10 [main] INFO net.sf.hibernate.cfg.Environment - using CGLIB
reflection optimizer
41 [main] INFO net.sf.hibernate.cfg.Environment - using JDK 1.4
java.sql.Timestamp handling
61 [main] INFO net.sf.hibernate.cfg.Configuration - configuring from
resource: /hibernate.cfg.xml
61 [main] INFO net.sf.hibernate.cfg.Configuration - Configuration
resource: /hibernate.cfg.xml
481 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to
locate http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd
in classpath under net/sf/hibernate/
481 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in
classpath
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.username=SYSDBA
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.url=jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
dialect=net.sf.hibernate.dialect.InterbaseDialect
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.password=987
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.driver_class=org.firebirdsql.jdbc.FBDriver
551 [main] DEBUG net.sf.hibernate.cfg.Configuration -
null<-org.dom4j.tree.DefaultAttribute@54a328 [Attribute: name resource
value "br/com/livraria/Cliente.hbm.xml"]
551 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping resource:
br/com/livraria/Cliente.hbm.xml
591 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to
locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in
classpath under net/sf/hibernate/
591 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
732 [main] INFO net.sf.hibernate.cfg.Binder - Mapping class:
br.com.livraria.Cliente -> CLIENTE
832 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id ->
ID, type: integer
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: livros,
type: java.util.Collection
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: nome ->
NOME, type: string
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property:
sobrenome -> SOBRENOME, type: string
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: idade
-> IDADE, type: integer
862 [main] DEBUG net.sf.hibernate.cfg.Configuration -
null<-org.dom4j.tree.DefaultAttribute@1a52fdf [Attribute: name resource
value "br/com/livraria/Livro.hbm.xml"]
862 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping resource:
br/com/livraria/Livro.hbm.xml
872 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to
locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in
classpath under net/sf/hibernate/
872 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
922 [main] INFO net.sf.hibernate.cfg.Binder - Mapping class:
br.com.livraria.Livro -> LIVRO
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id ->
ID, type: integer
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: titulo
-> TITULO, type: integer
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: autor
-> AUTOR, type: integer
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property:
disponivel -> DISPONIVEL, type: boolean
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: cliente
-> ID_CLIENTE, type: br.com.livraria.Cliente
922 [main] INFO net.sf.hibernate.cfg.Configuration - Configured
SessionFactory: null
922 [main] DEBUG net.sf.hibernate.cfg.Configuration - properties:
{hibernate.connection.password=987, java.runtime.name=Java(TM) 2 Runtime
Environment, Standard Edition,
sun.boot.library.path=C:\jdk1.5.0_01\jre\bin,
java.vm.version=1.5.0_01-b08, hibernate.connection.username=SYSDBA,
java.vm.vendor=Sun Microsystems Inc.,
java.vendor.url=http://java.sun.com/, path.separator=;,
java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io,
user.country=BR, sun.os.patch.level=Service Pack 2,
java.vm.specification.name=Java Virtual Machine Specification,
user.dir=C:\eclipse\webspace\LivrariaWeb,
java.runtime.version=1.5.0_01-b08,
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment,
java.endorsed.dirs=C:\jdk1.5.0_01\jre\lib\endorsed, os.arch=x86,
java.class.path=C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\classes;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\ant-1.5.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\ant-optional-1.5.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\c3p0-0.8.4.5.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\cglib-full-2.0.2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-collections-2.1.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-dbcp-1.2.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-lang-1.0.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-logging-1.0.4.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-pool-1.2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\concurrent-1.3.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\connector.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\dom4j-1.4.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\ehcache-0.9.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\hibernate2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jaas.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-cache.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-common.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-jmx.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-system.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jcs-1.0-dev.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jdbc2_0-stdext.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jgroups-2.2.7.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jta.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\junit-3.8.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\log4j-1.2.8.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\odmg-3.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\oscache-2.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\proxool-0.8.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\swarmcache-1.0rc2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\xalan-2.4.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\xerces-2.4.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\xml-apis.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\firebirdsql-full.jar,
java.vm.specification.version=1.0, java.home=C:\jdk1.5.0_01\jre,
sun.arch.data.model=32,
hibernate.dialect=net.sf.hibernate.dialect.InterbaseDialect,
hibernate.connection.url=jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb,
user.language=pt, java.specification.vendor=Sun Microsystems Inc.,
awt.toolkit=sun.awt.windows.WToolkit,
hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode,
java.version=1.5.0_01, java.ext.dirs=C:\jdk1.5.0_01\jre\lib\ext,
sun.boot.class.path=C:\jdk1.5.0_01\jre\lib\rt.jar;C:\jdk1.5.0_01\jre\lib\i18n.jar;C:\jdk1.5.0_01\jre\lib\sunrsasign.jar;C:\jdk1.5.0_01\jre\lib\jsse.jar;C:\jdk1.5.0_01\jre\lib\jce.jar;C:\jdk1.5.0_01\jre\lib\charsets.jar;C:\jdk1.5.0_01\jre\classes;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\activation.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\javax.servlet.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\javax.servlet.jsp.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-j2ee.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-jaxrpc.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-jsr77.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-saaj.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\mail.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\namespace.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\xml-apis.jar,
java.vendor=Sun Microsystems Inc.,
connection.driver_class=org.firebirdsql.jdbc.FBDriver, file.separator=\,
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi,
sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little,
sun.desktop=windows,
connection.url=jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb,
dialect=net.sf.hibernate.dialect.InterbaseDialect, sun.cpu.isalist=}
922 [main] INFO net.sf.hibernate.cfg.Configuration - processing
one-to-many association mappings
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Second pass for
collection: br.com.livraria.Cliente.livros
922 [main] INFO net.sf.hibernate.cfg.Binder - Mapping collection:
br.com.livraria.Cliente.livros -> LIVRO
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped collection key:
CLIENTE_FK, one-to-many: br.com.livraria.Livro
922 [main] INFO net.sf.hibernate.cfg.Configuration - processing
one-to-one association property references
932 [main] INFO net.sf.hibernate.cfg.Configuration - processing foreign
key constraints
932 [main] DEBUG net.sf.hibernate.cfg.Configuration - resolving
reference to class: br.com.livraria.Cliente
932 [main] DEBUG net.sf.hibernate.cfg.Configuration - resolving
reference to class: br.com.livraria.Cliente
962 [main] INFO net.sf.hibernate.dialect.Dialect - Using dialect:
net.sf.hibernate.dialect.InterbaseDialect
972 [main] DEBUG
net.sf.hibernate.exception.SQLExceptionConverterFactory - Using dialect
defined converter
982 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use outer join
fetching: true
992 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider - Using
Hibernate built-in connection pool (not for production use!)
992 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider - Hibernate
connection pool size: 20
1032 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider - using
driver: org.firebirdsql.jdbc.FBDriver at URL:
jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb
1032 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider -
connection properties: {user=SYSDBA, password=987}
1042 [main] INFO
net.sf.hibernate.transaction.TransactionManagerLookupFactory - No
TransactionManagerLookup configured (in JTA environment, use of process
level read-write cache is not recommended)
1042 [main] DEBUG
net.sf.hibernate.connection.DriverManagerConnectionProvider - total
checked-out connections: 0
1042 [main] DEBUG
net.sf.hibernate.connection.DriverManagerConnectionProvider - opening
new JDBC connection
2284 [main] WARN net.sf.hibernate.cfg.SettingsFactory - Could not
obtain connection metadata
org.firebirdsql.jdbc.FBSQLException: Resource Exception. Unable to
complete network request to host "localhost".
Reason: Unable to complete network request to host "localhost".
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:112)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
at
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at
net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
at
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
at
br.com.livraria.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:56)
at br.com.livraria.teste.TesteLivraria.main(TesteLivraria.java:35)
at
org.firebirdsql.gds.GDSException: Unable to complete network request to
host "localhost".
at org.firebirdsql.jgds.GDS_Impl.connect(GDS_Impl.java:1720)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:289)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:265)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:562)
at
org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:90)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:388)
at
org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:60)
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:109)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
at
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at
net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
at
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
at
br.com.livraria.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:56)
at br.com.livraria.teste.TesteLivraria.main(TesteLivraria.java:35)
Thanks in advance (and sorry for the long text)
I wonder if some of you could tell me why I am getting this problem when
trying a very simple application using MyEsclipse, Hibernate and Jaybird.
When I use DB Browser in MyEclipse (to create mapping files) everything
works fine, it connects with success.
My hibernate.cfg.xml file:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="connection.username">SYSDBA</property>
<property
name="connection.url">jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb</property>
<property
name="dialect">net.sf.hibernate.dialect.InterbaseDialect</property>
<property name="connection.password">987</property>
<property
name="connection.driver_class">org.firebirdsql.jdbc.FBDriver</property>
<!-- mapping files -->
<!-- The following mapping element was auto-generated in -->
<!-- order for this file to conform to the Hibernate DTD -->
<mapping resource="br/com/livraria/Cliente.hbm.xml"/>
<mapping resource="br/com/livraria/Livro.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Exception ocurred:
0 [main] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.1.7
10 [main] INFO net.sf.hibernate.cfg.Environment - hibernate.properties
not found
10 [main] INFO net.sf.hibernate.cfg.Environment - using CGLIB
reflection optimizer
41 [main] INFO net.sf.hibernate.cfg.Environment - using JDK 1.4
java.sql.Timestamp handling
61 [main] INFO net.sf.hibernate.cfg.Configuration - configuring from
resource: /hibernate.cfg.xml
61 [main] INFO net.sf.hibernate.cfg.Configuration - Configuration
resource: /hibernate.cfg.xml
481 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to
locate http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd
in classpath under net/sf/hibernate/
481 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd in
classpath
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.username=SYSDBA
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.url=jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
dialect=net.sf.hibernate.dialect.InterbaseDialect
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.password=987
541 [main] DEBUG net.sf.hibernate.cfg.Configuration -
connection.driver_class=org.firebirdsql.jdbc.FBDriver
551 [main] DEBUG net.sf.hibernate.cfg.Configuration -
null<-org.dom4j.tree.DefaultAttribute@54a328 [Attribute: name resource
value "br/com/livraria/Cliente.hbm.xml"]
551 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping resource:
br/com/livraria/Cliente.hbm.xml
591 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to
locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in
classpath under net/sf/hibernate/
591 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
732 [main] INFO net.sf.hibernate.cfg.Binder - Mapping class:
br.com.livraria.Cliente -> CLIENTE
832 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id ->
ID, type: integer
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: livros,
type: java.util.Collection
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: nome ->
NOME, type: string
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property:
sobrenome -> SOBRENOME, type: string
862 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: idade
-> IDADE, type: integer
862 [main] DEBUG net.sf.hibernate.cfg.Configuration -
null<-org.dom4j.tree.DefaultAttribute@1a52fdf [Attribute: name resource
value "br/com/livraria/Livro.hbm.xml"]
862 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping resource:
br/com/livraria/Livro.hbm.xml
872 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to
locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in
classpath under net/sf/hibernate/
872 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
922 [main] INFO net.sf.hibernate.cfg.Binder - Mapping class:
br.com.livraria.Livro -> LIVRO
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id ->
ID, type: integer
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: titulo
-> TITULO, type: integer
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: autor
-> AUTOR, type: integer
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property:
disponivel -> DISPONIVEL, type: boolean
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: cliente
-> ID_CLIENTE, type: br.com.livraria.Cliente
922 [main] INFO net.sf.hibernate.cfg.Configuration - Configured
SessionFactory: null
922 [main] DEBUG net.sf.hibernate.cfg.Configuration - properties:
{hibernate.connection.password=987, java.runtime.name=Java(TM) 2 Runtime
Environment, Standard Edition,
sun.boot.library.path=C:\jdk1.5.0_01\jre\bin,
java.vm.version=1.5.0_01-b08, hibernate.connection.username=SYSDBA,
java.vm.vendor=Sun Microsystems Inc.,
java.vendor.url=http://java.sun.com/, path.separator=;,
java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io,
user.country=BR, sun.os.patch.level=Service Pack 2,
java.vm.specification.name=Java Virtual Machine Specification,
user.dir=C:\eclipse\webspace\LivrariaWeb,
java.runtime.version=1.5.0_01-b08,
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment,
java.endorsed.dirs=C:\jdk1.5.0_01\jre\lib\endorsed, os.arch=x86,
java.class.path=C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\classes;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\ant-1.5.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\ant-optional-1.5.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\c3p0-0.8.4.5.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\cglib-full-2.0.2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-collections-2.1.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-dbcp-1.2.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-lang-1.0.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-logging-1.0.4.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\commons-pool-1.2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\concurrent-1.3.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\connector.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\dom4j-1.4.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\ehcache-0.9.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\hibernate2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jaas.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-cache.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-common.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-jmx.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jboss-system.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jcs-1.0-dev.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jdbc2_0-stdext.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jgroups-2.2.7.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\jta.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\junit-3.8.1.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\log4j-1.2.8.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\odmg-3.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\oscache-2.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\proxool-0.8.3.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\swarmcache-1.0rc2.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\xalan-2.4.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\xerces-2.4.0.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\xml-apis.jar;C:\eclipse\webspace\LivrariaWeb\WebRoot\WEB-INF\lib\firebirdsql-full.jar,
java.vm.specification.version=1.0, java.home=C:\jdk1.5.0_01\jre,
sun.arch.data.model=32,
hibernate.dialect=net.sf.hibernate.dialect.InterbaseDialect,
hibernate.connection.url=jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb,
user.language=pt, java.specification.vendor=Sun Microsystems Inc.,
awt.toolkit=sun.awt.windows.WToolkit,
hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode,
java.version=1.5.0_01, java.ext.dirs=C:\jdk1.5.0_01\jre\lib\ext,
sun.boot.class.path=C:\jdk1.5.0_01\jre\lib\rt.jar;C:\jdk1.5.0_01\jre\lib\i18n.jar;C:\jdk1.5.0_01\jre\lib\sunrsasign.jar;C:\jdk1.5.0_01\jre\lib\jsse.jar;C:\jdk1.5.0_01\jre\lib\jce.jar;C:\jdk1.5.0_01\jre\lib\charsets.jar;C:\jdk1.5.0_01\jre\classes;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\activation.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\javax.servlet.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\javax.servlet.jsp.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-j2ee.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-jaxrpc.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-jsr77.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\jboss-saaj.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\mail.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\namespace.jar;C:\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.4\data\libraryset\1.4\xml-apis.jar,
java.vendor=Sun Microsystems Inc.,
connection.driver_class=org.firebirdsql.jdbc.FBDriver, file.separator=\,
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi,
sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little,
sun.desktop=windows,
connection.url=jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb,
dialect=net.sf.hibernate.dialect.InterbaseDialect, sun.cpu.isalist=}
922 [main] INFO net.sf.hibernate.cfg.Configuration - processing
one-to-many association mappings
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Second pass for
collection: br.com.livraria.Cliente.livros
922 [main] INFO net.sf.hibernate.cfg.Binder - Mapping collection:
br.com.livraria.Cliente.livros -> LIVRO
922 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped collection key:
CLIENTE_FK, one-to-many: br.com.livraria.Livro
922 [main] INFO net.sf.hibernate.cfg.Configuration - processing
one-to-one association property references
932 [main] INFO net.sf.hibernate.cfg.Configuration - processing foreign
key constraints
932 [main] DEBUG net.sf.hibernate.cfg.Configuration - resolving
reference to class: br.com.livraria.Cliente
932 [main] DEBUG net.sf.hibernate.cfg.Configuration - resolving
reference to class: br.com.livraria.Cliente
962 [main] INFO net.sf.hibernate.dialect.Dialect - Using dialect:
net.sf.hibernate.dialect.InterbaseDialect
972 [main] DEBUG
net.sf.hibernate.exception.SQLExceptionConverterFactory - Using dialect
defined converter
982 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use outer join
fetching: true
992 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider - Using
Hibernate built-in connection pool (not for production use!)
992 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider - Hibernate
connection pool size: 20
1032 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider - using
driver: org.firebirdsql.jdbc.FBDriver at URL:
jdbc:firebirdsql://localhost:3060/C:\dados\LIVRARIA.fdb
1032 [main] INFO
net.sf.hibernate.connection.DriverManagerConnectionProvider -
connection properties: {user=SYSDBA, password=987}
1042 [main] INFO
net.sf.hibernate.transaction.TransactionManagerLookupFactory - No
TransactionManagerLookup configured (in JTA environment, use of process
level read-write cache is not recommended)
1042 [main] DEBUG
net.sf.hibernate.connection.DriverManagerConnectionProvider - total
checked-out connections: 0
1042 [main] DEBUG
net.sf.hibernate.connection.DriverManagerConnectionProvider - opening
new JDBC connection
2284 [main] WARN net.sf.hibernate.cfg.SettingsFactory - Could not
obtain connection metadata
org.firebirdsql.jdbc.FBSQLException: Resource Exception. Unable to
complete network request to host "localhost".
Reason: Unable to complete network request to host "localhost".
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:112)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
at
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at
net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
at
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
at
br.com.livraria.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:56)
at br.com.livraria.teste.TesteLivraria.main(TesteLivraria.java:35)
at
org.firebirdsql.gds.GDSException: Unable to complete network request to
host "localhost".
at org.firebirdsql.jgds.GDS_Impl.connect(GDS_Impl.java:1720)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:289)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:265)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:562)
at
org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:90)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:388)
at
org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:60)
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:109)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
at
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at
net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
at
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
at
br.com.livraria.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:56)
at br.com.livraria.teste.TesteLivraria.main(TesteLivraria.java:35)
Thanks in advance (and sorry for the long text)