-->
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.  [ 2 posts ] 
Author Message
 Post subject: mapping exception
PostPosted: Mon Feb 09, 2009 9:52 am 
Newbie

Joined: Mon Feb 09, 2009 9:40 am
Posts: 15
i am new to hibernate...i tried a simple example but it is thowing an exception called mapping exception....please help me .......
i am giving the details


<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping

PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"

"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">


<hibernate-mapping>
<class name="one.first" table="first">
<id name="id" type="int" column="id">
<generator class="identity"/>
</id>
<property name="first" type="string" not-null="true"/>
<property name="second" type="string" not-null="true"/>

</class>

</hibernate-mapping>



<?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>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">pawan</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3307/hibi</property>
<property name="hibernate.connection.username">pawan</property>

<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

<!-- Mapping Files -->
<mapping resource = "one/first.hbm.xml"/>


</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2009 10:50 am 
Senior
Senior

Joined: Tue Aug 01, 2006 9:24 pm
Posts: 120
It would help if you posted the exception.

Also, are you sure one.first is the right class?


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

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.