• 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

switching database servers causes web app to fail

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic