Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat error

 
sneha sridhar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am struggling to find the cause of an issue i am facing in tomcat for the past few days. I have described the issue below. Please take a look and let me know your ideas.

I have installed tomcat and java on a linux server. And I have set up my application as well.

I am trying to access the console of my web application using a url like this: http://<localhost_IP>:8500/webasp/Login.do.

I am able to get only till the login page. My application is not able to establish a connection with the database. I have configured my jndi datasource in server.xml as below:



I am able to successfully telnet to the host and port mentioned in the url field:

I am seeing the below errors in the log files.

catalina.out file:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSession' defined in class path resource: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not find datasource: java:comp/env/jdbc/asp

[19 Mar 05:14:58] ERROR: Unable to post document: org.apache.commons.httpclient.HttpException: Unexpected status code 403 received from server.
org.apache.commons.httpclient.HttpException: Unexpected status code 403 received from server.

I am not sure where I am going wrong. Any help would be greatly appreciated. Thanks.

Sneha
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Sneha!

Have you defined this resource in web.xml? The Tomcat Context is an override for it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic