type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 11 in the generated
java file
Only a type can be imported. org.hibernate.Transaction resolves to a package
An error occurred at line: 12 in the generated java file
Only a type can be imported. org.hibernate.Session resolves to a package
An error occurred at line: 13 in the generated java file
Only a type can be imported. org.hibernate.SessionFactory resolves to a package
An error occurred at line: 14 in the generated java file
Only a type can be imported. org.hibernate.HibernateException resolves to a package
An error occurred at line: 22 in the jsp file: /Save.jsp
Session cannot be resolved to a type
19: </head>
20: <body>
21: <%
22: Session sess=null;
23: SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
24: sess=sessionFactory.openSession();
25: System.out.println("Inserting Record");
An error occurred at line: 23 in the jsp file: /Save.jsp
SessionFactory cannot be resolved to a type
20: <body>
21: <%
22: Session sess=null;
23: SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
24: sess=sessionFactory.openSession();
25: System.out.println("Inserting Record");
26: Writer wr = new Writer();
An error occurred at line: 23 in the jsp file: /Save.jsp
Configuration cannot be resolved to a type
20: <body>
21: <%
22: Session sess=null;
23: SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
24: sess=sessionFactory.openSession();
25: System.out.println("Inserting Record");
26: Writer wr = new Writer();
An error occurred at line: 29 in the jsp file: /Save.jsp
The constructor Story(
String) is undefined
26: Writer wr = new Writer();
27: wr.setName("Das");
28:
ArrayList list = new
ArrayList();
29: list.add(new Story("Story Name 1"));
30: list.add(new Story("Story Name 2"));
31: wr.setStories(list);
32: Transaction transaction = null;
An error occurred at line: 30 in the jsp file: /Save.jsp
The constructor Story(String) is undefined
27: wr.setName("Das");
28:
ArrayList list = new
ArrayList();
29: list.add(new Story("Story Name 1"));
30: list.add(new Story("Story Name 2"));
31: wr.setStories(list);
32: Transaction transaction = null;
33: try {
An error occurred at line: 32 in the jsp file: /Save.jsp
Transaction cannot be resolved to a type
29: list.add(new Story("Story Name 1"));
30: list.add(new Story("Story Name 2"));
31: wr.setStories(list);
32: Transaction transaction = null;
33: try {
34: transaction = sess.beginTransaction();
35: sess.save(wr);
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)