E ai pessoal beleza?
Minha dúvida/problema é a seguinte:
No ITEM 1 mostra uma execeção que aparece ao tentar executar uma operação com Hibernate.Este erro só ocorre quando executo via NETBEANS, no ECLIPSE o mesmo projeto funciona normalmente.Utilizo o NETBEANS IDE 5.5 BETA e Hibernate 3.1, o arquivo se encontra na raiz do projeto e o classpath está certo.
No ITEM 2 mostra meu arquivo configurado.
Para que o Netbeans “enxergue” está recurso é necessário configurar em algum lugar?
Se alguém puder ajudar!
Valeu galera.
ITEM 1
org.hibernate.HibernateException: /hibernate.cfg.xml not found
at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1287)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1309)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
at com.hbm.dao.UsuarioDAO.doLogin(UsuarioDAO.java:44)
at com.hbm.controller.UsuarioController.doLogin(UsuarioController.java:47)
at com.hbm.view.Central.btOk(Central.java:123)
at com.hbm.view.Central.access$000(Central.java:16)
at com.hbm.view.Central$1.actionPerformed(Central.java:52)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
ITEM 2
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Parâmetros de conexão ao banco de dados -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@192.168.1.2:1521:xe</property>
<property name="connection.username">jefferson</property>
<property name="connection.password">123</property>
<!-- Pool de conexões interno -->
<property name="connection.pool_size">1</property>
<!-- Dialeto SQL do banco -->
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<!-- Exibe comandos SQL na saída padrão -->
<property name="show_sql">false</property>
<mapping resource="com/hbm/objetos/Usuario.hbm.xml"/>
</session-factory>
</hibernate-configuration>