Pessoal estou montando uma aplicação com hibernate e firebird. Mas ta dando um erro. Alguém pode me ajudar. Obrigado.
[code]
<session-factory>
<property name = "hibernate-dialect">org.hibernate.dialect.FirebirdDialect</property>
<property name = "hibernate.connection.driver_class">org.firebirdsql.jdbc.FBDriver</property>
<property name = "hibernate.connection.url">jdbc:firebirdsql:localhost/3050:D:\Clauber\Java\hibernate\banco\BANCO.GDB</property>
<property name = "hibernate.connection.username">SYSDBA</property>
<property name = "hibernate.connection.password">masterkey</property>
<!-- Configuração do c3p0 -->
<property name = "hibernate.c3p0.max_size">10</property>
<property name = "hibernate.c3p0.min_size">2</property>
<property name = "hibernate.c3p0.timeout">5000</property>
<property name = "hibernate.c3p0.max_statements">10</property>
<property name = "hibernate.c3p0.idle_test_period">3000</property>
<property name = "hibernate.c3p0.acquire_increment">2</property>
<!-- Configurações de Debug -->
<property name = "show_sql">true</property>
<property name = "hibernate.hbm2ddl.auto">create</property>
<property name = "hibernate.generate_statistics">true</property>
<property name = "hibernate.use_sql_comments">true</property>
<mapping resource = "Curso.hbm.xml"/>
<mapping resource = "Disciplina.hbm.xml"/>
<mapping resource = "Turma.hbm.xml"/>
<mapping resource = "Pessoa.hbm.xml"/>
<mapping resource = "Aluno.hbm.xml"/>
<mapping resource = "Professor.hbm.xml"/>
<mapping resource = "Endereco.hbm.xml"/>
</session-factory>
[/code]
Olhem o erro que tah dando
org.hibernate.HibernateException: problem parsing configuration/hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1173)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)
at util.HibernateUtility.<clinit>(HibernateUtility.java:16)
at Principal.main(Principal.java:14)
Caused by: org.hibernate.MappingException: invalid configuration
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1169)
... 4 more
Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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:465)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
... 4 more
Exception in thread "main" java.lang.NullPointerException
at util.HibernateUtility.getSession(HibernateUtility.java:27)
at Principal.main(Principal.java:14)