I've a similary error:
Code:
15:48:29,068 INFO Environment:483 - Hibernate 2.1.8
15:48:29,158 INFO Environment:517 - loaded properties from resource hibernate.properties: {hibernate.connection.password=, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.show_sql=true, hibernate.proxool.pool_alias=pool1, hibernate.c3p0.max_statements=0, hibernate.jdbc.batch_size=0, hibernate.cache.use_query_cache=true, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=1, hibernate.connection.pool_size=1, hibernate.connection.username=root, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cache.provider_class=net.sf.hibernate.cache.EhCacheProvider, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/progetto}
15:48:29,218 INFO Environment:542 - using java.io streams to persist binary types
15:48:29,218 INFO Environment:543 - using CGLIB reflection optimizer
15:48:29,729 INFO Environment:572 - using JDK 1.4 java.sql.Timestamp handling
15:48:29,779 INFO Configuration:332 - Mapping resource: com.omeopatici.dati.xml.Utente.hbm.xml
net.sf.hibernate.MappingException: Resource: com.omeopatici.dati.xml.Utente.hbm.xml not found
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:335)
at com.omeopatici.dati.db.operazioni.GestioneUtente.<init>(GestioneUtente.java:46)
at com.omeopatici.dati.db.solotestatute.Accesso.Ins_actionPerformed(Accesso.java:105)
at com.omeopatici.dati.db.solotestatute.Accesso$1.actionPerformed(Accesso.java:85)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5134)
at java.awt.Component.processEvent(Component.java:4931)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3639)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1590)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
15:48:32,593 INFO Configuration:351 - Mapping resource: com/omeopatici/dati/db/struttureDati/Gruppo.hbm.xml
net.sf.hibernate.MappingException: Resource: com/omeopatici/dati/db/struttureDati/Gruppo.hbm.xml not found
at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:353)
at com.omeopatici.dati.db.operazioni.Autenticazione.Autentica(Autenticazione.java:37)
at com.omeopatici.dati.db.solotestatute.Inizio.<init>(Inizio.java:52)
at com.omeopatici.dati.db.solotestatute.Inizio.main(Inizio.java:67)
java.lang.NullPointerException
at com.omeopatici.dati.db.operazioni.Autenticazione.Autentica(Autenticazione.java:76)
at com.omeopatici.dati.db.solotestatute.Inizio.<init>(Inizio.java:52)
at com.omeopatici.dati.db.solotestatute.Inizio.main(Inizio.java:67)
My fileCode:
cfg=new Configuration()
.addResource("com.omeopatici.dati.xml.Utente.hbm.xml")
.addResource("com.omeopatici.dati.xml.Gruppo.hbm.xml")
.addResource("com.omeopatici.dati.xml.Autorizzazioni.hbm.xml")
.setProperty(Environment.HBM2DDL_AUTO, "create");
sf = cfg.buildSessionFactory();
hibernate.cfgCode:
<mapping resource="com/omeopatici/dati/xml/Utente.hbm.xml"/>
<mapping resource="com/omeopatici/dati/xml/Gruppo.hbm.xml"/>
<mapping resource="com/omeopatici/dati/xml/Autorizzazioni.hbm.xml"/>
What I miss?
Where's wrong?