problem with JDBC on Tomcat 4 and DB2 7
Hi all, I've spent a lot of time trawling the web for an answer to this, I'm hoping someone can help. I've installed Tomcat 4 and DB2 v.7 to run Jive forums and some custom webapps. The problem I have is that the db2jdbc.dll is being loaded by the first classloader to access it, and is thereafter unavailable to other webapps. For example, when I start Tomcat and run the forum, it works fine. If I then try and load a JSP in another webapp that accesses my DB2 instance, I get: javax.servlet.ServletException: java.lang.UnsatisfiedLinkError: Native Library D:\development\SQLLIB\bin\db2jdbc.dll already loaded in another classloader If I do it in the reverse order, the first webapp works fine and the second fails with the same error. I have run the usejdbc2.bat and the drivers seem to be loading fine. How do I ensure that Tomcat can either a. share the .dll amongst webapps, or b. assign an individual copy of the .dll to each webapp? --- James Radvan e-Business Engineer [EMAIL PROTECTED] +44 7990 624899 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ClassCastException, custom Realm, and ClassLoading Repost... this is bugging me.
Christian, I'm sorry I can't help you with your problem, but I'd like to thank you for inadvertently helping me solve mine! Thanks, --- James Radvan e-Business Engineer [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: Bongiorno.Christian [mailto:[EMAIL PROTECTED]] Sent: 18 December 2001 14:51 To: Tomcat Users List Subject: RE: ClassCastException, custom Realm, and ClassLoading Repost... this is bugging me. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: problem with JDBC on Tomcat 4 and DB2 7
I figured it out. I had the JDBC drivers too far down the Classloader hierarchy - in the webapp/lib folder. moving them up into the common/lib folder solved it - now all webapps can access the drivers. --- James Radvan e-Business Engineer [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: James Radvan [mailto:[EMAIL PROTECTED]] Sent: 18 December 2001 13:48 To: Tomcat User Subject: problem with JDBC on Tomcat 4 and DB2 7 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: foriegn characters turn to ? in database
Out of interest, will using charset=UTF-8 work? (unicode) James - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: Tõnu Põld [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 08:32 To: '[EMAIL PROTECTED]' Subject: RE: foriegn characters turn to ? in database Hi, There are several places where this ? conversion might happen. a) If your JSP page output should be in Latin2, then you must have the %@ page contentType = text/html; charset=ISO-8859-2 % directive in JSP page. Else the default encoding (iso-8859-1) is used and the strings are converted from Latin2 to Latin1. Because some Latin2 charcters are missing in Latin1, those characters are dispayed as question marks. b) If your database uses Latin2, then the JDBC draiver might not convert the charcters to correct java unicode charcters. This may happen because the JDBC draiver thinks your database uses Latin1 encoding. Make sure the JDBC draiver supports Latin2. This could be tested by getting some Java String from database and by comparing the numeric character code with the character code in unicode table (http://www.unicode.org/charts/). For finding the numeric character code use: char c = dbString.charAt(0); If the JDBC draiver supports only Latin1, then the strings could be convereted to Latin2 by using something like this: String s = new String( dbString.getBytes(ISO-8859-1), ISO-8859-2); On most cases the ? conversion happens when the Java character (16 bit unicode char) is converted 8-bit character. Please look some Java tutorial/manual to learn more about the Java Characters/Strings. Best Regards, Tõnu -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 7:47 AM To: [EMAIL PROTECTED] Subject: Re: foriegn characters turn to ? in database Hi! I have seen this behavior too. I'm using MYSQL 3.23.36 with Latin2 character set as default. I can see these foreign characters in the database, but they are converted to ? on the JSP output. Sometimes also the foreign characters that are in the JSP itself get converted to ?. Any idea? Best regards, Kovi P.S.: Using WinNT 4 Service Pack 6, Tomcat 3.3m4 At 22:27 11.7.01 +, you wrote: Bryan, does your database use foreign character sets? From: Bryan Murtha Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: foriegn characters turn to ? in database Date: Wed, 11 Jul 2001 20:58:53 Hey All, We are accepting form submissions from users all over the world. The foriegn characters end up in Sybase looking like a ?. Does someone know how to deal with this? Regards, Bryan Original Message Follows From: Stefanos Karasavvidis Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: getServletContext() throws NullPoinetException Date: Tue, 10 Jul 2001 17:46:04 +0300 I've just installed tomcat 3.2.2 and have the following problem. I want to call getServletContext() from a servlets service method but get the folowing exception *Internal Servlet Error:* java.lang.NullPointerException at javax.servlet.GenericServlet.getServletContext(GenericServlet .java:205) at TestServlet.service(TestServlet.java:32) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrappe r.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper. java:372) at org.apache.tomcat.core.ContextManager.internalService(Context Manager.java :797) at org.apache.tomcat.core.ContextManager.service(ContextManager. java:743) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pr ocessConnect ion(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoi nt.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadP ool.java:501) at java.lang.Thread.run(Thread.java:484) Moreover the getServletConfig() returns null which is probably the main reason for this problem Any ideas?? Stefanos _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- Get your FREE download of MSN Explorer at http://explorer.msn.comhttp://explorer.msn.com Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use
RE: Tomcat as NT service.. problem.
I expect developers at Microsoft would disagree with that, Randy. If you're on the topic of 'thinking before criticising' you might want to taste a bit of your own medicine! As a software developer, I know that the coders rarely have the option to make every function perfect with time, budget and other constraints - that goes for paid Microsoft developers as much as unpaid Tomcat developers. - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 10:47 To: [EMAIL PROTECTED] Subject: RE: Tomcat as NT service.. problem. I would suggest that you investigate why this is before you call it a secret trap and stupid. There are lots of little gottchas like this in Tomcat (and Windows in general). They are generally there because the people at Microsoft couldn't be bothered to make all things work all the time. Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: NT services applet
start settings control panel administrative tools services - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 05 July 2001 17:17 To: [EMAIL PROTECTED] Subject: NT services applet How to find the NT services apple? Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: JDBC Problem with Ultradev
For those of you that are still having problems with this, make sure your driver is present in the Tomcat /webapps/[mywebapp]/WEB-INF/classes directory and select 'use driver on application server' in your connection setup in Ultradev. - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: James Radvan [mailto:[EMAIL PROTECTED]] Sent: 03 July 2001 14:07 To: '[EMAIL PROTECTED]' Subject: RE: JDBC Problem with Ultradev Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: JDBC Problem with Ultradev
Although this certainly is off topic, this person is trying to develop JSP for Tomcat on the Ultradev IDE. The Macromedia newsgroups are notoriously unhelpful when it comes to JSP/JDBC, mainly due to lack of knowledge, and I suspect that this list goes out to some people very knowledgeable in this area. That being said, there's a lot of documentation both in the Ultradev docs and on the Macromedia website for how to configure JDBC for live data preview, and you should probably state that you've checked all of this and that this list is your last resort if that is the case, rather than posting here to save yourself the effort. Most JDBC live data preview connection problems in Ultradev are due to misconfigured classpaths, absent, misplaced or misnamed driver jar's, and lack of plain old trawling through the docs. Make sure you've checked these first. The drivers need to be in the Ultradev file system as well, in one of the subfolders detailed in the Ultradev online help. James - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: pete [mailto:[EMAIL PROTECTED]] Sent: 03 July 2001 05:46 To: [EMAIL PROTECTED] Subject: Re: JDBC Problem with Ultradev And this has what to do with tomcat? Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: Problem running Tomcat 3.2 as a service on Win2000
where is your driver stored in the file system? Try both the /lib directory and the webapps/[webappname]/WEB-INF/classes directories, and make sure your classpath points to both. And check your classpath for spaces in the path. Good luck. - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 14:27 To: [EMAIL PROTECTED] Subject: Problem running Tomcat 3.2 as a service on Win2000 I have a servlet that connects to a database. When I have tomcat running from the batch file (tomcat start) the servlet runs fine and connects to the db. When I install tomcat as a service I get a ClassNotFoundException saying it can't find my JDBC driver. My driver is contained in a jar file with the classpath set correctly. Any ideas on how to fix this? Jason E. Brawner Silenus Group Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: somewhat closer to proper tomcat operation
In my experience (admittedly Win2000/AIX) if you are using JDBC than datasources are irrelevant. The jsp will need to have details of your driver etc so that it can find the database. I'm assuming your jdbc.jar is a valid jdbc driver for Access (ODBC-JDBC bridge?) '(unknown)' is not a valid path. // the jsp has no idea where to find your database. [ODBC Microsoft Access Driver] // is this correct? ODBC? Being able to connect to your DSN via ODBC is not the same as being able to make a JDBC connection. I have Tomcat/Jetspeed working with JDBC/DB2 - though I had nightmares getting it to work. Good luck. J - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: Gabriel Marti [mailto:[EMAIL PROTECTED]] Sent: 29 June 2001 02:36 To: [EMAIL PROTECTED] Subject: somewhat closer to proper tomcat operation Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: Tomcat Documentation
I'll try and help with some JDBC:DB2 specific stuff. Is documentation controlled in CVS? - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 So who will be interested in working on the Tomcat Documentation ? Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: Why does this list e-mail all users - i don't want this crap arriving in my mail
It's a m a i l i n g l i s t! That's what they're for!??? - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: Norman Cave-Browne-Cave [mailto:[EMAIL PROTECTED]] Sent: 29 June 2001 12:02 To: [EMAIL PROTECTED] Subject: Why does this list e-mail all users - i don't want this crap arriving in my mail Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: TOMCAT SUCKS
I think openly criticising a product that many people have worked hard to create and provide for your FREE use shows a remarkable lack of gratitude, especially when you follow your blinkered criticism with a request for help from the same people you just insulted. If you want an enterprise level system, pay for it. Tomcat holds it's own against any product on the market in it's space. - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: 28 June 2001 02:53 To: [EMAIL PROTECTED]; Nick Stoianov Subject: Re: TOMCAT SUCKS On Thu, 28 Jun 2001 10:10, Nick Stoianov wrote: 5th - I haven't met anybody in this mailing list who has a complex installation of Tomcat with a lot of virtual hosts , different ports and load balancers. So - who will help me in situation like this? No books , no support, no help from the mailing list. Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: tomcat on a home machine???
This is a network issue more than a software issue. The Tomcat installation is no different with permanent or dialup connections, however your IP address will likely change every time you dial (as most ISP's use DHCP). Thus it will be impossible to resolve a domain name to the IP address of your server from the public internet, as it will change every time you dial. You will still be able to access your home page on your local machine (http://localhost:8080/ by default) but it will only be accessible on the Net by using http://xxx.xxx.xxx.xxx:8080/ where the x's are whatever dynamic IP address you have been assigned that time. Of course, if your ISP offers you a fixed IP address, you can get a domain to resolve to that fixed address and your problems are solved. Obviously, the server will only be available to the public when you are dialled up. Cheers, - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 27 June 2001 09:08 To: [EMAIL PROTECTED] Subject: tomcat on a home machine??? Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: tomcat on a home machine???
I stand corrected - I had no idea such a service existed. clever. - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 -Original Message- From: Nico Wieland [mailto:[EMAIL PROTECTED]] Sent: 27 June 2001 11:05 To: [EMAIL PROTECTED] Subject: AW: tomcat on a home machine??? yes, it is possible with services like http://www.dyndns.com. Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
WML pages served by tomcat
Any ideas about how to serve WML pages from Tomcat? I have placed index.wml and wml12.dtd in the webapps/ROOT directory, and conceivably I should be able to access it via the Nokia WML Toolkit browser on http://localhost/index.wml . However when I do, I get the error trace content type text/plain is not supported I have entered in conf/web.xml: mime-mapping extension wml /extension mime-type text/vnd.wap.wml /mime-type /mime-mapping but this makes no difference. wtf? - James Radvan Websphere Analyst/Architect London, UK [EMAIL PROTECTED] +44 7990 624899 Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.
RE: how to change root value
do this with a virtualhost entry, eg: Host name=www.mydomain.com Context path=/ docBase=jakarta-tomcat/webapps/root / /Host I think :) -Original Message- From: Venkatesh T [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 16:18 To: tomcat Subject: how to change root value Click here to visit the Argos home page http://www.argos.co.uk The information contained in this message or any of its attachments may be privileged and confidential, and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you are not the addressee, any disclosure, reproduction, distribution, dissemination or use of this communication is not authorised. If you have received this message in error, please advise the sender by using the reply facility in your e-mail software. All messages sent and received by Argos Ltd are monitored for virus, high risk file extensions, and inappropriate content. As a result users should be aware that mail may be accessed.