• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Configuring tomcat

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to deploy my application named storage which under webapps folder

I am using Tomcat 5.5.23 and Hibernate 3 as orm tool.
I want to access my jsp page through the url like this
https://localhost:80/web/jsp/login.jsp

for this I have made changes in server.xml file
changed the ssl port from 8443 to 80 and redirection port for nonssl to 80 and changed the appbase to webapps/storage which was by default webapps

But when i try to acess my jsp page through the above mentyioned url i am getting this error HibernateUtil cannot be Resolved.

The error is a below
n 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;

But if appBase is not changed then it working fine..
Can anybody let me know where i am going wrong...
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The error seems like the hibernate jar is not loaded by the server. Did you drop all the necessary jar files required by your application in to the lib folder under the WEB-INF directory of your application?

Hope this helps
 
That is a really big piece of pie for such a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic