Hibernate+firebird

1 resposta
P

Ola a todos,

Alguem poderia me ajudar a resolver o erro abaixo, quando executo minha aplicacao.
uso netbeans 6 + firebird 1.5.

init:

deps-jar:

compile:

run:

10:21:27,671  INFO Environment:514 - Hibernate 3.2.4

10:21:27,687  INFO Environment:532 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.firebirdsql.jdbc.FBDriver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.max_fetch_depth=1, hibernate.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.substitutions=yes Y, no N, hibernate.proxool.pool_alias=pool1, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:firebirdsql:localhost/3050:/sistemas/bdistribuidor/bdistribuidor.fdb, hibernate.bytecode.use_reflection_optimizer=false, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1}

10:21:27,687  INFO Environment:563 - using <a href="http://java.io">java.io</a> streams to persist binary types

10:21:27,687  INFO Environment:681 - Bytecode provider name : cglib

10:21:27,687  INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling

10:21:27,734  INFO Configuration:1426 - configuring from resource: /hibernate.cfg.xml

10:21:27,734  INFO Configuration:1403 - Configuration resource: /hibernate.cfg.xml

10:21:27,796 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(9) The processing instruction target matching [xX][mM][lL] is not allowed.

Exception in thread AWT-EventQueue-0 br.com.boreal.DataAccessLayerException: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml

at br.com.boreal.HibernateFactory.buildIfNeeded(HibernateFactory.java:32)

at br.com.boreal.AbstractDao.<init>(AbstractDao.java:21)

at br.com.boreal.CidadeDao.<init>(CidadeDao.java:11)

at br.com.boreal.Cidade.<init>(Cidade.java:20)

at br.com.boreal.Principal$abreCidade.actionPerformed(Principal.java:177)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

at java.awt.Component.processMouseEvent(Component.java:6038)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)

at java.awt.Component.processEvent(Component.java:5803)

at java.awt.Container.processEvent(Container.java:2058)

at java.awt.Component.dispatchEventImpl(Component.java:4410)

at java.awt.Container.dispatchEventImpl(Container.java:2116)

at java.awt.Component.dispatchEvent(Component.java:4240)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)

at java.awt.Container.dispatchEventImpl(Container.java:2102)

at java.awt.Window.dispatchEventImpl(Window.java:2429)

at java.awt.Component.dispatchEvent(Component.java:4240)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Caused by: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml

at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1494)

at org.hibernate.cfg.Configuration.configure(Configuration.java:1428)

at org.hibernate.cfg.Configuration.configure(Configuration.java:1414)

at br.com.boreal.HibernateFactory.configureSessionFactory(HibernateFactory.java:77)

at br.com.boreal.HibernateFactory.buildIfNeeded(HibernateFactory.java:30)

 30 more

Caused by: org.dom4j.DocumentException: Error on line 9 of document  : The processing instruction target matching [xX][mM][lL] is not allowed. Nested exception: The processing instruction target matching [xX][mM][lL] is not allowed.

at org.dom4j.io.SAXReader.read(SAXReader.java:482)

at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484)

 34 more

BUILD SUCCESSFUL (total time: 5 seconds)

1 Resposta

P

Consegui resolver.
Era erro na formatacao dos arquivos xml e tambem no bean.

Criado 31 de dezembro de 2007
Ultima resposta 31 de dez. de 2007
Respostas 1
Participantes 1