Modify class path using catalina (Windows tomcat 5.5.2 version)
Hi everybody, I need to add a directory to class path of Tomcat and i'm using catalina.bat to launch it. Is there a way to do this without modifying original .bat of tomcat release? Thank you Xavier Frisaye
RE: IIS with Tomcat integration
i found this aswell. windows ;) when i moved to using virtual hosts with tomcat and iis with jk2 i found that only iis needed to be restarted and not windows. On Tue, 28 Sep 2004, Sng Wee Jim wrote: Date: Tue, 28 Sep 2004 09:48:54 +0800 From: Sng Wee Jim [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: IIS with Tomcat integration Solved. Need to restart windows, whenever the settings in uriworkermap.properties is modified. Seems like the isapi_redirect.dll can only get reloaded by windows restart and not by restarting the IIS website. - Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session based object, accessible to all classes.
My tomcat 5.0.27 app currently generates session based data in a number of classes. Is there a common way of sharing a data structure across these classes? I want to instantiate it when a user logs in, add to it from one class, then retrieve data from another class. This data will vary across users, hence is not common to all sessions. TIA, Regards DaveP. snip here * -- DISCLAIMER: NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. RNIB endeavours to ensure that emails and any attachments generated by its staff are free from viruses or other contaminants. However, it cannot accept any responsibility for any such which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
catalina-ant info
Hi all, Can anyone direct me to a user manual for the catalina-ant.jar tasks that come with Tomcat? I've read the documentation found under /tomcat-docs but I'd really like to see something specifically detailing ANT interface to the manager app. Many thanks, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemory on Tomcat webapp with awt use
Hi, I have a problem with this server configuration: - Server sun/solaris 5.8 Generic_108528-17 sun4u sparc SUNW,UltraAX-i2 - Apache 2.0.38 with mod_jk2 - Tomcat 4.1.30 - j2sdk1.4.2_05 Sun in pre-production environment. My webapp crashes also with few concurrent users when it uses awt for images generation on server side; the images are visualized to internet users by their requests. The server error (in catalina.out) is: java.lang.OutOfMemoryError Sep 27, 2004 4:33:11 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception (java.lang.OutOfMemoryError) executing [EMAIL PROTECTED], terminatin g thread -- Could be a bug or known problem on use of awt classes on Unix Systems? Without image generation my webapp works fine. On MS NT system the same problem seems doesn't arise: it's possible? My command line for running java is: java -Xms256m -Xmx256m -Djava.awt.headless=true .. Thanks in advance four your help. Best regards cg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat4 to Tomcat5 web.xml problem
I've got an application that runs fine in Tomcat 4.1.30. However when I place the same webapp in Tomcat 5.0.28 I get an error at startup saying that there is an error on line 11 column 21 of web.xml and the app is not loaded. Can anyone give me any pointers as to what could be wrong with the file? Thanks Shaun !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping servlet servlet-nameapt/servlet-name servlet-classorg.apache.turbine.Turbine/servlet-class init-param param-nameapplicationRoot/param-name param-valuewebContext/param-value /init-param init-param param-nameproperties/param-name param-value/WEB-INF/conf/TurbineResources.properties/param-value /init-param load-on-startup1/load-on-startup /servlet security-constraint web-resource-collection web-resource-nametemplates/web-resource-name url-pattern/templates/*/url-pattern /web-resource-collection web-resource-collection web-resource-namelogs/web-resource-name url-pattern/logs/*/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameTemplates/realm-name /login-config /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session based object, accessible to all classes.
Hi, Eh, store the object in the session with session.setAttribute(name, object) retrieve it with (cast-to your object)session.getAttribute(name). Or is this a too simple answer for your problem ? Regards Werner On Sep 28, 2004, at 10:23 AM, Pawson, David wrote: My tomcat 5.0.27 app currently generates session based data in a number of classes. Is there a common way of sharing a data structure across these classes? I want to instantiate it when a user logs in, add to it from one class, then retrieve data from another class. This data will vary across users, hence is not common to all sessions. TIA, Regards DaveP. snip here * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat4 to Tomcat5 web.xml problem
Try moving the servlet-mapping node so that it appears after the servlet node. On Tue, 2004-09-28 at 05:45, Shaun Campbell wrote: I've got an application that runs fine in Tomcat 4.1.30. However when I place the same webapp in Tomcat 5.0.28 I get an error at startup saying that there is an error on line 11 column 21 of web.xml and the app is not loaded. Can anyone give me any pointers as to what could be wrong with the file? Thanks Shaun !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping servlet servlet-nameapt/servlet-name servlet-classorg.apache.turbine.Turbine/servlet-class init-param param-nameapplicationRoot/param-name param-valuewebContext/param-value /init-param init-param param-nameproperties/param-name param-value/WEB-INF/conf/TurbineResources.properties/param-value /init-param load-on-startup1/load-on-startup /servlet security-constraint web-resource-collection web-resource-nametemplates/web-resource-name url-pattern/templates/*/url-pattern /web-resource-collection web-resource-collection web-resource-namelogs/web-resource-name url-pattern/logs/*/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameTemplates/realm-name /login-config /web-app - 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]
Increasing heap size in Tomcat
Hi All, We are using Tomcat 3.2.1 version. We want to Increase the Heap Size. Can anyone suggest way of how to do this. Thanks in advance Regards, Sri. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jdk1.4 tomcat.4.30
HI to all, I have still some problem with tomcat 4.x and jdk1.4.1_05. [echo] JAVA_HOME = C:\j2sdk1.4.2_05 [java] Sep 28, 2004 12:44:10 PM org.apache.coyote.http11.Http11Protocol init [java] INFO: Initializing Coyote HTTP/1.1 on port 8080 [java] Exception during startup processing [java] java.lang.reflect.InvocationTargetException [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) [java] Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration [java] at java.lang.ClassLoader.findBootstrapClass(Native Method) [java] at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:727) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:284) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:282) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) [java] at java.lang.ClassLoader.defineClass0(Native Method) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:539) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) [java] at java.net.URLClassLoader.access$100(URLClassLoader.java:55) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:194) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187) [java] at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:621) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:958) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) [java] at java.lang.Class.forName0(Native Method) [java] at java.lang.Class.forName(Class.java:141) [java] at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1153) [java] at org.apache.catalina.core.StandardService.initialize(StandardService.java:579) [java] at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) [java] at org.apache.catalina.startup.Catalina.start(Catalina.java:511) [java] at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) [java] at org.apache.catalina.startup.Catalina.process(Catalina.java:180) [java] ... 5 more This message its only thrown with jdk1.4, with jdk.13 it works. If I'm commenting out the following connector it works even with jdk1.4! Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Does anyone know this problem. How can I resolve it? THanks Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT]Geronimo and Tomcat
Hi all, I was reading a tutoral on using Geronimo. It seems that Geronimo is using Jetty. Why it don't use Tomcat. Or is Tomcat is available as optional plug in ?. rgds Anto Paul -- To strive,to seek,to find and not to yield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session based object, accessible to all classes.
-Original Message- From: werner Eh, store the object in the session with session.setAttribute(name, object) retrieve it with (cast-to your object)session.getAttribute(name). Or is this a too simple answer for your problem ? javax.servlet.http Interface HttpSession ? Is that the one you mean Werner? Just give it any recognisable name and it returns the object based on this users session? Sounds about right, so long as it is session based, which it seems to be from the javadocs. Much appreciated. DaveP ** snip here ** -- DISCLAIMER: NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. RNIB endeavours to ensure that emails and any attachments generated by its staff are free from viruses or other contaminants. However, it cannot accept any responsibility for any such which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Norton AntiVirus and False Positives In Tomcat
Sounds like NAV may have returned some false positives. The only virus-like content I would expect inside a plain HTML doc would be rogue JavaScript. Indeed. I looked at the HTML page myself - it's unaltered, and there's nothing rogue in there that I can see. Perhaps you could point your admin to the web resources you found, those concerning false positives from NAV? I agree - I already sent the link yesterday afternoon. This could become a sticky issue of corporate politics, depending on your organization's structure. You may have to get your management to talk to the admin's management. -QM You're right on there. This could be very sticky and uncomfortable. I'm not sure how receptive corp will be. Thanks - MOD __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
start IE after tomcat start
Hello, is their a possibility to start the IE with a page after tomcat is started? For example: tomcat started the Internet Explorer is automatic starting and open the site http://localhost:8080/XXX Greeting Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]Geronimo and Tomcat
[Link to all converstations on tomcat-dev with the word Geronimo] ... http://marc.theaimsgroup.com/?l=tomcat-devw=2r=1s=Geronimoq=b -Tim Anto Paul wrote: Hi all, I was reading a tutoral on using Geronimo. It seems that Geronimo is using Jetty. Why it don't use Tomcat. Or is Tomcat is available as optional plug in ?. rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IIS with Tomcat integration
You can open a command prompt and type in iisreset to have it read the changes. Or you can open the services control panel and restart the IIS Admin and World Wide Web Publishing services. Either way you will force a reload of the properties file. Be aware that either one of these options will cause an interruption of service. -Brantley -Original Message- From: Sng Wee Jim [mailto:[EMAIL PROTECTED] Sent: Monday, September 27, 2004 9:49 PM To: Tomcat Users List Subject: RE: IIS with Tomcat integration Solved. Need to restart windows, whenever the settings in uriworkermap.properties is modified. Seems like the isapi_redirect.dll can only get reloaded by windows restart and not by restarting the IIS website. - Jim -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Monday, September 27, 2004 2:17 PM To: Tomcat Users List Subject: Re: IIS with Tomcat integration jk2 or jk adapter ? On Mon, 27 Sep 2004, Sng Wee Jim wrote: Date: Mon, 27 Sep 2004 14:31:28 +0800 From: Sng Wee Jim [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: IIS with Tomcat integration Hi, I am having some problems integrating IIS 5 with Tomcat 5.0.28 on Win2k. Basically, the redirection is working fine with the following configuration in my uriworkermap.properties The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email immediately. You should not copy, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.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: cannot deploy the war file..Tomcat 4.1.30 --- please suggest...
Ok. cool. Here's a copy of a Context tag I use for a war file using a custom Realm and other assorted goodies: Context path=/services docBase=services.war debug= reloadable=true className=com.mkodo.web.services.WebServiceContext privileged=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=services_log. suffix=.txt timestamp=true/ Loader loaderClass=com.mkodo.web.servlet.PrivilegedClassLoader / Realm className=com.mkodo.web.services.WebServiceRealm / Resources className=org.apache.naming.resources.WARDirContext allowLinking=true/ Resource name=mkodo/web-service-lookup auth=Container type=com.mkodo.web.services.RemoteServiceLocator/ ResourceParams name=mkodo/web-service-lookup parameter namefactory/name valueorg.apache.naming.factory.BeanFactory/value /parameter /ResourceParams /Context This is in a services.xml file in webapps along with my services.war. So change your docBase to be your war file and hopefully you should be set. Jon Shilpa Nalgonda wrote: Thanks, now i get this error --\ : Doc base must point to a WAR file at org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:172) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java :3349) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3479) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) I have this entry in server.xml, i have closed the Context too. Context path=/rpcoemapi docBase=rpcoemapi debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_rpcoemapi.log suffix=.txt timestamp=true/ Resources className=org.apache.naming.resources.WARDirContext allowLinking=true/ Resource name=jdbc/ODINPRD auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/ODINPRD parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle == -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Monday, September 27, 2004 10:59 AM To: Tomcat Users List Subject: Re: cannot deploy the war file..Tomcat 4.1.30 --- please suggest... Ok, wait a minute. Have you got a Context element for your War file? (Either within server.xml or in a webapps/rpcoemapi.xml file) Or have you just dropped it in webapps and are expecting tomcat to autodeploy? If the latter then I would have expected Tomcat to pick the correct type of Resources: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%2 0Application%20Deployment If it's the former case then the Resources element nests inside the Context element: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/resources.html Jon Shilpa Nalgonda wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modify class path using catalina (Windows tomcat 5.5.2 version)
On Tue, Sep 28, 2004 at 08:36:39AM +0200, Xavier Frisaye wrote: : I need to add a directory to class path of Tomcat and i'm using catalina.bat : to launch it. : Is there a way to do this without modifying original .bat of tomcat release? The safest, most portable[1] way to add to a classpath is to wrap your data in a JAR and place that in one of: {context}/WEB-INF/lib {tomcat install}/common/lib {tomcat install}/shared/lib JARs in these directories are picked up automagically by Tomcat, so there's no need to alter a file. Refer to the Tomcat classloader doc to decide where to put the JAR. (Hint: most likely, under {context}/WEB-INF/lib). -QM [1] = portable between different versions of Tomcat, as well as between different (spec-compliant) containers. -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: start IE after tomcat start
Hi Use a script as follows: ---8 tomcat.bat net stop tomcat net start tomcat start iexplore.exe http://127.0.0.1:8080 exit ---8 tomcat.bat Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Re: Session based object, accessible to all classes.
On Tue, Sep 28, 2004 at 12:28:11PM +0100, Pawson, David wrote: : Interface HttpSession ? Is that the one you mean Werner? : Just give it any recognisable name and it returns the object : based on this users session? Yes. Think of session as another scope, like request or application: it's a bucket in which you can store any old Object (just be sure to cast it back to your expected object when you get it back). Session scope is special because it is bound to, well, a session, which should be a particular instance of a particular user account. (i.e. if bob logs in twice from different browsers, he will likely have two different sessions.) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: catalina-ant info
Hi, The Manager How-To: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Execu ting%20Manager%20Commands%20With%20Ant. The command to the Manager are the same whether issued via Ant or via the HTML interface. Yoav Shapira Millennium Research Informatics -Original Message- From: Chris Ward [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 5:35 AM To: Tomcat Users List Subject: catalina-ant info Hi all, Can anyone direct me to a user manual for the catalina-ant.jar tasks that come with Tomcat? I've read the documentation found under /tomcat-docs but I'd really like to see something specifically detailing ANT interface to the manager app. Many thanks, Chris - 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]
RE: jdk1.4 tomcat.4.30
Hi, Are you launching Tomcat from Ant? Looks that from your output. You need the JMX API on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Markus Brigl [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 6:48 AM To: [EMAIL PROTECTED] Subject: jdk1.4 tomcat.4.30 HI to all, I have still some problem with tomcat 4.x and jdk1.4.1_05. [echo] JAVA_HOME = C:\j2sdk1.4.2_05 [java] Sep 28, 2004 12:44:10 PM org.apache.coyote.http11.Http11Protocol init [java] INFO: Initializing Coyote HTTP/1.1 on port 8080 [java] Exception during startup processing [java] java.lang.reflect.InvocationTargetException [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 9) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp l.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) [java] Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration [java] at java.lang.ClassLoader.findBootstrapClass(Native Method) [java] at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:727) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:284) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:282) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r.java:941) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r.java:857) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r.java:941) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r.java:857) [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) [java] at java.lang.ClassLoader.defineClass0(Native Method) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:539) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) [java] at java.net.URLClassLoader.access$100(URLClassLoader.java:55) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:194) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187) [java] at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassL oade r.java:621) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r.java:958) [java] at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r.java:857) [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) [java] at java.lang.Class.forName0(Native Method) [java] at java.lang.Class.forName(Class.java:141) [java] at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.ja va:1 153) [java] at org.apache.catalina.core.StandardService.initialize(StandardService.jav a:57 9) [java] at org.apache.catalina.core.StandardServer.initialize(StandardServer.java: 2246 ) [java] at org.apache.catalina.startup.Catalina.start(Catalina.java:511) [java] at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) [java] at org.apache.catalina.startup.Catalina.process(Catalina.java:180) [java] ... 5 more This message its only thrown with jdk1.4, with jdk.13 it works. If I'm commenting out the following connector it works even with jdk1.4! Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Does anyone know this problem. How can I resolve it? THanks Markus - 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
Re: Increasing heap size in Tomcat
On Tue, Sep 28, 2004 at 03:36:51AM -0700, Srinivasarao Salla wrote: : We are using Tomcat 3.2.1 version. We want to Increase the Heap : Size. : Can anyone suggest way of how to do this. Find some way to pass the -Xmx flag to the Java commandline. In v4.x and 5.x, you set the environment variable JAVA_OPTS before running the start script. It may be the same in v3.x; what do the docs say? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemory on Tomcat webapp with awt use
On Tue, Sep 28, 2004 at 11:32:40AM +0200, Camillo Granchelli wrote: : My webapp crashes also with few concurrent users when it : uses awt for images generation on server side; the images are : visualized to internet users by their requests. : The server error (in catalina.out) is: : : java.lang.OutOfMemoryError Perhaps you'll need more memory (larger heap, aka -Xmx). Image rendering can be memory-intensive, depending on what API is used on the backend and the type of image you're creating. Run a load-test to guage your memory settings. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sending signed mails from servlet
Hi, I've used javamail-crypto, it's cool. It worked fine. The environment was very low stress as far as usage goes, something like one message every couple of days. I wish I had a link to an old post on this mailing list, not my post but one of the old timers (maybe Craig or Bill Barker). It detailed the meaning of alpha, beta, and stable ;) The gist was along these lines: Would you use a stable release of anything without testing it yourself first? I wouldn't. Would you use an alpha release of anything if you test it and it works well? I probably would, depending on the conditions. Such conditions can be management saying only stable stuff can be used. And that's OK. But if you're in control, don't let the alpha/bets/stable label make your choices for you without testing ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Steffen Heil [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:53 AM To: 'Tomcat Users List' Cc: 'Ralph Einfeldt' Subject: AW: sending signed mails from servlet Hi We are using www.bouncycastle.org to send s/MIME signed mails with javamail. I have seen this as well, as it is used as base of - http://javamail-crypto.sourceforge.net/ early alpha makes me nervous for productive systems. But there are no exsamples. Could you please provide me a short part of that source code to start with? Regards, Steffen 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]
RE: [OT]Geronimo and Tomcat
Hi, If you look at the mailing list threads for tomcat-dev and Geronimo-dev regarding Tomcat integration, you'd see me getting on their case ;) They being the Geronimo dev team. They've been very responsive and helpful now that the 1.0 release is nearing. So we're working on it, and have made significant progress in the past two weeks. You can use Tomcat within Geronimo now properly (i.e. via a GBean, the Geronimo Way), for simple use-cases. There's still no JAAS/JACC integration, only limited JSR77 integration, and no ability yet for Tomcat to participate in wider Geronimo transactions. And all of this stuff is NOT in Geronimo 1.0M2: it's in the repository if you want to build Geronimo yourself, and it will be in the next milestone release. The status is being tracked at http://wiki.apache.org/geronimo/Tomcat. Yoav Shapira Millennium Research Informatics -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 7:56 AM To: Tomcat Users List Subject: Re: [OT]Geronimo and Tomcat [Link to all converstations on tomcat-dev with the word Geronimo] ... http://marc.theaimsgroup.com/?l=tomcat-devw=2r=1s=Geronimoq=b -Tim Anto Paul wrote: Hi all, I was reading a tutoral on using Geronimo. It seems that Geronimo is using Jetty. Why it don't use Tomcat. Or is Tomcat is available as optional plug in ?. rgds Anto Paul - 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]
RE: Tomcat4 to Tomcat5 web.xml problem
Hi, Update your web.xml DTD to 2.3 or 2.4 in order to run your app on Tomcat 5. If you REALLY want a 2.2 DTD then at least validate your web.xml. Yoav Shapira Millennium Research Informatics -Original Message- From: Shaun Campbell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 5:46 AM To: Tomcat Users List Subject: Tomcat4 to Tomcat5 web.xml problem I've got an application that runs fine in Tomcat 4.1.30. However when I place the same webapp in Tomcat 5.0.28 I get an error at startup saying that there is an error on line 11 column 21 of web.xml and the app is not loaded. Can anyone give me any pointers as to what could be wrong with the file? Thanks Shaun !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping servlet servlet-nameapt/servlet-name servlet-classorg.apache.turbine.Turbine/servlet-class init-param param-nameapplicationRoot/param-name param-valuewebContext/param-value /init-param init-param param-nameproperties/param-name param-value/WEB-INF/conf/TurbineResources.properties/param-value /init-param load-on-startup1/load-on-startup /servlet security-constraint web-resource-collection web-resource-nametemplates/web-resource-name url-pattern/templates/*/url-pattern /web-resource-collection web-resource-collection web-resource-namelogs/web-resource-name url-pattern/logs/*/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameTemplates/realm-name /login-config /web-app - 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]
RE: start IE after tomcat start
Hi, Probably with a sleep or delay command in there to allow tomcat time to start up ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Steffen Heil [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 8:40 AM To: 'Tomcat Users List' Subject: AW: start IE after tomcat start Hi Use a script as follows: ---8 tomcat.bat net stop tomcat net start tomcat start iexplore.exe http://127.0.0.1:8080 exit ---8 tomcat.bat Regards, Steffen 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]
RE: Session based object, accessible to all classes.
-Original Message- From: QM Yes. Think of session as another scope, like request or application: it's a bucket in which you can store any old Object (just be sure to cast it back to your expected object when you get it back). Session scope is special because it is bound to, well, a session, which should be a particular instance of a particular user account. (i.e. if bob logs in twice from different browsers, he will likely have two different sessions.) -QM Thanks. Appreciated. Another step forwards. regards DaveP -- DISCLAIMER: NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. RNIB endeavours to ensure that emails and any attachments generated by its staff are free from viruses or other contaminants. However, it cannot accept any responsibility for any such which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: sending signed mails from servlet
Hi I've used javamail-crypto, it's cool. It worked fine. The environment was very low stress as far as usage goes, something like one message every couple of days. Okay, I will give both a try: javamail-crypto AND bouncycastle.org. It detailed the meaning of alpha, beta, and stable ;) Those are clear to me. I do use some beta software and I do not insist on stable. For example, my whole system is testing since about one year, it is sarge. However, if developers write early alpha about their own product, I become carefull. That's why I am asking for experience of others. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Re: headless java setting
Worked like a charm. I was putting it in the wrong spot. From: Robert F. Hall [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: headless java setting Date: Mon, 27 Sep 2004 19:02:12 -0700 No need to add X libs, just add -Djava.awt.headless=true to your JAVA_OPTS Didier McGillis wrote: I have a small problem. My predicesor setup his code to work with X-Windows. Well the code will not work without an x11 server running. However I have all my machines setup as a typical server and do not have xwindows installed. I saw where you could grab a few x11 libs and then run somewhere in the catalina.sh file a flag that would flip on the headless setting in teh JVM. I have tried that several times and not even a hint that it works. Any thoughts. Any experience. _ Take charge with a pop-up guard built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. - 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] _ Designer Mail isn't just fun to send, it's fun to receive. Use special stationery, fonts and colors. http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Increasing heap size in Tomcat
Hi, In tomcat 3.2.1 also we have a start script called tomcat.bat. I think in this script we set the JAVA_OPTS. But I am not knowing how to set the parameter and where to set it. If you any Idea I would appreciate it. Thanks in advance. Regards, Sri. -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 6:19 PM To: Tomcat Users List Subject: Re: Increasing heap size in Tomcat On Tue, Sep 28, 2004 at 03:36:51AM -0700, Srinivasarao Salla wrote: : We are using Tomcat 3.2.1 version. We want to Increase the Heap : Size. : Can anyone suggest way of how to do this. Find some way to pass the -Xmx flag to the Java commandline. In v4.x and 5.x, you set the environment variable JAVA_OPTS before running the start script. It may be the same in v3.x; what do the docs say? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.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: Increasing heap size in Tomcat
Hi, I think in Tomcat 3.x the variable to set is TOMCAT_OPTS, not JAVA_OPTS (Tomcat 4.x and 5.x) or CATALINA_OPTS (Tomcat 4.x and 5.x). This is covered in the documentation (http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#env_setu p) which you should have read by now. If you haven't, go RTFM ;) Beyond that, I've never used Tomcat 3.x myself, and so I can't offer much help. But I do think the above answers your question. Yoav Shapira Millennium Research Informatics -Original Message- From: Srinivasarao Salla [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 9:16 AM To: 'Tomcat Users List' Subject: RE: Increasing heap size in Tomcat Hi, In tomcat 3.2.1 also we have a start script called tomcat.bat. I think in this script we set the JAVA_OPTS. But I am not knowing how to set the parameter and where to set it. If you any Idea I would appreciate it. Thanks in advance. Regards, Sri. -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 6:19 PM To: Tomcat Users List Subject: Re: Increasing heap size in Tomcat On Tue, Sep 28, 2004 at 03:36:51AM -0700, Srinivasarao Salla wrote: : We are using Tomcat 3.2.1 version. We want to Increase the Heap : Size. : Can anyone suggest way of how to do this. Find some way to pass the -Xmx flag to the Java commandline. In v4.x and 5.x, you set the environment variable JAVA_OPTS before running the start script. It may be the same in v3.x; what do the docs say? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.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] 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]
Problem!
Dear All Readers, I have installed j2re-1_4_2_01-windows-i586 and jakarta-tomcat-5.0.25 on a Windows server 2003 SE. But just after finishing the setup, I cannot login to the localhost:8080. A windows popup comes and asks It asks for windows username and password. But it does not accept any users have been defined on the system. When I cancel the window, the message You are not authorized to view this page will be displayed. Could you possibly help me solve the problem? I will glad if you can hel! Sincerely Yours Ali Hoseinjany
Re: [OT]Geronimo and Tomcat
Thanks for the efforts. I am a great fan of Tomcat and other Apache projects. rgds Antony Paul - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 6:15 PM Subject: RE: [OT]Geronimo and Tomcat Hi, If you look at the mailing list threads for tomcat-dev and Geronimo-dev regarding Tomcat integration, you'd see me getting on their case ;) They being the Geronimo dev team. They've been very responsive and helpful now that the 1.0 release is nearing. So we're working on it, and have made significant progress in the past two weeks. You can use Tomcat within Geronimo now properly (i.e. via a GBean, the Geronimo Way), for simple use-cases. There's still no JAAS/JACC integration, only limited JSR77 integration, and no ability yet for Tomcat to participate in wider Geronimo transactions. And all of this stuff is NOT in Geronimo 1.0M2: it's in the repository if you want to build Geronimo yourself, and it will be in the next milestone release. The status is being tracked at http://wiki.apache.org/geronimo/Tomcat. Yoav Shapira Millennium Research Informatics -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 7:56 AM To: Tomcat Users List Subject: Re: [OT]Geronimo and Tomcat [Link to all converstations on tomcat-dev with the word Geronimo] ... http://marc.theaimsgroup.com/?l=tomcat-devw=2r=1s=Geronimoq=b -Tim Anto Paul wrote: Hi all, I was reading a tutoral on using Geronimo. It seems that Geronimo is using Jetty. Why it don't use Tomcat. Or is Tomcat is available as optional plug in ?. rgds Anto Paul - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with tomcat on UNIX
I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnectionImp l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(Calcul ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated !! Thanks Amar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with tomcat on UNIX
Hi, Well, how is the local machine configuration different the unix one? Is the driver jar in the same directory? Is the server.xml the same? Is your context definition, if you have one, the same? When you say you're running fine locally, is that from within an IDE, or on the command line? Out of curiosity, did you search the archives or consult the Tomcat FAQ before posting your question? This is not a rare question ;) Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 11:11 AM To: 'Tomcat Users List' Subject: Problems with tomcat on UNIX I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc e.ja v a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava: 5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnecti onIm p l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(C alcu l ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestP roce s sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :274 ) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio n FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC h ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j a va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo ntex t Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j a va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:19 5 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:16 4 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8 28) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process Conn e ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 84) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja v a:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated !! Thanks Amar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This
RE: Problems with tomcat on UNIX
Yoav, I did verified the server.xml files from both the environments and everything is pretty much the same the only difference is that I use port 8080 on my local machine and port 8072 on the unix machine. The jar file is in the same location. It is in the WEB-INF/libs dir. Well I use the link http://localhost:8080/SSBilling/form/ to access my local portal. Above all everything did seems to work just before the weekend. Please let me know if there is anything that I am missing to change. Thanks Amar -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 10:17 AM To: Tomcat Users List Subject: RE: Problems with tomcat on UNIX Hi, Well, how is the local machine configuration different the unix one? Is the driver jar in the same directory? Is the server.xml the same? Is your context definition, if you have one, the same? When you say you're running fine locally, is that from within an IDE, or on the command line? Out of curiosity, did you search the archives or consult the Tomcat FAQ before posting your question? This is not a rare question ;) Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 11:11 AM To: 'Tomcat Users List' Subject: Problems with tomcat on UNIX I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade r .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc e.ja v a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava: 5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnecti onIm p l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(C alcu l ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestP roce s sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java :274 ) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio n FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC h ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j a va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo ntex t Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j a va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:19 5 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:16 4 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at
RE: Problems with tomcat on UNIX
Hi, So everything worked fine before the weekend, the setup is the same except for ports, now all of a sudden it doesn't work, and you expect someone who doesn't know your system to be able to help? ;) These changes don't occur by themselves. Something has to have changed. Maybe you should try using a standard connection pooling approach rather than rolling your own. Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 11:32 AM To: Tomcat Users List Subject: RE: Problems with tomcat on UNIX Yoav, I did verified the server.xml files from both the environments and everything is pretty much the same the only difference is that I use port 8080 on my local machine and port 8072 on the unix machine. The jar file is in the same location. It is in the WEB-INF/libs dir. Well I use the link http://localhost:8080/SSBilling/form/ to access my local portal. Above all everything did seems to work just before the weekend. Please let me know if there is anything that I am missing to change. Thanks Amar -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 10:17 AM To: Tomcat Users List Subject: RE: Problems with tomcat on UNIX Hi, Well, how is the local machine configuration different the unix one? Is the driver jar in the same directory? Is the server.xml the same? Is your context definition, if you have one, the same? When you say you're running fine locally, is that from within an IDE, or on the command line? Out of curiosity, did you search the archives or consult the Tomcat FAQ before posting your question? This is not a rare question ;) Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 11:11 AM To: 'Tomcat Users List' Subject: Problems with tomcat on UNIX I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClass L oade r .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClass L oade r .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSour c e.ja v a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource. j ava: 5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnect i onIm p l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute( C alcu l ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(Request P roce s sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav a :274 ) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482 ) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli c atio n FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi l terC h ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa l ve.j a va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardC o ntex t Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa l ve.j a va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C onte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja v a:19 5 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C onte x t.java:151) at
forward to a form with enctype=multipart/form-data fails
Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forwar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forward to a form with enctype=multipart/form-data fails
Do you have a JSP at: /c/shared/UserPhoto.jsp ? On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote: Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forwar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [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: loading dll's from webapp
Have you verified that they are on the system path and not the user's path? Check My Computer-Properties-Advanced-Environment Variables Charlie -Original Message- From: John MccLain [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 7:32 PM To: Tomcat user list Subject: loading dll's from webapp Howdy, When I Kick off Tomct as a service (from windows service mgr.), it fails loading my context because I am trying to loadLibrary a few DLL's in a context startup listener. It can't seem to find the DLL's, HOWEVER, my system path points to their directory - and, when I start tomcat from Eclipse, using the sysdeo plugin, it works fine. How can I get the service to use the system path to find my DLL files ??? John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 Before you criticize someone, walk a mile in their shoes. That way, you'll be a mile from them, and you'll have their shoes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat cgi NPH support
I am curious why NPH support is so difficult to implement in CgiServlet? In CgiServlet.CgiRunner, there are lines of code commented out if (line.startsWith(HTTP)) { //TODO: should set status codes (NPH support) /* * response.setStatus(getStatusCode(line)); */ } I definitely need setStatus because most of my legacy scripts using 302 redirect. Without NPH support, my reponse header is HTTP/1.1 200 OK ... Status: 302... only blank page will display. Is is OK that I simply add a conditional check, i.e. if line contains HTTP/1.1 302 then setStatus(302)? Regards, PQ
RE: Tomcat 4.1 Connection Pooling...
Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.. So can you send me ur config and code snippet to get datasource if possible... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:55 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Nope, I can't help unfortunately. I used Tomcat 4.1 for years connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 5.0 and 5.5. Maybe I'm just lucky, but the docs (specifically the JDBC DataSources how-to) have always worked for me out of the box. I've never seen the error you describe. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:44 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Yoav Shapira, Can you put some light on this pooling stuff... Thanks. Shilpa. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:31 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Cary, I am running my application on both windowsxp and Linux. And my Oracle version is 8i. I have the same problem on both OS. I think increasing the number of processes would not help. This has got something to do with Tomcat connection pooling configuration. I am missing some configuration stuff there... if i use these below parameters in server.xml iget timeout exception...just after couple of requests.. maxActive :20 maxIdle :10 mxWait :1 removeAbandoned :true org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object And if i use this below configuration i get ORA:00020 exception... maxActive :0 maxIdle :0 mxWait :0 removeAbandoned :true Can you please help---i have been looking into this since 2 days and still it doesn't work... -Original Message- From: Cary Conover [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 10:09 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Shilpa, What OS are you running this configuration on? If it is AIX I would investigate to see how the system is configured for the number of processes per user on the system. If it is configured as a Workstation it is defaulted to 128 processes / login. If it is configured as a server it is set to 500 processes / login. Plus Oracle support site suggests in the neighborhood of 2500 processes / login for Oracle 9i to function well if you are running 9i. These are all system settings that can be found in smitty on the system and adjusted as root user. Hope this helps, Cary Shilpa Nalgonda [EMAIL PROTECTED] wrote: Can someone please suggest how to achieve connection Pooling in tomcat 4.1. As per the docs i have 1) configured server.xml to include the resource parameters ( datasource, connection pool size etc) 2) In application code , retrieve connection using datasource 3) Every Method call to database retrieves connection using datasource.getConnection () and closes connection everytime But still the pooling is not achieved, i get ORA-00020 error( maximim proceses exceeded), i increased the size from 30 to 200) even then it is not working. Can someone please help -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 12:55 PM To: Tomcat Users List Subject: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: Hi, I am getting the timeout exception for connection pooling, i am using Tomca 4.1 and datasource to retrieve connections. I am attaching all the soure code and
RE: Tomcat 4.1 Connection Pooling...
Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.. So can you send me ur config and code snippet to get datasource if possible... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:55 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Nope, I can't help unfortunately. I used Tomcat 4.1 for years connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 5.0 and 5.5. Maybe I'm just lucky, but the docs (specifically the JDBC DataSources how-to) have always worked for me out of the box. I've never seen the error you describe. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:44 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Yoav Shapira, Can you put some light on this pooling stuff... Thanks. Shilpa. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:31 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Cary, I am running my application on both windowsxp and Linux. And my Oracle version is 8i. I have the same problem on both OS. I think increasing the number of processes would not help. This has got something to do with Tomcat connection pooling configuration. I am missing some configuration stuff there... if i use these below parameters in server.xml iget timeout exception...just after couple of requests.. maxActive :20 maxIdle :10 mxWait :1 removeAbandoned :true org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object And if i use this below configuration i get ORA:00020 exception... maxActive :0 maxIdle :0 mxWait :0 removeAbandoned :true Can you please help---i have been looking into this since 2 days and still it doesn't work... -Original Message- From: Cary Conover [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 10:09 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Shilpa, What OS are you running this configuration on? If it is AIX I would investigate to see how the system is configured for the number of processes per user on the system. If it is configured as a Workstation it is defaulted to 128 processes / login. If it is configured as a server it is set to 500 processes / login. Plus Oracle support site suggests in the neighborhood of 2500 processes / login for Oracle 9i to function well if you are running 9i. These are all system settings that can be found in smitty on the system and adjusted as root user. Hope this helps, Cary Shilpa Nalgonda [EMAIL PROTECTED] wrote: Can someone please suggest how to achieve connection Pooling in tomcat 4.1. As per the docs i have 1) configured server.xml to include the resource parameters ( datasource, connection pool size etc) 2) In application code , retrieve connection using datasource 3) Every Method call to database retrieves connection using datasource.getConnection () and closes connection everytime But still the pooling is not achieved, i get ORA-00020 error( maximim proceses exceeded), i increased the size from 30 to 200) even then it is not working. Can someone please help -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
RE: Problems with tomcat on UNIX
Dear Yoav, It's a known fact that I was having problem Implementing the connection pooling for my application, but this issues has been resolved and I did test my application and everything seem to have worked correctly. I do understand that something might have changed that is causing the problem, But to the best of my knowledge nothing seems to have changed. Since I am having problems with different versions of the server.xml files, I choose to use port 8072 on my local machine too. Below is the latest version of my server.xml file. Please let me know If It needs any changes. Also please understand that this is my first web application. I sincerely thank you for all your suggestions and help. ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ Resource name=jdbc/myoracle type=javax.sql.DataSource/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams ResourceParams name=jdbc/myoracle parameter namevalidationQuery/name valueselect * from snet_cca_pooling/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuetemp/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@chd4.sbc.com:1521:ostl411/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuetemp/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8072 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina DefaultContext className=org.apache.catalina.core.StandardDefaultContext Resource auth=Container name=jdbc/myoracle type=javax.sql.DataSource/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxWait/name value-1/value /parameter parameter namemaxActive/name value20/value /parameter parameter namepassword/name valuetemp/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@chd4.sbc.com:1521:ostl411/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxIdle/name value10/value /parameter parameter nameusername/name valuetemp/value /parameter /ResourceParams /DefaultContext Host appBase=webapps name=localhost Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_log. suffix=.txt timestamp=true/ /Host Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm/ /Engine /Service /Server Amar -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 10:41 AM To: Tomcat Users List Subject: RE: Problems with tomcat on UNIX Hi, So everything worked fine before the weekend, the setup is the same except for ports, now all of a sudden it doesn't work, and you expect someone who doesn't know your system to be able to help? ;) These changes don't occur by themselves. Something has to have changed. Maybe you should try using a standard connection pooling approach rather than rolling your own. Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 11:32 AM To: Tomcat Users List Subject: RE:
RE: Tomcat 4.1 Connection Pooling...
But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.. So can you send me ur config and code snippet to get datasource if possible... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:55 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Nope, I can't help unfortunately. I used Tomcat 4.1 for years connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 5.0 and 5.5. Maybe I'm just lucky, but the docs (specifically the JDBC DataSources how-to) have always worked for me out of the box. I've never seen the error you describe. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:44 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Yoav Shapira, Can you put some light on this pooling stuff... Thanks. Shilpa. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:31 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Cary, I am running my application on both windowsxp and Linux. And my Oracle version is 8i. I have the same problem on both OS. I think increasing the number of processes would not help. This has got something to do with Tomcat connection pooling configuration. I am missing some configuration stuff there... if i use these below parameters in server.xml iget timeout exception...just after couple of requests.. maxActive :20 maxIdle :10 mxWait :1 removeAbandoned :true org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause:
RE: Tomcat 4.1 Connection Pooling...
Hi, The app runs fine because Tomcat tries to accommodate clueless users. The web.xml snippet you posted is required according to the Servlet Spec, and that's what you should adhere to. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java ) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver Conn e ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo nnec t ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje ctPo o l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec tPoo l .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour ce.j a va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava: 5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb. . So can you send me ur config and code snippet to get datasource if possible... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:55 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Nope, I can't help unfortunately. I used Tomcat 4.1 for years connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 5.0 and 5.5. Maybe I'm just lucky, but the docs (specifically the JDBC DataSources how-to) have always worked for me out of the box. I've never seen the error you describe. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:44 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Yoav Shapira, Can you put some light on this pooling stuff... Thanks. Shilpa. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:31 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Cary, I am running my application on both windowsxp and Linux. And my Oracle version is 8i. I have the same problem on both OS. I think increasing the
Re: forward to a form with enctype=multipart/form-data fails
Yes. :) I do. Thats what is confusing the hell out of me. Thanks. On Sep 28, 2004, at 9:22 AM, Ben Souther wrote: Do you have a JSP at: /c/shared/UserPhoto.jsp ? On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote: Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forw ar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [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] Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with tomcat on UNIX
Hi, I find it hard to believe this server.xml worked properly at any point in time. Don't declare JNDI resources with the same name at a global scope: you have jdbc/myoracle both in DefaultContext and in GlobalNamingResources. Pick only one location and use it, not both. I suggest GlobalNamingResources instead of DefaultContext. If you use GlobalNamingResources, you need an explicit Context for your webapp in server.xml with a ResourceLink element. Another option, the best actually if you're going to use server-provided connection pooling at all, is to declare the Resource just inside your Context, not in DefaultContext and not in GlobalNamingResources. Then you don't need a ResourceLink. As an aside, note that this has nothing to do with your operating system, unix or otherwise. Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:59 PM To: Tomcat Users List Subject: RE: Problems with tomcat on UNIX Dear Yoav, It's a known fact that I was having problem Implementing the connection pooling for my application, but this issues has been resolved and I did test my application and everything seem to have worked correctly. I do understand that something might have changed that is causing the problem, But to the best of my knowledge nothing seems to have changed. Since I am having problems with different versions of the server.xml files, I choose to use port 8072 on my local machine too. Below is the latest version of my server.xml file. Please let me know If It needs any changes. Also please understand that this is my first web application. I sincerely thank you for all your suggestions and help. ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ Resource name=jdbc/myoracle type=javax.sql.DataSource/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams ResourceParams name=jdbc/myoracle parameter namevalidationQuery/name valueselect * from snet_cca_pooling/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuetemp/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@chd4.sbc.com:1521:ostl411/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuetemp/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8072 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina DefaultContext className=org.apache.catalina.core.StandardDefaultContext Resource auth=Container name=jdbc/myoracle type=javax.sql.DataSource/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxWait/name value-1/value /parameter parameter namemaxActive/name value20/value /parameter parameter namepassword/name valuetemp/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@chd4.sbc.com:1521:ostl411/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxIdle/name value10/value /parameter parameter nameusername/name valuetemp/value /parameter /ResourceParams /DefaultContext Host appBase=webapps name=localhost Logger className=org.apache.catalina.logger.FileLogger
RE: Tomcat 4.1 Connection Pooling...
O.k thanks i'll do that, but what exactly you mean by Tomcat tries to accommodate clueless users., i did not quite understand.. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:01 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, The app runs fine because Tomcat tries to accommodate clueless users. The web.xml snippet you posted is required according to the Servlet Spec, and that's what you should adhere to. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java ) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver Conn e ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo nnec t ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje ctPo o l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec tPoo l .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour ce.j a va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava: 5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb. . So can you send me ur config and code snippet to get datasource if possible... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:55 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Nope, I can't help unfortunately. I used Tomcat 4.1 for years connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 5.0 and 5.5. Maybe I'm just lucky, but the docs (specifically the JDBC DataSources how-to) have always worked for me out of the box. I've never seen the error you describe. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:44 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Yoav Shapira, Can you put some light on this pooling stuff... Thanks. Shilpa. -Original Message-
RE: Tomcat 4.1 Connection Pooling...
This error happens when there are too many connections opened. There are too many connections opened because before you shut down your application, you don't explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.. So can you send me ur config and code snippet to get datasource if possible... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:55 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Nope, I can't help unfortunately. I used Tomcat 4.1 for years connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 5.0 and 5.5. Maybe I'm just lucky, but the docs (specifically the JDBC DataSources how-to) have always worked for me out of the box. I've never seen the error you describe. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:44 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Yoav Shapira, Can you put some light on this pooling stuff... Thanks. Shilpa. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 9:31 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Cary, I am running my application on both windowsxp and Linux. And my Oracle version is 8i. I have the same problem on both OS. I think increasing the number of processes would not help. This has got
RE: forward to a form with enctype=multipart/form-data fails
Hi, And is /c/shared within the docBase of your webapp? ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: Tomcat Users List Subject: Re: forward to a form with enctype=multipart/form-data fails Yes. :) I do. Thats what is confusing the hell out of me. Thanks. On Sep 28, 2004, at 9:22 AM, Ben Souther wrote: Do you have a JSP at: /c/shared/UserPhoto.jsp ? On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote: Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forw ar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [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] Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED] - 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]
RE: Tomcat 4.1 Connection Pooling...
I was not aware that i should explicitly close the datasource, but i am making sure that i close all the connections by saying Connection.close in the finally block..can you tell me how to close the datasource and where to do that... -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... This error happens when there are too many connections opened. There are too many connections opened because before you shut down your application, you don't explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.. So can you send me ur config and code snippet to get datasource if possible... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:55 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Nope, I can't help unfortunately. I used Tomcat 4.1 for years connecting to Oracle 8i and 9i, and I continue to do so now with Tomcat 5.0 and 5.5. Maybe I'm just lucky, but the docs (specifically the JDBC DataSources how-to) have always worked for me out of the box. I've never seen the error you describe. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 10:44 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi Yoav Shapira, Can you put some light on this pooling stuff...
RE: Tomcat 4.1 Connection Pooling...
Hi, Sometimes we make efforts to make things easier for novice users by providing features above and beyond those required by the Servlet Specification. Examples include this ability to bind JNDI resources without a web.xml resource-ref, support for symbolic linking to resources outside the webapp's docBase, support for deploying and running your app as an exploded directory structure and not just a packed WAR file, support for specifying that the connector should not use cookies for session tracking, and the list goes on and on. It's pretty much guaranteed that every such feature we provide will come back to bite us in the form of increased maintenance costs. But it's a tradeoff we make for the good of the community and to increase the attractiveness of Tomcat. Of course, there's a direct correlation between how easy a product is to use and the average ability of its users. It used to be that many people on this mailing list knew the Servlet Spec fairly well before they posted -- now we have a lot of posters who appear to have never read it ;) This a long story and I could go on this tangent for a while, but let's avoid that as it has nothing to do with your problem. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:01 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... O.k thanks i'll do that, but what exactly you mean by Tomcat tries to accommodate clueless users., i did not quite understand.. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:01 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, The app runs fine because Tomcat tries to accommodate clueless users. The web.xml snippet you posted is required according to the Servlet Spec, and that's what you should adhere to. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.jav a ) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Drive r Conn e ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableC o nnec t ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj e ctPo o l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObje c tPoo l .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSou r ce.j a va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource. j ava: 5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries,
Re: Problems with tomcat on UNIX
What JDBC driver are you using? Is it a type 4 driver? On Tue, 2004-09-28 at 11:10, LINGALA, AMARESHWAR G (SBCSI) wrote: I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnectionImp l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(Calcul ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated !! Thanks Amar - 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: forward to a form with enctype=multipart/form-data fails
Yes :) . It is. My ImageServlet gets a form submission of a form thats enctype=multipart/form-data. I am using the DiskFileUpload class from Apache using the commons-fileupload-1.0.jar DiskFileUpload upload = new DiskFileUpload(); List items = upload.parseRequest(request); ... Since the request contains a multipart form submission, I can get data from that request object once. The DiskFileUpload object does this for me and returns a List object i.e. items. In doing so my request object looses all the parameters that I had sent with it. Now, when I do the following: path = /c/shared/UserPhoto.jsp; request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forwar d(request, response); This forward fails . And I am still at a loss of explanation. Any help is appreciated. Regards, Now doing this in my On Sep 28, 2004, at 10:07 AM, Shapira, Yoav wrote: Hi, And is /c/shared within the docBase of your webapp? ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: Tomcat Users List Subject: Re: forward to a form with enctype=multipart/form-data fails Yes. :) I do. Thats what is confusing the hell out of me. Thanks. On Sep 28, 2004, at 9:22 AM, Ben Souther wrote: Do you have a JSP at: /c/shared/UserPhoto.jsp ? On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote: Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forw ar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [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] Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED] - 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] Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED]
RE: Tomcat 4.1 Connection Pooling...
For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... I was not aware that i should explicitly close the datasource, but i am making sure that i close all the connections by saying Connection.close in the finally block..can you tell me how to close the datasource and where to do that... -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... This error happens when there are too many connections opened. There are too many connections opened because before you shut down your application, you don't explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my application makes 7 database queries, each query gets connection from datasource and closes() the connection in finally block. When it gets connection from datasource it is supposed to get it from pool right??? I noticed that after my application runs 3 times --(3x7 =21).. it gives me this error org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb.. So can you send me ur config and code snippet to get datasource if possible...
Re: Problems with tomcat on UNIX
don't forget to copy the JDBC Driver's jar into $CATALINA_HOME/common/lib On Tue, 28 Sep 2004 13:16:35 -0400, Ben Souther [EMAIL PROTECTED] wrote: What JDBC driver are you using? Is it a type 4 driver? On Tue, 2004-09-28 at 11:10, LINGALA, AMARESHWAR G (SBCSI) wrote: I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnectionImp l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(Calcul ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated !! Thanks Amar - 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: forward to a form with enctype=multipart/form-data fails
Are you able to hit UserPhoto.jsp from your browser? If so, bring it up and paste the URL from your browser's address window. On Tue, 2004-09-28 at 13:26, Mufaddal Khumri wrote: Yes :) . It is. My ImageServlet gets a form submission of a form thats enctype=multipart/form-data. I am using the DiskFileUpload class from Apache using the commons-fileupload-1.0.jar DiskFileUpload upload = new DiskFileUpload(); List items = upload.parseRequest(request); ... Since the request contains a multipart form submission, I can get data from that request object once. The DiskFileUpload object does this for me and returns a List object i.e. items. In doing so my request object looses all the parameters that I had sent with it. Now, when I do the following: path = /c/shared/UserPhoto.jsp; request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forwar d(request, response); This forward fails . And I am still at a loss of explanation. Any help is appreciated. Regards, Now doing this in my On Sep 28, 2004, at 10:07 AM, Shapira, Yoav wrote: Hi, And is /c/shared within the docBase of your webapp? ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: Tomcat Users List Subject: Re: forward to a form with enctype=multipart/form-data fails Yes. :) I do. Thats what is confusing the hell out of me. Thanks. On Sep 28, 2004, at 9:22 AM, Ben Souther wrote: Do you have a JSP at: /c/shared/UserPhoto.jsp ? On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote: Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forw ar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [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] Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED] - 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
Need help for case insensitive deployment
Hi: I need to server up some pages through Tomcat4 that are case insensitive. I have found an attribute in resources for case sensitivity, but I could not get it to work. Here is my context definition. Context path=/Live docBase=\\host1\dir1 debug=0 privileged=true Resource name = type=org.apache.naming.resources.FileDirContext docBase=\\host1\dir1 caseSensitive=false cached=true / /Context Can someone tell me what is wrong or point me to a sample configuration for case insensitive deployment. Thanks a lot. Crazy Monkey
RE: Problems with tomcat on UNIX
Thanks Carlos it works now !!! -Original Message- From: Carlos Bracho [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:28 PM To: Tomcat Users List Subject: Re: Problems with tomcat on UNIX don't forget to copy the JDBC Driver's jar into $CATALINA_HOME/common/lib On Tue, 28 Sep 2004 13:16:35 -0400, Ben Souther [EMAIL PROTECTED] wrote: What JDBC driver are you using? Is it a type 4 driver? On Tue, 2004-09-28 at 11:10, LINGALA, AMARESHWAR G (SBCSI) wrote: I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo ader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo ader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .jav a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnectio nImp l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(Ca lcul ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr oces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon text Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 4) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .jav a:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated !! Thanks Amar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: Problems with tomcat on UNIX
I am really glad ;) On Tue, 28 Sep 2004 13:44:13 -0400, LINGALA, AMARESHWAR G (SBCSI) [EMAIL PROTECTED] wrote: Thanks Carlos it works now !!! -Original Message- From: Carlos Bracho [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:28 PM To: Tomcat Users List Subject: Re: Problems with tomcat on UNIX don't forget to copy the JDBC Driver's jar into $CATALINA_HOME/common/lib On Tue, 28 Sep 2004 13:16:35 -0400, Ben Souther [EMAIL PROTECTED] wrote: What JDBC driver are you using? Is it a type 4 driver? On Tue, 2004-09-28 at 11:10, LINGALA, AMARESHWAR G (SBCSI) wrote: I have recently Implemented Connection Pooling for my Struts web application. Everything seemed to have worked correctly until last weekend. All of a sudden I get the following error whenever I try to access the database. Also just so that you know everything works fine on my local machine. I get this problem only when I try to use the one on UNIX box. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver', cause: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo ader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo ader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .jav a:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:5 18) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnectio nImp l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(Ca lcul ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr oces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon text Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 4) at
RE: Tomcat 4.1 Connection Pooling...
Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... I was not aware that i should explicitly close the datasource, but i am making sure that i close all the connections by saying Connection.close in the finally block..can you tell me how to close the datasource and where to do that... -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... This error happens when there are too many connections opened. There are too many connections opened because before you shut down your application, you don't explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java ) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver Conn e ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo nnec t ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje ctPo o l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec tPoo l .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour ce.j a va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava: 5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its the parameter configuration can you send me your configuration for connection pooling... I am using these parameters... maxActive :20 maxIdle :10 maxWait :1 removeAbandoned :true -- what exactly is MaxIdle parameter.. Also my
Re: Tomcat 4.1 Connection Pooling...
I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1 Connection Pooling...
I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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.1 Connection Pooling...
Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] 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]
RE: Tomcat 4.1 Connection Pooling...
thanks.. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:17 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] 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: Tomcat 4.1 Connection Pooling...
Yoav is correct, you should be using the newer driver and not the older one. good thing I asked which version the driver is. that's a really old bug in the old driver. I remember reporting the bug back in 99 and the support rep said something like, yeah, lots of people have been reporting the bug. peter On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] 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: Problem!
A clean install of tomcat won't do that. Are you 100% sure that it is tomcat listening on port 8080? The most likely explanation is that it is some other application. If you start tomcat from the command line you should see if tomcat is/isn't starting correctly. If something else is listening on port 8080, you will see a series of errors. Mark -Original Message- From: hoseinjany [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:11 PM To: [EMAIL PROTECTED] Subject: Problem! Dear All Readers, I have installed j2re-1_4_2_01-windows-i586 and jakarta-tomcat-5.0.25 on a Windows server 2003 SE. But just after finishing the setup, I cannot login to the localhost:8080. A windows popup comes and asks It asks for windows username and password. But it does not accept any users have been defined on the system. When I cancel the window, the message You are not authorized to view this page will be displayed. Could you possibly help me solve the problem? I will glad if you can hel! Sincerely Yours Ali Hoseinjany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat cgi NPH support
From: Phillip Qin [mailto:[EMAIL PROTECTED] I am curious why NPH support is so difficult to implement in CgiServlet? Just because something isn't done, it doesn't necessarily mean it is difficult. A number of 'extra' servlets provided with Tomcat (CGI, webDAV, etc) are not 100% complete. It all comes down to who wants/needs to do the development for the bits that are missing. Is is OK that I simply add a conditional check, i.e. if line contains HTTP/1.1 302 then setStatus(302)? That sounds like parsing the header to me. Given NPN=Non-parsed headers that doesn't feel right. I had always assumed that NPN support would involve passing the output from the script directly to the client but haven't really given it any great amount of thought. As ever, patches are always welome ;) Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1 Connection Pooling...
I have updated with classes12.jar, but still i have this problem. But Peter what ii sthe bug that you mentioned, i have the problem of java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:23 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... Yoav is correct, you should be using the newer driver and not the older one. good thing I asked which version the driver is. that's a really old bug in the old driver. I remember reporting the bug back in 99 and the support rep said something like, yeah, lots of people have been reporting the bug. peter On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1 Connection Pooling...
Perhaps your application is hanging on to the database connections and not returning them to the pool? -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 19:43 To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I have updated with classes12.jar, but still i have this problem. But Peter what ii sthe bug that you mentioned, i have the problem of java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:23 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... Yoav is correct, you should be using the newer driver and not the older one. good thing I asked which version the driver is. that's a really old bug in the old driver. I remember reporting the bug back in 99 and the support rep said something like, yeah, lots of people have been reporting the bug. peter On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] 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] - To unsubscribe, e-mail: [EMAIL
RE: Tomcat 4.1 Connection Pooling...
how can i check that and how to resolve it... -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Perhaps your application is hanging on to the database connections and not returning them to the pool? -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 19:43 To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I have updated with classes12.jar, but still i have this problem. But Peter what ii sthe bug that you mentioned, i have the problem of java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:23 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... Yoav is correct, you should be using the newer driver and not the older one. good thing I asked which version the driver is. that's a really old bug in the old driver. I remember reporting the bug back in 99 and the support rep said something like, yeah, lots of people have been reporting the bug. peter On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] 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]
RE: Tomcat 4.1 Connection Pooling...
Hi, I just had an idea: it could be this is not your application's fault. We've had these in the past where the DB ran out of processes, for example if several apps or people were using it at once. Ask your DB for a breakdown of where the 200 processes are coming from. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:04 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... how can i check that and how to resolve it... -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Perhaps your application is hanging on to the database connections and not returning them to the pool? -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 19:43 To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I have updated with classes12.jar, but still i have this problem. But Peter what ii sthe bug that you mentioned, i have the problem of java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:23 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... Yoav is correct, you should be using the newer driver and not the older one. good thing I asked which version the driver is. that's a really old bug in the old driver. I remember reporting the bug back in 99 and the support rep said something like, yeah, lots of people have been reporting the bug. peter On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This
Re: Tomcat 4.1 Connection Pooling...
just in case, here's a link to Oracle's developer jdbc section http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/jdbc30/index.html just make sure the apps are calling java.sql.Connection.close() when they are done. the PooledConnection underneath will pass the connection back to the pool automatically. an easy way is to use Netstat to see how many connections are open. If you see the connection increase rapidly, you know it's not being closed. peter On Tue, 28 Sep 2004 15:03:53 -0400, Shilpa Nalgonda [EMAIL PROTECTED] wrote: how can i check that and how to resolve it... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1 Connection Pooling...
Every time your application uses a connection it should call the close() method to return it to the pool. I had a similar problem where over a fairly short period of time there was a database error which caused the execute to throw an exception. I had forgotten to put a finally block in that section so the connection never got closed. Once I put a finally block in with a con.close() then it solved my problem. Ta Matt -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 20:04 To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... how can i check that and how to resolve it... -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Perhaps your application is hanging on to the database connections and not returning them to the pool? -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 19:43 To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I have updated with classes12.jar, but still i have this problem. But Peter what ii sthe bug that you mentioned, i have the problem of java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:23 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... Yoav is correct, you should be using the newer driver and not the older one. good thing I asked which version the driver is. that's a really old bug in the old driver. I remember reporting the bug back in 99 and the support rep said something like, yeah, lots of people have been reporting the bug. peter On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. - 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] This e-mail, including any attachments, is a confidential business
Re: Tomcat 4.1 Connection Pooling...
along the same lines, look at Oracle's network logs to see what is happening. another option is to log into sql and use oracle commands to see how many connections are open. anyone of these options should give you more information to track down the problem. peter On Tue, 28 Sep 2004 15:11:14 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, I just had an idea: it could be this is not your application's fault. We've had these in the past where the DB ran out of processes, for example if several apps or people were using it at once. Ask your DB for a breakdown of where the 200 processes are coming from. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:04 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... how can i check that and how to resolve it... -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Perhaps your application is hanging on to the database connections and not returning them to the pool? -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 19:43 To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I have updated with classes12.jar, but still i have this problem. But Peter what ii sthe bug that you mentioned, i have the problem of java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:23 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... Yoav is correct, you should be using the newer driver and not the older one. good thing I asked which version the driver is. that's a really old bug in the old driver. I remember reporting the bug back in 99 and the support rep said something like, yeah, lots of people have been reporting the bug. peter On Tue, 28 Sep 2004 14:16:43 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, You're wrong. You can and should use classes12.zip (renamed to classes12.jar) with Oracle 8i. You can even use the modern ojdbc14.jar drivers. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:09 PM To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I am using Oracle 8i, and Oracle drivers i use is Oracle111.jar, and use DBCp for connection Pooling with Tomcat4.1, i thought classes112 is for 9i...correct me if i am wrong... -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 2:01 PM To: Tomcat Users List Subject: Re: Tomcat 4.1 Connection Pooling... I thought Oracle fixed that bug in their connectionPooling driver back in 2001. Am I missing something? Are you using some other driver to create a pool of jdbc connections to Oracle? sorry for the question if it's already been answered in earlier messages. I've used classes112.zip jdbc driver from oracle without any problems with connection pooling. If you're using classes111.zip driver from oracle, you should update your driver to the latest. just in case no one else mentioned it. peter On Tue, 28 Sep 2004 13:55:18 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source.
RE: Tomcat 4.1 Connection Pooling...
Even though this resource is not in Global scope? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... I was not aware that i should explicitly close the datasource, but i am making sure that i close all the connections by saying Connection.close in the finally block..can you tell me how to close the datasource and where to do that... -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... This error happens when there are too many connections opened. There are too many connections opened because before you shut down your application, you don't explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java ) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver Conn e ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo nnec t ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje ctPo o l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec tPoo l .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour ce.j a va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava: 5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Thanks. Maybe its
RE: Tomcat 4.1 Connection Pooling...
Hi, Even though this resource is not in Global scope? Yeah. What I said applies to any and all container-managed resources. Yoav -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... I was not aware that i should explicitly close the datasource, but i am making sure that i close all the connections by saying Connection.close in the finally block..can you tell me how to close the datasource and where to do that... -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... This error happens when there are too many connections opened. There are too many connections opened because before you shut down your application, you don't explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.jav a ) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Drive r Conn e ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableC o nnec t ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj e ctPo o l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObje c tPoo l .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSou r ce.j a va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource. j ava: 5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:43) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:53 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Yes, it's needed if you're using server-provided connection pooling. Read the Servlet Specification. Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 12:47 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Is it necessary to add this in web.xml, i have configured datasource for connectonpool only in server.xml... web.xml --- resource-ref res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 11:05 AM To: Tomcat
Re: Tomcat 4.1 Connection Pooling...
Connection conn = null; Statement stmt = null; // Or PreparedStatement if needed ResultSet rs = null; try { conn = //get connection from connection pool ... stmt = conn.createStatement(select ...); rs = stmt.executeQuery(); ... iterate through the result set ... rs.close(); rs = null; stmt.close(); stmt = null; conn.close(); // Return to connection pool conn = null; // Make sure we don't close it twice } catch (SQLException e) { ... deal with errors ... } finally { // Always make sure result sets and statements are closed, // and the connection is returned to the pool if (rs != null) { try { rs.close(); } catch (SQLException e) { ; } rs = null; } if (stmt != null) { try { stmt.close(); } catch (SQLException e) { ; } stmt = null; } if (conn != null) { try { conn.close(); } catch (SQLException e) { ; } conn = null; } } On Tue, 28 Sep 2004 15:28:24 -0400, Phillip Qin [EMAIL PROTECTED] wrote: Even though this resource is not in Global scope? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Hi, Hmm ;) There's a good reason there's no close method on javax.sql.DataSource. There's also a good reason the J2EE spec calls for the container, not the user, to manage the lifecycle of JNDI resources such as DataSources. IF you go with this ServletContextListener approach to take over lifecycle management of a server-provided JNDI resource, you'll be in a murky space at best. Yoav Shapira Millennium Research Informatics -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... For connecion pooling, when you close the connection, you don't actually close the physical link. After several shutdown/sartup of your application, open connection accumulates and exceeds Oracle's 200 thus you receive that SQLException. To solve your problem, I would implement a ServletContextListener to initialize connection pool when my context is in the initialization (public method contextInitialized) and close data source when my context is destroyed (public method contextDestroyed). If you have defined loadonstartup servlet in your web.xml, in the destroy method, explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 1:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... I was not aware that i should explicitly close the datasource, but i am making sure that i close all the connections by saying Connection.close in the finally block..can you tell me how to close the datasource and where to do that... -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1 Connection Pooling... This error happens when there are too many connections opened. There are too many connections opened because before you shut down your application, you don't explicitly close your data source. -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 12:55 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... But my application runs fine even with out that entry in web.xml, i am using Tomcats ConnectionPooling to connect to database..I only have scalability issue, when i test my application with multiple users i get the ORAcle erro below.. If only one users is there, then there is no problem...can you please suggest if adding that entry to web.xml will help... java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java ) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driver Conn e ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCo nnec t ionFactory.java:300) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObje ctPo o l.java:816) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjec tPoo l .java:119) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour ce.j a va:140) at
RE: Tomcat cgi NPH support
The legacy that I inherited from the crazy perl guy always has these lines of codes print Status: 302 Moved Temporarily\n; print Location: http://www.whatever.com\n\n;; I made a quick fix to my CGIServlet ... } else if (line.indexOf(:) = 0) { // PQ: quick fix for 302 redirect if (line.substring(0, line.indexOf(:)).trim().compareToIgnoreCase(STATUS)==0 line.indexOf(302)0) { response.setStatus(302); } else { response.addHeader (line.substring(0, line.indexOf(:)).trim(), line.substring(line.indexOf(:) + 1).trim()); } } else { ... I am not sure if the above code applies to any one else so I am reluctant to patch Tomcat. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 2:37 PM To: 'Tomcat Users List' Subject: RE: Tomcat cgi NPH support From: Phillip Qin [mailto:[EMAIL PROTECTED] I am curious why NPH support is so difficult to implement in CgiServlet? Just because something isn't done, it doesn't necessarily mean it is difficult. A number of 'extra' servlets provided with Tomcat (CGI, webDAV, etc) are not 100% complete. It all comes down to who wants/needs to do the development for the bits that are missing. Is is OK that I simply add a conditional check, i.e. if line contains HTTP/1.1 302 then setStatus(302)? That sounds like parsing the header to me. Given NPN=Non-parsed headers that doesn't feel right. I had always assumed that NPN support would involve passing the output from the script directly to the client but haven't really given it any great amount of thought. As ever, patches are always welome ;) Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4159af8d171121566911362!
Re: Tomcat 4.1 Connection Pooling...
Just a thought (and I apologize if this was already mentioned.I missed the very beginning of the thread), but I would also make sure you have the latest connection pooling jars. I recently had a problem where even though I had the tomcat configured to reclaim abandoned connections, some were still remaining open. Turned out there was a bug in the dbcp jar and upgrading to the latest solved it. -Michael Dale, Matt wrote: Every time your application uses a connection it should call the close() method to return it to the pool. I had a similar problem where over a fairly short period of time there was a database error which caused the execute to throw an exception. I had forgotten to put a finally block in that section so the connection never got closed. Once I put a finally block in with a con.close() then it solved my problem. Ta Matt -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 20:04 To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... how can i check that and how to resolve it... -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:06 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 Connection Pooling... Perhaps your application is hanging on to the database connections and not returning them to the pool? -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: 28 September 2004 19:43 To: Tomcat Users List; Peter Lin Subject: RE: Tomcat 4.1 Connection Pooling... I have updated with classes12.jar, but still i have this problem. But Peter what ii sthe bug that you mentioned, i have the problem of java.sql.SQLException: ORA-00020: maximum number of processes (200) exceeded -- ** Michael J. Makunas ** http://www.makunas.com/ ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat cgi NPH support
Yeah, it's header and in CGIServlet doc, Support for setting headers (for example, Location headers don't work) is on the TODO list. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 2:37 PM To: 'Tomcat Users List' Subject: RE: Tomcat cgi NPH support From: Phillip Qin [mailto:[EMAIL PROTECTED] I am curious why NPH support is so difficult to implement in CgiServlet? Just because something isn't done, it doesn't necessarily mean it is difficult. A number of 'extra' servlets provided with Tomcat (CGI, webDAV, etc) are not 100% complete. It all comes down to who wants/needs to do the development for the bits that are missing. Is is OK that I simply add a conditional check, i.e. if line contains HTTP/1.1 302 then setStatus(302)? That sounds like parsing the header to me. Given NPN=Non-parsed headers that doesn't feel right. I had always assumed that NPN support would involve passing the output from the script directly to the client but haven't really given it any great amount of thought. As ever, patches are always welome ;) Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4159af8d171121566911362!
Any Native SNMP Features in Tomcat
Does Tomcat 5.0x come with any support to perform SNMP requests or will I need to find a 3rd party utility for this? Thx, rhugga - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Any Native SNMP Features in Tomcat
I don't think so, but it's got JMX support. what kind of operations are you thinking of? if you're talking about deploying a webapp, the management stuff handles that. If you're talking about monitoring, you can use JMeter 2.0 to monitor tomcat 5.x peter On Tue, 28 Sep 2004 12:40:58 -0700 (PDT), Chuck Carson [EMAIL PROTECTED] wrote: Does Tomcat 5.0x come with any support to perform SNMP requests or will I need to find a 3rd party utility for this? Thx, rhugga - 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: forward to a form with enctype=multipart/form-data fails
Yes. I had tried that before my first email here. It had worked. Right now I have a work around that I am using by using response.sendRedirect(...). I still havent got it to work with the forward. On Sep 28, 2004, at 10:37 AM, Ben Souther wrote: Are you able to hit UserPhoto.jsp from your browser? If so, bring it up and paste the URL from your browser's address window. On Tue, 2004-09-28 at 13:26, Mufaddal Khumri wrote: Yes :) . It is. My ImageServlet gets a form submission of a form thats enctype=multipart/form-data. I am using the DiskFileUpload class from Apache using the commons-fileupload-1.0.jar DiskFileUpload upload = new DiskFileUpload(); List items = upload.parseRequest(request); ... Since the request contains a multipart form submission, I can get data from that request object once. The DiskFileUpload object does this for me and returns a List object i.e. items. In doing so my request object looses all the parameters that I had sent with it. Now, when I do the following: path = /c/shared/UserPhoto.jsp; request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forw ar d(request, response); This forward fails . And I am still at a loss of explanation. Any help is appreciated. Regards, Now doing this in my On Sep 28, 2004, at 10:07 AM, Shapira, Yoav wrote: Hi, And is /c/shared within the docBase of your webapp? ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: Tomcat Users List Subject: Re: forward to a form with enctype=multipart/form-data fails Yes. :) I do. Thats what is confusing the hell out of me. Thanks. On Sep 28, 2004, at 9:22 AM, Ben Souther wrote: Do you have a JSP at: /c/shared/UserPhoto.jsp ? On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote: Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).for w ar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [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] Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED] - 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
Re: [OT]Geronimo and Tomcat
Anto Paul wrote: Hi all, I was reading a tutoral on using Geronimo. It seems that Geronimo is using Jetty. Why it don't use Tomcat. Or is Tomcat is available as optional plug in ?. rgds Anto Paul Hi, As far as I know, Geronimo architecture based GBeans. GBeans are Geronimo style absraction for different kind of modules in Geronimo. I think Jetty has been more easier to integrate as GBean than Tomcat. However there are some issues going on to use Tomcat as Geronimo web container. - Jukka - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forward to a form with enctype=multipart/form-data fails
If you can hit it with a browser you should be able to forward to it. Bring the page up in a browser, copy the address, and paste in in your reply so we can see it. On Tue, 2004-09-28 at 15:12, Mufaddal Khumri wrote: Yes. I had tried that before my first email here. It had worked. Right now I have a work around that I am using by using response.sendRedirect(...). I still havent got it to work with the forward. On Sep 28, 2004, at 10:37 AM, Ben Souther wrote: Are you able to hit UserPhoto.jsp from your browser? If so, bring it up and paste the URL from your browser's address window. On Tue, 2004-09-28 at 13:26, Mufaddal Khumri wrote: Yes :) . It is. My ImageServlet gets a form submission of a form thats enctype=multipart/form-data. I am using the DiskFileUpload class from Apache using the commons-fileupload-1.0.jar DiskFileUpload upload = new DiskFileUpload(); List items = upload.parseRequest(request); ... Since the request contains a multipart form submission, I can get data from that request object once. The DiskFileUpload object does this for me and returns a List object i.e. items. In doing so my request object looses all the parameters that I had sent with it. Now, when I do the following: path = /c/shared/UserPhoto.jsp; request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).forw ar d(request, response); This forward fails . And I am still at a loss of explanation. Any help is appreciated. Regards, Now doing this in my On Sep 28, 2004, at 10:07 AM, Shapira, Yoav wrote: Hi, And is /c/shared within the docBase of your webapp? ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 1:06 PM To: Tomcat Users List Subject: Re: forward to a form with enctype=multipart/form-data fails Yes. :) I do. Thats what is confusing the hell out of me. Thanks. On Sep 28, 2004, at 9:22 AM, Ben Souther wrote: Do you have a JSP at: /c/shared/UserPhoto.jsp ? On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote: Hi, I have the following code in a Servlet: // ... // request.setAttribute(sPhoto, new Integer(setPhoto)); error(/c/shared/UserPhoto.jsp, Uploaded Images should be of type JPG or GIF and maximum of 800KB, request, response); // . // private void error(String path, String message, HttpServletRequest request, HttpServletResponse response) { try { request.setAttribute(errorMsg, message); getServletConfig().getServletContext().getRequestDispatcher(path).for w ar d(request, response); } catch(Exception ex) { ex.printStackTrace(); } } I have a multipart form on the UserPhoto.jsp. form name=editPhoto method=post action=/c/shared/ImageServlet enctype=multipart/form-data % String errorMsg = (String)request.getAttribute(errorMsg); if(errorMsg != null errorMsg.equals(null) == false) { % cw:errorBoxAn error occurred while updating user photograph settings. %=errorMsg%/cw:errorBox % } % . /form When I submit this form to the servlet above and then the servlet sets the attribute sPhoto and forwards the request back to the jsp, I get the following error: HTTP Status 404 - /c/shared/UserPhoto.jsp type Status report message /c/shared/UserPhoto.jsp description The requested resource (/c/shared/UserPhoto.jsp) is not available. Apache Tomcat/5.0.28 I do not understand why the forwarded request to the JSP does not find the JSP? Any help on this is appreciated. Regards, Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [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] Mufaddal Khumri Software Developer Waves In Motion Phone: 602 956 7080 x 26 Email: [EMAIL PROTECTED]
Re: JK2 causes SEGV in httpd
I've installed the jk2 binary on RedHat and there are no problems there. I'll try to compile from scratch on Suse... wish me luck! thnx -Blaine In message [EMAIL PROTECTED]you write: On Mon, Sep 27, 2004 at 05:27:33PM -0400, [EMAIL PROTECTED] wrote: : I have recently configured Apache 2.0.51 with mod_jk2.so based on the inform ation : from the book Professional Apache Tomcat 5, and now all requests : to the web server cause a segmentation fault. :) Is there something in my : config that may be causing this? A segmentation fault is caused by a dereference error in native code (English: C/C++ accessing memory incorrectly, such as trying * or - ops on a null pointer.) That's a code bug. It may have been uncovered due to your configuration, but certianly not caused by it. Have you tried a later version of JK2? You could also try rebuilding JK2 from source, so it builds against all of the latest APR headers and such. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.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]
Cannot get xml in JSTL 1.1 to work
Hi, I am running Tomcat 5.0.27 on both RedHat linux ES 3.0 and Windows XP. Trying to run any jstl-examples jsp pages (that I got from the sun web site), I get: javax.servlet.ServletException: com/sun/org/apache/xpath/internal/VariableStack org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:758) org.apache.jsp.pages.views.site.site_005fcontent_jsp._jspService(site_00 5fcontent_jsp.java:86) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Trying to resolve the problem, I added a few .jar files I thought could be missing (see files dated Sep 28). But I get the same error. Content of WEB-INF/lib/ -rw-r--r--1 root root46213 Dec 13 2003 orataglib_3_0.jar -rw-r--r--1 root root15783 Dec 13 2003 oraclasses_3_0.jar -rw-r--r--1 root root 6727 Sep 18 12:29 jdbc2_0-stdext.jar -rw-r--r--1 root root65368 Sep 18 12:29 jakarta-oro.jar -rw-r--r--1 root root46865 Sep 18 12:29 commons-validator.jar -rw-r--r--1 root root31605 Sep 18 12:29 commons-logging.jar -rw-r--r--1 root root63980 Sep 18 12:29 commons-lang.jar -rw-r--r--1 root root22379 Sep 18 12:29 commons-fileupload.jar -rw-r--r--1 root root 109096 Sep 18 12:29 commons-digester.jar -rw-r--r--1 root root 165119 Sep 18 12:29 commons-collections.jar -rw-r--r--1 root root 118726 Sep 18 12:29 commons-beanutils.jar -rw-r--r--1 root root 321 Sep 18 12:29 README -rw-r-1 root root 226061 Sep 18 12:29 mysql-connector-java-3.0.9-stable-bin.jar -rw-r--r--1 root root46747 Sep 18 12:29 jstl.jar -rw-r--r--1 root root 498051 Sep 18 12:29 struts.jar -rw-r--r--1 root root 960372 Sep 18 12:29 standard.jar -rw-r--r--1 root root26881 Sep 28 15:39 dom.jar -rw-r--r--1 root root27049 Sep 28 15:39 jaxp-api.jar -rw-r--r--1 root root26437 Sep 28 15:40 sax.jar -rw-r--r--1 root root 127 Sep 28 15:40 xalan.jar -rw-r--r--1 root root 972027 Sep 28 15:40 xercesImpl.jar I am really stuck! Bruno.
RE: Cannot get xml in JSTL 1.1 to work
JSTL works fine for me. I use it in my struts jsp pages. Which version of JSTL do you use? 1.0 or 1.1? -Original Message- From: Premont,Bruno [CIS] [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 4:54 PM To: [EMAIL PROTECTED] Subject: Cannot get xml in JSTL 1.1 to work Hi, I am running Tomcat 5.0.27 on both RedHat linux ES 3.0 and Windows XP. Trying to run any jstl-examples jsp pages (that I got from the sun web site), I get: javax.servlet.ServletException: com/sun/org/apache/xpath/internal/VariableStack org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:758) org.apache.jsp.pages.views.site.site_005fcontent_jsp._jspService(site_00 5fcontent_jsp.java:86) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Trying to resolve the problem, I added a few .jar files I thought could be missing (see files dated Sep 28). But I get the same error. Content of WEB-INF/lib/ -rw-r--r--1 root root46213 Dec 13 2003 orataglib_3_0.jar -rw-r--r--1 root root15783 Dec 13 2003 oraclasses_3_0.jar -rw-r--r--1 root root 6727 Sep 18 12:29 jdbc2_0-stdext.jar -rw-r--r--1 root root65368 Sep 18 12:29 jakarta-oro.jar -rw-r--r--1 root root46865 Sep 18 12:29 commons-validator.jar -rw-r--r--1 root root31605 Sep 18 12:29 commons-logging.jar -rw-r--r--1 root root63980 Sep 18 12:29 commons-lang.jar -rw-r--r--1 root root22379 Sep 18 12:29 commons-fileupload.jar -rw-r--r--1 root root 109096 Sep 18 12:29 commons-digester.jar -rw-r--r--1 root root 165119 Sep 18 12:29 commons-collections.jar -rw-r--r--1 root root 118726 Sep 18 12:29 commons-beanutils.jar -rw-r--r--1 root root 321 Sep 18 12:29 README -rw-r-1 root root 226061 Sep 18 12:29 mysql-connector-java-3.0.9-stable-bin.jar -rw-r--r--1 root root46747 Sep 18 12:29 jstl.jar -rw-r--r--1 root root 498051 Sep 18 12:29 struts.jar -rw-r--r--1 root root 960372 Sep 18 12:29 standard.jar -rw-r--r--1 root root26881 Sep 28 15:39 dom.jar -rw-r--r--1 root root27049 Sep 28 15:39 jaxp-api.jar -rw-r--r--1 root root26437 Sep 28 15:40 sax.jar -rw-r--r--1 root root 127 Sep 28 15:40 xalan.jar -rw-r--r--1 root root 972027 Sep 28 15:40 xercesImpl.jar I am really stuck! Bruno. !DSPAM:4159cf7b183645550514907!
RE: Cannot get xml in JSTL 1.1 to work
jstl 1.1. All other taglib work fine (core, sql, fmt, etc) I only have problems with the xml. For example, this very simple jsp file bumps: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % x:parse var=doc scope=application ?xml version=1.0? a b This is b /b /a /x:parse htmlheadtitleSite/title/head body bgcolor=white h2Site/h2 Siteid: x:out select=$doc//b / hr /body /hml Bruno. -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 4:57 PM To: 'Tomcat Users List' Subject: RE: Cannot get xml in JSTL 1.1 to work JSTL works fine for me. I use it in my struts jsp pages. Which version of JSTL do you use? 1.0 or 1.1? -Original Message- From: Premont,Bruno [CIS] [mailto:[EMAIL PROTECTED] Sent: September 28, 2004 4:54 PM To: [EMAIL PROTECTED] Subject: Cannot get xml in JSTL 1.1 to work Hi, I am running Tomcat 5.0.27 on both RedHat linux ES 3.0 and Windows XP. Trying to run any jstl-examples jsp pages (that I got from the sun web site), I get: javax.servlet.ServletException: com/sun/org/apache/xpath/internal/VariableStack org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:758) org.apache.jsp.pages.views.site.site_005fcontent_jsp._jspService(site_00 5fcontent_jsp.java:86) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Trying to resolve the problem, I added a few .jar files I thought could be missing (see files dated Sep 28). But I get the same error. Content of WEB-INF/lib/ -rw-r--r--1 root root46213 Dec 13 2003 orataglib_3_0.jar -rw-r--r--1 root root15783 Dec 13 2003 oraclasses_3_0.jar -rw-r--r--1 root root 6727 Sep 18 12:29 jdbc2_0-stdext.jar -rw-r--r--1 root root65368 Sep 18 12:29 jakarta-oro.jar -rw-r--r--1 root root46865 Sep 18 12:29 commons-validator.jar -rw-r--r--1 root root31605 Sep 18 12:29 commons-logging.jar -rw-r--r--1 root root63980 Sep 18 12:29 commons-lang.jar -rw-r--r--1 root root22379 Sep 18 12:29 commons-fileupload.jar -rw-r--r--1 root root 109096 Sep 18 12:29 commons-digester.jar -rw-r--r--1 root root 165119 Sep 18 12:29 commons-collections.jar -rw-r--r--1 root root 118726 Sep 18 12:29 commons-beanutils.jar -rw-r--r--1 root root 321 Sep 18 12:29 README -rw-r-1 root root 226061 Sep 18 12:29 mysql-connector-java-3.0.9-stable-bin.jar -rw-r--r--1 root root46747 Sep 18 12:29 jstl.jar -rw-r--r--1 root root 498051 Sep 18 12:29 struts.jar -rw-r--r--1 root root 960372 Sep 18 12:29 standard.jar -rw-r--r--1 root root26881 Sep 28 15:39 dom.jar -rw-r--r--1 root root27049 Sep 28 15:39 jaxp-api.jar -rw-r--r--1 root root26437 Sep 28 15:40 sax.jar -rw-r--r--1 root root 127 Sep 28 15:40 xalan.jar -rw-r--r--1 root root 972027 Sep 28 15:40 xercesImpl.jar I am really stuck! Bruno. !DSPAM:4159cf7b183645550514907! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get a handle to tomcat Mbean Server?
Hi All, I was just learning 'bt Mbeans. To begin with, I was learning to use and test the Mbeans that are already existing in tomcat so I get to know how Mbeans work. I have written my own Agent called UserManager to call the Mbeans to list users (Tomcat Admin functionality : based on classes ApplicationServlet, UserUtils and ListUserServlet of tomcat source). I'm just not able to get a handle to the correct Mbean server. Can I get a handle to tomcat mbean server at all if I have to use it else where?? I'm getting the below exception. Kindly let me know how do I get a handle to the Mbean server from outside the Admin Application. I've used the same parameters as used by the Admin application classes. I'm using tomcat 5.0.25. Please tell me how to get a reference / handle to the Mbean server. Application DUMP is okey [EMAIL PROTECTED] log4j:WARN No appenders could be found for logger (org.apache.commons.modeler.Re gistry). log4j:WARN Please initialize the log4j system properly. listUsers : UserUtil.getUsersForm(mserver,databaseName); listUsers has Server === [EMAIL PROTECTED] listUsers has databaseName === Users:type=UserDatabase,database=UserDatabase In MBeanServer mserver = [EMAIL PROTECTED] The obj is Users:type=UserDatabase,database=UserDatabase javax.management.InstanceNotFoundException: MBeanServer cannot find MBean with O bjectName Users:type=UserDatabase,database=UserDatabase at mx4j.server.MBeanServerImpl.findMBeanMetaData(MBeanServerImpl.java:52 8) at mx4j.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:1235) at org.apache.webapp.admin.users.UserUtil.getUsersForm(UserUtil.java:106 ) at org.apache.webapp.admin.users.UserManager.listUsers(UserManager.java: 198) at org.apache.webapp.admin.users.Jyo.main(Jyo.java:26) List is Null Press any key to continue . . . Thanks, Jyothi -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with tomcat on UNIX
Yoav, I sincerely appreciate your suggestions, Below are the corrections to my server.xml. But I definetely am missing something, Since I get the following error. Can you please let me know what's missing in the server.xml ? - ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ Resource name=jdbc/myoracle type=javax.sql.DataSource/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams ResourceParams name=jdbc/myoracle parameter namevalidationQuery/name valueselect * from snet_cca_pooling/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name valuewfab/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@chd4.sbc.com:1521:ostl411/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuewfab/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8072 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina Context className=org.apache.catalina.core.StandardDefaultContext ResourceLink global=jdbc/myoracle name=jdbc/myoracle/ /Context Host appBase=webapps name=localhost Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_log. suffix=.txt timestamp=true/ /Host Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm/ /Engine /Service /Server - org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 40) at com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnectionImp l.java:57) at com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(Calcul ationsReportAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 )
RE: How to get a handle to tomcat Mbean Server?
I don't know if this helps but this is a function I use to load the user database. After that, I use the different methods implemented in the org.apache.catalina.UserDatabase class. I found the functions and the parameters needed by searching the source for the function I wanted. I use this to dynamically add and search for users. I can also add roles and add roles to users. private void loadUserDatabase() { if(MBeanServerFactory.findMBeanServer(null).size() 0) { m_BeanServer = (MBeanServer) BeanServerFactory.findMBeanServer(null).get(0); } else { m_BeanServer = MBeanServerFactory.createMBeanServer(); } try { ObjectName obname = new ObjectName( userDB ); MBeanInfo info = m_BeanServer.getMBeanInfo( obname ); MBeanOperationInfo opInfo[] = info.getOperations(); MBeanAttributeInfo atribInfo[] = info.getAttributes(); for( int i = 0; i opInfo.length; i++ ) { log( loadUserDatabase, Operation: + opInfo[i].getName() + is defined ); } for( int i = 0; i atribInfo.length; i++ ) { log( loadUserDatabase, Attribute: + atribInfo[i].getName() + = + m_BeanServer.getAttribute( obname, atribInfo[i].getName() ) ); } } catch( Exception e ) { e.printStackTrace(); } } Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Honnavalli, Jyothi [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 3:30 PM To: 'Tomcat Users List' Subject: How to get a handle to tomcat Mbean Server? Hi All, I was just learning 'bt Mbeans. To begin with, I was learning to use and test the Mbeans that are already existing in tomcat so I get to know how Mbeans work. I have written my own Agent called UserManager to call the [snip] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Info re: use of CGI servlet in Tomcat, JDK version
As I suspected, my patch was bad. In fact it was terrible. It broke 4.1.x and 5.0.x (making JDK 1.4 required) and didn't actually do what was originally intended anyway. This has now all been fixed in CVS. The parameterEncoding option has been removed for 4.1.x and 5.0.x but remains (in a working state) in 5.5.x Mark From: Mark Thomas [mailto:[EMAIL PROTECTED] A JDK 1.4 requirement is a bug and most likely my fault. I'll look at this now. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Hello, This is not a question so much as a notice; I'm working on Windows OS, and had JDK 1.3 set up as JAVA_HOME. I'm using Tomcat 5.0.19 and wanted to run perl scripts so set up CGI servlet by commenting-in appropriate sections of conf/web.xml, and renaming servlets-cgi.jar, putting my script in a /cgi folder under /WEB-INF in my application, and got the error NoSuchMethodFound for CGIRunner.run It is not the case that this method isn't there as you all probably know. I found that I need to use the 1.4 version of the JDK (j2sdk1.4.) for the servlet to work properly. Perhaps this caveat can be added to the CGI doc. thanks, Lesley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Integrating Tomcat 5 and Apache 2
Redhat Linux Enterprise httpd-2.0.46-40.ent j2sdk1.4.2_05 tomcat-5.0.27 jakarta-tomcat-connectors-jk2-2.0.4-src For the record.. If I run the servlets http://server.edu:8080/servlet/com.datatel.server.servlets.webadvis or.WebAdvisor?ACTION=Login they work fine. Going over the Chapter 8. Integrating Tomcat 5 and Apache 2 at http://cymulacrum.net/writings/tomcat5/c875.html Everthing (./confgure, make ldd ) went fine. Found that the $CATALINA/logs/jk2.shm and the jk2.socket files. For some reason arn't being created when tomcat starts. Tomcat isn't complaining about anything as far as I can tell. 2004-09-28 15:53:34 StandardContext[]WebAdvisor: Initializing WebAdvisorContext 2004-09-28 15:53:34 StandardContext[]WebAdvisor: No cache found, creating new session cache. 2004-09-28 15:57:09 StandardContext[/servlets- examples]InvokerFilter(ApplicationFilterConfig[name=Path Mapped Filter, filterClass=filters.ExampleFilter]): 4 milliseconds Tomcat starts and stops and serves the pages when directed as above. Went back thru Chapter 8. Integrating Tomcat 5 and Apache 2 Appendix A. mod_jk2 404 Error Problem Appendix C. Building mod_jk2 on Red Hat Enterprise Linux 3 (RHEL) double checked everything. Went ahead and started httpd and tried the uri setting # Uri mapping for datatel [uri:/datatel/openweb/*] in workers2.properties and got the 404 error. Commented out the uri settings there and put Location /datatel/openweb/* JkUriSet worker ajp13 /Location in etc/httpd/conf/httpd.conf Gave it a shot and recieved 500 Internal Server Error (httpd error log logged ) [Tue Sep 28 15:45:36 2004] [error] uriEnv.init() map to invalid worker /datatel/openweb/*-0 ajp13 and [Tue Sep 28 15:57:32 2004] [error] mod_jk2.handle() No worker for /datatel/openweb/index.html When I tried index.html I'm almost there was hoping some one would have an idea on what is going on Thanks \\|// -(@ @)- ===oOO==(_)==OOo== Stewart Walker [EMAIL PROTECTED]
Re: Integrating Tomcat 5 and Apache 2
Stewart, Try enabling the RequestDumperValve in server.xml. I think you'll find it has something to do with the difference between com.datatel.server.servlets.webadvisor.WebAdvisor and datatel/openweb ... well that is my first thought anyway. PJ On Wed, 2004-09-29 at 08:28, Stewart Walker wrote: Redhat Linux Enterprise httpd-2.0.46-40.ent j2sdk1.4.2_05 tomcat-5.0.27 jakarta-tomcat-connectors-jk2-2.0.4-src For the record.. If I run the servlets http://server.edu:8080/servlet/com.datatel.server.servlets.webadvis or.WebAdvisor?ACTION=Login they work fine. Going over the Chapter 8. Integrating Tomcat 5 and Apache 2 at http://cymulacrum.net/writings/tomcat5/c875.html Everthing (./confgure, make ldd ) went fine. Found that the $CATALINA/logs/jk2.shm and the jk2.socket files. For some reason arn't being created when tomcat starts. Tomcat isn't complaining about anything as far as I can tell. 2004-09-28 15:53:34 StandardContext[]WebAdvisor: Initializing WebAdvisorContext 2004-09-28 15:53:34 StandardContext[]WebAdvisor: No cache found, creating new session cache. 2004-09-28 15:57:09 StandardContext[/servlets- examples]InvokerFilter(ApplicationFilterConfig[name=Path Mapped Filter, filterClass=filters.ExampleFilter]): 4 milliseconds Tomcat starts and stops and serves the pages when directed as above. Went back thru Chapter 8. Integrating Tomcat 5 and Apache 2 Appendix A. mod_jk2 404 Error Problem Appendix C. Building mod_jk2 on Red Hat Enterprise Linux 3 (RHEL) double checked everything. Went ahead and started httpd and tried the uri setting # Uri mapping for datatel [uri:/datatel/openweb/*] in workers2.properties and got the 404 error. Commented out the uri settings there and put Location /datatel/openweb/* JkUriSet worker ajp13 /Location in etc/httpd/conf/httpd.conf Gave it a shot and recieved 500 Internal Server Error (httpd error log logged ) [Tue Sep 28 15:45:36 2004] [error] uriEnv.init() map to invalid worker /datatel/openweb/*-0 ajp13 and [Tue Sep 28 15:57:32 2004] [error] mod_jk2.handle() No worker for /datatel/openweb/index.html When I tried index.html I'm almost there was hoping some one would have an idea on what is going on Thanks \\|// -(@ @)- ===oOO==(_)==OOo== Stewart Walker [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help for case insensitive deployment
Hi: Can someone tell me whether my question is posted or not? Am I having problem with my mail server? Thanks. Willy -Original Message- From: Willy Lin Sent: Tuesday, September 28, 2004 10:39 AM To: 'Tomcat Users List' Subject: Need help for case insensitive deployment Hi: I need to server up some pages through Tomcat4 that are case insensitive. I have found an attribute in resources for case sensitivity, but I could not get it to work. Here is my context definition. Context path=/Live docBase=\\host1\dir1 debug=0 privileged=true Resource name = type=org.apache.naming.resources.FileDirContext docBase=\\host1\dir1 caseSensitive=false cached=true / /Context Can someone tell me what is wrong or point me to a sample configuration for case insensitive deployment. Thanks a lot. Crazy Monkey