RE: Admin app not working..
Hi, You have a bad download of the admin app. This typically occurs if you unzipped it with the wrong utility, or copied from Windows to Unix improperly. HTH -Original Message- From: Nick Stuart [mailto:[EMAIL PROTECTED] Sent: 23 June 2003 16:36 To: Tomcat Subject: Admin app not working.. Good morning all! I'm having issues with getting the admin app to work correctly on 4.1.24. I can log into it fine and everything appears to be normal, but when I go to try and do anything I get the following exception: type Status report message Servlet action is currently unavailable description The requested service (Servlet action is currently unavailable) is not currently available. And after that if I hit the reload button the following pops up (truncated to shorten message): org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) . root cause javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) at org.apache.jsp.index_jsp._jspService(index_jsp.java:120) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137). I get this everytime I try to run the admin app. I'm running tomcat 4.1.24 on Mandrake 9.1. And also, the manager app appears to be working fine, along with all of my apps. Its only the admin app that appears to busted. Any ideas/suggestions on how to get it working would be great! Thanks for your help! -Nick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Admin app not working..
On the main Tomcat distribution site it states: NOTE: The tar files in this distribution use GNU tar extensions, and must be untarred with a GNU compatible version of tar. The version of tar on Solaris and Mac OS X will not work with these files. We have also on this list noted other OS's that this applies to (HP for definite). This warning does not appear on mirror sites! The admin app is particularly susceptible to this. Rgeards eric -Original Message- From: Nick Stuart [mailto:[EMAIL PROTECTED] Sent: 23 June 2003 16:48 To: Tomcat Users List Subject: RE: Admin app not working.. Hmm...dont see how I would. I downloaded the tar.gz file from jakarta and untarred with tar xzf file name I didnt copy anything over from another machine or anything. I had this issue with twoboth version 4.1.18 and .24. I was hoping the upgrade to ...24 would help, but apparently not. Thanks for the suggestion. On Mon, 2003-06-23 at 10:40, Roberts, Eric wrote: Hi, You have a bad download of the admin app. This typically occurs if you unzipped it with the wrong utility, or copied from Windows to Unix improperly. HTH -Original Message- From: Nick Stuart [mailto:[EMAIL PROTECTED] Sent: 23 June 2003 16:36 To: Tomcat Subject: Admin app not working.. Good morning all! I'm having issues with getting the admin app to work correctly on 4.1.24. I can log into it fine and everything appears to be normal, but when I go to try and do anything I get the following exception: type Status report message Servlet action is currently unavailable description The requested service (Servlet action is currently unavailable) is not currently available. And after that if I hit the reload button the following pops up (truncated to shorten message): org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) .. root cause javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) at org.apache.jsp.index_jsp._jspService(index_jsp.java:120) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137). I get this everytime I try to run the admin app. I'm running tomcat 4.1.24 on Mandrake 9.1. And also, the manager app appears to be working fine, along with all of my apps. Its only the admin app that appears to busted. Any ideas/suggestions on how to get it working would be great! Thanks for your help! -Nick - 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: Admin app not working..
All I can tell is that we run on HP. To get the admin app to work, I have to download to Windows. I then use Ant to create a tar.gz of the admin app and this then unzips perfectly on our HP machines. Crazy but true :) -Original Message- From: Nick Stuart [mailto:[EMAIL PROTECTED] Sent: 23 June 2003 16:48 To: Tomcat Users List Subject: RE: Admin app not working.. Hmm...dont see how I would. I downloaded the tar.gz file from jakarta and untarred with tar xzf file name I didnt copy anything over from another machine or anything. I had this issue with twoboth version 4.1.18 and .24. I was hoping the upgrade to ...24 would help, but apparently not. Thanks for the suggestion. On Mon, 2003-06-23 at 10:40, Roberts, Eric wrote: Hi, You have a bad download of the admin app. This typically occurs if you unzipped it with the wrong utility, or copied from Windows to Unix improperly. HTH -Original Message- From: Nick Stuart [mailto:[EMAIL PROTECTED] Sent: 23 June 2003 16:36 To: Tomcat Subject: Admin app not working.. Good morning all! I'm having issues with getting the admin app to work correctly on 4.1.24. I can log into it fine and everything appears to be normal, but when I go to try and do anything I get the following exception: type Status report message Servlet action is currently unavailable description The requested service (Servlet action is currently unavailable) is not currently available. And after that if I hit the reload button the following pops up (truncated to shorten message): org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) .. root cause javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) at org.apache.jsp.index_jsp._jspService(index_jsp.java:120) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137). I get this everytime I try to run the admin app. I'm running tomcat 4.1.24 on Mandrake 9.1. And also, the manager app appears to be working fine, along with all of my apps. Its only the admin app that appears to busted. Any ideas/suggestions on how to get it working would be great! Thanks for your help! -Nick - 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: Need help on deploying application
Sounds like the JDK 1.4.1 not liking spaces in the directory paths. Try putting tomcat in D:\Tomcat4.1 HTH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 23 June 2003 17:20 To: [EMAIL PROTECTED] Subject: Need help on deploying application I have installed Tomcat on my workstation and I'm able to access the applications supplied with the distribution. I have two Tomcat books and I'm trying to deploy an application from one of them as a tool to learn Tomcat basics. I am unable to get to the application. Below is what I believe to be the essential facts of my situation. I would appreciate someone looking over this and telling me where I've gone wrong or offering suggestions on other debugging techniques. Thanks. Here is the information from the Tomcat Manager page: Tomcat version: Apache Tomcat/4.1.24 JVM version: 1.4.1_02-b06 JVM supplier: Sun Microsystems Inc. OS: Windows XP OS version: 5.1 Processor architecture: x86 My CATALINA_HOME environment variable points to: D:\Program Files\Apache Group\Tomcat 4.1 My application is at this path location: D:\Program Files\Apache Group\Tomcat 4.1\webapps\apress I have the files login.jsp and welcome.jsp in this directory. I have this web.xml file in apress\WEB-INF: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/j2ee/dtds/web-app_2_3.dtd' web-app servlet servlet-namelogin/servlet-name servlet-classchapter2.login/servlet-class /servlet taglib taglib-uri/apress/taglib-uri taglib-location/WEB-INF/lib/taglib.tld/taglib-location /taglib /web-app I have this context element in my server.xml file: Context path=/apress docBase=apress debug=0 reloadable=true / When I point my browser at http://localhost:8080/apress/login.jsp;, I get this error message: The requested resource (/apress/login.jsp) is not available. When I use the Tomcat Manager application to start the /apress application, I get this error message: FAIL - Application at context path /apress could not be started Can anyone point out where I've gone wrong? Thanks. -- Charles Knell [EMAIL PROTECTED] - email - 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: java.sql.SQLException: Cannot load JDBC driver class 'null'
Hi, If you have declared your database connection pools ast the GlobalNamingResource level, but do not have your contexts declarared in server.xml, you probably need to have context.xml files in your META-INF subdirectory which contain your ResourceLink definitions for the context. HTH -Original Message- From: Michael Holly [mailto:[EMAIL PROTECTED] Sent: 18 June 2003 17:21 To: [EMAIL PROTECTED] Subject: java.sql.SQLException: Cannot load JDBC driver class 'null' In trying to make the move to automate my testing I have come up against a problem. First some background. I am running Tomcat 4.1.18, Java 1.3.1, Win 2k Part of getting on automated testing was getting the ANT build to undeploy and then redeploy the war after it got created. In addition, I decided that it was more convenient to have the Test classes located in myapp.war instead of a seperate war. Part of getting this dynamic undeploy/deploy cycle to work was removing the context from the server.xml. The reason I want to do this is I have 2 connection pools located there. In a dynamic deploy tomcat generates it's own context for the app. I found there were three ways I could do this. #1. put the connection pool into the GlobalNamingResources section of server.xml #2. create a $APP_NAME.xml file that contains the context of the app and put it into $TOMCAT_HOME/webapps. Both the Tomcat manager and Admin apps do this. #3. Possibly put the context info in the web.xml file for the app. I have tried both 1 and 2 and I am getting a java.sql.SQLException: Cannot load JDBC driver class 'null' error when the DBCP is accessed. The classes12.jar file is located in $TOMCAT_HOME/common/lib. It has been renamed from .zip to .jar Is there something special that I have to do to make the pools available to my application? As you can tell from the included files I am using configuring a connection pool for two different connections. Below are my files for Option #2 (the one I would like to go with). Do I have the resource-ref defined correctly? Is there something I am missing? Some Observations. The app seems to deploy correctly. ( I can see app in Tomcat manager ) Using the Tomcat Admin facility I can see my DataSources. WEB.XML- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameTSR Application/display-name descriptionThis is the web configuration for the TSR application/description !-- SERVLET LISTINGS -- servlet servlet-nameTestServlet/servlet-name servlet-classnet.talisen.tsr.servlets.TestServlet/servlet-class /servlet servlet servlet-nameControllerServlet/servlet-name servlet-classnet.talisen.tsr.servlets.ControllerServlet/servlet-class /servlet servlet servlet-nameFileDownloadServlet/servlet-name servlet-classnet.talisen.tsr.servlets.FileDownloadServlet/servlet-class /servlet servlet servlet-nameStartupServlet/servlet-name servlet-classnet.talisen.tsr.servlets.StartupServlet/servlet-class load-on-startup1/load-on-startup /servlet !--servlet servlet-namelog4j-init/servlet-name servlet-classnet.talisen.tsr.servlets.Log4jInit/servlet-class load-on-startup1/load-on-startup init-param param-namelog4j-init-file/param-name param-valueWEB-INF\classes\log4j.properties/param-value /init-param /servlet-- !-- integrate the testing -- servlet servlet-nameJUnitEETestServlet/servlet-name descriptionJUnitEE test runner/description servlet-classorg.junitee.servlet.JUnitEEServlet/servlet-class /servlet !-- SERVLET MAPPINGS -- servlet-mapping servlet-nameTestServlet/servlet-name url-pattern/test/url-pattern /servlet-mapping servlet-mapping servlet-nameStartupServlet/servlet-name url-pattern/startup/url-pattern /servlet-mapping servlet-mapping servlet-nameControllerServlet/servlet-name url-pattern/controller/url-pattern /servlet-mapping servlet-mapping servlet-nameFileDownloadServlet/servlet-name url-pattern/download/url-pattern /servlet-mapping !-- integrate the testing -- servlet-mapping servlet-nameJUnitEETestServlet/servlet-name url-pattern/TestServlet/*/url-pattern /servlet-mapping !-- JNDI resource for DB connection pool -- resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description res-ref-name jdbc/oracle_tsr /res-ref-name res-type javax.sql.DataSource /res-type res-auth
RE: Load balancing
Hi, Can you use the jvmRoute parameter? -Original Message- From: Pierre Maris [mailto:[EMAIL PROTECTED] Sent: 20 June 2003 16:38 To: [EMAIL PROTECTED] Subject: Load balancing Hi, I am working with a load balanced configuration (1 Apache and 2 Tomcat instances on the same machine). Load balancing is provided by mod_jk. My application uses caches, and to purge caches I need to address, explicitly, each of the Tomcat instances. What's the best way to do this? Regards Pierre - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Special characters
Just try %@ page contentType=text/html; charset=UTF-8 % - it worked for me! -Original Message- From: David Del Sacramento [mailto:[EMAIL PROTECTED] Sent: 12 June 2003 16:27 To: Tomcat Users List Subject: RE: Special characters Thnaks Andy, I did export CATALINA_OPTS, but I got the next error. - java.io.UnsupportedEncodingException: iso-8859-1= at sun.io.Converters.getConverterClass(Converters.java:107) at sun.io.Converters.newConverter(Converters.java:138) at sun.io.CharToByteConverter.getConverter(CharToByteConverter.java:67) at java.io.OutputStreamWriter.init(OutputStreamWriter.java:75) at com.sun.mail.handlers.text_plain.writeTo(text_plain.java:106) at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839) at javax.activation.DataHandler.writeTo(DataHandler.java:295) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1147) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1600) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:321) at javax.mail.Transport.send0(Transport.java:163) at javax.mail.Transport.send(Transport.java:80) at SendMessage.send(SendMessage.java:116) at org.apache.jsp.procesar_0002dpublicacion_0002dcarro_0002dpr$jsp._jspService(procesar_0002dpublicacion_0002dcarro_0002dpr$jsp.java:526) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet..java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve..java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve..java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125) at java.lang.Thread.run(Thread.java:484) - Do you have any idea? I will apreciate your help David --- Bodycombe, Andrew [EMAIL PROTECTED] wrote: You have to specify the file.encoding system property export CATALINA_OPTS=-Dfile.encoding=iso-8859-1 Then restart tomcat. HTH, Andy -Original Message- From: David Del Sacramento [mailto:[EMAIL PROTECTED] Sent: 12 June 2003 15:04 To: [EMAIL PROTECTED] Subject: Special characters Hi, I installed Tomcat 4.1.24 in a Solaris server and I'm using a JSP form that received
RE: UnsatisfiedLinkError with DB2 app driver and JDK1.4.1
Where is the jar file containing your db drivers? Sounds as though you have it in your jdk1.3.1 installation - it should be in common/lib. HTH -Original Message- From: Jochen Schweflinghaus [mailto:[EMAIL PROTECTED] Sent: 11 June 2003 11:39 To: [EMAIL PROTECTED] Subject: UnsatisfiedLinkError with DB2 app driver and JDK1.4.1 Hi, I am SUCCESSFULLY running a web Application with the following environment: - Redhat Linux 7.1 - DB2/LINUX 7.2.3 Database - Tomcat 4.0.4 - JRE 1.3.1 But when just I switch $JAVA_HOME variable for tomcat to use JDK 1.4.1 instead of JRE 1.3.1 I get a java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path at COM.ibm.db2.jdbc.app.DB2Driver.init(DB2Driver.java:241) ... when trying to get a Database connection though the COM.ibm.db2.jdbc.app.DB2Driver. Getting connections via the COM.ibm.db2.jdbc.net.DB2Driver still works, so that I suspected an uncorrect setting of LD_LIBRARY_PATH or the java.library.path property respectively. But this is NOT the case, the path to libdb2jdbc.so is included there. And amazingly a standalone java class I wrote for testing is running fine with any combinations of JVMs and JDBC drivers. I had all tries from the same shell and used the same jar files. So it seems to be a Problem with the JVM version 1.4.x and tomcat. Any hints about this ? Does anyone out there experience similar problems ? Appreciate any kind of help - Jochen. - 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: tomcat domino server
As per a previous reply: Increase the timeout on the domino session. This is not ideal, but you are in a transition phase, and the situation will not last forever. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 11 June 2003 12:34 To: Tomcat Users List Subject: Re: tomcat domino server Consider the following scenario: The user logs in our web application (which runs on both Tomcat and Domino) using the Domino authentication services. Then a Domino HttpSession is created. Then the user clicks a link which redirects the user to the Tomcat application. Then the user clicks around in the 'tomcat-part' of the application for about an hour. (The Domino session then is timed out). The he clicks a link which redirects him back to the 'domino-part' of the application. The user is presented a login-screen. This seems a bit odd, because he wasn't inactive for the past hour. (He was actively using the 'tomcat-part' of the application. The user doesn't know he is on a different server). So why should he log in again? See my problem? Many thanks, Harm de Laat Informatiefabriek The Netherlands Jesper B. Kiær [EMAIL PROTECTED] 06/11/2003 12:22 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To Tomcat Users List [EMAIL PROTECTED] cc Subject Re: tomcat domino server Hi I was wonderring why is this a big problem? When your session is timed out in Domino you are redirected to the login page and thereafter to the page originaly requested. You could rise the the default time out periode from 30 minuttes on the Domino server. This would help the users, but of course lower the security level. regards Jesper B. Kiær Jezzper Consulting http://www.jezzper.dk [EMAIL PROTECTED] wrote on 11-06-2003 11:04:56: Hi all, In our production environment we are (slowly) switching from the Lotus Domino Webserver to Tomcat (and JBoss). But for now we have to use both because we can't switch all applications at once. Therefore some of our webpages (applications) use both the Domino webserver and the Tomcat server. Unfortunatly we have some problems with session time-outs. For instance, when a user logs in our webapplication (we use Domino authentication) a Lotus Domino HttpSession is created. Then when a user clicks a link in the application the user is sent to a Tomcat application. The user then stays in the tomcat application for more than a hour. Then he cliks another link which sends the user back to the Domino server. But then, Ooops... The session of the Domino server is timed-out! This ofcourse goes both ways (The tomcat session could time out, while the user is busy in the Domino web-application). We have absolutely no idea on how to fix this problem. We have searched the net for days and tried a lot, but nothing seems to work. Maybe some of you guys encountered the same problem? Can you help? Thanks, Harm de Laat Informatiefabriek The Netherlands - 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: How to UTF-8 your site.
I would just like to say thanks. I have a magazine site which I recently upgraded from 3.2 to 4.1.24, and all quotation marks in the text were being replaced with the dreaded ? The prospect of editing manually over 100 pages was not a prospect I was looking forward to. Following your advice, everything is now 100%. Thanks -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: 10 June 2003 13:27 To: Tomcat Users List Subject: How to UTF-8 your site. Hello, I have recently completed the torturous process of translating my web-site into 16 European languages. Having had lots of advice from this list and other sources I have come down to a few conclusions about what a Java / Tomcat web-site needs in order to fully support UTF-8. These are: 1. JSP pages must inlcude the header: %@ page contentType=text/html; charset=UTF-8 % 2. In the Catalina.bat (windows) catalina.sh (windows) apache$jakarta_config.com (OpenVMS), file there must be a switch added to the call to java.exe. The switch is: -Dfile.encoding=UTF-8 I cannot find documentation for this environment variable anywhere or what it actually does but it is essential. 3. For translation of inputs coming back from the browser there must be a method that translates from the browser's ISO-8859-1 to UTF-8. It seems to me that -1 is used in all regions as I have had people in countries such as Greece Bulgaria test this and they always send input back in -1 encoding. The method which you will use constantly should go something like this: /** * Convert ISO8859-1 format string (which is the default sent by IE * to the UTF-8 format that the database is in. */ public String toUTF8(String isoString) { String utf8String = null; if (null != isoString !isoString.equals()) { try { byte[] stringBytesISO = isoString.getBytes(ISO-8859-1); utf8String = new String(stringBytesISO, UTF-8); } catch(UnsupportedEncodingException e) { // As we can't translate just send back the best guess. System.out.println(UnsupportedEncodingException is: + e.getMessage()); utf8String = isoString; } } else { utf8String = isoString; } return utf8String; } I have found that these three steps are all that is necessary to make your site accept any language that UTF-8 can work with. I extend my thanks to those of you on the Tomcat users list who helped me find these little gems. Kind regards, Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4 control panel
Er.. manager app and admin app? -Original Message- From: Michele Neylon :: Blacknight Solutions [mailto:[EMAIL PROTECTED] Sent: 11 June 2003 12:42 To: [EMAIL PROTECTED] Subject: Tomcat 4 control panel Hi all I was just wondering if anybody had come across a control panel of any type (even simple) for Tomcat 4 We offer JSP/Servlet support in a shared environment, but not all our technical staff feel comfortable configuring it. Any links or suggestions would be much appreciated. -- Mr. Michele Neylon Blacknight Solutions http://www.blacknightsolutions.com/ Shell hosting now available # This message (and any attachment) is intended only for the recipient and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete this message immediately. Disclosure, copying or other action taken in respect of this email or in reliance to it is prohibited. - 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: Tomcat 4 control panel
Admin app - create new host? -Original Message- From: Michele Neylon :: Blacknight Solutions [mailto:[EMAIL PROTECTED] Sent: 11 June 2003 12:57 To: [EMAIL PROTECTED] Subject: RE: Tomcat 4 control panel Er.. manager app and admin app? I mean something that will write to server.xml etc. We offer virtual hosting, so easy control for our admins is important. My understanding of manager and admin app is that they can control the existing apps etc., not setup new vhosts in server.xml -- Mr. Michele Neylon Blacknight Solutions http://www.blacknightsolutions.com/ Shell hosting now available # This message (and any attachment) is intended only for the recipient and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete this message immediately. Disclosure, copying or other action taken in respect of this email or in reliance to it is prohibited. - 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: CharConversionException: isHexDigit
I bet it could be a rare browser. Closed environments are very rarely closed - in our company we are only provided with our own in-house modified version of IE6 - but we work in IT and Telecoms, so Netscape, Opera, etc can be found all over the place - because we can :) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 28 May 2003 15:07 To: Tomcat Users List Subject: RE: CharConversionException: isHexDigit Howdy, Dude -- I got the exact same thing yesterday and posted it! ;) Still looking for the answer. I don't think it's a rare browser: 100% of my hits are from either IE5..5 or IE6 on Windows 2000 (this is a closed intranet environment). Yoav Shapira Millennium ChemInformatics -Original Message- From: Joel Carklin [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 4:27 AM To: Tomcat Users List Subject: CharConversionException: isHexDigit hi everyone, i was wondering if anyone else has come across the following exception being thrown. i don't know what causes it and it doesn't seem to affect the web applications I'm running but I'm a bit concerned about it. It appears now and then, not very frequently, but often enough, in my catalina.out log file. Usually when I'm not around (like in the middle of the night!) Thanks for any help I'm using Tomcat 4.1.24 and the exception is: java.io.CharConversionException: isHexDigit at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:124) at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:87) org.apache.tomcat.util.http.Parameters.processParameters(Parameters.jav a:40 7) org.apache.tomcat.util.http.Parameters.processParameters(Parameters.jav a:49 5) org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters ...jav a:278) org.apache.coyote.tomcat4.CoyoteRequest.parseRequestParameters(CoyoteRe ques t.java:1933) org.apache.coyote.tomcat4.CoyoteRequest.getParameterNames(CoyoteRequest ...jav a:953) org.apache.coyote.tomcat4.CoyoteRequest.getParameterMap(CoyoteRequest..j ava: 933) org.apache.coyote.tomcat4.CoyoteRequestFacade.getParameterMap(CoyoteReq uest Facade.java:193) org.apache.catalina.core.ApplicationHttpRequest.setRequest(ApplicationH ttpR equest.java:525) org.apache.catalina.core.ApplicationHttpRequest.init(ApplicationHttpR eque st.java:125) org.apache.catalina.core.ApplicationDispatcher.wrapRequest(ApplicationD ispa tcher.java:921) org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDis patc her.java:414) org.apache.catalina.core.ApplicationDispatcher.fo! rward(ApplicationDispatcher.java:356) org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherV alve .java:420) org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherV alve .java:327) org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve .java:181) org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:17 2) org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve ...jav a:174) org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:5 94) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process Conn ection(Http11Protocol.java:392) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 65) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja va:619) at java.lang.Thread.run(Thread.java:536) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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:
RE: JNDI resources
Hi, What is in your web.xml relating to the datasource? If the datasource is correctly defined in server.xml, there is no need to define it in web.xml, but if you do, web.xml will supersede server.xml, and if web.xml does not have all the correct parameters, you will get this problem. HTH -Original Message- From: Greg Speechley [mailto:[EMAIL PROTECTED] Sent: 31 March 2003 10:40 To: Tomcat User Subject: Re: JNDI resources I am trying to use tomcat's DBCP and access it by setting variables in server.xml and web.xml as outlined in the documentation. However it is not getting any of the values that are set in server.xml. Here is my java code: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); // Look up our data source DataSource ds = (DataSource) envCtx.lookup(jdbc/Pool); if (ds != null) { Connection conn = ds.getConnection(); ... } However I get the following error: java.sql.SQLException: Cannot load JDBC driver class 'null'. ds is not null but all its variables are (I checked by casting it to BasicDataSource and using the getter methods). I have the mysql driver in a jar in common/lib and I think I have followed all the steps correctly. Thanks for your help Greg PS I am having the same sort of problems with getting the mail variables as well server.xml --- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Uncomment these entries to enable JMX MBeans support -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Global JNDI resources -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- Logger shared by all Contexts related to this virtual host. By default (when using FileLogger), log files are created in the logs directory relative to $CATALINA_HOME. If you wish, you can specify a different directory with the directory attribute. Specify either a relative (to $CATALINA_HOME) or absolute path to the desired directory.-- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ !-- Define properties for each web application. This is only needed if you want to set non-default properties, or have web application document roots in places other than the virtual host's appBase directory. -- !-- Tomcat Root Context -- !-- Context path= docBase=ROOT debug=0/ -- Context path=/myapp docBase=myapp debug=0 reloadable=true crossContext=true Resource
RE: Http Session Replication : State of the Art
Try http://www.filip.net/tomcat-clustering.html Session replication is a standard feature of Tomcat 5. -Original Message- From: jerome moliere [mailto:[EMAIL PROTECTED] Sent: 28 March 2003 13:06 To: [EMAIL PROTECTED] Subject: Http Session Replication : State of the Art Hi all, searching through the archives of this mailing list, like using our friend google, point me to a single web page (article on theServerSide.com) and this solution is not part from the Jakarta project (uses Javagroups + add-on library with a custom Context Manager InSessionreplicationManager). I know that session replication induces a high load for J2EE servers but it's a customer requirement :) I found a product (commercial) aiming to deliver such feature to different J2EE servers (Weblogic,tomcat,jonas) My question is :what is the tomcat team position for this feature ? Who has put such solution in place ? Who can support such solution ? Sorry for this question (already asked) but with few answers (old ones moreover) Thanks for all help, clue or pointer Cheers Jerome - 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: determining which jdk tomcat is using
Run the manager application - it lists the JVM version. -Original Message- From: KIESEL,JEFF (HP-NewJersey,ex2) [mailto:[EMAIL PROTECTED] Sent: 24 March 2003 15:15 To: '[EMAIL PROTECTED]' Subject: determining which jdk tomcat is using hi all, i have multiple jdks installed on my machine(win2k). i have my JAVA_HOME environment variable set to the JDK want to use, and this is reflected in my Path environment variable as well. how can i be sure tomcat is using the jdk i want it to? is there a way to get tomcat to output this information? thanks, ~jeff - 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: javax.servlet.ServletException: ClassNotFoundException: org.postgresql.Driver
The key word is link - place the file physically in the common/lib directory. HTH -Original Message- From: Jason S. Friedman [mailto:[EMAIL PROTECTED] Sent: 14 March 2003 06:17 To: [EMAIL PROTECTED] Subject: javax.servlet.ServletException: ClassNotFoundException: org.postgresql.Driver I searched the list archives and the web and, while I found folks with a similar issue, none of those posts had an answer that worked for me. The error message is: javax.servlet.ServletException: ClassNotFoundException: org.postgresql.Driver I'm running RH8.0, Apache Tomcat/4.1.18-LE-jdk14, and Postgresql7.3. The file compiles and runs without error from my IDE (netbeans) and from the command line and I can get other servlets to run. I've tried putting a link to /usr/share/pgsql/jdbc7.2dev-1.2.jar into the directory containing my class file and also in the following directories: ./server/webapps/admin/WEB-INF/lib/ ./server/lib/ ./common/lib/ ./shared/lib/ ./common/classes I've reloaded my webapp with each change. 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: KEEP-ALIVE
Er.. Why is this attribute nowhere in the TC docs?? -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED] Sent: 14 March 2003 07:51 To: [EMAIL PROTECTED] Subject: Re: KEEP-ALIVE If you are using the CoyoteConnector (the default for 4.1.x), then set the maxKeepAliveRequests=1 attribute on the Connector. This will effectively disable Keep-Alives. Carlos Manuel Belo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] We are using TomCat without Apache and using http 1.1 I would like to disconnect keep alive to make a workaround. I cannot find a way to do this. Can you please help me? Best Regards Carlos Belo - 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: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector.
Filip's memory is correct. In server.xml you need an entry on the engine element: Engine jvmRoute=tomcat1 . then on the next instance Engine jvmRoute=tomcat2 etc. and your workers.properties file should declare workers tomcat1, tomcat2, etc Regards Eric -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 07:36 To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. BlankI remember there being a property called jvmRoute in the server.xml file that would allow the Apache workers to make sure you got the right Tomcat server upon the next request. otherwise, you can just cluster enable your system, and it should work for you. http://www.filip.net/tomcat-clustering.html Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect www.filip.net -Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: Sunday, March 09, 2003 9:52 PM To: [EMAIL PROTECTED] Subject: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. Hi I'm using Apache2.0.43 and Tomcat4.1.18. I have configured it with multiple tomcat instances with a load balancer. But I am unable to maintain sticky session . The application that I am using has to maintain sessions. But this not happening .When I login the request is JSP so it does to the first Tomcat after login when I click on any link it goes to the second Tomcat and I get a session timeout. I want to know if any one has configured this version of tomcat for maintaining sticky session . I am also sending the workers.properties # workers.properties # # In Unix, we use forward slashes: ps=/ # list the workers by name #worker.list=tomcat1,tomcat2,loadbalancer worker.list=loadbalancer #worker.list=loadbalancer # # First tomcat server # worker.tomcat1.port=11009 worker.tomcat1.host=192.168.146.205 worker.tomcat1.type=ajp13 # Specify the size of the open connection cache. #worker.tomcat1.cachesize # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.tomcat1.lbfactor=100 #worker.tomcat1.local_worker=1 # # Second tomcat server # worker.tomcat2.port=12009 worker.tomcat2.host=192.168.146.205 worker.tomcat2.type=ajp13 # Specify the size of the open connection cache. #worker.tomcat2.cachesize # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.tomcat2.lbfactor=100 #worker.tomcat2.local_worker=1 # # Load Balancer worker # # # The loadbalancer (type lb) worker performs weighted round-robin # load balancing with sticky sessions. # Note: # If a worker dies, the load balancer will check its state #once in a while. Until then all work is redirected to peer #worker. worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat1,tomcat2 worker.loadbalancer.sticky_session=1 in Tomcat#worker.loadbalancer.local_worker_only=2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector.
There is a typo in the server.xml - it should be jvmRoute. The worker.list in your workers.properties appears to only contain the loadbalancer: #worker.list=tomcat1,tomcat2,loadbalancer worker.list=loadbalancer #worker.list=loadbalancer Uncomment the top line and remove the rest. Are you using jk or jk2? Eric -Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 10:14 To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. Hi I check out in the server.xml there is no entry for jvmRoute. There is something called jmvRoute is it a typo or something cos I corrected it to jvmRoute and it still does not work Engine name=Standalone defaultHost=localhost debug=0 jmvRoute=jvm1 This is tag directly taken from server.xml in the tomcat4.1.18's conf directory BR Joshua -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:13 PM To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. Filip's memory is correct. In server.xml you need an entry on the engine element: Engine jvmRoute=tomcat1 . then on the next instance Engine jvmRoute=tomcat2 etc. and your workers.properties file should declare workers tomcat1, tomcat2, etc Regards Eric -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 07:36 To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. BlankI remember there being a property called jvmRoute in the server.xml file that would allow the Apache workers to make sure you got the right Tomcat server upon the next request. otherwise, you can just cluster enable your system, and it should work for you. http://www.filip.net/tomcat-clustering.html Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect www.filip.net -Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: Sunday, March 09, 2003 9:52 PM To: [EMAIL PROTECTED] Subject: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. Hi I'm using Apache2.0.43 and Tomcat4.1.18. I have configured it with multiple tomcat instances with a load balancer. But I am unable to maintain sticky session . The application that I am using has to maintain sessions. But this not happening .When I login the request is JSP so it does to the first Tomcat after login when I click on any link it goes to the second Tomcat and I get a session timeout. I want to know if any one has configured this version of tomcat for maintaining sticky session . I am also sending the workers.properties # workers.properties # # In Unix, we use forward slashes: ps=/ # list the workers by name #worker.list=tomcat1,tomcat2,loadbalancer worker.list=loadbalancer #worker.list=loadbalancer # # First tomcat server # worker.tomcat1.port=11009 worker.tomcat1.host=192.168.146.205 worker.tomcat1.type=ajp13 # Specify the size of the open connection cache. #worker.tomcat1.cachesize # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.tomcat1.lbfactor=100 #worker.tomcat1.local_worker=1 # # Second tomcat server # worker.tomcat2.port=12009 worker.tomcat2.host=192.168.146.205 worker.tomcat2.type=ajp13 # Specify the size of the open connection cache. #worker.tomcat2.cachesize # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.tomcat2.lbfactor=100 #worker.tomcat2.local_worker=1 # # Load Balancer worker # # # The loadbalancer (type lb) worker performs weighted round-robin # load balancing with sticky sessions. # Note: # If a worker dies, the load balancer will check its state #once in a while. Until then all work is redirected to peer #worker. worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat1,tomcat2 worker.loadbalancer.sticky_session=1 in Tomcat#worker.loadbalancer.local_worker_only=2 - 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: Loading one host or web-app before others
Hi, You could set up two Service elements, because Tomcat does guarantee that Services will be initialized in the order they are listed in server.xml HTH Eric -Original Message- From: Neale Rudd [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 10:10 To: Tomcat Users List Subject: Loading one host or web-app before others Hi, Does anyone know if there is a way in Tomcat to specify which host to load first? Tomcat seems to start all hosts around the same time and we have a requirement to start one first so that we can use it to set up some hooks on System.out and System.err. Thankyou for your help. Best Regards, Neale Rudd metawerx http://www.metawerx.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector.
Joshua, Here are the extracts from my conf files. I am running Apache 2.0.43 with mod_jk and Tomcat 4.1.18 also, so please check carefully that you have similar. workers.properties: worker.list=tomcat1,tomcat2,loadbalancer worker.tomcat1.port=9019 worker.tomcat1.host=myhost worker.tomcat1.type=ajp13 worker.tomcat1.lbfactor=100 worker.tomcat2.port=9029 worker.tomcat2.host=myhost worker.tomcat2.type=ajp13 worker.tomcat2.lbfactor=100 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat1, tomcat2 mod_jk.conf: JkMount /manager loadbalancer JkMount /manager/* loadbalancer JkMount /admin loadbalancer JkMount /admin/* loadbalancer JkMount /myapp loadbalancer JkMount /myapp/* loadbalancer server.xml on Tomcat 1: Connector className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=2 redirectPort=8443 debug=0 proxyPort=0 maxProcessors=75 tcpNoDelay=true secure=false enableLookups=true useURIValidationHack=false scheme=http port=9019 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler bufferSize=2048 acceptCount=10 minProcessors=5 Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Engine jvmRoute=tomcat1 className=org.apache.catalina.core.StandardEngine debug=0 name=Standalone defaultHost=myhost mapperClass=org.apache.catalina.core.StandardEngineMapper server.xml on Tomcat 2 Connector className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=2 redirectPort=8443 debug=0 proxyPort=0 maxProcessors=75 tcpNoDelay=true secure=false enableLookups=true useURIValidationHack=false scheme=http port=9029 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler bufferSize=2048 acceptCount=10 minProcessors=5 Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Engine jvmRoute=tomcat2 className=org.apache.catalina.core.StandardEngine debug=0 name=Standalone defaultHost=myhost mapperClass=org.apache.catalina.core.StandardEngineMapper HTH Eric -Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 10:45 To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. Hi I tried correcting the typo but it does not work .Infact the load balancing itself doesn't work if I change it to jvmRoute. BR Joshua -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:52 PM To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. There is a typo in the server.xml - it should be jvmRoute. The worker.list in your workers.properties appears to only contain the loadbalancer: #worker.list=tomcat1,tomcat2,loadbalancer worker.list=loadbalancer #worker.list=loadbalancer Uncomment the top line and remove the rest. Are you using jk or jk2? Eric -Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 10:14 To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. Hi I check out in the server.xml there is no entry for jvmRoute. There is something called jmvRoute is it a typo or something cos I corrected it to jvmRoute and it still does not work Engine name=Standalone defaultHost=localhost debug=0 jmvRoute=jvm1 This is tag directly taken from server.xml in the tomcat4.1.18's conf directory BR Joshua -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:13 PM To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. Filip's memory is correct. In server.xml you need an entry on the engine element: Engine jvmRoute=tomcat1 . then on the next instance Engine jvmRoute=tomcat2 etc. and your workers.properties file should declare workers tomcat1, tomcat2, etc Regards Eric -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 07:36 To: Tomcat Users List Subject: RE: Problem with sticky session in Tomcat4.1.18 and Apache 2.0.43 using mod_JK Connector. BlankI remember there being a property called jvmRoute in the server.xml file that would allow the Apache workers to make sure you got the right Tomcat server upon the next request. otherwise, you can just cluster enable your system, and it should work for you. http://www.filip.net/tomcat-clustering.html Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect www.filip.net -Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: Sunday, March 09, 2003 9:52 PM To: [EMAIL
RE: Problems with JMX Bean in Tomcat4.1.18
-Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 14:54 To: Tomcat Users List Subject: Problems with JMX Bean in Tomcat4.1.18 Hi I have a problem with JMX Bean it was giving the following error ServerLifecycleListener: Creating MBean for Connector [EMAIL PROTECTED] java.lang.Exception: ManagedBean is not found with Ajp13Connector at org.apache.catalina.mbeans.MBeanUtils.createMean(MBeanUtils.java:234) I commented out the code for the JMX Bean in the server.xml bcos in one of the posts in the mail-archive site I found the JMX BEan and the Apj13 cannot be used together. But now I am getting these errors after commenting out the JMX Bean code. java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447) at java.net.ServerSocket.init(ServerSocket.java:165) at java.net.ServerSocket.init(ServerSocket.java:116) at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultServe rSocketFactory.java:147) at org.apache.ajp.tomcat4.Ajp13Connector.open(Ajp13Connector.java:825) at org.apache.ajp.tomcat4.Ajp13Connector.start(Ajp13Connector.java:1071) at org.apache.catalina.core.StandardService.start(StandardService.java:506) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) java.lang.NullPointerException at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:869) at java.lang.Thread.run(Thread.java:479) Tags in server.xml which is commented. Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with JMX Bean in Tomcat4.1.18
Hi Joshua, Do not use the ajp13 connector - use the CoyoteConnector. Then you can use your JMX Beans. The error means that there is no entry in mbeans_decriptor.xml for ajp13. Regards Eric -Original Message- From: Joshua Sunil Kumar [mailto:[EMAIL PROTECTED] Sent: 10 March 2003 14:54 To: Tomcat Users List Subject: Problems with JMX Bean in Tomcat4.1.18 Hi I have a problem with JMX Bean it was giving the following error ServerLifecycleListener: Creating MBean for Connector [EMAIL PROTECTED] java.lang.Exception: ManagedBean is not found with Ajp13Connector at org.apache.catalina.mbeans.MBeanUtils.createMean(MBeanUtils.java:234) I commented out the code for the JMX Bean in the server.xml bcos in one of the posts in the mail-archive site I found the JMX BEan and the Apj13 cannot be used together. But now I am getting these errors after commenting out the JMX Bean code. java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:447) at java.net.ServerSocket.init(ServerSocket.java:165) at java.net.ServerSocket.init(ServerSocket.java:116) at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultServe rSocketFactory.java:147) at org.apache.ajp.tomcat4.Ajp13Connector.open(Ajp13Connector.java:825) at org.apache.ajp.tomcat4.Ajp13Connector.start(Ajp13Connector.java:1071) at org.apache.catalina.core.StandardService.start(StandardService.java:506) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) java.lang.NullPointerException at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:869) at java.lang.Thread.run(Thread.java:479) Tags in server.xml which is commented. Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Share Java resources between two (or more) servlets
You could use a GlobalNamingResources datasource db connection pool which would be available to all your servlets via a ResourceLink, rather than a servlet. -Original Message- From: Bill Lunnon [mailto:[EMAIL PROTECTED] Sent: 07 March 2003 11:52 To: Tomcat Users List Subject: RE: Share Java resources between two (or more) servlets Andreas, Firstly, the servlet with db connections should be created and added to the ServletContext (hence not really a servlet). All other servlets can than access this object via getServletContext.getAttribute() etc. This servlet is defined as a servlet, loaded on initialisation. You must release that the init() method of this servlet can be called multiple times, especially if web.xml is changed. To avoid any dramas, make sure that the init() is singleton (ie it only operates once). Same applies to the destroy() To be safe, make sure the get() and post() methods of the servlet do something like redirect the response to another web page. I know this approach works. Hope this helps Bill -Original Message- From: Andreas Byström [mailto:[EMAIL PROTECTED] Sent: Friday, 7 March 2003 9:20 PM To: Tomcat Users Subject: Share Java resources between two (or more) servlets Hi all! I'm writing an application that uses (for now) 4 different servlets. I would like all these servlets to share some java singelton object. Is this possible? Do all servlets share the same jvm instance and thereby uses the same singelton object? I have one servlet that is set to load-on-startup, this servlet will create the java object (db connections and other stuff) that I want all servlets to share later on. This servlet is not used anymore, it hust listens for shutdown and will not receive any requests. Is this how you should solve a initialization problem or is there some other way? When I run my application I start this servlet (servlet1) as above. But when I then invoke another servlet, servlet2, (that is not set to load-on-startup) there is a strange behavior. Using my traces I can read that it first invokes init on servlet1 again and then init on servlet2. If I then sends a first reuquest to servlet3 it just does init on servlet3. If I instead had sent the first request to 3 before the first request to servlet2 it is the same behavior but vice versa. when the request comes to servlet3 it does init on first 1 nd then 3. The request to servlet 2 now just incokes init on servlet2. Have anyone a clue of you it can be like this? // Andreas Andreas Bystrom Computer Engineer e-horizon Streaming Technologies Stadshusplatsen 2, 4th floor Box 172 SE 14922 Nynashamn mail : [EMAIL PROTECTED] web : www.e-horizon.se phone : +46 8 524 201 80 mobile: +46 708 85 23 35 - 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: can't connect to my Datasource Oracle
Your server.xml looks OK - try classes12.zip (renamed to classes12.jar) instead of classes111.jar -Original Message- From: Yannick Monclin [mailto:[EMAIL PROTECTED] Sent: 07 March 2003 15:24 To: [EMAIL PROTECTED] Subject: can't connect to my Datasource Oracle hi, i try to configure my datasource in order to use it with oracle, all is ok, but when i execute my jsp, he find the jndi name create the datasource (i think because i don't know how to see it ? in the logs ?) and when he execute ds.getConnection() i have no answer, no error from my server but connexion isn't createdand he stop to execute code here someone could help me thanks Yannick I use an oracle 7.3, i have tomcat 4.1.18, driver classes111.jar, jdk 1.4, XP this is my server.xml and my web.xml Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=true debug=0 displayName=Tomcat Heures Comp docBase=c:\Tomcat 4.1\webapps\heurescomp mapperClass=org.apache.catalina.core.StandardContextMapper path=/heurescomp privileged=false reloadable=true swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper Logger className=org.apache.catalina.logger.FileLogger debug=9 directory=logs prefix=heures_comp suffix=.txt timestamp=true verbosity=4/ Resource auth=Container name=jdbc/myoracle scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/myoracle parameter namevalidationQuery/name valueselect * from tab;/value /parameter parameter namepassword/name value/value /parameter parameter namemaxWait/name value1/value /parameter parameter namemaxActive/name value4/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.1.1:1521:ccomp/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameusername/name value/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams /Context web.xml web-app resource-ref descriptionOracle Datasource/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app and my jsp code . // connexion datasource JNDI Context initCtx = new InitialContext(); System.out.println(Creation Context ok= +initCtx); Context envCtx = (Context)initCtx.lookup(java:/comp/env); System.out.println(init context ok= +envCtx); DataSource ds = (DataSource)envCtx.lookup(jdbc/myoracle); System.out.println(init datasource ok= +ds); Connection conn = ds.getConnection(); System.out.println(Connecté); - 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: DBCP problems connection does not return
Try removing the maxIdle and maxActive parameters so that defaults are used - these are much lower than the 30 and 100 in your configuration. I had the same problem with Oracle. HTH Eric -Original Message- From: Gerlinde Fischer [mailto:[EMAIL PROTECTED] Sent: 06 March 2003 12:06 To: [EMAIL PROTECTED] Subject: DBCP problems connection does not return Hi, I have the following problem: The connection seems to be connected, but it does not return. I want to use the naming datasource from tomcat. Configuration: tomcat 4.1.18 standalone, database sapdb (I although tried mysql, the same behaviour) linux 8.0 commons-dbcp.jar, commons-pool.jar and sapdbc.jar in the common/lib directory. configuration in the server.xml file. in my context whb I have made the following configuration: -- Resource auth=Container description=DB Connection name=jdbc/SapdbDS scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/SapdbDS parameter nameurl/name valuejdbc:sapdb://127.0.0.1/WHB?autocommit=off/value /parameter parameter namevalidationQuery/name valueselect count(*) from katver/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxActive/name value100/value /parameter parameter namedriverClassName/name valuecom.sap.dbtech.jdbc.DriverSapDB/value /parameter parameter namemaxWait/name value5/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueuser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value300/value /parameter parameter namepassword/name valuepw/value /parameter /ResourceParams It seems that I can connect to the database, but the connection does not return. Here the code with which I want to connect. public Connection getConnection() throws SQLException { Connection con1=null; try { InitialContext initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/SapdbDS); System.out.println(imTry getconnecion nach datasource: ); con1 = ds.getConnection(); System.out.println(imTry nach getConntection: ); } catch (Exception e) { System.out.println(Fehler: getconnection + e.getMessage()); System.exit(1); } return con1; } -- In the log-file catalina.out I found the following: --- imTry getconnecion nach datasource: --- The output: imTry nach getConntection: does not appear. After 2 hours on the web page I got. page could not displaced. Regrads Gerlinde Universität Bamberg Lehrstuhl für Wirtschaftsinformatik Prof. Dr. Elmar J. Sinz Projekt FlexNow! Tel: ++49 951 863 2775 Fax: ++49 951 863 1195 - 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: 403 Forbidden - you don't have permission ... I'M STUCK!!
Sorry - didn't get your attachments - but think the problem is in httpd.conf Is your listen directive set? # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the VirtualHost # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # Listen 127.0.0.1:8080 ...in other words its the port that could be causing the problem. HTH -Original Message- From: tomcat guy [mailto:[EMAIL PROTECTED]] Sent: Freitag, 21. Februar 2003 16:48 To: Tomcat Users List Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!! Bill, thanks for looking over the files... I checked the directory and everyone is set for file permissions. If they were not set wouldn't http://localhost:8080/examples be blocked? It accesses the same folder D:/Apache/Tomcat4.1/webapps/examples as http://localhost/examples . Isn't that correct??? The folder D:/Apache/Tomcat4.1/CTG/examples has the same permissions as D:/Apache/Tomcat4.1/webapps/examples. Any other ideas? What I need to access is the directory listing under D:/Apache/Tomcat4.1/CTG/temp... It is one of those things that has to be something so obvious, when (IF) I find it I'll probably screem! :) Until then... aaargghh... - Original Message - From: Bill Barker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 21, 2003 12:24 AM Subject: Re: 403 Forbidden - you don't have permission ... any ideas? At a very quick glance, it looks like it should be Ok. My first guess would be tree permissions. Apache will tree-walk, so it needs at least 'rx' permissions to all directories upto and including D:/Apache/Tomcat4.1/CTG/examples. 403 is also Apache's normal response when you have disabled directory listings, but I didn't see that in my quick glance (quick := I very well may have overlooked something :). tomcat guy [EMAIL PROTECTED] wrote in message 001301c2d91d$b63a0590$6601a8c0@ctg">news:001301c2d91d$b63a0590$6601a8c0@ctg... If anyone can help, here is my problem: I can go to http://localhost:8080/examples and I get the directory listing images/ jsp/ servlets/. BUT when I go to http://localhost/examples I get the forbidden error?!? Any ideas? The permissions are all good. I go to http://localhost/examples/jps and it works? The JSP's work along with the servlets. I recently reinstalled my apache server. I cannot remember this not working. What did I forget!!! (besides my documentation, of course). Basically I need to setup a directory path to http://localhost/examples/temp or http://localhost/temp to my virtualHost http://ctg.com/examples nothing is working!!! I have attached a copy of my httpd.conf server.xml. If anyone would be able to give it a quick glance OR send a copy of your config files that would be great! I am using: Apache2.0.43 Tomcat4.1.18 mod_jk Win2k -- - 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: 403 Forbidden - you don't have permission ... I'M STUCK!!
1) Yes each VH can have a Directory directive (as far as I can remember :-)) 2) I have the Tomcat Welcome page as the default page on our installation - in mod_jk.conf I added the lines: JKMount / ajp13 JKMount /* ajp13 in addition to my normal webapp mounts. Apache now completely ignores it's own default directory and sends all blank requests to Tomcats ROOT context. Plus all the links to Manager, Admin etc work! Ciao -Original Message- From: tomcat guy [mailto:[EMAIL PROTECTED]] Sent: Freitag, 21. Februar 2003 17:13 To: Tomcat Users List Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!! I just noticed that! Like I was saying it had to be something simple. The default Directory / was not set. I'll do another ggghhh One word - documentation. Got another quick question now. Can you have a Directory setting for each virtualHost? Ok 2 questions. The default DocumentRoot is: DocumentRoot D:/Apache/Apache2/htdocs everything (all files) are being served under D:/Apache/Tomcat4.1/webapps Should the DocumentRoot be changed to this? Or does the connector handle this D:/Apache/Apache2/htdocs is ok??? - Original Message - From: Roberts, Eric [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, February 21, 2003 9:50 AM Subject: RE: 403 Forbidden - you don't have permission ... I'M STUCK!! Sorry - didn't get your attachments - but think the problem is in httpd.conf Is your listen directive set? # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the VirtualHost # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # Listen 127.0.0.1:8080 ...in other words its the port that could be causing the problem. HTH -Original Message- From: tomcat guy [mailto:[EMAIL PROTECTED]] Sent: Freitag, 21. Februar 2003 16:48 To: Tomcat Users List Subject: Re: 403 Forbidden - you don't have permission ... I'M STUCK!! Bill, thanks for looking over the files... I checked the directory and everyone is set for file permissions. If they were not set wouldn't http://localhost:8080/examples be blocked? It accesses the same folder D:/Apache/Tomcat4.1/webapps/examples as http://localhost/examples . Isn't that correct??? The folder D:/Apache/Tomcat4.1/CTG/examples has the same permissions as D:/Apache/Tomcat4.1/webapps/examples. Any other ideas? What I need to access is the directory listing under D:/Apache/Tomcat4.1/CTG/temp... It is one of those things that has to be something so obvious, when (IF) I find it I'll probably screem! :) Until then... aaargghh... - Original Message - From: Bill Barker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 21, 2003 12:24 AM Subject: Re: 403 Forbidden - you don't have permission ... any ideas? At a very quick glance, it looks like it should be Ok. My first guess would be tree permissions. Apache will tree-walk, so it needs at least 'rx' permissions to all directories upto and including D:/Apache/Tomcat4.1/CTG/examples. 403 is also Apache's normal response when you have disabled directory listings, but I didn't see that in my quick glance (quick := I very well may have overlooked something :). tomcat guy [EMAIL PROTECTED] wrote in message 001301c2d91d$b63a0590$6601a8c0@ctg">news:001301c2d91d$b63a0590$6601a8c0@ctg... If anyone can help, here is my problem: I can go to http://localhost:8080/examples and I get the directory listing images/ jsp/ servlets/. BUT when I go to http://localhost/examples I get the forbidden error?!? Any ideas? The permissions are all good. I go to http://localhost/examples/jps and it works? The JSP's work along with the servlets. I recently reinstalled my apache server. I cannot remember this not working. What did I forget!!! (besides my documentation, of course). Basically I need to setup a directory path to http://localhost/examples/temp or http://localhost/temp to my virtualHost http://ctg.com/examples nothing is working!!! I have attached a copy of my httpd.conf server.xml. If anyone would be able to give it a quick glance OR send a copy of your config files that would be great! I am using: Apache2.0.43 Tomcat4.1.18 mod_jk Win2k -- - 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 P
RE: Tomcat 4.1.18-LE re-writes tomcat-users.xml file; why?
Yoav is correct - you can create users in the Admin webapp. ...and you could use the Fullname field for your comments. HTH -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Freitag, 21. Februar 2003 16:56 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: RE: Tomcat 4.1.18-LE re-writes tomcat-users.xml file; why? Howdy, I recently upgraded from tomcat 4.1.12-LE to 4.1.18-LE. I use the simple Memory Realm for user authentication. I have been maintaining the tomcat-users.xml file by hand, including comments etc. It appears that some portion of 4.1.18 reads and then rewrites the tomcat-users.xml That portion is org.apache.catalina.users.MemoryUserDatabase. This class reads and then writes the file. I believe the reason the file needs to be re-written is that users may be added via the admin webapp. I may be wrong on this. What the class does is read the file into memory, not retaining its XML content but rather converting it into maps of groups (org.apache.catalina.Group), roles (org.apache.catalina.Role), and users (org.apache.catalina.User). The public close() method persists the in-memory representation of this structures back into the XML file. So obviously, comments are not saved. file because all of my comments etc. disappear shortly after the server starts and long before I make any access to the server. This is unfortunate. I'm not sure what the best solution is in this case. For now, perhaps you could move the content of these comments out of the tomcat-users.xml file itself and into a separate document regarding tomcat user setup for your company/webapp/whatever. Is the behavior with respect to the tomcat-users.xml file configurable? I don't think so. I would really prefer that it not be changed by some program. It's not some program. This is a tomcat-owned configuration file and tomcat changes this file. p.s. would you please cc me on any reply so I see it soonest? Thanks. OK. Yoav Shapira Millennium ChemInformatics 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: error opening tomcat admin login page
Hi Mark, Sorry I didn't have much time yesterday so sent a very brief response! I experienced this problem when copying my Tomcat installation from W2K to Unix. The file transfer mechanism screwed up lots things, mainly case sensitivity, CR/LF. As you point out, only the admin application (struts based) seems to be affected. About a week ago Roberto Rios posted to the list with the exact same problem - and my advice on reinstallation worked for him. I am not familiar with your platform, but would guess that your gunzip or tar utilities are doing something unexpected when extracting the files. On the download page for Tomcat appears the following: NOTE: The tar files in this distribution use GNU tar extensions, and must be untarred with a GNU compatible version of tar. The version of tar on Solaris and Mac OS X will not work with these files. Add HP-UX to that list also :-( I extract everything on W2K from .zip, then use a custom ant target to tar and gzip everything back up again into a .tar.gz which does extract properly under HP-UX - ho-hum :-) I can only advise you try a reinstallation, if that still doesn't work, see if you can come up with a similar workaround. HTH -Original Message- From: Mark Strecker [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 19. Februar 2003 19:34 To: Tomcat Users List Subject: Re: error opening tomcat admin login page Thanks for your response. I am having trouble understanding what to do. I tried to track down the source of the problem and I found the message tag in struts-bean.tld ... but that's it. I couldn't find any properties files in the admin webapp ... would you be more specific about which file(s) you mean? Are you saying to reinstall Tomcat? I'm not sure what would happen differently if I did. It's a simple gunzip, tar -xf then run tomcat. Would you elaborate on this too? TIA, Mark Roberts, Eric wrote: Hi, Its a case sensitivity issue - when you installed either message got translated to MESSAGE or the other way round. Two solutions - 1) re-install from another souce or 2) go down into the admin app directories and change the names of the properties files manually HTH -Original Message- From: Mark Strecker [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 19. Februar 2003 17:42 To: Tomcat Users List Subject: error opening tomcat admin login page Hello All, I installed tomcat 4.1.18 on an sgi(Java 1.3.1 on Irix 6.5) and cannot open the admin login(/admin/login.jsp). I get this exception : org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:530, Compiled Code) at org.apache.jsp.login_jsp._jspService(login_jsp.java:188, Compiled Code) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853, Compiled Code) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204, Compiled Code) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295, Compiled Code) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853, Compiled Code) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247, Compiled Code) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193, Compiled Code) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995, Compiled Code) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643, Compiled Code) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:550, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995, Compiled Code) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415, Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180, Compiled Code) at org.apache.catalina.core.StandardPipeline
RE: Error 500 when trying to run /manager app.
Add the role as well ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ role rolename=manager/ role rolename=admin/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ user username=admin password=admin roles=admin,manager,role1,tomcat/ /tomcat-users -Original Message- From: Andoni [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 20. Februar 2003 13:15 To: Tomcat Users List Subject: Error 500 when trying to run /manager app. Hello, I am getting an error 500 ServletException Root Cause: java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.ManagerServlet is privileged and cannot be loaded by this web application Is this because I am using the wrong username / password? I have gone to tomcat-users.xml and it looks like: tomcat-users user name=tomcat password=tomcat roles=tomcat / user name=administrator password=password roles=manager / user name=role1 password=tomcat roles=role1 / user name=both password=tomcat roles=tomcat,role1 / /tomcat-users I am trying to log in as the administrator user that I added. What else do I have to do? Andoni. - 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: error opening tomcat admin login page
Hi, Its a case sensitivity issue - when you installed either message got translated to MESSAGE or the other way round. Two solutions - 1) re-install from another souce or 2) go down into the admin app directories and change the names of the properties files manually HTH -Original Message- From: Mark Strecker [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 19. Februar 2003 17:42 To: Tomcat Users List Subject: error opening tomcat admin login page Hello All, I installed tomcat 4.1.18 on an sgi(Java 1.3.1 on Irix 6.5) and cannot open the admin login(/admin/login.jsp). I get this exception : org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:530, Compiled Code) at org.apache.jsp.login_jsp._jspService(login_jsp.java:188, Compiled Code) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853, Compiled Code) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204, Compiled Code) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295, Compiled Code) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853, Compiled Code) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247, Compiled Code) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193, Compiled Code) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995, Compiled Code) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643, Compiled Code) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:550, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995, Compiled Code) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415, Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643, Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641, Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995, Compiled Code) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174, Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643, Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480, Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995, Compiled Code) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223, Compiled Code) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432, Compiled Code) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386, Compiled Code) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534, Compiled Code) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530, Compiled Code) at java.lang.Thread.run(Thread.java:484, Compiled Code) Any help would be greatly appreciated. Thanks, Mark - To unsubscribe,
RE: Setting classpath for tomcat 4.1.18 - where to??
Hi, Put your drivers in common/lib. Tomcat uses it's own classpath - read the Class Loader HOW TO in the docs. HTH :-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 12. Februar 2003 12:39 To: [EMAIL PROTECTED] Subject: Setting classpath for tomcat 4.1.18 - where to?? Where abouts is the classpath set in tomcat 4.1.18??? I reckon it doesnt know about the class for the loader and hence a reason why it might be throwing an exception. Does anybody know where I can add extra classes to the classpath for Tomcat 4.1.18?? Need to add driver classes. They are already set in the control panel environment settings but perhaps need to directly set them? - 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: Admin Webapp Error
Hi Roberto, I had a similar experience, but on a unix platform. We had downloaded Tomcat as a .zip to W2K box (we run HP/UX and the tar.gz files are no good to us). The file was unzipped, then transferred to the unix box. The file transfer mechanism did not work correctly, and did not convert the CR/LF characters correctly, nor was case preserved. This showed up in the admin app with exactly the error you describe - because the properties files were corrupted - with spurious CR's and capitalisation screwed up. Have a look at the properties files used by the admin app and verify that the names have not been messed up in your transfers. HTH -Original Message- From: Roberto Rios [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 12. Februar 2003 15:34 To: [EMAIL PROTECTED] Subject: Admin Webapp Error Importance: High Hi all, I am trying to use the admin module that comes with tomcat 4.1.18, and I receive the following error message: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:530) at org.apache.jsp.login_jsp._jspService(login_jsp.java:188) ... I did some research, and I was not able to found I solution. I never found a direct solution, so I decided to do some tests. First of all, the problems seems to be related with struts. 1) I have replaced xmlParserAPIs.jar and xercesImpl.jar because someone wrote that the struts that comes with tomcat 4.1.18 has some bugs, and do not work with earlier versions of it. So, I have downloaded the version 2.1.0 os xerces, but it doesn't work too. 2) After that, I did some research at STRUTS mailing list, and I found that the problem could be related with Action servlet, and some guys recommended to put a load-on-startup/ into web.xml. It doesn't worked too. Of course I tried to do both of them, but no success again. I have tried to use both tomcat 4.1.18 FULL and 4.1.18 LE. I am using j2sdk 1.4.1_01-b01, with w2k pro. I always use a fresh installation with no modifications. I just ungzip/untar the binary distribution, then I set the CATALINA_HOME, change the tomcat-users.xml (adding the admin and manager roles as well an admin user). Tomcat always works well. My applications run fine. Manager webapp works fine too, but the admin module... Please, some one have a solution to this problem? Thanks in advance, Roberto Rios - 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: loadbalancing with tomcat only and unable to bring admin and manager pages
Another answer on monitoring: We run a shell script on cron which invokes Ant to monitor which servlets are running in Tomcat (using the list target), and then compare the results with a properties file containing the names of our servlets - any discrepancy and an alarm is automatically triggered. So far Tomcat has been 100% stable however :-)) -Original Message- From: krip pane [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 12. Februar 2003 15:10 To: Tomcat Users List Subject: Re: loadbalancing with tomcat only and unable to bring admin and manager pages Ben, Thanks for te reply (so far the only one). Can you please elaborate on the monitoring part? I meant to ask what are the symptoms (are there generic meassges?) to grep for from the log files to monitor the health of tomcat. Thanks --- Ben Ricker [EMAIL PROTECTED] wrote: On Tue, 2003-02-11 at 10:06, krip pane wrote: i'm running tomcat 4.1.12. I've a few questions any and all help is truly appreciated. 1. what's the best way to monitor the health of tomcat? There are a number of ways to do this: process watching, scripts that access the certain URLs and match the result with what is expected, third-party monitors like Big Brother, etc. 2. Is the default connector that comes packaged with tomcat capable of doing failover,loadbalancing or do I need to have apache in the front and a connector in between. You need to have Apache out in front with a connector in between. 3. Is it possible to redirect tomcat to port 80 (or do i need apache in the front again) to avoid having the users type 8080 everytime? You can have Tomcat use port 80, but you have to change the server.xml to reflect that and start Tomcat as Root. However, you would not have the load-balancing/failover. 4. while starting tomcat as user tomcat i keep getting tomcat-users permission denied. only wrokaround I found was to either give the user write access to the conf dir or comment out the memoryrealm altogether. One, is it a good idea to give the suer write access to conf dir. Two i have to setup a user list (currently locally) to allow access to tomcat, if i comment out the memeoryrealm then how do i authenticate my users. I give the user 'Tomcat' the ownership of the Tomcat directory. Should be no pproblem with that, as log as the conf directory is not in the 'ROOT' docbase directory. The answer above should fix two. Ben Ricker -- Ben Ricker [EMAIL PROTECTED] Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - 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: Question
[EMAIL PROTECTED] -Original Message- From: Luc Foisy [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 12. Februar 2003 15:48 To: Tomcat User List (E-mail) Subject: Question is there an apache html server list? Luc Foisy - 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: Apache-Tomcat-HPUX Problems
Silly me - who would have thought of going to your vendor for free support! I downloaded the HP release and everything works. Thanks to all! -Original Message- From: PELOQUIN,JEFFREY (HP-Boise,ex1) [mailto:[EMAIL PROTECTED]] Sent: Montag, 10. Februar 2003 16:31 To: 'Tomcat Users List' Subject: RE: Apache-Tomcat-HPUX Problems Eric, We have been using apache/tomcat on HP-UX for over a year and have not had any problems compiling any version of apache. Because of compilation issues with mod_jk we used mod_webapp instead of mod_jk but now that HP has released their version of Apache with mod_jk13 bundled in, we are in the process of migrating. The latest download can be found at http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo .pl?productNumber=HPUXWSSUITE I have not as yet installed this update but I have used the previous release and integration with tomcat went smooth. Note they have tomcat 4.1.12 as part of this package but you can use you can use any version of tomcat. Just modify the provided mod_jk files accordingly. Using the HP-UX version provided by HP may solve your problems Jeff -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED]] Sent: Monday, February 10, 2003 7:49 AM To: Tomcat Users List Subject: Apache-Tomcat-HPUX Problems Hi, Does anybody on the list run under HPUX? We are running: HP-UX B.11.00 U 9000/800 (tb) Tomcat 4.1.18 Apache 1.3.24 Oracle 8.1.7 Tomcat and Apache communicate via mod_jk. We use DBCP to provide a global Db connection pool. Everything works fine. We are running Apache only because we wish to use it for loadbalancing to multiple Tomcat instances. Here is the problem: At first we tried installing Apache 2.0.44 - but we got compiler warnings and when we try to start it we get core dumps. We can build and run Apache 1.3.24. The mod_jk.so was compiled from the Tomcat 3.3.1a source, as this had some specific HPUX build instructions. As I say, in normal operation, everything is fine, but with loadbalancing enabled, if I drop the first instance of Tomcat, Apache coredumps as soon as a browser request is received. The Apache error log shows that the child process (mod_jk) caused the fault. I believe this is all to do with the DSO support of HPUX (we compiled with GNU compiler). Anybody out there on HPUX who can shed some light? Thanks Eric Roberts - 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: web page errors
You do need a web.xml for each app - but if they have a lot in common you can define a lot of this stuff in the DefaultContext of server.xml HTH -Original Message- From: Peter Choe [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 11. Februar 2003 16:19 To: Tomcat Users List; Tomcat Users List Subject: RE: web page errors do i need to set up the web.xml for each application, or is there a way to have one set up for all the applications in one place? Peter Choe At 10:04 AM 2/11/2003, Shapira, Yoav wrote: Howdy, can tomcat handle errors such as 404 document not found without apache? Yes. Anything that claims it implements the HTTP protocol has to handle these. how can i configure tomcat to direct these errors to an error page? It'll automatically direct these errors to its default error pages. Use the error-page directive in your web.xml to define custom error pages. See the servlet spec chapter 13 for a full explanation of the error-page element with examples. Yoav Shapira Millennium ChemInformatics - 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]
Apache-Tomcat-HPUX Problems
Hi, Does anybody on the list run under HPUX? We are running: HP-UX B.11.00 U 9000/800 (tb) Tomcat 4.1.18 Apache 1.3.24 Oracle 8.1.7 Tomcat and Apache communicate via mod_jk. We use DBCP to provide a global Db connection pool. Everything works fine. We are running Apache only because we wish to use it for loadbalancing to multiple Tomcat instances. Here is the problem: At first we tried installing Apache 2.0.44 - but we got compiler warnings and when we try to start it we get core dumps. We can build and run Apache 1.3.24. The mod_jk.so was compiled from the Tomcat 3.3.1a source, as this had some specific HPUX build instructions. As I say, in normal operation, everything is fine, but with loadbalancing enabled, if I drop the first instance of Tomcat, Apache coredumps as soon as a browser request is received. The Apache error log shows that the child process (mod_jk) caused the fault. I believe this is all to do with the DSO support of HPUX (we compiled with GNU compiler). Anybody out there on HPUX who can shed some light? Thanks Eric Roberts - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: question
Tomcat is not starting up correctly - go to $CATALINA_HOME/logs and read the logfiles. If these do not help you, post the logs back to the list, together with details of your OS, then we may be able to help you. -Original Message- From: Sunny Sun [mailto:[EMAIL PROTECTED]] Sent: Freitag, 07. Februar 2003 09:07 To: [EMAIL PROTECTED] Subject: question Hello, I have a question for setup jakarta-tomcat-4.1.18. After I set up it, I want to run tomcat by typing: $CATALINA_HOME/bin/startup.sh. And the message is: Using CATALINA_BASE: /usr/jakarta-tomcat-4.1.18 Using CATALINA_HOME: /usr/jakarta-tomcat-4.1.18 Using CATALINA_TMPDIR: /usr/jakarta-tomcat-4.1.18/temp Using JAVA_HOME: /usr/java/j2sdk1.4.1_01 When I test it by typing: http://localhost:8080, the message shows me: The connection was refused when attemping to contact localhost:8080. When I want to shutdown tomcat by typing: $CATALINA_HOME/bin/shutdown.sh, the message shows me: Using CATALINA_BASE: /usr/jakarta-tomcat-4.1.18 Using CATALINA_HOME: /usr/jakarta-tomcat-4.1.18 Using CATALINA_TMPDIR: /usr/jakarta-tomcat-4.1.18/temp Using JAVA_HOME: /usr/java/j2sdk1.4.1_01 Catalina.stop: java.net.ConnectException: Connection refused java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:426) at java.net.Socket.connect(Socket.java:376) at java.net.Socket.init(Socket.java:291) at java.net.Socket.init(Socket.java:119) at org.apache.catalina.startup.Catalina.stop(Catalina.java:581) at org.apache.catalina.startup.Catalina.execute(Catalina.java:402) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) I have no idea whether the tomcat is setup successfully or not. And how to fix the problem? Could you please help me out? Thank you very much in advance. Sunny _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - 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: DataSource.getConnection() hangs
Hi Maris I don't use a validation query at all and mine works! I'm using Oracle - maybe different databases have different features when working with DBCP ;-)) -Original Message- From: Maris Orbidans [mailto:[EMAIL PROTECTED]] Sent: Freitag, 07. Februar 2003 12:37 To: Tomcat Users List Subject: RE: DataSource.getConnection() hangs I solved it too. But it seems that mine problem was caused by empty pool validation query string. thanx Maris -Original Message- From: Sean Dockery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 7:27 PM To: Tomcat Users List Subject: RE: DataSource.getConnection() hangs Very very cool thing to know. I've seen this behavior before but never knew what was causing it. At 14:11 2003-02-05 +0100, you wrote: Hi, I had this problem a while ago. Mine was caused by DBCP attempting to open a pool of Db connections when receiving the first getConnection() request - and my Db was not configured to handle that many connections - and it just hung waiting for the maxActive value to become available. I omitted minIdle and maxActive parameters so that they defaulted (in my case 4 and 2) then it worked. I then got my DBA to reconfigure his startup parameters to something realistic. HTH Sean Dockery [EMAIL PROTECTED] Certified Java Web Component Developer Certified Delphi Programmer SBD Consultants http://www.sbdconsultants.com - 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: DataSource.getConnection() hangs
Hi, I had this problem a while ago. Mine was caused by DBCP attempting to open a pool of Db connections when receiving the first getConnection() request - and my Db was not configured to handle that many connections - and it just hung waiting for the maxActive value to become available. I omitted minIdle and maxActive parameters so that they defaulted (in my case 4 and 2) then it worked. I then got my DBA to reconfigure his startup parameters to something realistic. HTH -Original Message- From: Maris Orbidans [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 05. Februar 2003 11:33 To: Tomcat Users List Subject: RE: DataSource.getConnection() hangs I have it: resource-ref descriptionDB Connection/description res-ref-namejdbc/BooksDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Lindomar [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 7:16 PM To: Tomcat Users List Subject: Re: DataSource.getConnection() hangs Put this: == resource-ref descriptionany description/description res-ref-namejdbc/BooksDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref == In web.xml of your application. See too http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasourc e-examples-how to.html Ok. - Original Message - From: Maris Orbidans [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, February 03, 2003 15:47 Subject: DataSource.getConnection() hangs E-mail Premium BOL Antivírus, anti-spam e até 100 MB de espaço. Assine já! http://email.bol.com.br/ ok, I configured data source, wrote those lines you can see below in server.xml, inside Context tag. Now Tomcat just hangs, when I call DataSource method getConnection. I use Tomcat 4.1.18 has anybody experienced this ? Maris Orbidans ResourceParams name=jdbc/BooksDB parameter namevalidationQuery/name value/ /parameter parameter nameurl/name valuejdbc:mysql://localhost/booksdb/value /parameter parameter namepassword/name valuehh/value /parameter parameter namemaxActive/name value16/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameusername/name valuepoweruser/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams -Original Message- From: Cristian Draghici [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 11:07 AM To: Tomcat Users List Subject: RE: Cannot load JDBC driver class 'null' yes it will shutdown tomcat and edit the server.xml file by hand. (add the ResourceParams entry under your context) add the necessary entries, start tomcat and the admin console should work. (at least that's what happens with my tomcat 4.1.18) hope this helps, cristi -Original Message- From: Maris Orbidans [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 11:03 AM To: Tomcat Users List Subject: Cannot load JDBC driver class 'null' hello I have run into that problem too, I defined a datasource and put driver and common/lib and defined resource-ref in web.xml of my web. app. but if throws exception when I try to get a connection from datasource I have found. I tried to do it at home with different database with the same result, so I dont think I have mistyped something. I know this problem has been adressed before but I havent found any solution from maillist archives. BTW I have found one related thing: If you open Tomcat admin tool, choose host - context - context name - Data sources it will throw an exception: org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName' so... I there any known solution ? Maris Orbidans www.datapro.lv - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To
RE: tomcat, tyrex and mysql, and autocommit
If you are running Tomcat 4.1.x you should be using DBCP for database connections. Tyrex is no longer used as of 4.1 -Original Message- From: emiliano albiani [mailto:[EMAIL PROTECTED]] Sent: Montag, 03. Februar 2003 10:57 To: Tomcat Users List Subject: tomcat, tyrex and mysql, and autocommit Martin Jacobson wrote: emiliano albiani wrote: HI, I'm trying configuring tyrex in my tomcat installation to use MySql xa driver. I did it as described in tomcat documentation: http://jakarta.apache.org/tomcat/to...les-howto.html, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html, but something is going wrong. snip Error trace: 2003-01-31 12:04:24,631 ERROR [Thread-3](ConnectionPool.java:1046) - Error attempting to destory connection XAConnection: unused by connection pool iseDatasource java.sql.SQLException: Can't call commit when autocommit=true at com.mysql.jdbc.Connection.commit(Unknown Source) at com.mysql.jdbc.xa.XAConnectionImpl.close(Unknown Source) at tyrex.resource.jdbc.ConnectionPool.discard(ConnectionPool.java:1042) at tyrex.resource.jdbc.ConnectionPool.release(ConnectionPool.java:852) at tyrex.resource.jdbc.ConnectionPool.connectionErrorOccurred(ConnectionPool.java:636) at com.mysql.jdbc.xa.XAConnectionImpl.getConnection(Unknown Source) at tyrex.resource.jdbc.ConnectionPool.getConnection(ConnectionPool.java:427) at tyrex.resource.jdbc.ConnectionPool.getConnection(ConnectionPool.java:398) By default MySQL is in autocommit mode - you should turn it off to enable transactions. Martin How can I do it? This is what I did with no success: mysql ise set autocommit=0; but tyrex still have the same problem. What am I missing? Thanks in advance. Emiliano. - 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: Context problem, urgent!
Hi, The missing jar is xml-apis.jar which is an Ant distribution jar. Have you set the ANT_HOME environment variable? -Original Message- From: Peng Annie / FINLAND [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 30. Jänner 2003 14:18 To: 'Tomcat Users List' Subject: RE: Context problem, urgent! Hi, I am still struggling with ant. After puting the library files manually, I got this error message: BUILD FAILED file:C:/jakarta-tomcat-4.1.18-src/webapps/tomcat-docs/build.xml:82: javax.xml.tr ansform.TransformerFactoryConfigurationError: Provider for javax.xml.transform.T ransformerFactory cannot be found Which lib file is missing? Thanks in advance. -Original Message- From: Barney Hamish [mailto:[EMAIL PROTECTED]] Sent: 30. tammikuuta 2003 13:53 To: 'Tomcat Users List' Subject: RE: Context problem, urgent! It doesn't really matter if it downloads the zipped tar or the zip, they're both pretty much the same and should work on either platform... My guess is your firewall is getting in the way of ant's efforts to download the beanutils. Check in the build script or the instructions where it expects to find the bean utils package, download it yourself and put it there. -Original Message- From: Peng Annie / FINLAND [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 12:26 PM To: 'Tomcat Users List' Subject: RE: Context problem, urgent! OK Now when I run ant in tomcat src dir it doesn't complain. But it was failed with the following message: [echo] download http://jakarta.apache.org/builds/jakarta-commons/release/commo ns-beanutils/v 1.4.1/commons-beanutils-1.4.1.tar.gz testexist: [echo] Testing for /usr/local/commons-beanutils-1.4.1/commons-beanutils.jar downloadgz: [get] Getting: http://jakarta.apache.org/builds/jakarta-commons/release/commo ns-beanutils/v 1.4.1/commons-beanutils-1.4.1.tar.gz [get] Error getting http://jakarta.apache.org/builds/jakarta-commons/release/commo ns-beanutils/v 1.4.1/commons-beanutils-1.4.1.tar.gz to \usr\local\file.tar.gz BUILD FAILED file:C:/jakarta-tomcat-4.1.18-src/build.xml:564: java.io.FileNotFoundException: http://jakarta.apache.org/builds/jakarta-commons/release/commo ns-beanutils/v 1.4.1/commons-beanutils-1.4.1.tar.gz Total time: 2 seconds I am using W2k, why it tried to download tar.gz? -Original Message- From: Barney Hamish [mailto:[EMAIL PROTECTED]] Sent: 30. tammikuuta 2003 13:13 To: 'Tomcat Users List' Subject: RE: Context problem, urgent! It sounds like you're running ant from the wrong directory... Try running Ant from the directory where the Tomcat build.xml is. Hamish -Original Message- From: Peng Annie / FINLAND [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 11:59 AM To: 'Tomcat Users List' Subject: RE: Context problem, urgent! Hi Bill, Thanks a lot for the instruction. But where shall I put Ant? When I run 5) step in your instruction, it always complain build.xml doesn't existed! BR, Annie -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED]] Sent: 30. tammikuuta 2003 11:23 To: [EMAIL PROTECTED] Subject: Re: Context problem, urgent! Since 13040 is still marked NEW, I'm afraid so. It's really not as scary as it sounds. The steps are (assuming that jakarta-ant-1.5.x is already installed, and in your PATH): 1) download and un-pack the Tomcat source distribution. 2) download and un-pack the Connector source distribution 3) cd to the directory where you unpacked the Tomcat source (by default .../jakarta-tomcat-4.1.x-src), and copy the 'build.properties.sample' file to 'build.properties' 4) edit the 'build.properties' file to set the 'jtc.home' property to the location of the Connector source dowload. Last time that I did this, you also need to set the 'jasper.home=jasper' property. If you are behind a firewall, then you also have to set the 'proxy.host' and 'proxy.port' to your proxy server's values. These (as well as the 'proxy.use') are commented out by default: uncomment them if this applies. 5) run the command 'ant download' to install the additional libraries. 6) apply the patch to the source code. 7) run the command 'ant dist' to create a new Tomcat distribution in .../jakarta-tomcat-4.1.x-src/dist. Peng Annie / FINLAND [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks Bill. It is exactly my problem. It is a bug of TC4.1.12. I noticed that there is fixing solution to the source code. Does it mean that I have to download the source code and modify it and recompile it? -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED]] Sent: 30. tammikuuta 2003 9:18 To: [EMAIL PROTECTED] Subject: Re: Context problem, urgent! Look at
RE: DBCP Factory
Hi, common/lib should contain commons-dbcp.jar - that is where the BasicDataSourceFactory is. -Original Message- From: Marc Logemann [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 30. Jänner 2003 15:08 To: [EMAIL PROTECTED] Subject: RE: DBCP Factory Hi, i tried also the factory paramter, w/o success, can somebody tell me where the DBCP lib should be? i checked common/lib, but didnt see something. DBCP is bundled with tomcat, but AFAIK is not the default factory for javax.sql.DataSource. According to http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-h owto.htm you have to explicitly set the factory: namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value --- greetings from Marc Logemann http://www.logemann.info - 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: Clustering Tomcat
Try http://www.theserverside.com/resources/article.jsp?l=Tomcat - should tell you all you need. -Original Message- From: Collins, Jim [mailto:[EMAIL PROTECTED]] Sent: Montag, 27. Jänner 2003 12:27 To: 'Tomcat Users List' Subject: Clustering Tomcat Hi, Has anyone had any experience of clustering Tomcat that they would like to share? I have read that it is possible to cluster Tomcat with Apache but I am not sure if it is possible to cluster Tomcat on its own. Any help/pointers would be appreciated. Regards Jim. PLEASE READ: The information contained in this email is confidential and intended for the named recipient(s) only. If you are not an intended recipient of this email you must not copy, distribute or take any further action in reliance on it and you should delete it and notify the sender immediately. Email is not a secure method of communication and Nomura International plc cannot accept responsibility for the accuracy or completeness of this message or any attachment(s). Please examine this email for virus infection, for which Nomura International plc accepts no responsibility. If verification of this email is sought then please request a hard copy. Unless otherwise stated any views or opinions presented are solely those of the author and do not represent those of Nomura International plc. This email is intended for informational purposes only and is not a solicitation or offer to buy or sell securities or related financial instruments. Nomura International plc is regulated by the Financial Services Authority and is a member of the London Stock Exchange. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Please help with LogConfigurationException
Hi Jim, Just a thought - you say the application has been running without this error except for the last week or so, and then this week no problems. It sounds to me as though a particular use case may have arisen where an incorrect logging statement is being invoked, and that this use case had not arisen previously (i.e. the problem was always in the code, but until invoked, no problems). Thats my 2p :-) Eric -Original Message- From: Collins, Jim [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 21. Jänner 2003 15:35 To: 'Tomcat Users List' Subject: RE: Please help with LogConfigurationException Hi Yoav, Thanks for your reply. I could see it was commons logging throwing the exception and I tried changing the actual logging implementation that it uses to log4J to see if that would stop it happening but it did not. I don't really think it is a commons logging problem either because it works and logs correctly until this exception get thrown. Last week this exception was being thrown at least twice a day however since Friday no more exceptions have been thrown. It just seems bizarre to me that it should suddenly start happening and then stop. Regards Jim. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: 21 January 2003 14:24 To: Tomcat Users List Subject: RE: Please help with LogConfigurationException Howdy, A couple of things: - It's commons-logging, not tomcat, that's throwing the exception. It's most likely misconfigured, i.e. you have some jars (probably the commons-logging jars themselves) in the wrong place. - Can you temporarily take out commons logging, i.e. code directly to JDK 1.4 logging or log4j or whatever you want, and see if the problem goes away? - Try to ask on the commons-logging mailing list. Yoav Shapira Millennium ChemInformatics -Original Message- From: Collins, Jim [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 4:24 AM To: 'Tomcat Users List' Subject: RE: Please help with LogConfigurationException Hi, I have still had no feedback at all on this. Can anyone please help I am running out of hair to pull out. Regards Jim -Original Message- From: Collins, Jim [mailto:[EMAIL PROTECTED]] Sent: 20 January 2003 09:47 To: 'Tomcat Users List' Subject: Please help with LogConfigurationException Hi, I am still getting this Exception thrown. Has anyone else ever had this and know of a fix. Any help at all would be appreciated as this is causing me a lot of problems Thanks Jim. A quick update. I have now copied the log4J jar file to commons/lib and restarted the server so that is now uses log4J instead of the JDK1.4 logger. After a couple of hours I got this error: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Log FactoryImpl.ja va:530) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Log FactoryImpl.ja va:285) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:401) at org.apache.tomcat.util.log.CommonLogHandler.log(CommonLogHandl er.java:97) at org.apache.tomcat.util.log.Log.log(Log.java:198) at org.apache.tomcat.util.log.Log.log(Log.java:192) at org.apache.tomcat.util.log.Log.log(Log.java:174) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.jav a:536) at java.lang.Thread.run(Thread.java:536) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruct or(LogFactoryI mpl.java:415) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Log FactoryImpl.ja va:523) ... 8 more Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruct or(LogFactoryI mpl.java:411) ... 9 more Could anyone please give me some clue as to what I can do. I have not changed anything for some time now and prior to these errors that have just started happening I have not had to restart the server for weeks. Now I am having to start it more than once every day. Thanks Jim. -Original Message- From: Collins, Jim [mailto:[EMAIL PROTECTED]] Sent: 17 January 2003 12:31 To: 'Tomcat
RE: Tomcat 4.0.x JDBC connection pooling
Yes - We used 4.1.12 and have just migrated to 4.1.18 on a mission critical 24 x 7 app and we have had no problems - once we got it working in the first place!! -Original Message- From: Luca Cremonini [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 18:00 To: Tomcat Users List Subject: RE: Tomcat 4.0.x JDBC connection pooling Thanks Eric! But with Tomcat 4.0.x I don't have things like MaxActive, MinIdle and other parameters... 4.0 documentation doesn't tell anything about this. It seems to me that I have to migrate to 4.1.x to use the pool and such parameters. Am I right? L.C. Roberts, EricPer:Tomcat Users List [EMAIL PROTECTED] Eric.Roberts@ Cc: one.at Oggetto: RE: Tomcat 4.0.x JDBC connection pooling 16/01/2003 17.33 Per favore, rispondere a Tomcat Users List Hi Luca, The pool is established in the definition of the resource jdbc/EmployeeDB - where things like MaxActive, MinIdle and other parameters determine how the pool behaves. At startup the pool will connect the MinIdle connections to the DB - a new connection will then only be established if that number are already in use. It is good practice to always close connections, as otherwise you become dependent on parameters like RemoveAbandoned and RemoveAbandoned timeout. All of this is discussed in the JNDI Datasource HOWTO in the documention : -) -Original Message- From: Luca Cremonini [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 17:17 To: [EMAIL PROTECTED] Subject: Tomcat 4.0.x JDBC connection pooling I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online documentation (http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html ): --- // Obtain our environment naming context Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); // Look up our data source DataSource ds = (DataSource) envCtx.lookup(jdbc/EmployeeDB); // Allocate and use a connection from the pool Connection conn = ds.getConnection(); ... use this connection to access the database ... conn.close(); --- I searched the mailing list and the web, but coudn't find answer to these questions: - When I call ds.getConnection(); am I getting a connection from a pool or opening a NEW connection every time? - If there's a pool why do I have to close the connection with conn.close(); instead of releasing it to the pool? - What are the improvement in Tomcat 1.1.x about JDBC connection pooling? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help With Tomcat Database Connection Configuration
Hi, Your server.xml looks fine. If you specify the resource in server.xml there is no need to put it in web.xml (in fact this will more than likely cause problems). You should reference the datasource in your app as follows: ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/juddidb); The class.forName() is used when you are not using DBCP but directly connecting. Make sure that the Oracle classes12.zip is renamed to classes12.jar and in CATALINA_HOME/common/lib HTH Eric -Original Message- From: Ravi Rangaswamy [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 21:38 To: TomcatUserList Subject: Help With Tomcat Database Connection Configuration Hi, I am running a UDDI registry (CATALINA_HOME/web-apps/juddi) from inside Tomcat. Now I want to run the registry with Oracle. So, I created a JDBC datasource in Tomcat. To do this, I followed these steps. 1. I added the segment in CATALINA_HOME/conf/server.xml inside the context element. !-- Orcale JDBC datasource for jUDDI -- Resource name=jdbc/juddidb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/juddidb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@localhost:1521:orcl/value /parameter parameter nameusername/name valuejuddiUser/value /parameter parameter namepassword/name valuejuddiUser/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value5000/value /parameter /ResourceParams !-- End of Orcale JDBC datasource for jUDDI -- 2. I added this segment in CATALINA_HOME/web-apps/juddi/WEB_INF/web.xml inside the web-app element. !-- Orcale JDBC datasource for jUDDI -- resource-ref descriptionOracle Datasource/description res-ref-namejdbc/juddidb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I start Tomcat and invoke a action on jUDDI, I get the exception Cannot load JDBC driver class 'null' java.lang.NullPointerException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:523) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312) So, to further debug, I added the segment from Step 2 to CATALINA_HOME/web-apps/examples/WEB_INF/web.xml and created a jsp (shown at the end of the mail) to see if it was picking up the configuration parameters. When this jsp is executed, I get the following displayed with the parameters as specified in server.xml. DriverClassName: oracle.jdbc.driver.OracleDriver Url: jdbc:oracle:thin:@localhost:1521:orcl Username: juddiUser Password: juddiUser MaxActive: 20 MaxWait: 5000 NumActive: 3 numIdle: 0 If I place the same jsp under CATALINA_HOME/web-apps/juddi/jsp/. and run the jsp, I get nulls for each param DriverClassName: null Url: null Username: null Password: null MaxActive: 8 MaxWait: -1 NumActive: 0 numIdle: 0 Can anyone tell me what I am doing wrong and why these two applications (examples and the uddi registry) behave differently. Thanks, Ravi. Test jsp %@ page language=java import=java.sql.*,javax.naming.InitialContext,javax.naming.Context,javax.sql.DataSource,org.apache.commons.dbcp.BasicDataSource % body bgcolor=white font color=red % Connection conn = null; try { InitialContext initialContext = new InitialContext(); Context context = (Context)initialContext.lookup(java:comp/env); DataSource ds = (DataSource)context.lookup(jdbc/juddidb); out.print( DriverClassName: + ((BasicDataSource) ds).getDriverClassName()); out.print( Url: + ((BasicDataSource) ds).getUrl()); out.print( Username: + ((BasicDataSource) ds).getUsername()); out.print( Password: + ((BasicDataSource) ds).getPassword()); out.print( MaxActive: + ((BasicDataSource) ds).getMaxActive()); out.print( MaxWait: + ((BasicDataSource) ds).getMaxWait()); out.print( NumActive: + ((BasicDataSource) ds).getNumActive()); out.print( numIdle: + ((BasicDataSource) ds).getNumIdle()); } catch (Exception e) { e.printStackTrace(); } % - Do you Yahoo!? Yahoo! Mail
RE: javax.naming.NameNotFoundException: Name java: is not bound in this Context
Yes, but the resource name is jdbc/esljsp - java:comp/env/jdbc/esljsp would be used in a servlet using JNDI such as: ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/esljsp); Regards Eric -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 11:53 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Thanks for your reply! See below... Roberts, Eric wrote: Hi, Try this: First define your DataSource resource e.g. Resource name=jdbc/esljsp auth=Container scope=Shareable type=javax.sql.DataSource/ and add the necessary ResourceParams name=jdbc/esljsp and the parameters. then define your Realm using: dataSourceName=jdbc/esljsp I already have these lines in config.xml: --= [ server.xml ] =-- Resource name=jdbc/esljsp type=javax.sql.DataSource auth=Container scope=Shareable description=Database resource for esljsp project / ResourceParams name=jdbc/esljsp !-- various parameters not shown here -- /ResourceParams Realm className=org.apache.catalina.realm.DataSourceRealm dataSourceName=java:/comp/env/jdbc/esljsp debug=5 userTable=T_USERS userNameCol=NAME userCredCol=PASSWORD userRolesTable=T_USERROLES roleNameCol=ROLENAME / --= [ / server.xml ] =-- If I haven't them there, I wouldn't be able to connect to database in my servlets, getting DataSource through JNDI. But servlets work just fine. And exception is thrown while Tomcat starts up, telling me that java: name is not found, so this must not be configuration problem. HTH Eric -Original Message- --= [ cut ] =-- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: javax.naming.NameNotFoundException: Name java: is not bound in this Context
Sorry - missed it earlier - in the Realm definition, I think it should be just resourceName=jdbc/esljsp - not dataSourceName=jdbc/esljsp -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 12:26 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Roberts, Eric wrote: Yes, but the resource name is jdbc/esljsp - java:comp/env/jdbc/esljsp would be used in a servlet using JNDI such as: ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/esljsp); Servlet snippet: --= [ cut ] =-- try { javax.naming.InitialContext initCtx=new InitialContext(); javax.naming.Context envCtx= (Context)initCtx.lookup(java:/comp/env); javax.sql.DataSource ds=(DataSource)envCtx.lookup(jdbc/esljsp); } catch (NamingException ne) { out.println(ne); } --= [ / cut ] =-- And it works. But dataSourceName attribute from DataSourceRealm is not. Regards Eric -Original Message- --= [ cut ] =-- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: javax.naming.NameNotFoundException: Name java: is not bound in this Context
All I know is that if you read the server.xml which comes with TC, that is what is there!! -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 13:33 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Roberts, Eric wrote: Sorry - missed it earlier - in the Realm definition, I think it should be just resourceName=jdbc/esljsp - not dataSourceName=jdbc/esljsp That's odd. There is no resourceName attribute in DataSourceRealm documentation. I looked at the source of it and saw (set|get)DataSourceName only. And I see that tomcat docs is wrong in DataSourceRealm description, because attribute list there is not reflect real things in code. Now I'm trying to look into the sources, but I'm not so hacky... -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 12:26 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Roberts, Eric wrote: Yes, but the resource name is jdbc/esljsp - java:comp/env/jdbc/esljsp would be used in a servlet using JNDI such as: ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/esljsp); Servlet snippet: --= [ cut ] =-- try { javax.naming.InitialContext initCtx=new InitialContext(); javax.naming.Context envCtx= (Context)initCtx.lookup(java:/comp/env); javax.sql.DataSource ds=(DataSource)envCtx.lookup(jdbc/esljsp); } catch (NamingException ne) { out.println(ne); } --= [ / cut ] =-- And it works. But dataSourceName attribute from DataSourceRealm is not. Regards Eric -Original Message- --= [ cut ] =-- -- Veniamin Fichin [EMAIL PROTECTED] Programmer athttp://www.rbcsoft.ru/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: javax.naming.NameNotFoundException: Name java: is not bound in this Context
Just some other things which may help: I define my Realm datasource in the GlobalNamingResource element of server.xml and this is where the parameters are also defined. Any Context requiring authentication is defined with privileged=true. My Realm is defined within the Engine element - as the last item. -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 13:33 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Roberts, Eric wrote: Sorry - missed it earlier - in the Realm definition, I think it should be just resourceName=jdbc/esljsp - not dataSourceName=jdbc/esljsp That's odd. There is no resourceName attribute in DataSourceRealm documentation. I looked at the source of it and saw (set|get)DataSourceName only. And I see that tomcat docs is wrong in DataSourceRealm description, because attribute list there is not reflect real things in code. Now I'm trying to look into the sources, but I'm not so hacky... -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 12:26 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Roberts, Eric wrote: Yes, but the resource name is jdbc/esljsp - java:comp/env/jdbc/esljsp would be used in a servlet using JNDI such as: ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/esljsp); Servlet snippet: --= [ cut ] =-- try { javax.naming.InitialContext initCtx=new InitialContext(); javax.naming.Context envCtx= (Context)initCtx.lookup(java:/comp/env); javax.sql.DataSource ds=(DataSource)envCtx.lookup(jdbc/esljsp); } catch (NamingException ne) { out.println(ne); } --= [ / cut ] =-- And it works. But dataSourceName attribute from DataSourceRealm is not. Regards Eric -Original Message- --= [ cut ] =-- -- Veniamin Fichin [EMAIL PROTECTED] Programmer athttp://www.rbcsoft.ru/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: javax.naming.NameNotFoundException: Name java: is not bound in this Context
I am using 4.1.18 also - but upgraded from 4.1.12 -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 14:03 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Roberts, Eric wrote: All I know is that if you read the server.xml which comes with TC, that is what is there!! You may saw this attribute in UserDatabaseRealm definition in server.xml: Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ But we are talking about DataSourceRealm... Anyway thank you for your effort! May be I should try writing in tomcat-dev , as this feature is relatively new (if I'm not wrong, it first appeared in 4.1.18), and there may be truly a bug. -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 13:33 To: Tomcat Users List Subject: Re: javax.naming.NameNotFoundException: Name java: is not bound in this Context Roberts, Eric wrote: Sorry - missed it earlier - in the Realm definition, I think it should be just resourceName=jdbc/esljsp - not dataSourceName=jdbc/esljsp That's odd. There is no resourceName attribute in DataSourceRealm documentation. I looked at the source of it and saw (set|get)DataSourceName only. And I see that tomcat docs is wrong in DataSourceRealm description, because attribute list there is not reflect real things in code. Now I'm trying to look into the sources, but I'm not so hacky... --= [ cut ] =-- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.0.x JDBC connection pooling
Hi Luca, The pool is established in the definition of the resource jdbc/EmployeeDB - where things like MaxActive, MinIdle and other parameters determine how the pool behaves. At startup the pool will connect the MinIdle connections to the DB - a new connection will then only be established if that number are already in use. It is good practice to always close connections, as otherwise you become dependent on parameters like RemoveAbandoned and RemoveAbandoned timeout. All of this is discussed in the JNDI Datasource HOWTO in the documention :-) -Original Message- From: Luca Cremonini [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 17:17 To: [EMAIL PROTECTED] Subject: Tomcat 4.0.x JDBC connection pooling I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online documentation (http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html): --- // Obtain our environment naming context Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); // Look up our data source DataSource ds = (DataSource) envCtx.lookup(jdbc/EmployeeDB); // Allocate and use a connection from the pool Connection conn = ds.getConnection(); ... use this connection to access the database ... conn.close(); --- I searched the mailing list and the web, but coudn't find answer to these questions: - When I call ds.getConnection(); am I getting a connection from a pool or opening a NEW connection every time? - If there's a pool why do I have to close the connection with conn.close(); instead of releasing it to the pool? - What are the improvement in Tomcat 1.1.x about JDBC connection pooling? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: javax.naming.NameNotFoundException: Name admin is not bound in this Context
David, We use DBCP on a mission critical 24 x 7 application - and we have no issues with it. We started with Tomcat 4.1.12 and are about to go to 4.1.18 - already in development and working fine. When we did our initial investigations, we were able to use DBCP at all the levels possible in server.xml - i.e. within a specific context, as a DefaultContext, and as a GlobalNamingResource. What we do not do is place any reference to our DBCP resource in a web.xml file. Not only is it unnecessary if defined in server.xml, but it is my belief that the web.xml resource replaces the server.xml resource - and as you do not give the driver name in a web.xml resource, you get a null value. -Original Message- From: David Durst [mailto:[EMAIL PROTECTED]] Sent: Montag, 13. Jänner 2003 11:30 To: [EMAIL PROTECTED] Subject: Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context Sounds like you don't have the appropiate driver loaded or you have incorrectly specified your pgsql driver in server.xml. Double check the values. I make that mistake alot. I have gotten that answer like 10 times now :( I have the correct driver specified :) I must have because I had this all working up until about 30 minutes ago. I have the jar in both common/lib/ and sfadmin/WEB-INF/lib I am starting to think the whole DBCP thing is very unstable. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Resource issues
Hi, Question 1: Is your jar containing org.prostgresql.Driver in common/lib? Question 2: Is your resource defined in a Context or as a GlobalNaming Resource? Question 3: Version of Tomcat? Attached is a small servlet which you can use to find out what is happening. Regards Eric -Original Message- From: David Durst [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 09. Jänner 2003 12:26 To: [EMAIL PROTECTED] Subject: Resource issues I am going through the JNDI Datasource example and attempting to apply it to my situation. here is the following config in my server.xml Resource name=jdbc/mydb auth=Container type=javax.sql.Datasource/ ResourceParams name=jdbc/mydb parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternamemaxActive/namevalue100/value/parameter parameternamemaxIdle/namevalue5/value/parameter parameternamemaxWait/namevalue-1/value/parameter parameternameusername/namevalueYEAHRIGHT/value/parameter parameternamepassword/namevalueNOSORRY/value/parameter parameternamedriverClassName/namevalueorg.postgresql.Driver/value/parameter parameternameurl/namevaluejdbc:postgresql://127.0.0.1:5432/larco/value/parameter /ResourceParams I add the following to my web.xml: resource-ref descriptionpostgreSQL Datasource example/description res-ref-namejdbc/mydb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When attempting to load the Datasource as follows: if((cntx = new InitialContext()) == null) return; if((ectx = (Context)cntx.lookup(java:comp/env)) == null ){ return; if((ds = (DataSource)ectx.lookup(jdbc/mydb)) != null) return; I get a null on the DataSource. Can anyone help me out with this??? Thanks, David Durst -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] DBTest.java Description: DBTest.java -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Connection Pool problem with virtual hosts
Hi, Try using the GlobalNamingResource element instead of the Context element, then put a ResourceLink to that resource in each Host element. If the resource is defined in either Context or GlobalNamingResource in server.xml , there is no need to include any reference to it in web.xml as a lookup to the InitialContext will resolve the resource. Regards Eric -Original Message- From: Nate Drake [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 09. Jänner 2003 15:48 To: [EMAIL PROTECTED] Subject: Connection Pool problem with virtual hosts Hi, I'm having trouble when attempting to access a JDBC connection pool when using a virtual host. I have a servlet that is set to load on startup (ie. load-on-startup1/load-on-startup in web.xml), this servlet attempts to get a pool connection to read some configuration options from the database. This works fine when the web app is deploy without using virtual hosts. When attempting to run with virtual hosts I get the following error: Could not load JDBC driver 'null'. I've seen this error reported many times on the list, with no definite solution that has worked. Here is information about my setup: Tomcat Standalone, version 4.1.12 Oracle database Solaris 8 and 9 web.xml for pool: resource-ref descriptionOracle Datasource/description res-ref-namejdbc/orapool/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref server.xml for virtual host: Host name=blah.blah.com debug=0 appBase=blah unpackWARs=true autoDeploy=true !-- Logger shared by all Contexts related to this virtual host. By default (when using FileLogger), log files are created in the logs directory relative to $CATALINA_HOME. If you wish, you can specify a different directory with the directory attribute. Specify either a relative (to $CATALINA_HOME) or absolute path to the desired directory.-- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=blah_log. suffix=.txt timestamp=true/ !-- Define properties for each web application. This is only needed if you want to set non-default properties, or have web application document roots in places other than the virtual host's appBase directory. -- !-- Tomcat Root Context -- Context path= docBase=blahweb debug=4 Resource name=jdbc/orapool auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orapool parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namevalidationQuery/name valueselect sysdate from dual/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter parameter namemaxWait/name value3/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namepassword/name valuemypassword/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.0.100:1521:mysid/value /parameter parameter nameusername/name valuemyusername/value /parameter /ResourceParams /Context /Host Code to get connection from pool: Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/orapool); return ds.getConnection(); Again, the above configuration works fine when used in a Context under the localhost Host element. It seems to only be when I define another Host element that I get the error. Any ideas? Thanks, Nate -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
RE: help with DataSourceRealm in 4.1.17
Hi, Try just jdbc/db. HTH -Original Message- From: Kevin HaleBoyes [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 19. Dezember 2002 20:05 To: [EMAIL PROTECTED] Subject: help with DataSourceRealm in 4.1.17 I've been using JDBCRealm successfully in my application but jumped on the DataSourceRealm when I saw it in 4.1.17. So, I replaced my JDBCRealm definition to the DataSourceRealm but have run into a problem. I have the following in the CATALINA_HOME/webapps/cml.xml file: Context path=/cml docBase=/usr/local/jakarta/cml debug=99 privileged=false Resource name=jdbc/Db auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/Db parameternamefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternamedriverClassName/name valueoracle.jdbc.OracleDriver/value/parameter parameternameurl/name valuejdbc:oracle:thin:@200.65.6.188:1521:tiggs9i/value/parameter parameternameusername/name valuecml/value/parameter parameternamepassword/name valuecml/value/parameter parameternamemaxActive/name value20/value/parameter parameternamemaxIdle/name value10/value/parameter parameternamemaxWait/name value-1/value/parameter parameternamevalidationQuery/name valueselect sysdate from dual/value/parameter /ResourceParams Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=java:comp/env/jdbc/Db userTable=mmis_users userNameCol=user_name userCredCol=user_pass userRoleTable=mmis_user_roles roleNameCol=role_name digest=MD5 / /Context I know the jdbc/Db JNDI resource is configured properly because I'm able to access the datasource from the application using: Context initCtx = new InitialContext(); Context envCtx = (Context)initCtx.lookup(java:comp/env); DataSource ds = (DataSource)envCtx.lookup(jdbc/Db); return ds.getConnection(); but when Tomcat starts up I get the following error: 2002-12-19 14:55:01 DataSourceRealm[/cml]: Exception performing authentication javax.naming.NameNotFoundException: Name java:comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:811) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:463) at org.apache.catalina.realm.DataSourceRealm.start(DataSourceRealm.java:582) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3543) etc... I even tried using dataSourceName=java:/comp/env/jdbc/Db in the Realm definition (note the slash after the colon as was shown in the Realm HOW-TO) but this gave a similar exception. Does anyone know what name I should use for the data source? Thanks, Kevin. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Deployment in Tomcat 4.1.17 failed ?
Hi, I have experienced similar log entries. I had to copy the webapps directory from a W2K machine to an HP-UX environment, and my transfer method removed all the capitalisation from my directory and filenames (e.g. WEB-INF became web-inf). I notice that your app is ATTS - in uppercase. Maybe, as you configured everything manually, you didn't preserve the case sensitivity of the directory and filenames? HTH -Original Message- From: Edison Ch [mailto:[EMAIL PROTECTED]] Sent: Freitag, 20. Dezember 2002 10:41 To: [EMAIL PROTECTED] Subject: Deployment in Tomcat 4.1.17 failed ? I just d/l Tomcat 4.1.17 and am having a heck of time trying to deploy web application into Tomcat. I am using the latest ant 1.5.1 with combination of 4.1.17 tomcat. I use ant install and it always failed to install. Spent a day to figure it out and it finally worked after tweaking this and that. Ant install succesfully. Now when I try to access the apps - localhost:8080/app - it always said the page is not accessible. Then I look at the log to find out why. Can't quite figure out what's the error so I go to localhost:8080/manager/html/list to see what's the current status of my apps. It showed that it was not running. I click on run - yet it failed to load. So i decide to deploy manually by copying the whole working directory under ${CATALINA_HOME}/webapps -- and structure it accordingly [with WEB-INF and web.xml]. Then i register the apps into the server.xml [just like the manual asked] then i turn on the logger for that apps -- and got this as the result: 2002-12-20 15:52:08 StandardContext[/ATTS]: Starting 2002-12-20 15:52:08 StandardContext[/ATTS]: Processing start(), current available=false 2002-12-20 15:52:08 StandardContext[/ATTS]: Configuring default Resources 2002-12-20 15:52:08 StandardContext[/ATTS]: Resources start failed: 2002-12-20 15:52:08 StandardContext[/ATTS]: Configuring privileged default Loader 2002-12-20 15:52:08 StandardContext[/ATTS]: Configuring default Manager 2002-12-20 15:52:08 StandardContext[/ATTS]: Processing standard container startup 2002-12-20 15:52:08 StandardContext[/ATTS]: Context startup failed due to previous errors 2002-12-20 15:52:08 StandardContext[/ATTS]: Exception during cleanup after start failed LifecycleException: Container StandardContext[/ATTS] has not been started at org.apache.catalina.core.StandardContext.stop(Unknown Source) at org.apache.catalina.core.StandardContext.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardHost.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardEngine.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) Is it my web.xml fault? or? my config of application web.xml is like: ?xml version=1.0 encoding=ISO-8859-1? !-- !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc. //DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtd/web-app_2_3.dtd; -- web-app display-nameATTS beta/display-name descriptionThis is beta of ATTS/description context-param param-namewebmaster/param-name param-valueroot@localhost/param-value descriptionEmail of the maintainer of the site/description /context-param welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list servlet descriptionATTS to add route/description servlet-nameATTSaddRoute/servlet-name servlet-classATTSaddRoute/servlet-class load-on-startup2/load-on-startup /servlet servlet descriptionConnection Pool of JDBC/description servlet-nameConnectionPool/servlet-name servlet-classConnectionPool/servlet-class load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameATTSaddRoute/servlet-name url-pattern/ATTSaddRoute/url-pattern /servlet-mapping servlet-mapping servlet-nameConnectionPool/servlet-name url-pattern/ConnectionPool/url-pattern /servlet-mapping session-config session-timeout10/session-timeout /session-config /web-app What did i do wrong ? please help.. = Sincerely, Edison Ch
RE: Problems deploying servlet (expect web.xml is the problem)
Hi, The problem is with your web.xml - it occurs at line 105 column 11! The error messages tell you that within the web-app element, only the following are allowed: icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref* The question is How did this run when deployed from the war-file? - Why does there appear to be a difference between Tomcat unpacked dtd and Resin/Tomcat-war dtd? -Original Message- From: Lars Preben S. Arnesen [mailto:[EMAIL PROTECTED]] Sent: Freitag, 20. Dezember 2002 10:59 To: [EMAIL PROTECTED] Subject: Problems deploying servlet (expect web.xml is the problem) I have developed a servlet that ran fine on Resin. It also seems to work when deploying as a war-file. I'm trying to convert to Eclipse and Tomcat, but I don't want to make war files during development. Instead of using a war file I have the following entry in the server.xml file: Context path= docBase=/home/larsar/dev/src/feide-dev/w3ls/moria/src/webapp reloadable=true workDir=/home/larsar/dev/src/feide-dev/w3ls/moria/src/webapp/work/org/apache/jsp / The web.xml file is located in path/WEB-INF and so is the classes directory with the compiled class files. When I start Tomcat I get an exception (included below). I seems like the problem is in the web.xml, but this works just fine when the xml-file is included in a war-file. I removed almost all entries and inserted one by one and when I added a filter, the error occured. Any tips is appreciated. filter filter-name AuthenticationFilter/filter-name filter-class no.feide.moria.user.AuthenticationFilter /filter-class /filter Starting service Tomcat-Standalone Apache Tomcat/4.1.12 6044 [main] ERROR digester.Digester - Parse Error at line 105 column 11: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*). org.xml.sax.SAXParseException: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*). at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:362) -- Lars Preben S. Arnesen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: help with DataSourceRealm in 4.1.17
Yes - I always put my context defs in server.xml - I just find it more reliable! -Original Message- From: Kevin HaleBoyes [mailto:[EMAIL PROTECTED]] Sent: Freitag, 20. Dezember 2002 13:41 To: Tomcat Users List Subject: RE: help with DataSourceRealm in 4.1.17 --- Roberts, Eric [EMAIL PROTECTED] wrote: Hi, Try just jdbc/db. Yeah, I've tried every combination that I can - jdbc/Db, /jdbc/Db, env/jdbc/Db, /env/jdbc/Db, etc. up to java:comp/env/jdbc/Db. None work. Again, I think it is a timing issue where the Realm is initialized before the JNDI resources. I'm going to try putting the CML context definition in server.xml instead of in its own file. K. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Enough please!
Folks, Can we stop the I don't understand the objective of this open list.. thread. While we all have our opinions, this is meant to be a list where we help each other technically. I have been attempting to help people with database pooling (mine works :-)) for the last few days, but I have had to spend far too much time deleting the hundred or so reponses to this thread. Can we get back to sanity please? Thanks Eric -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Deleting multiple responses (was: Enough please!]
Correct! -Original Message- From: Swanson, Brion [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 10. Dezember 2002 16:12 To: 'Tomcat Users List' Subject: RE: Deleting multiple responses (was: Enough please!] I think the point was we shouldn't have to filter out long threads of off-topic flame wars. I agree there's many solutions to the annoyance of a dominant off-topic thread, but the fact remains that we really shouldn't feed the trolls. Just my $0.02. Thanks, Brion -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:10 AM To: 'Tomcat Users List' Subject: RE: Deleting multiple responses (was: Enough please!] Or use a Filter on the subject line. Also end of problem. John -Original Message- From: Andrzej Jan Taramina [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:06 AM To: [EMAIL PROTECTED] Subject: RE: Deleting multiple responses (was: Enough please!] I have had to spend far too much time deleting the hundred or so reponses to this thread. Change your subscription to digest mode. End of problem. Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat Windows
Run Tomcat as a service - see the documentation for how to! -Original Message- From: Alberto Puerta [mailto:[EMAIL PROTECTED]] Sent: Montag, 09. Dezember 2002 11:38 To: Tomcat Usuarios Subject: Tomcat Windows Hi. When start Tomcat in Windows, startup.bat is launched with a MS-DOS window but i'd like to run it as a process and without any visible window that somebody can close and stop the server. Is ther any solution? Using bootstrap.jar (i test it and nothing)? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to configure datasources in tomcat 4.1.12 to obtain OracleResultSets
Try parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter Hope this helps. -Original Message- From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] Sent: Montag, 09. Dezember 2002 12:28 To: [EMAIL PROTECTED] Subject: How to configure datasources in tomcat 4.1.12 to obtain OracleResultSets Hi! Since my application running under both OracleAS and Tomcat 4.1.12 should obtain connection pooling i tried to configure the application servers. Our application makes use of OracleResultSet. I configured OracleAS by editing the data-sources.xml file which works very well: data-source class=com.evermind.sql.DriverManagerDataSource name=OracleDS location=jdbc/OracleCoreDS xa-location=jdbc/xa/OracleXADS ejb-location=jdbc/OracleDS connection-driver=oracle.jdbc.driver.OracleDriver username=scott password=tiger url=jdbc:oracle:thin:@testdb:1525:ORA5 inactivity-timeout=30 / The code for jndi lookup is here. It works fine when i cast ResultSet to OracleResultSet using OracleAS: initCtx = new InitialContext(); envCtx = (Context) initCtx.lookup(java:comp/env); dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS); con = dataSource.getConnection(); ResultSet rs = con.executeQuery(..); OracleResultSet orars = (OracleResultSet)rs; Then i configured tomcat 4.1.12 server.xml file: Resource name=jdbc/OracleDS auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/OracleDS parameternameusername/namevaluescott/value/parameter parameternamepassword/namevaluetiger/value/parameter parameternamedriverClassName/namevalueoracle.jdbc.driver.OracleDriver/value/parameter parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value/parameter /ResourceParams The same source for jndi lookup brings up a ClassCastException at line OracleResultSet orars = (OracleResultSet)rs; Therefore i tried to add a new parameter in tomcats server.xml: parameternamefactory/namevaluecom.evermind.sql.DriverManagerDataSource/value/parameter Now following exceptions occurs: javax.naming.NamingException: Could not create resource factory instance, com.evermind.sql.DriverManagerDataSource java.lang.Object org.apache.naming.factory.ResourceFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable) I have oc4j.jar and classes12.jar in tomcats home directory under config/lib. How should i configure tomcat to be able to use connection pooling and OracleResultSets? Thanks in advance! thomas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: oracle+tomcat 4.1.x+dbcp = driverClassName is required!
Pedro, You need javax.sql - that is the package containing DataSource. Your Resource type should be: type=javax.sql.DataSource You need these parameters in addition to url, username and password: parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter In the Context the ResourceLink type should be: type=javax.sql.DataSource You do not need any resource-ref in your web.xml - just use your ResourceLink name as follows: Context ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/{name_of_resource_link}); if (ds != null) { DbCon = ds.getConnection(); } Hope this helps. -Original Message- From: Pedro Salazar [mailto:[EMAIL PROTECTED]] Sent: Montag, 09. Dezember 2002 13:49 To: Tomcat Users List Subject: oracle+tomcat 4.1.x+dbcp = driverClassName is required! Greetings, I'm getting this exception when I try to lookup and cast a DataSource: [catalina.out] javax.naming.NamingException: DbcpDataSourceFactory: driverClassName is required org.apache.naming.factory.DbcpDataSourceFactory.getObjectInstance(DbcpDataSourceFactory.java:199) org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:177) javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301) org.apache.naming.NamingContext.lookup(NamingContext.java:835) ... [server.xml] I'm using a resource inside globalNamingResources and linked with resourceLink in context (but I already tried a explicit resource inside context). [web.xml] I'm using a resource-ref. System: -tomcat 4.1.2 (JavaWebServicesDeveloperPack 1.0.1) -dbcp 1.0 -jdbc oracle driver (renamed to jar and without javax.sql package) in common/lib directory. But I know that the driver is being loaded because before call my web application, I saw this info message in catalina.out: DbcpDataSourceFactory: driverClassName=oracle.jdbc.driver.OracleDriver, url=jdbc:oracle:thin:@192.168.89.52:1521:dbtest, user=test_01 I don't know why but it works fine in tomcat 4.0.6 I got it in other machine. So, what is the problem here? If need I can supply the exactly configurations (resource, resource-ref, ...). thanks, Pedro Salazar. -- pedro salazar (pt-inovacao) [EMAIL PROTECTED] key id: D803BC61 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Connection Pooling Help
Kevin, Try: Context ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/shiltonDB); -Original Message- From: Kevin Passey [mailto:[EMAIL PROTECTED]] Sent: Montag, 09. Dezember 2002 14:25 To: Tomcat Users List (E-mail) Subject: Connection Pooling Help Hi, Can somebody point out my mistake for me - I'm starting to bang my head.. I am trying to get connection pooling working on my AS/400 using the Commons-DBCP. I have placed this JAR in TOMCAT_HOME/common/lib along with the JT400.JAR I have added the context entries to my server.xml file - thus:- !-- AS400 Connection Pooling Test -- Context path=/shilton docBase=shilton debug=5 reloadable=true crossContext=true Resource name=jdbc/shiltonDB auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/shiltonDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name value100/value /parameter parameter nameusername/name valueINTERNET/value /parameter parameter namepassword/name valueINTERNET/value /parameter parameter namedriverClassName/name valuecom.ibm.as400.access.AS400JDBCDriver/value /parameter parameter nameurl/name valuejdbc:as400://10.0.0.1/value /parameter /ResourceParams /Context I have added this to my WEB-INF web.xml file:- resource-ref description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description res-ref-name jdbc/shiltonDB /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref And I have this java program to test the connection import javax.naming.*; import javax.sql.*; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletOutputStream; import java.sql.*; public class DBCPServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) { try { ServletOutputStream out = res.getOutputStream(); out.println(htmlbody); out.println(h2Using Tomcat Connection Pooling with DBCP/h2); Context ctx = new InitialContext(); if (ctx == null) out.println(Something is wrong with Tomcat); DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/shiltonDB); if (ds != null) { Connection conn = ds.getConnection(); if (conn != null) { out.println(bGot Connection:/b + conn.toString() + p); Statement stmt = conn.createStatement(); String sql = select * from BSSTYL; ResultSet rst = stmt.executeQuery(sql); if (rst.next()) { out.println(bValue of HDCUST on first record:/b + rst.getString(dbfield1)+ p); } out.println(This was our little database-access servlet...); conn.close(); } } } catch (Exception e) { e.printStackTrace(); } } /** * if somebody does a http-post, we do an interal dispatch to doGet() */ public void doPost(HttpServletRequest req, HttpServletResponse res) { doGet(req, res); } } ds is alway null - what am I missing. Thanks in advance. Kevin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.sql.SQLException: Cannot load JDBC driver class 'null'
Roberto, How are you instantiating your datasource? You need something like: import javax.naming.Context; import javax.naming.InitialContext; . . . ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/art); Hope this helps. -Original Message- From: Roberto Bouza [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 04. Dezember 2002 23:05 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: java.sql.SQLException: Cannot load JDBC driver class 'null' Hi. I think I have all the configuration fine, but for some reason when my DBTest try to get the connection from the DB I only get this: - ERRORS start java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc e.java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava:312) at poseidon.ext.DBTest.init(DBTest.java:27) -- ERRORS end - What's done: 1.) In the $CATALINA_HOME/common/lib I have postgresql.jar (PostgreSQL Driver), commons-collections.jar, commons-pool.jar, commons-dbcp.jar 2.) My server.xml: --- SERVER XML starts Resource name=jdbc/art auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/art parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql://efch-mia-sr-02.efcholdings.com:5432/efch-art/value /parameter parameter nameusername/name value[username]/value /parameter parameter namepassword/name value[password]/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value100/value /parameter /ResourceParams --- SERVER.XML end -- All that code inside a context tag. 3.) My web.xml - STARTS --- resource-ref descriptionpostgreSQL Art's Datasource/description res-ref-namejdbc/art/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref - END --- 5.) I'm using Tomcat 4.1.16 with Apache 2.0, Plus PostgreSQL 7.3 and jdk 1.4.1 Tomcat starts fine, all works fine but when my DBTest is triying to get the connection I get the error mentioned before. I really don't know why tomcat is not seeing the Driver if it is on common/lib...??? Thanks in advance for your help. -- = Roberto Bouza Fraga = === Research Development Engineer Ella Cisneros Fontanals Holdings Ph: (305)-860-0116 / Fax:(305)-860-9401 === e-Mail:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Specifying the name of war file while using Ant
Vim, You just need to edit your build.xml file. Find the section for the dist target and make the jar command something like: jar jarfile=${dist.home}/${app.name}.war basedir=${build.home}/ The example build.xml that comes with ant puts the version number into the war filename. -Original Message- From: vim m [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 04. Dezember 2002 21:10 To: Tomcat Users List Subject: Specifying the name of war file while using Ant Hello: I am new to Tomcat. I have installed version 4.1. And have tested successfully my first basic application. I am using Ant to create the distributable files. My application name is test. When I execute the 'ant dist' command, the war file is named test-0.1-dev.war. Is there anyway I could just create a test.war file instead? Should I make some changes in my build file? I have just adapted the files that were given in the documentation. Thanks. Vim - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DBCP question
Hi Veniamin, Try this way instead - it works for me! Server.xml: Resource description=Oracle database resource for esljsp project name=jdbc/esljsp-oracle auth=Container type=javax.sql.DataSource/ . . ResourceParams name=jdbc/esljsp-oracle . . parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@db.server.ru:1521:sidvalue/value /parameter. . web.xml: . . resource-ref descriptionOracle database resource for esljsp project/description res-ref-namejdbc/esljsp-oracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref . . Source: . . import javax.naming.Context; import javax.naming.InitialContext; . . ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/esljsp-oracle); Hope this helps! -Original Message- From: Veniamin Fichin [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 04. Dezember 2002 20:28 To: Tomcat Users List Subject: DBCP question Hello cats! I'm trying to implement connection pool with Oracle8 database. After some codewriting I stuck with a problem which I don't know how to solve. Here are my configs and source code. --= [ server.xml ] =-- Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Tomcat-Standalone Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / Engine name=Standalone defaultHost=localhost debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true / Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context path=/esljsp docBase=esljsp debug=5 reloadable=true !-- I suspect I've chosen wrong class in type value -- Resource name=jdbc/esljsp-oracle type=oracle.jdbc.pool.OracleConnectionPoolDataSource auth=Container description=Oracle database resource for esljsp project / ResourceParams name=jdbc/esljsp-oracle parameter namedataSourceName/name valueoracle.jdbc.pool.OracleDataSource/value /parameter parameter namedescription/name valueOracle database resource for esljsp project/value /parameter parameter nameserverName/name valuedb.server.ru/value /parameter parameter nameportNumber/name value1521/value /parameter parameter namenetworkProtocol/name valuetcp/value /parameter parameter namedatabaseName/name valuesidvalue/value /parameter parameter nameuser/name valueusername/value /parameter parameter namepassword/name valuepassword/value /parameter /ResourceParams Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_esljsp_log. suffix=.txt timestamp=true / /Context /Host /Engine /Service /Server --= [ / server.xml ] =-- --= [ / web.xml ] =-- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- taglib taglib-uri/esl-adm.tld/taglib-uri taglib-location/WEB-INF/esl-adm.tld/taglib-location /taglib -- servlet servlet-nameDBAccessTest/servlet-name servlet-classru.rbcsoft.esljsp.DBAccessTest/servlet-class /servlet servlet-mapping !-- this servler creates OracleConnectionPoolDataSource instance right -- servlet-nameDBAccessTest/servlet-name url-pattern/dbaccess/DBAccessTest/url-pattern /servlet-mapping resource-ref descriptionOracle database resource for esljsp project/description res-ref-namejdbc/esljsp-oracle/res-ref-name res-typeoracle.jdbc.pool.OracleConnectionPoolDataSource/res-type res-authContainer/res-auth res-sharing-scopeUnshareable/res-sharing-scope /resource-ref /web-app --= [ / web.xml ] =-- --= [ index.jsp ] =-- %@ page isThreadSafe=false info=Database access test|Index page contentType=text/html; charset=utf-8 % %@ page import=javax.naming.InitialContext, javax.naming.Context % %@ page import=oracle.jdbc.pool.OracleConnectionPoolDataSource % html head titleDatabase access test: index page/title /head body % Context ctx=new
RE: java.sql.SQLException: Cannot load JDBC driver class 'null'
Lamy, If you put your resource in the Global Naming Resources section of server.xml you need to put a ResourceLink to that resource in your context. Below works for me: ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/name_of_resource_link); -Original Message- From: LAMY Olivier [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 05. Dezember 2002 10:14 To: Tomcat Users List Subject: Re: java.sql.SQLException: Cannot load JDBC driver class 'null' Normally it's InitialContext initContext=new InitialContext(); DataSource ds = (DataSource) envCtx.lookup(java:/comp/env/jdbc/art); I have the same problem. I tried to move my ressources declaration from the context to the GlobalNamingResources. And it doesn't work ??? - Original Message - From: Roberts, Eric [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 05, 2002 9:45 AM Subject: RE: java.sql.SQLException: Cannot load JDBC driver class 'null' Roberto, How are you instantiating your datasource? You need something like: import javax.naming.Context; import javax.naming.InitialContext; . . . ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/art); Hope this helps. -Original Message- From: Roberto Bouza [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 04. Dezember 2002 23:05 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: java.sql.SQLException: Cannot load JDBC driver class 'null' Hi. I think I have all the configuration fine, but for some reason when my DBTest try to get the connection from the DB I only get this: - ERRORS start java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc e.java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava:312) at poseidon.ext.DBTest.init(DBTest.java:27) -- ERRORS end - What's done: 1.) In the $CATALINA_HOME/common/lib I have postgresql.jar (PostgreSQL Driver), commons-collections.jar, commons-pool.jar, commons-dbcp.jar 2.) My server.xml: --- SERVER XML starts Resource name=jdbc/art auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/art parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql://efch-mia-sr-02.efcholdings.com:5432/efch-art/value /parameter parameter nameusername/name value[username]/value /parameter parameter namepassword/name value[password]/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value100/value /parameter /ResourceParams --- SERVER.XML end -- All that code inside a context tag. 3.) My web.xml - STARTS --- resource-ref descriptionpostgreSQL Art's Datasource/description res-ref-namejdbc/art/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref - END --- 5.) I'm using Tomcat 4.1.16 with Apache 2.0, Plus PostgreSQL 7.3 and jdk 1.4.1 Tomcat starts fine, all works fine but when my DBTest is triying to get the connection I get the error mentioned before. I really don't know why tomcat is not seeing the Driver if it is on common/lib...??? Thanks in advance for your help. -- = Roberto Bouza Fraga = === Research Development Engineer Ella Cisneros Fontanals Holdings Ph: (305)-860-0116 / Fax:(305)-860-9401 === e-Mail:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message (ci après le message), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toute diffusion, publication, totale ou partielle ou divulgation sous quelque forme que ce soit non
RE: java.sql.SQLException: Cannot load JDBC driver class 'null'
Roberto, Subtle difference between my code and yours: ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/jdbc/art); Note the / characters after java:/comp/env and before jdbc/art I was getting the same error with Oracle as you are with PostgreSQL. -Original Message- From: Roberto Bouza [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 05. Dezember 2002 15:47 To: Tomcat Users List Subject: RE: java.sql.SQLException: Cannot load JDBC driver class 'null' Well... I forgot to put a part of my .java is like this: -- DBTest.java -- Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); Context envContext = (Context)ctx.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/art); // I tested both ways //DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/art); if (ds != null) { Connection conn = ds.getConnection(); . --- END DBTest.java --- The weird thing is I create a simple class DB, to load the PostgreSQL Driver, connect to the database and do some simple queries - The driver is in my $CATALINA_HOME/common/lib - and all works fine I can load the driver without any problem... but, when I used the DBCP - BOOM - java.sql.SQLException: Cannot load JDBC driver class 'null'... Thanks you for your help. -- = Roberto Bouza Fraga = === Research Development Engineer Ella Cisneros Fontanals Holdings Ph: (305)-860-0116 / Fax:(305)-860-9401 === e-Mail:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: exception loading sessions from persistent storage?
Paul, Here is an extract from server.xml as shipped with TC: !-- PersistentManager: Uncomment the section below to test Persistent Sessions. saveOnRestart: If true, all active sessions will be saved to the Store when Catalina is shutdown, regardless of other settings. All Sessions found in the Store will be loaded on startup. Sessions past their expiration are ignored in both cases. maxActiveSessions: If 0 or greater, having too many active sessions will result in some being swapped out. minIdleSwap limits this. -1 means unlimited sessions are allowed. 0 means sessions will almost always be swapped out after use - this will be noticeably slow for your users. minIdleSwap: Sessions must be idle for at least this long (in seconds) before they will be swapped out due to maxActiveSessions. This avoids thrashing when the site is highly active. -1 or 0 means there is no minimum - sessions can be swapped out at any time. maxIdleSwap: Sessions will be swapped out if idle for this long (in seconds). If minIdleSwap is higher, then it will override this. This isn't exact: it is checked periodically. -1 means sessions won't be swapped out for this reason, although they may be swapped out for maxActiveSessions. If set to = 0, guarantees that all sessions found in the Store will be loaded on startup. maxIdleBackup: Sessions will be backed up (saved to the Store, but left in active memory) if idle for this long (in seconds), and all sessions found in the Store will be loaded on startup. If set to -1 sessions will not be backed up, 0 means they should be backed up shortly after being used. To clear sessions from the Store, set maxActiveSessions, maxIdleSwap, and minIdleBackup all to -1, saveOnRestart to false, then restart Catalina. -- It looks like you have enabled the peristence manager. -Original Message- From: Paul Tomsic [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 05. Dezember 2002 18:16 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: re: exception loading sessions from persistent storage? hmm, we're not persisting anything. Is it Tomcat that's persisting something? Where does tomcat persist sessions when it is shut down? Is there a directory that it serializes sessions to? thanks again for the help.. Paul Well, to be honest, I have no idea :-( What are you trying to serialize? From the stack trace, seems your persisting something do is not serializable...I guest you will have to list what you are trying to persist -- Jeanfrancois Paul Tomsic wrote: here's the whole stack trace: 2002-12-04 11:54:59 StandardManager[/cdg] Exception loading sessions from persistent storage java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: org.apache.xerces.util.DOMErrorHandlerWrapper at java.io.ObjectInputStream.readObject(ObjectInputStream.java:440) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231) snip __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem going from 4.0.6 to 4.1.16b
Stupid question - but do you have sufficient free disk space? ;-) -Original Message- From: Mark Woon [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 04. Dezember 2002 12:17 To: [EMAIL PROTECTED] Subject: Problem going from 4.0.6 to 4.1.16b Hi All. I'm hoping someone can shed some light on my problem. I'm trying to upgrade from 4.0.6 to 4.1.16b and I'm finding that I'm unable to access any JAR's in WEB-INF/lib. Here's what I'm getting from localhost_log: 2002-12-04 03:09:17 StandardContext[]: Starting 2002-12-04 03:09:17 StandardContext[]: Processing start(), current available=false 2002-12-04 03:09:17 StandardContext[]: Configuring default Resources 2002-12-04 03:09:17 StandardContext[]: Configuring non-privileged default Loader 2002-12-04 03:09:17 StandardContext[]: Configuring default Manager 2002-12-04 03:09:17 StandardContext[]: Processing standard container startup 2002-12-04 03:09:17 WebappLoader[]: Deploying class repositories to work directory D:\Morpheus\Dev\PharmGen\runtime\tomcat\work\Standalone\localhost\_ 2002-12-04 03:09:17 WebappLoader[]: Deploy class files /WEB-INF/classes to d:\Morpheus\Dev\PharmGen\www\WEB-INF\classes 2002-12-04 03:09:17 WebappLoader[]: Deploy JAR /WEB-INF/lib/xalan.jar to d:\Morpheus\Dev\PharmGen\www\WEB-INF\lib\xalan.jar 2002-12-04 03:09:17 WebappLoader[]: Deploy JAR /WEB-INF/lib/xercesImpl.jar to d:\Morpheus\Dev\PharmGen\www\WEB-INF\lib\xercesImpl.jar 2002-12-04 03:09:17 WebappLoader[]: Deploy JAR /WEB-INF/lib/xmlParserAPIs.jar to d:\Morpheus\Dev\PharmGen\www\WEB-INF\lib\xmlParserAPIs.jar 2002-12-04 03:09:17 WebappLoader[]: Reloading checks are enabled for this Context 2002-12-04 03:09:17 ContextConfig[]: ContextConfig: Processing START 2002-12-04 03:09:17 StandardContext[]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 2002-12-04 03:09:18 StandardContext[]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN' 2002-12-04 03:09:18 ContextConfig[]: Accumulating TLD resource paths 2002-12-04 03:09:18 ContextConfig[]: Scanning taglib elements in web.xml 2002-12-04 03:09:18 ContextConfig[]: Scanning TLDs in /WEB-INF subdirectory 2002-12-04 03:09:18 ContextConfig[]: Scanning JARs in /WEB-INF/lib subdirectory 2002-12-04 03:09:18 ContextConfig[]: Scanning JAR at resource path '/WEB-INF/lib/xmlParserAPIs.jar' 2002-12-04 03:09:18 ContextConfig[] Exception processing JAR at resource path /WEB-INF/lib/xmlParserAPIs.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/xmlParserAPIs.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.IOException: The system cannot find the path specified at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1313) at java.io.File.createTempFile(File.java:1401) at java.io.File.createTempFile(File.java:1438) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at
RE: ajp13 port always 8009 (config does not apply)
Hussayn, The JK2 properties file contains a directive to port 8009. You need to change this as well! -Original Message- From: SAXESS - Hussayn Dabbous [mailto:[EMAIL PROTECTED]] Sent: Montag, 02. Dezember 2002 16:27 To: [EMAIL PROTECTED] Subject: ajp13 port always 8009 (config does not apply) Hy; I wanted to change the ajp13 port from 8009 (the default port) to 9010. But i always see, the instance opening on the default port. This is an exerpt of my server.xml: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 9000 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=9000 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=99 connectionTimeout=2 useURIValidationHack=false / !-- Define a Coyote/JK2 AJP 1.3 Connector on port 9010 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=9010 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=99 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ I can connect from a browser via port 9000. And if i comment out the ajp connector and restart tomcat, the ajp connector will not be instanciated as expected. So i am shure, my server.xml is readable and been executed... I tried to track the problem within the sources, but i quickly gave up. Maybe someone knows, if this is a bug (i've seen a NEW bug on this issue in the bugdatabase) or i missunderstand something ... regards, hussayn -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Does web.xml inherit?
As far as I know the sequence is: Default Context App Context /conf/web.xml /WEB-INF/web.xml So your /WEB-INF/web.xml has the final say, provided that overrides to the previous settings have been allowed. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Montag, 25. November 2002 23:24 To: Tomcat Users List Subject: Does web.xml inherit? I am running Tomcat 4.0.6 on Solaris. We are getting complaints of session timeouts from users. Looking around I found the Default Session Configuration section of the web.xml in the /conf directory. The app is in its own context defined by its own web.xml. So my question is: does the web.xml inherit the values from the web.xml in the /conf directory (let us call it the main web.xml)? Or are the default values listed in the main web.xml the default values for ALL other contexts if they are not explicitely changed in the other contexts? Thanks, Ben Ricker Wellinx.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: help for newbie?
Jered, Do you have a web.xml file which describes and maps your servlet? This should be placed in $CATALINA_HOME/webapps/myapp/WEB-INF Have a look at the examples app for examples. Hope this helps. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 26. November 2002 17:05 To: [EMAIL PROTECTED] Subject: help for newbie? Greetings to all. I am new to JSP and Tomcat - but trying diligently to learn quickly. I have what are most probably basic questions. I am using the latest, so I assume, Tomcat 4.1.12. I am attempting to create a Webapp and Servlet. I get the Tomcat 404 error, The Requested resource is not available. I suspect I have two problems(more details follow basic descriptions): 1. My servlet isn't recognized once compiled from .java to .class using latest java 1.4.1_01 javac command. 2. I think my webapp is not recognized. DETAILS What I tried: after inital failure, I attempted copying my .class file to the example directory and executing with localhost:8080/examples/servlet/MyServlet just as the HellowWorld servlet is called in an attempt to eliminate possible causes. No luck with this. (I had restarted Tomcat after pasting .class file.) I also tried copying and pasting the HelloWorldExample .class file to my webapp directory and it would not execute. My webapp Directory (courtesy of WROX Professional JSP [which has not a few typo's]: %TOMCAT%\ch03\WEB-INF\classes\com\wrox\projsp\ch03\app1\ and the URL that should activate it: localhost:8080/ch03/servlet/com.wrox.projsp.ch03.app1.MyFirstServlet I changed the laboriously long .myfirstwebapp. to .app1. both in the package declaration of my .class as well as the call the attempted activation URL. If this is the wrong place to ask for help with basics such as this, plese forgive me - I am hoping this is the place and am all too happy to go where directed for answers. If this is the right place, all help is appreciated. Kind regards, Jered p.s. java follows package com.wrox.projsp.ch03.app1; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpRequest; import javax.servlet.http.HttpResponse; import javax.servlet.ServletException; public class MyFirstServlet extends Httpservlet { public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setConentType(text/plain); PrinWriter out = response.getWriter(); out.println(Frustration: bane of inspiration); } } -=| Just say NO to post-modernism. |=- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problem with Classloader and symbolic links in 4.1.12
Have you considered using Ant to build and deploy your applications? -Original Message- From: Eugene Gluzberg [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 21. November 2002 01:45 To: Tomcat Users List Subject: problem with Classloader and symbolic links in 4.1.12 Here is a scenario. I created a reloadable webapp in my tomcat installation, created the directory structure: webapps/test/WEB-INF/lib webapps/test/WEB-INF/classes I then create a symlink from classes to where my code package resides: ln -s $HOME/source/testPackage webapps/test/WEB-INF/classes in $HOME/source/testPackage resides a java file TestServlet.java and its compiled version TestServlet.class TestServlet.java is a servlet class in the testPackage package Tomcat runs as my user, its installed in my home directory, my catalina.policy has: grant { permission java.security.AllPermission; }; When i try to load the servlet, i get the following exception: Wrapper cannot find servlet class testPackage.TestServlet or a class it depends on I do the following: cd webapps/test/WEB-INF/classes rm -f testPackage (remove the link) cp -r $HOME/source/testPackage . restart tomcat, go to the URL of the servlet, and it works fine. Why does it not work with the symbolic link? Is there an option i can give somewhere to tomcat's classloader to follow symbolic links? it would make my life so much easier since I am trying to develop an app with thousands of classes and hundreds of packages, modifying my build system to send all the classes to the tomcat dir would be a hassle. Thanks, Eugene -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: webapp fails to start using /manager start command
Have you checked the log files to see if there is a reason as to why the app could not be started? -Original Message- From: Price, Erik [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 21. November 2002 14:43 To: [EMAIL PROTECTED] Subject: webapp fails to start using /manager start command Hello, I checked the archives for this but couldn't find the answer to my problem. I created a new webapp yesterday and put it into the $CATALINA_HOME/webapps directory. From this list I learned that it is possible to have a webapp recognized by restarting Tomcat *OR* by adding a Context node into $CATALINA_HOME/conf/server.xml that points to the path of the webapp. Since I do not have root access on this server, I cannot change root-owned files and have asked my system administrator to restart Tomcat for me, to get my webapp recognized. He sent me an email saying that he gave me access to the manager webapp, which I have studied from the HOWTO in the documentation. I understand how to use it, but I cannot get my webapp to start. Is it possible to get a webapp to start (for the very first time) from the manager webapp? Or does Tomcat really need to be restarted completely? When I list the webapps on the server using http://domainname:8080/manager/list I can see a list of the webapps that are recognized, including my webapp. But all of the other webapps are listed as running, and my own webapp looks like this: /epricetest:stopped:0 So I thought that I might have to start the webapp using the start command, so I try this: http://domainname:8080/manager/start?path=/epricetest But the error message I receive when I try this is FAIL - Application at context path /epricetest could not be started This does not match any of the error messages detailed in the manager app HOWTO, so I am unsure of what is causing the problem. Could it be that to start a webapp for the very first time, Tomcat must really be restarted? (In which case, there is no way to do it without bugging my system administrator again?) Any suggestions? Thank you, Erik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Oracle Connection Pool - Global Naming Resource - HOW TO
I had problems earlier getting a Global Naming Resource database connection pool to work with my Oracle db. The only reply I got was that someone else had the same problem! I now have it working, so for those interested, here is the HOW TO: When defining the parameters for the db pool (say TESTdb) ensure that the maxActive parameter is not set too high, i.e. that Oracle has enough connections available for the pool (Oracle config parameter max_connections). Mine was set to 100 in server.xml, and when the pool tried to establish itself, it just sat and waited for 100 connections to become available! Every app that wants to use the connection pool should have a Context entry in server.xml containing a ResourceLink to the name of the pool. ResourceLink name=testDb global=jdbc/TESTdb type=javax.sql.DataSource/ The application can then connect using: Context ctx = null; ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(/testDb); Connection conn = ds.getConnection(); No entries are required in the application web.xml to reference the resource. Have Fun! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: webapp fails to start using /manager start command
Erik, Applications gain their context environments in Tomcat as follows: DefaultContext as defined in server.xml - all apps inherit from here. Context - specific to the app in server.xml web.xml - as in CATALINA_HOME/conf web.xml - as in Webapps/app/WEB-INF I have web.xml´s which only contain: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameApp Name/display-name servlet servlet-nameApp/servlet-name servlet-classApp/servlet-class /servlet servlet-mapping servlet-nameApp/servlet-name url-pattern/App/web-app/url-pattern /servlet-mapping /web-app and even only: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameApp Name/display-name /web-app if I don´t have a servlet. I like my apps to inherit from DefaultContext and use Context to access Global Resources such as database connection pools. Applications are easier to manage this way, and also save you having to debug your web.xml files. You just have to get your server.xml right! Regards Eric -Original Message- From: Price, Erik [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 21. November 2002 16:03 To: Roberts, Eric; Tomcat Users List Subject: RE: webapp fails to start using /manager start command Eric, Great! I didn't know about the log files, but that had the answer. A SAX parse error in my WEB-INF/web.xml file. This is kind of surprising since I just copied the web.xml file from the URL at http://domainname:8080/tomcat-docs/appdev/web.xml.txt and removed the .txt extension. I realize that this example file is intended to be just that, an example, but did anyone know that it does not validate? There is a servlet node called graph that is missing a servlet-class node. It took me a few tries, some judicious log-reading, and some web.xml-editing, but I managed to get my webapp started! The HelloWorld is just a start, but now I can move forward. QUESTION: How important is the web.xml file to a webapp? All I did was comment the offending node and the webapp started. I still have completely invalid data in the web.xml file. The reason for this is that I have not really designed a webapp; this is just a testbed for miscellaneous servlets. So until I have designed a true web application and created a correct web.xml file, does the web.xml file really matter? Thanks again to all who help me on this list. (Please CC me in response as I am a digester, thank you) Erik -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 8:48 AM To: Tomcat Users List Subject: RE: webapp fails to start using /manager start command Have you checked the log files to see if there is a reason as to why the app could not be started? -Original Message- From: Price, Erik [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 21. November 2002 14:43 To: [EMAIL PROTECTED] Subject: webapp fails to start using /manager start command Hello, I checked the archives for this but couldn't find the answer to my problem. I created a new webapp yesterday and put it into the $CATALINA_HOME/webapps directory. From this list I learned that it is possible to have a webapp recognized by restarting Tomcat *OR* by adding a Context node into $CATALINA_HOME/conf/server.xml that points to the path of the webapp. Since I do not have root access on this server, I cannot change root-owned files and have asked my system administrator to restart Tomcat for me, to get my webapp recognized. He sent me an email saying that he gave me access to the manager webapp, which I have studied from the HOWTO in the documentation. I understand how to use it, but I cannot get my webapp to start. Is it possible to get a webapp to start (for the very first time) from the manager webapp? Or does Tomcat really need to be restarted completely? When I list the webapps on the server using http://domainname:8080/manager/list I can see a list of the webapps that are recognized, including my webapp. But all of the other webapps are listed as running, and my own webapp looks like this: /epricetest:stopped:0 So I thought that I might have to start the webapp using the start command, so I try this: http://domainname:8080/manager/start?path=/epricetest But the error message I receive when I try this is FAIL - Application at context path /epricetest could not be started This does not match any of the error messages detailed in the manager app HOWTO, so I am unsure of what is causing the problem. Could it be that to start a webapp for the very first time, Tomcat must really be restarted? (In which case
RE: RESEND:Problem in starting the TOMCAT
The vikas2 application is failing to start. Check CATALINA_HOME/logs and see what the logfiles say. -Original Message- From: Nagpal, Vikas [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 21. November 2002 17:17 To: '[EMAIL PROTECTED]' Subject: RESEND:Problem in starting the TOMCAT Hi everybody, I am receiving the following error in starting the tomcat thru the manager application. FAIL - Encountered exception java.lang.IllegalStateException: Container StandardContext[/vikas2] has not been started Of late I have been copying some stuff into my directory. Is this something to do with the error. Thanks, VIkas. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: SSL keystore problem
Have you commented out the SSL connector in server.xml? -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 13:49 To: [EMAIL PROTECTED] Subject: SSL keystore problem I had tried playing around with the SSL connector and deleted a keystore when i was done. I thought Tomcat would stop trying to load it. For some reason it keeps trying to find the file from the path where it previously was and throws a FileNotFoundException. Where is it getting the path information from and how can i reset it to the default.
RE: SSL keystore problem
I don´t know about starting clean, but once you comment out the SSL connector, to use SSL again simply regenerate a new keystore and uncomment the SSL connector. -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 13:55 To: Tomcat Users List Subject: RE: SSL keystore problem no i have not...i have tried that and it works, but i would like to start again clean, how do I go about doing this? -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED]] Sent: Wed 11/20/2002 7:53 AM To: Tomcat Users List Cc: Subject: RE: SSL keystore problem Have you commented out the SSL connector in server.xml? -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 13:49 To: [EMAIL PROTECTED] Subject: SSL keystore problem I had tried playing around with the SSL connector and deleted a keystore when i was done. I thought Tomcat would stop trying to load it. For some reason it keeps trying to find the file from the path where it previously was and throws a FileNotFoundException. Where is it getting the path information from and how can i reset it to the default.
RE: SSL keystore problem
By default the keystore is created in the home directory of the user that creates it. If SSL Connector is called, it looks in the home directory for the keystore. -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 13:58 To: Tomcat Users List Subject: RE: SSL keystore problem Also I would like to know where that path information to the keystore is being stored-- is there some hidden system file or properties file that the SSLServerFactory reads from in order to attempt to initKeyStore()? -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED]] Sent: Wed 11/20/2002 7:53 AM To: Tomcat Users List Cc: Subject: RE: SSL keystore problem Have you commented out the SSL connector in server.xml? -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 13:49 To: [EMAIL PROTECTED] Subject: SSL keystore problem I had tried playing around with the SSL connector and deleted a keystore when i was done. I thought Tomcat would stop trying to load it. For some reason it keeps trying to find the file from the path where it previously was and throws a FileNotFoundException. Where is it getting the path information from and how can i reset it to the default.
RE: SSL keystore problem
The keystore file can be located in a different location as follows: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore \path\to\my\keystore Try reading SSL HOW TO in the documentation. -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 14:03 To: Tomcat Users List Subject: RE: SSL keystore problem Do you know how to specify a different location? Sorry to bother u so much but im just a student trying to teach all this stuff to myself. -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED]] Sent: Wed 11/20/2002 8:00 AM To: Tomcat Users List Cc: Subject: RE: SSL keystore problem By default the keystore is created in the home directory of the user that creates it. If SSL Connector is called, it looks in the home directory for the keystore. -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 13:58 To: Tomcat Users List Subject: RE: SSL keystore problem Also I would like to know where that path information to the keystore is being stored-- is there some hidden system file or properties file that the SSLServerFactory reads from in order to attempt to initKeyStore()? -Original Message- From: Roberts, Eric [mailto:[EMAIL PROTECTED]] Sent: Wed 11/20/2002 7:53 AM To: Tomcat Users List Cc: Subject: RE: SSL keystore problem Have you commented out the SSL connector in server.xml? -Original Message- From: brana02 [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 20. November 2002 13:49 To: [EMAIL PROTECTED] Subject: SSL keystore problem I had tried playing around with the SSL connector and deleted a keystore when i was done. I thought Tomcat would stop trying to load it. For some reason it keeps trying to find the file from the path where it previously was and throws a FileNotFoundException. Where is it getting the path information from and how can i reset it to the default.
Problem with Oracle/Global Naming Resource
I am getting the following error when attempting to load the Oracle database driver as a globally pooled resource: java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312) It works fine if I either give my application an explicit context in server.xml or put the same entries in a DefaultContext. Any ideas? My server.xml entries are: !-- Global JNDI resources -- GlobalNamingResources !-- Database Connection Pool Definition -- Resource name=TESTdb type=javax.sql.DataSource auth=Container scope=Shareable /Resource ResourceParams name=TESTdb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@dbtst:1521:scott/value /parameter parameter nameusername/name valuescott/value /parameter parameter namepassword/name valuetiger/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /GlobalNamingResources My web.xml entries are: resource-ref res-ref-nameTESTdb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth res-sharing-scopeShareable/res-sharing-scope /resource-ref -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]