-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: InvalidMappingException
PostPosted: Thu Oct 29, 2009 7:31 pm 
Newbie

Joined: Sun Oct 18, 2009 1:44 am
Posts: 8
Hello Friends I am getting the following errors.Could you please guide me.

Error:

Code:
Exception in thread "main" org.hibernate.InvalidMappingException: Could not parse mapping document from resource customer.hbm.xml
   at org.hibernate.cfg.Configuration.addResource(Configuration.java:523)
   at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511)
   at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
   at org.hibernate.cfg.Configuration.configure(Configuration.java:1352)
   at org.hibernate.cfg.Configuration.configure(Configuration.java:1338)
   at salesOrderSchema.SalesOrderUnmarshaller.main(SalesOrderUnmarshaller.java:36)
Caused by: org.hibernate.MappingException: class salesOrderSchema.Sales.Customer not found while looking for property: nameStyle
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:74)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276)
   at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2164)
   at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2141)
   at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2031)
   at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:359)
   at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
   at org.hibernate.cfg.Configuration.add(Configuration.java:424)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465)
   at org.hibernate.cfg.Configuration.addResource(Configuration.java:520)
   ... 7 more
Caused by: java.lang.ClassNotFoundException: salesOrderSchema.Sales.Customer
   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:100)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:70)
   ... 17 more




cutomer.hbm.xml

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
   
<class name="salesOrderSchema.Sales.Customer" table="SalesLT.Customer">
      
     <id name="customerID" type="int" column="CustomerID" >
      <generator class="identity"/>
     </id>
      
   <property name="nameStyle">
   <column name = "NameStyle"/>
   </property>
    <property name="title">
   <column name="Title"/>
    </property>
    
     <property name="firstName">
      <column name="FirstName"/>
     </property>
    
      <property name="middleName">
      <column name="MiddleName"/>
     </property>
    
     <property name="lastName">
      <column name="LastName"/>
     </property>
    
     <property name="suffix">
      <column name="Suffix"/>
     </property>
    
     <property name="companyName">
      <column name="CompanyName"/>
     </property>
    
     <property name="salesPerson">
      <column name="SalesPerson"/>
     </property>
    
     <property name="emailAddress">
      <column name="EmailAddress"/>
     </property>
    
     <property name="phone">
      <column name="Phone"/>
     </property>
      
   </class>

</hibernate-mapping>



Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.