-->
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: errors
PostPosted: Tue Sep 18, 2012 3:50 pm 
Newbie

Joined: Tue Sep 18, 2012 3:40 pm
Posts: 1
i am getting following errors...plz help me!i have put Customer.hbm.xml in a package(com.jlcindia.hibernate) and hibernate config file in src folder..
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.jlcindia.hibernate.Lab1Client.main(Lab1Client.java:11)
Caused by: org.hibernate.MappingException: Resource: com.jlcindia.hibernate.Customer.hbm.xml not found
at org.hibernate.cfg.Configuration.addResource(Configuration.java:442)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1381)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1353)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1335)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1302)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1230)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1216)
at com.jlcindia.hibernate.CHibernateUtil.<clinit>(CHibernateUtil.java:11)
... 1 more
**********hibernate.cfg.xml-
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/jlcdb1</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<!-- Mapping files -->
<mapping resource="com.jlcindia.hibernate.Customer.hbm.xml" />
</session-factory>
</hibernate-configuration>
**************Customer.hbm.xml
<hibernate-mapping>
<class name="com.jlcindia.hibernate.Customer" table="customers">
<id name="cid" type="int" column="cid" >
<generator class="increment"/>
</id>
<property name="cname" \>
<property name="email" \>
<property name="phone" type="long"\>
<property name="email" \>
<property name="city" column="city" type="String" \>
</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.