Pessoal, onde pode ser esse erro:
Saida do console do NetBeans:
init:
deps-jar:
compile-single:
run-single:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at utils.ConnectDB.<clinit>(ConnectDB.java:19)
at dao.FreteHibernateDAO.consultarTabela(FreteHibernateDAO.java:29)
at gui.JanelaCadastrarFrete.initComponents(JanelaCadastrarFrete.java:68)
at gui.JanelaCadastrarFrete.<init>(JanelaCadastrarFrete.java:26)
at gui.JanelaCadastrarFrete$2.run(JanelaCadastrarFrete.java:168)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
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:1528)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1035)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:64)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1017)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:64)
at utils.ConnectDB.<clinit>(ConnectDB.java:15)
... 12 more
Caused by: org.dom4j.DocumentException: Error on line 1 of document : The value following "version" in the XML declaration must be a quoted string. Nested exception: The value following "version" in the XML declaration must be a quoted string.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
... 18 more
BUILD SUCCESSFUL (total time: 1 second)
codigo hibernate.cfg.xml:
[code]<?xml version="1.0" encoding="UTF-8"?>
org.postgresql.Driver postgres jdbc:postgresql://localhost:5432/transportadora postgres org.hibernate.dialect.PostgreSQLDialect [/code]