Estou iniciando com o hibernate. Criei o banco, os beans, mapeamentos e o hibernate.cfg.xml. Não sei porque, está dando o seguinte erro quando eu faço uma operação, neste caso, listagem de Estados:
[INFO] Environment - Hibernate 3.0
[INFO] Environment - hibernate.properties not found
[INFO] Environment - using CGLIB reflection optimizer
[INFO] Environment - using JDK 1.4 java.sql.Timestamp handling
[INFO] Configuration - configuring from resource: /hibernate.cfg.xml
[INFO] Configuration - Configuration resource: /hibernate.cfg.xml
[DEBUG] DTDEntityResolver - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath under org/hibernate/
[DEBUG] DTDEntityResolver - found http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath
[DEBUG] Configuration - connection.driver_class=org.firebirdsql.jdbc.FBDriver
[DEBUG] Configuration - connection.url=jdbc:firebirdsql://127.0.0.1:3050/D:/CARROS.FDB
[DEBUG] Configuration - connection.username=SYSDBA
[DEBUG] Configuration - connection.password=masterkey
[DEBUG] Configuration - dialect=org.hibernate.dialect.FirebirdDialect
[DEBUG] Configuration - hibernate.show_sql=true
[DEBUG] Configuration - null<-org.dom4j.tree.DefaultAttribute@126804e [Attribute: name resource value "carros/beans/Anuncio.hbm.xml"]
[INFO] Configuration - Mapping resource: carros/beans/Anuncio.hbm.xml
[DEBUG] DTDEntityResolver - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under org/hibernate/
[DEBUG] DTDEntityResolver - http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd not found in classpath
[ERROR] Configuration - Could not configure datastore from input stream <org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net>org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
at org.dom4j.io.SAXReader.read(SAXReader.java:353)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:394)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:445)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1312)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1284)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1266)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1233)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1161)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1147)
at carros.dao.HibernateUtility.<clinit>(HibernateUtility.java:25)
at carros.test.DBTests.doQueryHbm(DBTests.java:56)
at carros.test.DBTests.main(DBTests.java:95)
Nested exception:
java.net.UnknownHostException: hibernate.sourceforge.net
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
at sun.net.www.http.HttpClient.New(HttpClient.java:287)
at sun.net.www.http.HttpClient.New(HttpClient.java:299)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:784)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:736)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:661)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:905)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:334)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:394)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:445)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1312)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1284)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1266)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1233)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1161)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1147)
at carros.dao.HibernateUtility.<clinit>(HibernateUtility.java:25)
at carros.test.DBTests.doQueryHbm(DBTests.java:56)
at carros.test.DBTests.main(DBTests.java:95)
Initial SessionFactory creation failed.org.hibernate.MappingException: Error reading resource: carros/beans/Anuncio.hbm.xml
Exception in thread "main" java.lang.ExceptionInInitializerError
at carros.dao.HibernateUtility.<clinit>(HibernateUtility.java:30)
at carros.test.DBTests.doQueryHbm(DBTests.java:56)
at carros.test.DBTests.main(DBTests.java:95)
Caused by: org.hibernate.MappingException: Error reading resource: carros/beans/Anuncio.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:448)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1312)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1284)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1266)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1233)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1161)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1147)
at carros.dao.HibernateUtility.<clinit>(HibernateUtility.java:25)
... 2 more
Caused by: org.hibernate.MappingException: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:404)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:445)
... 9 more
Caused by: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
at org.dom4j.io.SAXReader.read(SAXReader.java:353)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:394)
... 10 more
Java Result: 1
alguém sabe me informar o que está errado?
obrigado