Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

Reply to the mail(import files error)

Ads

 
 

Share on Google+Share on Google+

prajula kottai
Reply to the mail(import files error)
2 Answer(s)      6 years and 9 months ago
Posted in : Hibernate

Hi! Thank you. That error has gone and i have worked out an example, but its giving a null pointer exception as

org.hibernate.MappingException: Error reading resource: contact.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:447) 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 roseindia.tutorial.hibernate.Wtc.main(Wtc.java:14) Caused by: org.hibernate.MappingException: duplicate import: roseindia.tutorial.hibernate.Contact at org.hibernate.cfg.Mappings.addImport(Mappings.java:100) at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:538) at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:485) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:231) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:149) at org.hibernate.cfg.Configuration.add(Configuration.java:358) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:395) at org.hibernate.cfg.Configuration.addResource(Configuration.java:444) ... 7 more Exception in thread "main" java.lang.NullPointerException at roseindia.tutorial.hibernate.Wtc.main(Wtc.java:21)

Ads
View Answers

October 19, 2010 at 4:36 PM


Hi,

In the Hibernate application is it necessary to place the contact.hbm.xml file in class path.

So, you can put the contact.hbm.xml in src directory or in bin directory of your eclipse project.

So, just try out both and try to fix the error.

Remember in mind that contact.hbm.xml must be present the classpath.

Thanks



October 19, 2010 at 5:54 PM



Ads









Related Tutorials/Questions & Answers:
Reply to the mail(import files error)
Reply to the mail(import files error)  Hi! Thank you. That error has...-to-the-mail(import-files-error).html Thanks... as org.hibernate.MappingException: Error reading resource: contact.hbm.xml
Reply to the mail(import files error)
Reply to the mail(import files error)  Hi Its already there in the bin. If its class path should be set , how can i do dat?   Hi, Wait for 20 minutes. I will send you link to download new project file. You should
Advertisements
Reply to ur mail(Hibernate Error)
Reply to ur mail(Hibernate Error)  Hi! Im using Eclipse. Steps : 1. Downloaded the example code and library from rose india and extracted the content in a directory. 2. Downloaded file contains the Eclipse project. 3. Started
reply to the mail
reply to the mail  Hi! which jar file needed to be added? Thanks   Question not clear
java mail error - JavaMail
java mail error  how to rceive emails using java mail api  Hi Friend, We can use Java Mail APIs to send and receive mails in Java.... Please visit the following link to know more about use of Java Mail API. http
mail
mail  I wrote a program to send mail using smtp. But there is an error message " could not connect to smtp.gmail.com port 465. what is the problem how can i solve it ...   Please visit the following link: Java Mail API
please solve this error Warning: mail() [function.mail]:
please solve this error Warning: mail() [function.mail]:   please solve this error Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing
mail
mail  how to send mail using jsp   Please visit the following links: JSP Send Mail Java Mail Tutorials
reply must
reply must  is it critical to do a software job based on games(java) i know core java & advanced java basics only please give me answer
Reply - Struts
net.roseindia; import com.opensymphony.xwork2.ActionSupport; import
java mail
the working of java mail.plz help me. Reply so on. Thanks, mohit   Hi Friend... Mail API is now open source and you can download the source code and read. If you want to understand the working of Java Mail download the source code from here
Reply Me - Struts
Reply Me  Hi Friends, Please write the code using form element...because i got error in textbox null value  Hi Soniya Would you please explain, in which technology are you creating page? I promise
reply me - Java Beginners
reply me  Hi, user enter vend_id in text box ten open the addform.jsp In the addform.jsp have two button Update and delete... minutes User click update button then give the error plz chk my code what
Introduction of Java Mail
with attached files. Introduction to Java Mail API... Introduction of Java Mail       In this section we will describe Java Mail examples to be used
Reply Me - Java Beginners
Reply Me  Hi Amardeep I am sending database table name,code and db file please insert this data in this table its very urgent.... My project deadline is very near this code i am using then i got the some error
Reply Me - Java Beginners
Reply Me  Hi, This is not correct url please send me again coorect url
Reply me - Java Beginners
Reply me  Hi,   Hi Ragini please specify main problem. where are problem in your code. Thanks
java mail
(MailClient.java:90) help me clear this error..send suggestions to mail mail...java mail  import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; import java.util.Properties; public class MailClient
when sending the mail from java I am getting the below error - JavaMail
when sending the mail from java I am getting the below error   when sending the mail from java I am getting the below error : Exception... not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/mail/mail.jar,file
reply - Java Beginners
reply  Hi friends I have a 255 fields i want to insert data in the table please let me know how to insert data in the database please reply me its very urgent
Reply me - Java Beginners
Reply me  Hi Friends, Quest:- Tell em what is the difference between java and php, dotnet Quest:- what is the similar point of php and java... Please tell me its very urgent
Reply me soon.........
Reply me soon.........  Any body plzz help.....how to get d checked details from previous page to current page and den insert into table
Reply Me - Java Beginners
Reply Me  Hi,.. I have a some fields in one form like security and some more fields this fields maintain the table if user click security... question then reply me
Reply Me - Java Beginners
Reply Me  Hi All, I want to using query string in my page please write the query string in java script and send me and I have a some link...=13c222b87273340cf002bfba4ab9d045. please reply me fast its urgent
Reply me - Java Beginners
Reply me  Hi, this code is .java file but i am working in jsp... tell me its urgent package services; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement
Reply Me - Java Beginners
table and reply me fast...I got two error 1 is catch is without try 2 is try...Reply Me   Hi I am sending some code please check it and solve...) { out.println("<hr><font size='2' face='arial'><b>Error: Records
Reply me - Java Beginners
Reply me  If u r not understood my just posted question plz let me know  Hi Ragini, Please specify your requirements in detail. It would be good for me to provide you the solution if problem is clear. And also
java mail
java mail  By Which code or function i can send E-mail to given E-mail Address   Hi Friend, Please visit the following link: Java Mail Thanks   Hi Friend, Please visit the following link: Java Mail
java mail
java mail example  how to download javamail software give one examples   Please visit the following link: Java Mail API
Reply Me - Java Beginners
Reply Me  Hi Rajnikant, I know MVC Architecture but how can use this i don't know... please tell me what is the use...,html files Model contian bean class and pojo class through which we interact