RE: tomcat can't find suitable driver for mysql
Yes, that also works, however it's just as easy to do that in a setenv.sh file in the bin folder. Dream * Excel * Explore * Inspire Jon McAlexander Asst Vice President Middleware Product Engineering Enterprise CIO | Platform Services | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -Original Message- From: Barry Kimelman Sent: Monday, July 13, 2020 5:32 PM To: Tomcat Users List Subject: Re: tomcat can't find suitable driver for mysql I have found a solution. I modified /etc/environment to include a definition of CLASSPATH, rebooted, and now it seems to be working just fine. On Mon, Jul 13, 2020 at 4:24 PM calder wrote: > On Mon, Jul 13, 2020, 15:22 Barry Kimelman > > wrote: > > > my system is ubuntu 20.04 > > I am running tomcat 9.0.37 > > > > > I can run java based mysql programs from the terminal command line > with no > > problems > > > > > In my build.xml I have the following lines > > > > So, you're attempting run in Eclipse? Or using Maven? > > > It's also important to note that "things" run differently on Linux vs > Windows. > -- == Barry Kimelman Winnipeg, Manitoba, Canada
Re: tomcat can't find suitable driver for mysql
I have found a solution. I modified /etc/environment to include a definition of CLASSPATH, rebooted, and now it seems to be working just fine. On Mon, Jul 13, 2020 at 4:24 PM calder wrote: > On Mon, Jul 13, 2020, 15:22 Barry Kimelman > wrote: > > > my system is ubuntu 20.04 > > I am running tomcat 9.0.37 > > > > > I can run java based mysql programs from the terminal command line with no > > problems > > > > > In my build.xml I have the following lines > > > > So, you're attempting run in Eclipse? Or using Maven? > > > It's also important to note that "things" run differently on Linux vs > Windows. > -- == Barry Kimelman Winnipeg, Manitoba, Canada
Re: [Tomcat 9.0.37] Https / SSL on Windows server 2016 with windows certificate store
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Valintin, On 7/11/20 17:52, Valentin wrote: > Hello, > > I try to configure my tomcat 9.0.37 installed on a windows server > 2016 to use a certificate located in *cert:LocalMachine\My* > > I mention that I am an administrator of this machine. This > certificate is also used by IIS. > > What I did was to configure my server.xml file like this : > > protocol="org.apache.coyote.http11.Http11NioProtocol" > SSLEnabled="true" maxThreads="150" scheme="https" secure="true" > keyAlias="myserver.domain.com" keystoreFile="" keystorePass="" > keystoreType="Windows-My" clientAuth="false" sslProtocol="TLS" /> > > The error I got in tomcat logs was that the keyAlias doesn't exist > but I used the CN mentioned in the description of my certificate. > > Is it possible for tomcat to use the windows certificate store ? > The only link I found about this was : > https://bz.apache.org/bugzilla/show_bug.cgi?id=56021 What user is the Tomcat process running as? Windows-MY is a user-specific keystore, and LocalAccess or whatever user is being used probably has a different Windows-MY keystore than the "Valintin" user (the login you are logged-in as). - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8M2zUACgkQHPApP6U8 pFinHA//bdiEo0qRrjc8cFWY99yRm2BTlOUJ6/6kC4yPjBVOBuaP20S0nx8lxSvz cyRyH6xhgSAjtdRAA+uUdlmZ5oU7P7q15L9a+InNHqL0crr8xlmlwGIT/jXIA5iQ E+c2sXYYi+HCLNp2rA/OC8DTA7XI6SI+pQS7kXkEA2gJ1b2BEwJ5qPfLKVq9LzfC r2b2vfWoPXkAxbKslM7dgY2rdQg0Z2UIcmmHfUGsFraa0JEXm7FSw1E6vQQzwvFs rECltE6v/QKLd/sCkuMQ7l7/WFWlcGwKna0IRApYEaTF66+0DKTOLtRzXORZgsbg bH4rKqfEt1/DGGC0m6UMT2vz2CpETVaKx9D0dy9CB9kkbsjyCZTLwzznFkTSjedZ dRDZXU8bfN3l/Iwzsc3zlQLkGpGyhbrHNc2EFFpI087VvyvibGLNWTrgFbGJ8mm1 F3eDjCerfK7CI70x/yxvr8FKpCNCBKyrpqQoj+V58aSBmFHzBaKiZgyExgVwVtp+ PLQC4MvKTxSRoYRRJ1OLrSKTw9zEmVZDJIbMaJeWiJFfrC9ti7nLL3uOPkwqyb2j 4t7HadblRcl8ytGRkyB66vMHaGDCR1BsPnlOmruid3MCWwU+Xh2joSDeku8YP92d Sh9uLm6bK9xc4//RTVMyIwytCWw/zRfT4hK3habjGRYRIJWR/7w= =pUGV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat can't find suitable driver for mysql
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Barry, On 7/13/20 16:21, Barry Kimelman wrote: > my system is ubuntu 20.04 I am running tomcat 9.0.37 I can run java > based mysql programs from the terminal command line with no > problems Tomcat establishes its own CLASSPATH and applications hosted on Tomcat behave according to the servlet spec with respect to where libraries must be located. > I have installed tomcat under /opt/tomcat/latest under > /opt/tomcat/latest/lib I have installed the jar file for mysql > > -rw-r--r-- 1 root root 1007505 Jul 13 10:54 > /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar That should be sufficient. How are you launching Tomcat? > In my build.xml I have the following lines Your build.xml is not relevant, unless it is physically copying files somewhere, or bundling them into your WAR file. > 131 > However after I compile and install the application, when I try to > run it my application traps the following error How do you launch Tomcat and/or your application? > java.sql.SQLException: No suitable driver found for > jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false > > What am I missing ? Why can't my tomcat app find the mysql class ? How are you configuring your application for JDBC access? Using a in META-INF/context.xml foor your application? - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8M2mgACgkQHPApP6U8 pFjKiA/+Kkxc2zdlIFj7hXi/wZIRcQM7jmQfs1WA6xujWXxPEnfCK24AuknMwt/w KOKDjK65Q+WTlPIxe2Kh6+oMpMbCAnIWfqLs0oM7r/aUAvMvuw3qaEbeuPgGwcJx 7Kh746Hfx4qnmsaFYx6bD8GA2K+343mTH6QlWnV/F7EeILiNA6gPhMms/FAl7R1G pVjYaXsPQU4+vwEsakGLmJpqF5I9BqejwaVDYVyALa+u1C4dyqk2N6MxVv/KsifB p/I1TY281mjzGRXRS9WE9TksRAJ3S5PtAs1GIlXZVGbfNLc+Zlt6uIYwia+5Oi0G vZtJzE8pIpq/Q+/DswwtumtwocfiHlsYhIezdmVNYnJnwXTRoBxz3JEOb4cYN07D duii9T+AtACHGaTLXYFWX71XAqwrNw67MbEhi4ex9Ajrk0Qx8s6le9EyKQNI9Wpz TrjyjbsvQzXcTANsPTF4o23IQIhc+VuAKJsTlyucvKVCUUx4AS1lTKmBH7zgVr3S /CDmwF/PYrBWCEv2D+iQqhAQ7uc/cK7Fp3mwIpc+oWzIA+ART93ktuEP5lKYiNHE JFDxO5wpK2HFv/dMpf2HFqEDprP9dMS2M8kZRFGKSoDDVTS25YyH7WM//ID1RU9J 4LFcSR7qek/1My7HYpPZFctey+eI/OAbwB3JlyV2QMNRs8CwH8E= =Wcma -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat can't find suitable driver for mysql
On Mon, Jul 13, 2020, 15:22 Barry Kimelman wrote: > my system is ubuntu 20.04 > I am running tomcat 9.0.37 > I can run java based mysql programs from the terminal command line with no > problems > In my build.xml I have the following lines > So, you're attempting run in Eclipse? Or using Maven? It's also important to note that "things" run differently on Linux vs Windows.
RE: tomcat can't find suitable driver for mysql
That is in the build, but not in the operational files. Dream * Excel * Explore * Inspire Jon McAlexander Asst Vice President Middleware Product Engineering Enterprise CIO | Platform Services | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -Original Message- From: Barry Kimelman Sent: Monday, July 13, 2020 4:08 PM To: Tomcat Users List Subject: Re: tomcat can't find suitable driver for mysql But what about the lines 191 192 193 in the build.xml file ? Aren't those supposed to expose all the JAR files under the tomcat lib directory to all apps ? On Mon, Jul 13, 2020 at 3:49 PM wrote: > Is this path included in your classpath or in one of the .loaders in > the catalina.properties file? > /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar > > > Dream * Excel * Explore * Inspire > Jon McAlexander > Asst Vice President > > Middleware Product Engineering > Enterprise CIO | Platform Services | Middleware | Infrastructure > Solutions > > 8080 Cobblestone Rd | Urbandale, IA 50322 > MAC: F4469-010 > Tel 515-988-2508 | Cell 515-988-2508 > > jonmcalexan...@wellsfargo.com > > > This message may contain confidential and/or privileged information. > If you are not the addressee or authorized to receive this for the > addressee, you must not use, copy, disclose, or take any action based > on this message or any information herein. If you have received this > message in error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation. > > > -Original Message- > From: Barry Kimelman > Sent: Monday, July 13, 2020 3:22 PM > To: Tomcat Users List > Subject: tomcat can't find suitable driver for mysql > > my system is ubuntu 20.04 > I am running tomcat 9.0.37 > I can run java based mysql programs from the terminal command line > with no problems > > I have installed tomcat under /opt/tomcat/latest under > /opt/tomcat/latest/lib I have installed the jar file for mysql > > -rw-r--r-- 1 root root 1007505 Jul 13 10:54 > /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar > > In my build.xml I have the following lines > > 131 > > 186 > 187 > 188 > 189 > 190 > 191 > 192 > 193 > > However after I compile and install the application, when I try to run > it my application traps the following error > > java.sql.SQLException: No suitable driver found for > jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false > > What am I missing ? Why can't my tomcat app find the mysql class ? > > > > == > > Barry Kimelman > Winnipeg, Manitoba, Canada > -- == Barry Kimelman Winnipeg, Manitoba, Canada - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat can't find suitable driver for mysql
But what about the lines 191 192 193 in the build.xml file ? Aren't those supposed to expose all the JAR files under the tomcat lib directory to all apps ? On Mon, Jul 13, 2020 at 3:49 PM wrote: > Is this path included in your classpath or in one of the .loaders in the > catalina.properties file? > /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar > > > Dream * Excel * Explore * Inspire > Jon McAlexander > Asst Vice President > > Middleware Product Engineering > Enterprise CIO | Platform Services | Middleware | Infrastructure Solutions > > 8080 Cobblestone Rd | Urbandale, IA 50322 > MAC: F4469-010 > Tel 515-988-2508 | Cell 515-988-2508 > > jonmcalexan...@wellsfargo.com > > > This message may contain confidential and/or privileged information. If > you are not the addressee or authorized to receive this for the addressee, > you must not use, copy, disclose, or take any action based on this message > or any information herein. If you have received this message in error, > please advise the sender immediately by reply e-mail and delete this > message. Thank you for your cooperation. > > > -Original Message- > From: Barry Kimelman > Sent: Monday, July 13, 2020 3:22 PM > To: Tomcat Users List > Subject: tomcat can't find suitable driver for mysql > > my system is ubuntu 20.04 > I am running tomcat 9.0.37 > I can run java based mysql programs from the terminal command line with no > problems > > I have installed tomcat under /opt/tomcat/latest under > /opt/tomcat/latest/lib I have installed the jar file for mysql > > -rw-r--r-- 1 root root 1007505 Jul 13 10:54 > /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar > > In my build.xml I have the following lines > > 131 > > 186 > 187 > 188 > 189 > 190 > 191 > 192 > 193 > > However after I compile and install the application, when I try to run it > my application traps the following error > > java.sql.SQLException: No suitable driver found for > jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false > > What am I missing ? Why can't my tomcat app find the mysql class ? > > > > == > > Barry Kimelman > Winnipeg, Manitoba, Canada > -- == Barry Kimelman Winnipeg, Manitoba, Canada
RE: tomcat can't find suitable driver for mysql
Is this path included in your classpath or in one of the .loaders in the catalina.properties file? /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar Dream * Excel * Explore * Inspire Jon McAlexander Asst Vice President Middleware Product Engineering Enterprise CIO | Platform Services | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -Original Message- From: Barry Kimelman Sent: Monday, July 13, 2020 3:22 PM To: Tomcat Users List Subject: tomcat can't find suitable driver for mysql my system is ubuntu 20.04 I am running tomcat 9.0.37 I can run java based mysql programs from the terminal command line with no problems I have installed tomcat under /opt/tomcat/latest under /opt/tomcat/latest/lib I have installed the jar file for mysql -rw-r--r-- 1 root root 1007505 Jul 13 10:54 /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar In my build.xml I have the following lines 131 186 187 188 189 190 191 192 193 However after I compile and install the application, when I try to run it my application traps the following error java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false What am I missing ? Why can't my tomcat app find the mysql class ? == Barry Kimelman Winnipeg, Manitoba, Canada
Re: tomcat can't find suitable driver for mysql
I should also mention this is the same JAVA code I had running under Tomcat 9.0.14 running under Windows 10 where it ran with no problems. On Mon, Jul 13, 2020 at 3:30 PM Barry Kimelman wrote: > An update : > > I have now installed the same JAR file under tomcat that I used from the > command line > -rwxr-xr-x 1 root root 1007502 Jul 13 15:25 > /opt/tomcat/latest/lib/mysql-connector-java-5.1.47.jar > > However the same error still occurs. > > On Mon, Jul 13, 2020 at 3:21 PM Barry Kimelman > wrote: > >> my system is ubuntu 20.04 >> I am running tomcat 9.0.37 >> I can run java based mysql programs from the terminal command line with >> no problems >> >> I have installed tomcat under /opt/tomcat/latest >> under /opt/tomcat/latest/lib I have installed the jar file for mysql >> >> -rw-r--r-- 1 root root 1007505 Jul 13 10:54 >> /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar >> >> In my build.xml I have the following lines >> >> 131 >> >> 186 >> 187 >> 188 >> 189 >> 190 >> 191 >> 192 >> 193 >> >> However after I compile and install the application, when I try to run it >> my application traps the following error >> >> java.sql.SQLException: No suitable driver found for >> jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false >> >> What am I missing ? Why can't my tomcat app find the mysql class ? >> >> >> >> == >> >> Barry Kimelman >> Winnipeg, Manitoba, Canada >> > > > -- > > == > > Barry Kimelman > Winnipeg, Manitoba, Canada > -- == Barry Kimelman Winnipeg, Manitoba, Canada
Re: tomcat can't find suitable driver for mysql
An update : I have now installed the same JAR file under tomcat that I used from the command line -rwxr-xr-x 1 root root 1007502 Jul 13 15:25 /opt/tomcat/latest/lib/mysql-connector-java-5.1.47.jar However the same error still occurs. On Mon, Jul 13, 2020 at 3:21 PM Barry Kimelman wrote: > my system is ubuntu 20.04 > I am running tomcat 9.0.37 > I can run java based mysql programs from the terminal command line with no > problems > > I have installed tomcat under /opt/tomcat/latest > under /opt/tomcat/latest/lib I have installed the jar file for mysql > > -rw-r--r-- 1 root root 1007505 Jul 13 10:54 > /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar > > In my build.xml I have the following lines > > 131 > > 186 > 187 > 188 > 189 > 190 > 191 > 192 > 193 > > However after I compile and install the application, when I try to run it > my application traps the following error > > java.sql.SQLException: No suitable driver found for > jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false > > What am I missing ? Why can't my tomcat app find the mysql class ? > > > > == > > Barry Kimelman > Winnipeg, Manitoba, Canada > -- == Barry Kimelman Winnipeg, Manitoba, Canada
tomcat can't find suitable driver for mysql
my system is ubuntu 20.04 I am running tomcat 9.0.37 I can run java based mysql programs from the terminal command line with no problems I have installed tomcat under /opt/tomcat/latest under /opt/tomcat/latest/lib I have installed the jar file for mysql -rw-r--r-- 1 root root 1007505 Jul 13 10:54 /opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar In my build.xml I have the following lines 131 186 187 188 189 190 191 192 193 However after I compile and install the application, when I try to run it my application traps the following error java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false What am I missing ? Why can't my tomcat app find the mysql class ? == Barry Kimelman Winnipeg, Manitoba, Canada
Re: multipart/form-data request with 2 files with the same name - possible bug
On 13/07/2020 18:33, Builder Lynx Demo wrote: > My tomcat is configured to accept multipart/form-data posts. Here is > the relevant portion in the WEB-INF/web.xml: > > 505242880 > 505242880 > 5000 > /home/pics > > > Assuming both the files are larger than 5000 bytes, then both should be > saved in the /home/pics directory. This doesn't look right. The location is the *temporary* upload location. Files are uploaded there but only kept until the request has completed processing. It is up to the application to copy the temporary files somewhere else. Note also that the temporary files should have (form looking at the upload code) unique names. > However (and this is the issue) given that they have the same name, then > one file over-writes the second file. That looks like an application issue at this point. The application is in control of whether the temporary files get copied anywhere else and the names used for them if they are. See this example from the Tomcat Manager application: https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/manager/HTMLManagerServlet.java#L292 Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
multipart/form-data request with 2 files with the same name - possible bug
Hi, I'm using Tomcat 8.5.15 on Linux (CentOS 7). Imagine the following scenario: I have a web page with a form with a structure like: ... The user selects two different files. However, both files have the same name (they reside in different directories on the users computer). So the form is like: // This file came from /home/user/pics1/somefile.jpg // This file came from /home/user/pics2/somefile.jpg Although both these files have the same name, they are different contents (different images). The user then submits the form. My tomcat is configured to accept multipart/form-data posts. Here is the relevant portion in the WEB-INF/web.xml: 505242880 505242880 5000 /home/pics Assuming both the files are larger than 5000 bytes, then both should be saved in the /home/pics directory. However (and this is the issue) given that they have the same name, then one file over-writes the second file. The result is that the "value" of one of the input parameters is essentially lost. Or to put it another way, in the /home/pics directory, only a single file version of "somefile.jpg" is saved, and one is lost (over-written). I have reviewed the relevant RFC: https://www.ietf.org/rfc/rfc2388.txt However it is essentially silent on this particular issue. The issue being: how to handle multiple parts with the same name. One possible solution is to ask the user to rename the files to be unique before uploading. That would be a work around for desktop/laptop users. However we actually discovered this issue on iOS devices... When Safari or Chrome on iOS use the form, then the form shows a "Browse" button. That button allows the user to take a picture with the device camera. The file name of the image is always "image.jpg". Both form fields have the same file name value, just "image.jpg". This then causes the problem. There is no reasonable way to rename the files on iOS devices that are captured from the camera. On Android devices, as a point of comparison, each camera image is saved with a unique file name, and that is what the browser processes. My desired solution would be to have the multipart processor work to be able to handle this scenario. I think the best solution would be to rename the file when duplicates are found in the request. Or something similar. I did a bunch of searching on the mailing list to see if this has come up before. I didn't find anything. Apologies if it is a solved issue some how and I just didn't find it. Thank-you for your help with this. Alex.