Why am i getting this error? I have been doing the same thing as usual.
Quote:
sesssion factory failed org.hibernate.InvalidMappingException: Could not parse mapping document from resource database/items/T6Radio.hbm.xml
Exception in thread "main" java.lang.ExceptionInInitializerError
at database.HibernateUtil.<clinit>(HibernateUtil.java:19)
at database.DatabaseManager.getItem(DatabaseManager.java:1014)
at database.DatabaseManager.getTheRefSystem(DatabaseManager.java:955)
at database.DatabaseManager.primeDB(DatabaseManager.java:897)
at main.RTIMSmart.main(RTIMSmart.java:18)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource database/items/T6Radio.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:602)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1621)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1589)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1568)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)
at database.HibernateUtil.<clinit>(HibernateUtil.java:16)
... 4 more
Caused by: org.hibernate.MappingException: class T6Radio not found while looking for property: k_T6Radio
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:97)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:302)
at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:423)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:356)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:295)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:166)
at org.hibernate.cfg.Configuration.add(Configuration.java:702)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:537)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:599)
... 11 more
Caused by: java.lang.ClassNotFoundException: T6Radio
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:93)
... 19 more
Quote:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//hibernate/Hibernate DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="T6Radio" table="T6RADIO">
<id name="k_T6Radio" column="k_T6RADIO">
<generator class="native"/>
</id>
<many-to-one name="TheRtim"
column="K_RTIM"
not-null="true" class="database.items.RTIM"/>
<many-to-one name="ThePort"
column="PORT_ID"
not-null="true" class="database.items.Port"/>
</class>
</hibernate-mapping>
Quote:
package database.items;
public class T6Radio {
private int k_T6Radio;
private RTIM TheRtim ;
private Port ThePort;
public T6Radio(){
}
public RTIM getTheRtim() {
return TheRtim;
}
public void setTheRtim(RTIM theRtim) {
TheRtim = theRtim;
}
public Port getThePort() {
return ThePort;
}
public void setThePort(Port thePort) {
ThePort = thePort;
}
public int getk_T6Radio() {
return k_T6Radio;
}
public void setk_T6Radio(int kT6RADIO) {
k_T6Radio = kT6RADIO;
}
}