Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / March 2005

Tip: Looking for answers? Try searching our database.

problem with servlets reading databases after upgrades

Thread view: 
Drew - 15 Mar 2005 14:30 GMT
Hi All:

I previously had several Java servlets that ran great on my Windows
2000 box.  All of my servlets basically just run SQL queries against
an Access database and print the results to the browser.  So, I had
Data Sources set up to point to the Access databases under Control
Panel/Administrative Tools.  These servlets would be ran by users
accessing my machine thru Apache Tomcat.

Recently, I upgraded this machine from Windows 2000 to Windows XP SP2.
In the process, I also upgraded to the latest version of Java.  I had
to recreate the Tomcat service because the directory Java was
installed in changed.  After doing that, the Tomcat service started
working again and almost all of the servlets were back to working
superb.

However, two of them generate SQL exceptions that they did not
generate before the upgrade and I can't figure out what the error is.
I've tried deleting their corresponding data source and recreating it
but that doesn't seem to help.

Here is the error that one generates:

here1 here21 with url = jdbc:odbc:DBStormLog
*** SQLException caught ***
SQLState: S1009
Message: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not
a valid path. Make sure that the path name is spelled correctly and
that you are connected to the server on which the file resides.
Vendor: -1023

The other one generates a different error but it seems very weird as
well:

here1 here2
Connected to jdbc:odbc:DBSailors
Driver JDBC-ODBC Bridge (odbcjt32.dll)

*** SQLException caught ***
SQLState: S1000
Message: [Microsoft][ODBC Microsoft Access Driver] Selected collating
sequence not supported by the operating system.
Vendor: -5026

I've put print statements in and the statement that seems to generate
the exception is:

Connection con = DriverManager.getConnection(url);

I have this same statement in all my other servlets.  All the
different servlets are just basically a template with different SQL
exceptions.

Has anyone seen these two errors above?  It seems like they must be
directly related to the upgrading I did since everything worked great
before?  I'd appreciate any help.  I'm lost!

Drew
Drew - 15 Mar 2005 16:21 GMT
As a followup, I messed around some more and stumbled upon the
solution!  For the servlet generating the "collating sequence" error,
I created a new Access database and just copied the tables into it.
Then I changed the name of the old database to have an .old extension
so that I could give the new database the name that the DSN looks for
under Data Sources.

That fixed it!

Then, on the one giving Microsoft Access Driver unknown is not a valid
path, I did the following.  I noticed the database was on my P: drive
which is a network drive.  Just testing, I went under the Data Sources
in Control Panel and instead of browsing thru the p: drive to the
database, I typed in the full UNC path to the database in the text box
for database name.

I don't know why, but that fixed it as well!  Maybe something with
service pack 2 doesn't allow Data Sources to go to network drives?
Not sure, but its all back to normal now.

Thanks!
Drew


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.