Skip to main content

HibernateUtil cannot be resolved

No replies
rbadhwar
Offline
Joined: 2007-12-25

I have deployed my application with Tomcat 5.5.23 as server and RDBMS as mysql 5 and ORM Tool Hibernate 3

I have also changed the default appBase parameter from webapps to webapps/storage in server.xml

When i try to acces the login page via securred layer through this url https:/192.168.1.4:80/web/jsp/login.jsp
I am getting this error
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 6 in the jsp file: /jsp/login.jsp
HibernateUtil cannot be resolved
3: import="org.json.*,java.util.*,com.hgi.util.*,java.io.*,org.hibernate.*,com.hgi.entities.*,org.hibernate.criterion.*,java.util.regex.Pattern,java.util.regex.*,java.util.Random,java.text.*"
4: %>
5: <%
6: HibernateUtil.init("/usr/local/apache-tomcat-5.5.53/webapps/storage/hibernate");
7: %>
8: <%
9: String logout = request.getParameter("logout");

An error occurred at line: 18 in the jsp file: /jsp/login.jsp
HibernateUtil cannot be resolved
15: String password = request.getParameter("password");
16: if(username!=null && !("").equals(username) && password!=null && !("").equals(password))
17: {
18: Session sess = HibernateUtil.currentSession();
19: Transaction tx = null;
20:
21: String hql = " from LoginImpl login where login.username= :username and login.password= :password and login.status= :status";

An error occurred at line: 27 in the jsp file: /jsp/login.jsp
LoginImpl cannot be resolved to a type
24: query.setString("password",password);
25: query.setString("status","E");//LoginImpl.STATUS_ENABLE);
26: List users = query.list();
27: LoginImpl login = null;
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);

An error occurred at line: 30 in the jsp file: /jsp/login.jsp
LoginImpl cannot be resolved to a type
27: LoginImpl login = null;
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);
31: Global userInfo = new Global();
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();

An error occurred at line: 31 in the jsp file: /jsp/login.jsp
Global cannot be resolved to a type
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);
31: Global userInfo = new Global();
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();
34: userInfo.userSet = login.getUser().getSetNo();

An error occurred at line: 31 in the jsp file: /jsp/login.jsp
Global cannot be resolved to a type
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);
31: Global userInfo = new Global();
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();
34: userInfo.userSet = login.getUser().getSetNo();

An error occurred at line: 35 in the jsp file: /jsp/login.jsp
UserImpl cannot be resolved to a type
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();
34: userInfo.userSet = login.getUser().getSetNo();
35: userInfo.firstName = ((UserImpl)login.getUser()).getFirstName();
36:
37: userInfo.homeDir = Global.commonBase + userInfo.userSet + File.separator + userInfo.username + File.separator;
38: userInfo.thumbnailBase = userInfo.homeDir + "thumbnails" + File.separator;

An error occurred at line: 37 in the jsp file: /jsp/login.jsp
Global.commonBase cannot be resolved to a type
34: userInfo.userSet = login.getUser().getSetNo();
35: userInfo.firstName = ((UserImpl)login.getUser()).getFirstName();
36:
37: userInfo.homeDir = Global.commonBase + userInfo.userSet + File.separator + userInfo.username + File.separator;
38: userInfo.thumbnailBase = userInfo.homeDir + "thumbnails" + File.separator;
39: userInfo.fileBase = userInfo.homeDir + "data" + File.separator;
40: userInfo.tempDir = userInfo.homeDir + "temp" + File.separator;

An error occurred at line: 4 in the jsp file: /jsp/templates/loginT.jsp
Global.appName cannot be resolved to a type
1:
2:
3:
4: <%=Global.appName%> - <%=Global.appDescription%>
5:
6: hgilib/commonfunctions.js" type="text/javascript">
7:

An error occurred at line: 4 in the jsp file: /jsp/templates/loginT.jsp
Global.appDescription cannot be resolved to a type
1:
2:
3:
4: <%=Global.appName%> - <%=Global.appDescription%>
5:
6: hgilib/commonfunctions.js" type="text/javascript">
7:

An error occurred at line: 6 in the jsp file: /jsp/templates/loginT.jsp
Global.jscriptBase cannot be resolved to a type
3:
4: <%=Global.appName%> - <%=Global.appDescription%>
5:
6: hgilib/commonfunctions.js" type="text/javascript">
7:
8:
9: function doFixes()

An error occurred at line: 16 in the jsp file: /jsp/templates/loginT.jsp
Global.cssBase cannot be resolved to a type
13: }
14:
15:
16: main.css"/>
17:
18:
19:

An error occurred at line: 22 in the jsp file: /jsp/templates/loginT.jsp
Global.jspBase cannot be resolved to a type
19:
20:
21:
22: login.jsp" style="margin:0px;padding:0px;" onSubmit="form1.Submit.value='Login'">
23:
24:
25:

An error occurred at line: 26 in the jsp file: /jsp/templates/loginT.jsp
Global.imgBase cannot be resolved to a type
23:
24:
25:
26: left.png" alt="<%=Global.appName%> - <%=Global.appDescription%>" style="margin-right:10px;visibility:hidden;" id="left" />
27:
28:
29:

An error occurred at line: 26 in the jsp file: /jsp/templates/loginT.jsp
Global.appName cannot be resolved to a type
23:
24:
25:
26: left.png" alt="<%=Global.appName%> - <%=Global.appDescription%>" style="margin-right:10px;visibility:hidden;" id="left" />
27:
28:
29:

An error occurred at line: 26 in the jsp file: /jsp/templates/loginT.jsp
Global.appDescription cannot be resolved to a type
23:
24:
25:
26: left.png" alt="<%=Global.appName%> - <%=Global.appDescription%>" style="margin-right:10px;visibility:hidden;" id="left" />
27:
28:
29:

An error occurred at line: 32 in the jsp file: /jsp/templates/loginT.jsp
Global.appName cannot be resolved to a type
29:
30:
31:
32: Sign in to your <%=Global.appName%>
33:
34:
35: <% if (!("").equals(msg)) { %>

An error occurred at line: 37 in the jsp file: /jsp/templates/loginT.jsp
Global.imgBase cannot be resolved to a type
34:
35: <% if (!("").equals(msg)) { %>
36:
37: alert.gif" align="absmiddle"><%=msg%>
38:
39: <% } %>
40:

An error occurred at line: 56 in the jsp file: /jsp/templates/loginT.jsp
Global.imgBase cannot be resolved to a type
53:
54:
55:
56: login_button.gif" alt="Login" width="68" height="27" border="0">
57: user/forgotPassword.jsp' style="font-weight:normal;">Forgot Password
58:
59:

An error occurred at line: 57 in the jsp file: /jsp/templates/loginT.jsp
Global.jspBase cannot be resolved to a type
54:
55:
56: login_button.gif" alt="Login" width="68" height="27" border="0">
57: user/forgotPassword.jsp' style="font-weight:normal;">Forgot Password
58:
59:
60:

An error occurred at line: 62 in the jsp file: /jsp/templates/loginT.jsp
Global.appName cannot be resolved to a type
59:
60:
61:
62: Dont have <%=Global.appName%> yet? Sign Up
63:
64:
65:

An error occurred at line: 71 in the jsp file: /jsp/templates/loginT.jsp
Global.imgBase cannot be resolved to a type
68:
69:
70:
71: © 2007 HgI Technologies Pvt. Ltd.
72:
73:
74:

Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

when i keep my appBase in server.xml to webapps which the default value then i am able to access my page without any error.

Why it is happening so can anybody help me to solve this error.