Home Tutorialhelp Comment Getting the Exception while executing the hibernat

 
 

Comment

phanib
Getting the Exception while executing the hibernat,
June 24, 2008 at 8:08 PM

While executing the Hibernet application i am getting the following error.
C:\Hiber>java FirstExample
Jun 24, 2008 7:59:54 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.0rc1
Jun 24, 2008 7:59:54 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Jun 24, 2008 7:59:54 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Jun 24, 2008 7:59:54 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Jun 24, 2008 7:59:54 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Jun 24, 2008 7:59:54 PM org.hibernate.cfg.Configuration getConfigurationInputStr
eam
INFO: Configuration resource: /hibernate.cfg.xml
Exception in thread "main" java.lang.NullPointerException
at FirstExample.main(FirstExample.java:34)

C:\Hiber>


any one please help me.

Thanks
-phanib
View All Comments
Advertisement
Related Tutorial and Articles
Programming Questions

Question-Answer Guidelines
Question-Answer Guidelines How to ask questions... Question-Answer Guidelines Disclaimer RoseIndia does... and rating the articles/ tutorials. Same like this, question-answer section 

Java Beginners

while executing a java program
while executing a java program  while iam executing a simple java program after i type "java simple.java" there was a an error occuring.the error is "exception in thread "main" java.lang.noclassdeffounderror:simple" what thus 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception   sir i am Getting following exception when executing javax.servlet.ServletException: java.lang.NoClassDefFoundError: org...(0); Iterator rowIter = mySheet.rowIterator(); while (rowIter.hasNext 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception  Dear sir,while executing this code i am getting... of a is " + f); } } //following is an exception org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/newTestMES3.jsp at line 

Spring Framework Questions

getting classnotfound exception while running login application
getting classnotfound exception while running login application  hi, I am getting Error creating bean with name 'urlMapping' defined... to bean 'loginController' while setting bean property 'urlMap' with key 

Programming Tutorials

Articles - Articles Submission Guidelines
Articles - Articles Submission Guidelines   ... for getting your work published within reputed newspapers and publication websites... people. While you can easily find numerous people who love writing articles, many 

Programming Questions

Question Answer
? Browse Latest Questions Question-Answer Guidelines... website. If you found the question you can read the answer if it solves your... question. Facing Programming Problem? Are you facing problem while 

Java Beginners

pls answer these question
pls answer these question  Write a program that prompts the user to input the length and width of a rectangle. Then calculate and prints...{ public static void main(String[] args)throws Exception{ BufferedReader br 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception  Dear Sir , While sending a mail am getting an following exception javax.mail.MessagingException: 554 mail server permanently rejected message (#5. 3.0)so how to over come from this please help 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception  sir i m Getting an following exception while... SoftWare Engg 10000 javax.mail.MessagingException: IOException while sending message; nested exception is: java.io.FileNotFoundException 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception  sir i changed to that ie InputStream myInput1... exception please help me sir if an changes tel me sir thanks in advance... = mySheet.rowIterator(); while (rowIter.hasNext()) { HSSFRow myRow = (HSSFRow 

Java Server Faces Questions

problem with executing JSF file(Build failed)
problem with executing JSF file(Build failed)  *while executing below code i am getting problem as **init: deps-module-jar: deps-ear-jar: deps... = st.executeQuery(qry); while (rs.next()) { b 

Java Beginners

Question on Checked Exception
Question on Checked Exception   why checked exception force to put try and catch block ? Please send me answer 

Java Beginners

Getting Exception
Getting Exception  How to get exception from commented code in java 

Java Interview Questions

Exception handling in super and subclass while implementing inheritance,,?
Exception handling in super and subclass while implementing inheritance,,?  How to implement Superclass Exceptions with SubClass while implementing Inheritance concept in core java.? Please answer for this with sample code 

Hibernate Questions

Im getting this error while running JPA project
Im getting this error while running JPA project  Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: examplePersistenceUnit] Unable to configure EntityManagerFactory 

JSP Servlet Questions

getting error while inserting values in database
getting error while inserting values in database  AddUser.java..."); if (envContext == null)throw new Exception("Error: No Context"); if (ds == null) throw new Exception("Error: No DataSource 

Programming Tutorials

Core Java Interview Question, Interview Question
a container to be laid out and redisplayed? Answer: validate() Question: What... no matter whether or not an exception is thrown or caught. Question: What... associative? Answer: The = operator is right associative. Question: What 

Software Services

Outsourcing Guidelines,Successful Guidelines on Outsourcing,Useful Guidelines on Outsourcing
Outsourcing- Guidelines Introduction Organizations often feel confused and overwhelmed when they go for outsourcing the first.... Here is a quick lowdown on the most important points to remember while 

Programming Tutorials

Core Java Interview Question, Interview Question
an exception be rethrown? Answer: Yes, an exception can be rethrown. Question: Which... or an exception occurs within the execution of the finally clause. Question: Which class is the immediate superclass of the Container class? Answer: Component Question 

JDBC Questions

Exception while inserting image in oracle using java
Exception while inserting image in oracle using java  import...[])throws Exception { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver... image1(no int, name varchar2(20), photo blob); Please answer soooooooon 

Development process Questions

i got an exception while accept to a jsp
i got an exception while accept to a jsp  type Exception report...; ****thanks for your answer, exception comes through unicode format... () that prevented it from fulfilling this request. exception 

Ajax Questions

share your answer to this question
share your answer to this question  i need to know what is the TELERIK CONTROL? what is the map suite? what is dunda chart? Also i have to know what are the websites available which give infor regarding this. Let me know how 

Java Beginners

question
(Exception e) { editorPane.setText...(strUrl,ta); } catch(Exception e... Exception { BufferedWriter writer2 = null; BufferedReader reader1 

JDBC Questions

java runtime exception - JDBC
java runtime exception  while i executing this source code:- import... this exception. i am executing my prgm on command prompt in window 7..."); } catch (Exception e) { e.printStackTrace 

Java Interview Questions

Exception - Java Interview Questions
resourceswww.roseindia.net/java/exceptions/  oops! It's answer of question "...; While running java application JVM it self throws exception as you said... correct your question, nothing personal. Now here your answer which is very simple 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception  thanks sir for u r reply ,but i already added that jar file sir even though i m getting an exception sir please help me sir ... thanks in advance..  Hi Friend, You can do one thing, replace 

JSP Servlet Questions

Jsp.jasper exception - JSP-Servlet
Jsp.jasper exception   Thank for u answer for yesterday question I am geeting an exception while running the code exception org.apache.jasper.JasperException: Index: 2, Size: 2 

Hibernate Questions

executing Hibernate application
executing Hibernate application  when i am executing the hibernate application the following error occured. log4j:WARN No appenders could be found...:WARN Please initialize the log4j system properly. Exception in thread "main 

Java Beginners

ERRor in executing DB program
ERRor in executing DB program  While executing following code an Error was generated.can any one help me for this. LiveDB liveDBObj = DataSourceFactory.getLiveDBInstance(); PreparedStatement pstmt=null; String qry=""; qry 

Hibernate Questions

I am getting this exception
I am getting this exception   Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception  sir i used u r code for sending a mass email by reading an excel sheet,but i am getting a following error so please help me if any changes in code . thanks in advance.. java.io.IOException: Invalid 

JSP Servlet Questions

Getting an exception - JSP-Servlet
Getting an exception  sir i used u r code for sending a mass email by reading an excel sheet,but i am getting a following error so please help me if any changes in code . thanks in advance.. java.io.IOException: Invalid 

Java Beginners

java question
a class called FullAddress that inherits the above attributes while adding... details or the long address details. This means your final answer should have... are including utility classes. Use exception handling to make the program robust. use 

Hibernate Questions

hibernat frame work
hibernat frame work  what is the deployment structure for 'hibernete.cfg.xml','contact.hbm.xml','Contact.java','FirstExample.java' programs into eclipse ide   Have a look at the following link: Hibernate Tutorial 

JDBC Questions

Problem in executing query....
Problem in executing query....  Suppose there is a textbox or a text area and the user is supposed to enter any text.Suppose the user enters his text... the user does not enter ' then there is no problem while executing.But suppose the user 

Programming Tutorials

Core Java Interview Question, Interview Question
. Question: Can an object be garbage collected while it is still reachable? Answer... : z ? Answer: It is written x ? y : z. Question: What is the difference between... object. Question: How is rounding performed under integer division? Answer 

Java Beginners

i cNT GET ANSWER FOR THIS QUESTION
i cNT GET ANSWER FOR THIS QUESTION  The roots of the quadratic equation ax2+bx+c=0, aï??¹0 are given by the following formula: x=(-b?±â?š(b^2-4ac))/2a In this formula. The term b2-4ac is called 

Java Interview Questions

java interview question and answer - Java Interview Questions
java interview question and answer   sir, i want one mark java interview question and answers 

JSP Servlet Questions

send answer
send answer  For online exam project,i want single question on single page and on that page there are three buttons previous,submit,next.If i click on next button it show next question from database 

Development process Questions

Getting Error - Development process
Getting Error   Hi , i am getting error while executing this code. I just want to store date in to database. Dont mistake me for repeated questions. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Number 

Programming Tutorials

Core Java Interview Question, Interview Question
: getState() Question: What state is a thread in when it is executing? Answer...;     Question: Name four Container classes. Answer... Exception and Error exceptions. Question: What class allows you to read objects 

Struts Questions

exception - Struts
exception  Hi, While try to upload the example given by you in struts I am getting the exception javax.servlet.jsp.JspException: Cannot...: Exception in JSP: /FileUpload.jsp:10 7: 8: 9: 10: 11: 12: 13 

Java Beginners

Exception
Exception  public class FooException extends Exception { public..."); } public void calculate() throws FooException, Exception { try { int.... ex.printStackTrace(); System.exit(1); } catch(Exception ex 

Programming Tutorials

Core Java Interview Question, Interview Question
Question: When do we say an exception is handled Answer: When...;     Flow Control and exception Question: What is the difference between while and do while loop Answer: Do while loop 

Programming Tutorials

Core Java Interview Question, Interview Question
the IOException. Exception's subclasses have to be caught first. Question: Can an inner... by last-in-first-out rule (LIFO), while queues use the FIFO rule Question: You can...? Answer: Garbage collection. Question: What comes to mind when someone 

JSP Servlet Questions

Please , can any one answer this Question?
Please , can any one answer this Question?  How to cummunicate one web application to another web application in different places 

Java Interview Questions

java question on exception
java question on exception  can we use inbuilt exception variable with throw keyword in java 

Hibernate Questions

Getting exception in Assocation & Join. - Hibernate
Getting exception in Assocation & Join.  select product0_.id as id0...) exception setting property value with CGLIB (set hibernate.cglib.use_reflection... org.hibernate.PropertyAccessException: exception setting property value with CGLIB 

Ajax Questions

my answer
); } catch (Exception e) { out.print(e.toString()); } finally 

Programming Tutorials

Core Java Interview Question, Interview Question
it to byte stream Question: What are the rules of serialization Answer: Rules... is difference between error and exception Answer: Error occurs at runtime... exception or IO exceptions Question: What do you mean by object oreiented 

Java Beginners

Character count by while loop
Character count by while loop  Write the program to count the number... with this question...   import java.io.*; import java.util.*; class CountCharacters { public static void main(String[] args) throws Exception 

Swing AWT

Executing JAR file - Swing AWT
Executing JAR file  Hello Friends! I have successfully created the JAR file of my project with the Manifest File including my Main...: Exception in thread "main" java.lang.NoClassDefFoundError: secl/Login (wrong name 

Java Beginners

plz. answer my ques - Java Beginners
plz. answer my ques  I want to ask a prog. prob which would create... ***** while taking passwords as input.(As it is done at login in websites). Also... = s.getResultSet(); while (rs.next ()){ userName=rs.getString("user 

Java Beginners

Clarify my last question's answer - Java Beginners
Clarify my last question's answer  Dear expert, I've tried out... did not specify my question too clearly. Here's my 2 database... question. Do you want to search through id or through the qualification selected 

Java Beginners

Java experts.Please answer this question - Java Beginners
Java experts.Please answer this question  class A { void get() { System.out.println("A's method"); } } class C extends A{} class D extends A { void set() { System.out.println("D's method"); } } class ins { public 

General

Constructor Chaining Answer
Java NotesConstructor Chaining Answer Answers to the question in Constructor Chaining. Grandparent() constructor Parent(25) constructor Parent() constructor Child() constructor Copyleft 2003 Fred Swartz MIT License, Last 

Java Beginners

Question
Question   When there is an exception in my program how java runtime system handles 

Java Interview Questions

continuing execution after an exception is thrown
continuing execution after an exception is thrown  If while executing a statement in a try say the second statement, if it throws an exception, is it possible to handle that exception and then continue on with the remaining 

JSP Servlet Questions

Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code 

JSP Servlet Questions

Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code 

JSP Servlet Questions

Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code 

JSP Servlet Questions

Getting Null pointer Exception in the jsp page
Getting Null pointer Exception in the jsp page  I have developed this jsp page to store the data in database.While storing the value of check box in database I am getting null pointer exception in the following code 

Programming Tutorials

Core Java Interview Question, Interview Question
Core Java Interview Question Page 6       Question: How can i tell what state a thread is in ?  Answer: Prior to Java 5, isAlive() was commonly used to test 

Mobile Applications Questions

j2me exception - MobileApplications
j2me exception  hai while creating an image i am getting an exception in the below line: public ImageItemMIDlet(){ try..."); } catch (Exception e) { //getting IOException 

Development process Questions

Empty screen after executing servlet - Development process
Empty screen after executing servlet  Hi, After executing servlet am getting blank screen. Am using weblogic server and Eclipse editor...)Locate war file and deployed 5)Then test , but am getting empty screen . Plz give 

JDBC Questions

exception at runtime - JDBC
exception at runtime  while i executing this source code:- import... remove this exception. i am executing my prgm on command prompt in window 7... (Exception e) { e.printStackTrace(); } } } i got an exception 

JavaMail Questions

Java Mail exception - JavaMail
while i am connecting to the Gmail, I am getting the following exception... Whats wrong... I dont know.. How to avoid this exception. The exception 

Java Server Faces Questions

exception in thread main while running servlet
exception in thread main while running servlet  I got exception in thread main no such method error while running servlet. I have added servlet.api.jar file in classpath.my classpath is C:\Program Files\Apache Software Foundation 

Spring Framework Questions

bean creation exception
bean creation exception  hi i am getting exception while running simple spring ioc program Exception in thread "main... path resource [beans.xml]; nested exception is java.io.FileNotFoundException 

Java Interview Questions

question
question  what is exception hirachy 

JSP Servlet Questions

Exception - JSP-Servlet
Exception  Hi team, This is Ragavendran.R. I am getting java.lang.StringIndexOutOfBoundsException: String out of range : 6 error while compiling the following program in JSP charting application: Plz reply 

Java Beginners

to know my answer
to know my answer  hi, this is pinki, i can't solve my question "how to change rupee to dollar,pound and viceversa using wrapper class in java." will u help me 

Java Beginners

JSP Login Page Question
users first registered and then after they can login. my question is how a user... in database, plz...provide me answer its very urgent.   The given code accepts...+"'"); int count=0; while(rs.next()){ count 

Java Beginners

Is the answer 35, 35?
Is the answer 35, 35?  int a = 5; int b = 7; int num = 35; while (a < b) { System.out.println(?My age is ? + num); a = a + 1; }   ...) { int a = 5; int b = 7; int num = 35; while (a < b 

JDBC Questions

Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...(); ResultSet rs = stmt.executeQuery(query); String s = ""; while (rs.next()) { // do 

Java Beginners

Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...(); ResultSet rs = stmt.executeQuery(query); String s = ""; while (rs.next()) { // do 

JSP Servlet Questions

Getting file size - JSP-Servlet
Getting file size  Hello friends, I am doing a jsp project... it returns 0 bytes as the answer. Below is the coding... file into byte code while (totalBytesRead < formDataLength) { byteRead 

JSP Servlet Questions

JasperException: Exception in JSP
JasperException: Exception in JSP  Hi, I am facing below problem while getting paramater as int from jsp. Same code is working fine for string. Please suggest the way forward. exception 

Java Beginners

question
question  how to run a jsp program while ubundu(linux) boot up 

Java Beginners

question
question  I have a project named demo using eclipse but while we are trying to run there is an error like type :Status report message : /demo/ description: The requested resource (/demo/) is not available. Please help me 

Java Beginners

question
question  while (rs.next()) { name=rs.getString(1); id=rs.getString(2); // session.setAttribute("name1", obj); session.setAttribute("id",id); session.setAttribute("name",name); i didn't get this properly,i 

Java Beginners

question
question  i need to select some details form database and that will displays on the same jsp page which is already contains some other details ,mustn't go to next page while i am clicking a link. have any option in jsp or java 

Java Beginners

question
question  sir, i have a project. i am using a user authentication code,it will displays the user name or password is incorrect while user enter wrong user name or password.but it'll displays on url. i wan't to remove that from 

Java Beginners

question
question  good afternoon sir, i have a project in jsp which contains attendance marking.i could mark present successfully but i want to list absentees.i need a jsp code to insert absent,half day leave in to data base while user 

Java Beginners

question
question  I have a project named demo using eclipse with ApacheTocatv7 but while we are trying to run there is an error like type :Status report message : /demo/ description: The requested resource (/demo/) is not available 

Java Beginners

Question?
Question?  My question is how to: Add a menu bar to the program with a File menu. In the File menu, add a submenu (JMenuItem) called About. When...] + " "; } // System.out.println(winningsString); // Useful while testing } public 

JSP Servlet Questions

null pointer exception in jsp
null pointer exception in jsp  index.html <html> <...(Exception e) { System.out.println(e); } } %>...="select * from Login"; ResultSet rs=st.executeQuery(view); while(rs.next 

General

Java Interview Questions
indefinitely? Answer: for(;;)--for loop; while(true)--always true, etc.... Answer: Object. Question: What is the difference between.... Question: What is the SimpleTimeZone class? Answer 

JDBC Questions

Question
(Exception e) { e.printStackTrace 

Java Beginners

question
question  i have a jsp project ATS-HR ,i am using eclipse for back end .but while i am trying to run,the following error has occured **type :Status report message :/ATS-HR/ description :The requested resource (/ATS-HR 

Java Beginners

i need to answer this Question but i can't do it probably
i need to answer this Question but i can't do it probably   use the web to locate the lyrics to the traditional song"The Twelve Days of Christmas" the song contains a list of gifts received for the holiday.the list is cumulative 

Java Beginners

question
and retrieve the same when you need them. Here your privacy is maintained while 

JSP Interview Questions

question
=request.getParameter("address"); %> <html> <h3>Getting values from previous 

Java Beginners

plz answer - Java Beginners
= search.length - 1; while (start <= end) { midPt = (start + end) / 2 

Programming Tutorials

Core Java Interview Question, Interview Question
;     Question: What is clipping? Answer: Clipping...? Answer: If a checked exception may be thrown within the body of a method, the method must either catch the exception or declare it in its throws clause. Question 

Java Beginners

question
("Thanks for sending mail!"); } catch(Exception e){ out.println(e.getMessage 

Java Beginners

question
!"); } } rs.close(); ps.close(); } catch (Exception

Regex Questions

answer
 

JSP Servlet Questions

Getting NumberFormatException
Getting NumberFormatException  Hello Sir, I'm using Integer.parseInt... also used Integer.parseInt(String str, int radix) but it also throws the exception... it in a JSP it continuously throws the exception. below is the code I used. Please 

Advertisements Advertisements
 

 

 

DMCA.com