Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet getting record from MySQL through hibernate. Exception

 
Vladimir Svydenko
Greenhorn
Posts: 4
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am newbie in Java, and it is my first project.
I have developed a servlet. This servlet is receiving and inserting record into MySQL through hibernate using eclispe ide.
I have developed the following code:
Servlet UserManagerServlet


class HibUtil


When I run my code then I find the following exception.


UserManagerServlet.java:56


UserManagerServlet.java:87
List result =


Pleas tell me that where I have done the mistake and how can I resolove the error.
I am sorry for my English

Note:
For test i have wrote new class DelMe2 and object arn was succesfull added to MySQL

 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


where is your utilis package ? is it get imported properly.... and remember your HibUti is a singleton .....


just check this link hibernatesamples.....


 
Vladimir Svydenko
Greenhorn
Posts: 4
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My project after deploying


C:\apache-tomcat-6.0.26\webapps\servlet_db\
|
---META-INF
|...............|
|................-----MANIFEST.MF
---WEB-INF
|...............|
|................-----classes
|...............|...............|
|...............|................-org
|...............|...............|.....|
|...............|...............|......-test
|...............|...............|...........|
|...............|...............|...........-UserManagerServlet.class, DelMe2.class, users.class
|...............|...............|
|...............|................-utils
|...............|.....................|
|...............|......................-HibUtil.class
|...............|
|............... ---- lib(*.jars)
|...............|
|............... --web.xml
|
-index.jsp

Servlet



Exception:


org.test.UserManagerServlet.listUsers(UserManagerServlet.java:91)
is
 
Vladimir Svydenko
Greenhorn
Posts: 4
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have solved my problem.
Thanks for everyone...
 
Prasad Krishnegowda
Ranch Hand
Posts: 667
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you post here, what you did to solve the problem, i mean solution, it will be helpful for others, who might face the problem or facing the problem.. Anyway, glad you solved your problem.. By, the by welcome to javaranch..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic