Can't get DB Pooling to Work
I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) org.apache.jsp.MyJsp_jsp._jspService(org.apache.jsp.MyJsp_jsp:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276) org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159) org.apache.jsp.MyJsp_jsp._jspx_meth_sql_query_0(org.apache.jsp.MyJsp_jsp:100) org.apache.jsp.MyJsp_jsp._jspService(org.apache.jsp.MyJsp_jsp:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I believe my context isn't working or it's not finding it. I'm using Tomcat 5.5.7 and mySQL. I have tried putting it in server.xml, in context.xml in the MANIFEST-INF folder of the webapp, and in conf/Catalina/localhost/context.xml. The context I'm using is exactly like it is in the docs except the user and password and resource name and it uses mySQL. Context path=/dotdraft docBase=dotdraft debug=5 reloadable=true crossContext=true Resource name=jdbc/dotdraft auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=xxx password=xxx driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/test/ /Context Thanks, Karl
RE: Can't get DB Pooling to Work
XP Pro. I want a context resource if that means I want it applied to just this application, not all of them. Which JAR? Both the JConnector JAR and naming-factory-dbcp.jar are in common/lib. Thanks, Karl -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:00 PM To: Tomcat Users List Subject: Re: Can't get DB Pooling to Work Making a guess that you are on Linux, who owns the jar file? Where did you put it? Are you wanting global or context resource? Doug From: Karl Coleman I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't get DB Pooling to Work
I got it working. It was really dumb actually. In conf/Catalina/localhost I had the file named as context.xml. I renamed it to match the name of the app and it worked. Thanks for your input Doug. Karl -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:24 PM To: Tomcat Users List Subject: Re: Can't get DB Pooling to Work Add the driver to you app war. This will allow you to make changes to the driver without a restarting Tomcat. Place nothing in server.xml. Add it the context.xml. What version is the driver and how big is it? Doug - Original Message - From: Karl Coleman [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Friday, February 18, 2005 4:06 PM Subject: RE: Can't get DB Pooling to Work XP Pro. I want a context resource if that means I want it applied to just this application, not all of them. Which JAR? Both the JConnector JAR and naming-factory-dbcp.jar are in common/lib. Thanks, Karl -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:00 PM To: Tomcat Users List Subject: Re: Can't get DB Pooling to Work Making a guess that you are on Linux, who owns the jar file? Where did you put it? Are you wanting global or context resource? Doug From: Karl Coleman I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: restarting tomcat
I don't know the why's. I just know that a change to a JSP doesn't require a restart but a change to a class file does. Karl That's a great question! I was about to ask a very similar question myself. If you make changes to a JSP file, that means that file has to be recompiled, first to a .java file, then by javac to a .class file, which is really a Servlet. So, does changing a JSP file mean the Tomcat web app to which it belongs is also reloaded? Rob -Original Message- From: naryam naryam [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 8:28 PM To: [EMAIL PROTECTED] Subject: restarting tomcat Hi, Is it true that each time a java servlet changes the tomcat servlet engine must be restarted. Does it mean that each time we need to recompile, we need also to restart the engine? Chris - Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RegExp issues with Tomcat 5
We upgraded tomcat running one of our applications from 4 to 5 this past = Friday, March 27th. Since, one of our regular expressions is not = functioning properly. Here is the expression: s/(\\|')/\\$1/g Instead of escaping the apostrophe with another apostrophe for SQL = purposes, it is replacing the apostrophe with the literal '$1'. It was = working with Tomcat 4 and that is the only thing that has changed. Thanks, Karl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegExp issues with Tomcat 5
We are using the regexp tag library in our jsp's. Yes, it worked fine with Tomcat 4. The rest of the application is working fine. Users just started noticing that where they are putting apostrophes and saving, when they bring the information back up it shows as $1. Mary's purse is being brought into the application as Mary$1s purse. It is like it isn't interpreting the meaning of the $1 anymore. Karl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 11:57 AM To: Tomcat Users List Subject: RE: RegExp issues with Tomcat 5 Hi, We upgraded tomcat running one of our applications from 4 to 5 this past = Friday, March 27th. Since, one of our regular expressions is not = functioning properly. Here is the expression: s/(\\|')/\\$1/g Instead of escaping the apostrophe with another apostrophe for SQL = purposes, it is replacing the apostrophe with the literal '$1'. It was = working with Tomcat 4 and that is the only thing that has changed. So. What are you suggesting? ;) The jakarta-regexp that tomcat uses to handle regular expressions has not changed since September 2003, so many of the tomcat 4.1.x releases have used it. Did you use these tomcat 4 releases without a problem? Alternatively, if you're referring to regexps directly used in your application, and you're using JDK regexps (the java.util.regex package), obviously tomcat has nothing to do with that. Is the rest of your webapp functioning properly in tomcat5, or are there other errors that perhaps make this regexp one come up? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegExp issues with Tomcat 5
Using the regexp tag library I think it is still at version 1.0. Because INSERT into tablename (field1) values ('I CAN'T DO THIS') generates an error in SQL Server. Karl -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 12:03 PM To: Tomcat Users List Subject: Re: RegExp issues with Tomcat 5 Karl, We upgraded tomcat running one of our applications from 4 to 5 this past = Friday, March 27th. Since, one of our regular expressions is not = functioning properly. Here is the expression: s/(\\|')/\\$1/g Instead of escaping the apostrophe with another apostrophe for SQL = purposes, it is replacing the apostrophe with the literal '$1'. It was = working with Tomcat 4 and that is the only thing that has changed. What regex library are you using? Tomcat shouldn't have anything in it that would affect your regexs. Not to open up too big of a can of worms, but if you're using JDBC, why do you have to escape your own SQL statements? -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegExp issues with Tomcat 5
Thanks a lot. I will check into it further. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 1:14 PM To: Tomcat Users List Subject: RE: RegExp issues with Tomcat 5 Hi, Using the regexp tag library I think it is still at version 1.0. You mean http://jakarta.apache.org/taglibs/doc/regexp-doc/intro.html? I wouldn't be surprised if this taglib didn't work on tomcat 5. It's designed and tested for a JSP 1.1/1.2 spec container, like tomcat 4. Tomcat 5 as you know implements the JSP 2.0 spec, with its new expression language and several changes to expression evaluation. It'd be almost shocking if the taglib worked without modification on tomcat 5. Ask on taglibs-user (http://jakarta.apache.org/taglibs/index.html#MailingLists). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegExp issues with Tomcat 5
Is there a regexp library people recommend? I saw there is one on the Jakarta site. Karl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 1:14 PM To: Tomcat Users List Subject: RE: RegExp issues with Tomcat 5 Hi, Using the regexp tag library I think it is still at version 1.0. You mean http://jakarta.apache.org/taglibs/doc/regexp-doc/intro.html? I wouldn't be surprised if this taglib didn't work on tomcat 5. It's designed and tested for a JSP 1.1/1.2 spec container, like tomcat 4. Tomcat 5 as you know implements the JSP 2.0 spec, with its new expression language and several changes to expression evaluation. It'd be almost shocking if the taglib worked without modification on tomcat 5. Ask on taglibs-user (http://jakarta.apache.org/taglibs/index.html#MailingLists). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegExp issues with Tomcat 5
Either. I'll look at the java.util.regex one. I posted at taglib-user earlier and still waiting for response. Thanks again. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 2:52 PM To: Tomcat Users List Subject: RE: RegExp issues with Tomcat 5 Hi, Is there a regexp library people recommend? I saw there is one on the Jakarta site. Library in general or JSP tag library specifically? I've been fine with java.util.regex, which I think requires JDK 1.4. If you must use a JDK older than 1.4, use jakarta-regexp (which tomcat uses). For a JSP tag library to handle regular expressions: I don't know and don't have time to research, but it does seem Glenn is actively working on the regexp taglib and I can't imagine its next release not working on tomcat 5. As I said previously, ask on taglib-user, and I'm sure he'll respond. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Windows Serive Permissions?
It seems the problem with this lies with JRE1.4. When we loaded 1.3 and ran it, it worked. Anyone know of a workaround for the exec method hanging when using JRE 1.4 (besides using 1.3). Karl -Original Message- From: Karl Coleman Sent: Monday, December 01, 2003 11:02 AM To: [EMAIL PROTECTED] Subject: Windows Serive Permissions? I have a command-line utility I am running that converts files into PDF. Here is the line we're using to run the program: Process proc = Runtime.getRuntime().exec(cmd.exe /c C:\\BatchPDF.exe +rtfFile.getAbsolutePath()+ +pdfFile.getAbsolutePath()); The problem is, it only runs if Tomcat was started from the startup.bat file. If Tomcat is running as a service, which is how we want it, it does not run. We set up Tomcat to run under administrator with no luck. We are guessing this is a file permissions problem, either from running it as a Windows service or with Tomcat itself. Any ideas would be appreciated. Thanks, Karl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Windows Serive Permissions?
I have a command-line utility I am running that converts files into PDF. Here is the line we're using to run the program: Process proc = Runtime.getRuntime().exec(cmd.exe /c C:\\BatchPDF.exe +rtfFile.getAbsolutePath()+ +pdfFile.getAbsolutePath()); The problem is, it only runs if Tomcat was started from the startup.bat file. If Tomcat is running as a service, which is how we want it, it does not run. We set up Tomcat to run under administrator with no luck. We are guessing this is a file permissions problem, either from running it as a Windows service or with Tomcat itself. Any ideas would be appreciated. Thanks, Karl
RE: Listening to Session Creation... Need Access to Session
Why would that be wasting time? Isn't this a tomcat list? Karl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 2:39 PM To: Tomcat Users List Subject: RE: Listening to Session Creation... Need Access to Session I'm not going to waste time on approaches 1 and 3, as they're tomcat-specific. #2 will work: you will get the event, with access to the session, once the session is created. It has no attributes at that time, so any getAttribute call will return null. Perhaps you are really looking for a session attribute listener? Yoav Shapira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Running a Service
I need to run a process at a specific time every day, say 3:00am. How do you configure Tomcat to have a service running in the background.
RE: Running a Service
I apologize for being so broad. Let me be more specific. It might help some. We are running an intranet application running on apache and tomcat. It's all Java, using JSP and Servlets, and Struts. One function of the application is scanning in faxes. After being scanned, these documents are stored as TIFF files on the server temporarily. Right now, importing these images into the database is a manual process. There is a JSP page that has a Start Import button that invokes a servlet that imports these images into the database. My task is to make this an automated process so that any images that have been scanned in will get scanned in at night, say 3am. In other words, this code that is in this servlet that imports images needs to be called automatically every night at 3am. I hope that helps. Thanks. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:07 PM To: Tomcat Users List Subject: RE: Running a Service Howdy, You mean like a cron job? ;) Or the Windows Scheduler on windows, or a 3rd party tool like 12Ghosts Timer? Or do you mean already have a tomcat running around the clock but you'd like something to happen at 3am? A tool like Quartz (quarts.sf.net) would help... Yoav Shapira Millennium ChemInformatics -Original Message- From: Karl Coleman [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:02 PM To: [EMAIL PROTECTED] Subject: Running a Service I need to run a process at a specific time every day, say 3:00am. How do you configure Tomcat to have a service running in the background. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Running a Service
I checked out quartz and it looks like exactly what I need. Thanks. If my detailed description gives anybody aother ideas, please let me know. Thanks again. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:07 PM To: Tomcat Users List Subject: RE: Running a Service Howdy, You mean like a cron job? ;) Or the Windows Scheduler on windows, or a 3rd party tool like 12Ghosts Timer? Or do you mean already have a tomcat running around the clock but you'd like something to happen at 3am? A tool like Quartz (quarts.sf.net) would help... Yoav Shapira Millennium ChemInformatics -Original Message- From: Karl Coleman [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:02 PM To: [EMAIL PROTECTED] Subject: Running a Service I need to run a process at a specific time every day, say 3:00am. How do you configure Tomcat to have a service running in the background. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]