RE: ODBC jar files
Yikes! I'll fix that right away. Thanks, Chris! -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, October 25, 2011 9:49 AM To: Tomcat Users List Subject: Re: ODBC jar files -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barry, On 10/25/2011 10:04 AM, Propes, Barry L wrote: > I did not take it out, but simply added the new ojdbc6.jar, to the > lib, which from the sounds of things sounds like a bad idea (to add > and have both in there). Yes, it is a bad idea. Classes will be loaded arbitrarily from one JAR or the other (but at least consistently, one of them should trump the other) and you may get an "updated" class that conflicts with an old class. If you've ever been in "XML hell", it's the same thing: fighting libraries. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6mzEQACgkQ9CaO5/Lv0PDCBQCgsrB6FrREV9q5t5fdwZDgXlz5 NqEAn0ieun/8hir+tiysgN/LkQXZsuSv =Thny -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: ODBC jar files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barry, On 10/25/2011 10:04 AM, Propes, Barry L wrote: > I did not take it out, but simply added the new ojdbc6.jar, to the > lib, which from the sounds of things sounds like a bad idea (to > add and have both in there). Yes, it is a bad idea. Classes will be loaded arbitrarily from one JAR or the other (but at least consistently, one of them should trump the other) and you may get an "updated" class that conflicts with an old class. If you've ever been in "XML hell", it's the same thing: fighting libraries. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6mzEQACgkQ9CaO5/Lv0PDCBQCgsrB6FrREV9q5t5fdwZDgXlz5 NqEAn0ieun/8hir+tiysgN/LkQXZsuSv =Thny -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ODBC jar files
Thanks a bunch, Jeff! This helps. I just downloaded ojdbc6.jar, but have been running ojdbc14.jar, and it's still in the lib folder. I did not take it out, but simply added the new ojdbc6.jar, to the lib, which from the sounds of things sounds like a bad idea (to add and have both in there). I am running Tomcat 6.0.29. I'll try removing the other older ojdbc jar file and replace it with the newer one - ojdbc6.jar. I will go get the other documentation, too, Jeff! Thanks for the tips! Barry -Original Message- From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Sent: Tuesday, October 25, 2011 8:52 AM To: 'Tomcat Users List' Subject: RE: ODBC jar files Barry - I run an Oracle mixed environment and I can assure you that you will run into problems running ojdbc14.jar and connecting to your 11g database. In particular, you will see some "odd" errors related to bind peek on the server side - but that is supposedly fixed in 11.2.0.2. I can't say for sure as I haven't been able to schedule an upgrade, yet. If you want to talk to 11g, you really should use the 11.2.0.2 ojdbc jar file. You can get that directly from the Oracle website. It should be mostly backwards compatible for connecting to 10g, but there are a few "improvements" that might come back to bite you. In particular, they have added additional mappings to handle the Native Language string columns (NCHAR, NVARCHAR, etc.). Before switching to that jar in your legacy app, you need to insure that it won't be a problem, or you may need to make some quick changes to the code. Also, according to Oracle, make sure you grab the ojdbc file that matches the Java version you are running. If your Tomcat runs under Java 5, you need the ojdbc5.jar. The ojdbc6.jar is only for using with Java 6. They are the same code, but compiled for those java versions, and I assume optimized for them. If you don't know what version of the ojdbc file you have, you can always look it up. Using your favorite unzip tool, extract the MANIFEST.MF file from the META-INF directory of the ojdbcx.jar file. It's a simple text file and contains the release number of the jar file. And while you're on the Oracle JDBC website, download the documentation that goes along with it. Read it thoroughly and see what other changes they've made that might be useful and/or detrimental to your implementation. Jeff > -Original Message- > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > Sent: Monday, October 24, 2011 3:36 PM > To: Tomcat Users List > Subject: RE: ODBC jar files > > Ok, thanks for that explanation. I'll test putting one in the WEB- > INF/lib and see if I can connect to it that way. If so, I'll see where > I need to go from there. > > > -Original Message- > From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > Sent: Thursday, October 20, 2011 4:14 PM > To: Tomcat Users List > Subject: RE: ODBC jar files > > > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > > Subject: RE: ODBC jar files > > > I had web app A with a context file in its META-INF directory and > > web app B with a (different) context file in its META-INF directory. > > That's not related to the classloader being used here. There's a > separate one for Tomcat's lib directory, and that's the only one that > sees the jars in that location. You can put a JDBC jar in > WEB-INF/lib, but then the webapp has to do its own DB connection pooling. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY MATERIAL and is thus for use only by the intended > recipient. If you received this in error, please contact the sender > and delete the e-mail and its attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (
RE: ODBC jar files
Barry - I run an Oracle mixed environment and I can assure you that you will run into problems running ojdbc14.jar and connecting to your 11g database. In particular, you will see some "odd" errors related to bind peek on the server side - but that is supposedly fixed in 11.2.0.2. I can't say for sure as I haven't been able to schedule an upgrade, yet. If you want to talk to 11g, you really should use the 11.2.0.2 ojdbc jar file. You can get that directly from the Oracle website. It should be mostly backwards compatible for connecting to 10g, but there are a few "improvements" that might come back to bite you. In particular, they have added additional mappings to handle the Native Language string columns (NCHAR, NVARCHAR, etc.). Before switching to that jar in your legacy app, you need to insure that it won't be a problem, or you may need to make some quick changes to the code. Also, according to Oracle, make sure you grab the ojdbc file that matches the Java version you are running. If your Tomcat runs under Java 5, you need the ojdbc5.jar. The ojdbc6.jar is only for using with Java 6. They are the same code, but compiled for those java versions, and I assume optimized for them. If you don't know what version of the ojdbc file you have, you can always look it up. Using your favorite unzip tool, extract the MANIFEST.MF file from the META-INF directory of the ojdbcx.jar file. It's a simple text file and contains the release number of the jar file. And while you're on the Oracle JDBC website, download the documentation that goes along with it. Read it thoroughly and see what other changes they've made that might be useful and/or detrimental to your implementation. Jeff > -Original Message- > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > Sent: Monday, October 24, 2011 3:36 PM > To: Tomcat Users List > Subject: RE: ODBC jar files > > Ok, thanks for that explanation. I'll test putting one in the WEB- > INF/lib and see if I can connect to it that way. If so, I'll see where > I need to go from there. > > > -Original Message- > From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > Sent: Thursday, October 20, 2011 4:14 PM > To: Tomcat Users List > Subject: RE: ODBC jar files > > > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > > Subject: RE: ODBC jar files > > > I had web app A with a context file in its META-INF directory and web > > app B with a (different) context file in its META-INF directory. > > That's not related to the classloader being used here. There's a > separate one for Tomcat's lib directory, and that's the only one that > sees the jars in that location. You can put a JDBC jar in WEB-INF/lib, > but then the webapp has to do its own DB connection pooling. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY MATERIAL and is thus for use only by the intended > recipient. If you received this in error, please contact the sender and > delete the e-mail and its attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ODBC jar files
Ok, thanks for that explanation. I'll test putting one in the WEB-INF/lib and see if I can connect to it that way. If so, I'll see where I need to go from there. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Thursday, October 20, 2011 4:14 PM To: Tomcat Users List Subject: RE: ODBC jar files > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > Subject: RE: ODBC jar files > I had web app A with a context file in its META-INF directory and web > app B with a (different) context file in its META-INF directory. That's not related to the classloader being used here. There's a separate one for Tomcat's lib directory, and that's the only one that sees the jars in that location. You can put a JDBC jar in WEB-INF/lib, but then the webapp has to do its own DB connection pooling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ODBC jar files
> From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > Subject: RE: ODBC jar files > I had web app A with a context file in its META-INF directory and > web app B with a (different) context file in its META-INF directory. That's not related to the classloader being used here. There's a separate one for Tomcat's lib directory, and that's the only one that sees the jars in that location. You can put a JDBC jar in WEB-INF/lib, but then the webapp has to do its own DB connection pooling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ODBC jar files
I had kind of thought that might be the case, but wasn't sure. I had web app A with a context file in its META-INF directory and web app B with a (different) context file in its META-INF directory. But just because the jars have different names, I suppose doesn't' even mean the package path is different, let alone the class name. I'll check those very carefully. Thanks! -Original Message- From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] Sent: Thursday, October 20, 2011 2:07 PM To: Tomcat Users List Subject: Re: ODBC jar files If there are common classes it will be very hard to tell which one will be loaded by class loader check this document, http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html On Thu, Oct 20, 2011 at 3:00 PM, Propes, Barry L wrote: > Sorry for any confusion there - I meant tomcat/lib, not WEB-INF/lib. > > Ok, I imagine that is a problem then. I haven't perused both jars, > but I imagine there's some redundancy in there! > > Thanks. > > -Original Message- > From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > Sent: Thursday, October 20, 2011 12:46 PM > To: Tomcat Users List > Subject: RE: ODBC jar files > > > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > > Subject: ODBC jar files > > > Will it hurt to have two different odbc jar files in the lib folder? > > Which lib folder are you referring to? Tomcat's lib folder, or > WEB-INF/lib of the webapp? > > If any class names are common to both jars, you *will* run into trouble. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE > PROPRIETARY MATERIAL and is thus for use only by the intended > recipient. If you received this in error, please contact the sender > and delete the e-mail and its attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Ashish www.ayurwellness.com www.mysoftwareneeds.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: ODBC jar files
If there are common classes it will be very hard to tell which one will be loaded by class loader check this document, http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html On Thu, Oct 20, 2011 at 3:00 PM, Propes, Barry L wrote: > Sorry for any confusion there - I meant tomcat/lib, not WEB-INF/lib. > > Ok, I imagine that is a problem then. I haven't perused both jars, but I > imagine there's some redundancy in there! > > Thanks. > > -Original Message- > From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > Sent: Thursday, October 20, 2011 12:46 PM > To: Tomcat Users List > Subject: RE: ODBC jar files > > > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > > Subject: ODBC jar files > > > Will it hurt to have two different odbc jar files in the lib folder? > > Which lib folder are you referring to? Tomcat's lib folder, or WEB-INF/lib > of the webapp? > > If any class names are common to both jars, you *will* run into trouble. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Ashish www.ayurwellness.com www.mysoftwareneeds.com
RE: ODBC jar files
Sorry for any confusion there - I meant tomcat/lib, not WEB-INF/lib. Ok, I imagine that is a problem then. I haven't perused both jars, but I imagine there's some redundancy in there! Thanks. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Thursday, October 20, 2011 12:46 PM To: Tomcat Users List Subject: RE: ODBC jar files > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > Subject: ODBC jar files > Will it hurt to have two different odbc jar files in the lib folder? Which lib folder are you referring to? Tomcat's lib folder, or WEB-INF/lib of the webapp? If any class names are common to both jars, you *will* run into trouble. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ODBC jar files
> From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > Subject: ODBC jar files > Will it hurt to have two different odbc jar files in the > lib folder? Which lib folder are you referring to? Tomcat's lib folder, or WEB-INF/lib of the webapp? If any class names are common to both jars, you *will* run into trouble. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
ODBC jar files
Question. Will it hurt to have two different odbc jar files in the lib folder? I've been connecting to a production server on Oracle10g for some time, and have had my context.xml file in the META-INF directory of one web app configured to hit this Oracle server. Our group just got a new development server on Oracle11g, and while I can connect to it via Toad or SQL Plus (thereby assuring the tnsnames file is properly configured) I cannot connect at all from the web app in Tomcat. I've been using the drivers in the ojdbc14_g.jar file for some time but I think I may need ojdbc6.jar for the new Oracle server. I wasn't sure if these two would conflict or not. FWIW, I'm using: Tomcat Version 6.0.26 JDK 1.6.0_18 Win XP is my OS for the test machine. The above mentioned .jar files. I just added the second one, ojdbc6.jar, then deleted the work folder contents and restarted the web app. My context.xml file is configured in the following manner: -- I've also tried the following: -- -- with the same error message getting logged. SEVERE: Servlet.service() for servlet jsp threw exception java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=185599744)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334) I feel this is mostly a driver error, but related to Tomcat in terms of the way the jar files are housed in the lib directory and perhaps if one set of driver classes takes precedent over another? I really wasn't sure if those two jar files would conflict and cause issues. If anyone can enlighten me on this it would be appreciated! Thanks, Barry - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org