This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat error" Watch "Tomcat error" New topic
Author

Tomcat error

sneha sridhar
Greenhorn

Joined: Mar 20, 2013
Posts: 1
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

Joined: Jun 25, 2001
Posts: 16095
    
  21

Welcome to the JavaRanch, Sneha!

Have you defined this resource in web.xml? The Tomcat Context is an override for it.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: Tomcat error