• Post Reply Bookmark Topic Watch Topic
  • New Topic

switching database servers causes web app to fail  RSS feed

 
deb platt
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been working on a web application (servlets and jsp) that is served up by Tomcat and communicates with an Oracle database (which Tomcat communicates with to do the initial authentication). The application was built using Eclipse 3.3.0 and Ant.

While in development, the application has been working as expected. We are getting ready to move it from development to production. To do so, I have to change the connection string. In development, I'm connecting to an Oracle DBMS at zone1.mydomain.com. In production, I'd like to change this to zone2.mydomain.com. When I go to my context.xml and make this configuration change for user authentication, the application no longer works. In the localhost log, I get his error message:
SEVERE: Exception opening database connection
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
and in the stdout log it says this:
java.lang.ClassNotFoundException: jdbc racle:thin:@zone2.mydomain.com:1521:mydb
If I switch back to zone1, it works again.

From the same machine that Tomcat's on, I can use a database client (AquaData) to connect zone2.mydomain.com:1521:mydb. In fact, I can connect to both zone1 and zone2 via AquaData.

Any suggestions?

Deb
[ June 10, 2008: Message edited by: deb platt ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ClassNotFoundException is odd, since it mentions the connection URL, not a class name. Just to make sure, did you inadvertently switch the driver class name and the connection URL when making the entries for the production database?
 
deb platt
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It turns out that the connect string was being passed in where a string representing the database driver was expected. When I corrected that, the Network Adapter error also went away.

Thanks!

Deb
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!