Error with All threads (...) are currently busy on Red Hat
Our tomcat server freezes intermittently, without any identifiable cause, giving a message like All threads (xxx) are currently busy, waiting. At first I assumed that some bug with our java code was causing requests to hang indefinitely and they were accumulating over time to cause this, but I've added diagnostics code to detect that condition and it appears not to be the case. A similar problem was reported recently at http://www.mail-archive.com/[EMAIL PROTECTED]/msg132875.html However, the resolution to that referred to problematic versions which we aren't using Our exact versions are below.. linux Red Hat EL kernel 2.4.21-17.ELsmp (as per recommendation on Bug 120341 for ibm blades) tomcat 4.1.30 apache 2.0.49 mod_jk 2.04 glibc 2.3.2-95.20 java 1.4.2_02 - Sun VM Any help would be greatly appreciated, Brad McEvoy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error with All threads (...) are currently busy on Red Hat
Create a thread dump to see how many threads you have and what they are doing. kill -QUIT tomcat pid This will just produce a thread dump and not stop tomcat. The output will get to catalina.out unless you have mapped stdout to a different file. -Original Message- From: Brad McEvoy [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 8:20 AM To: '[EMAIL PROTECTED]' Subject: Error with All threads (...) are currently busy on Red Hat Our tomcat server freezes intermittently, without any identifiable cause, giving a message like All threads (xxx) are currently busy, waiting. At first I assumed that some bug with our java code was causing requests to hang indefinitely and they were accumulating over time to cause this, but I've added diagnostics code to detect that condition and it appears not to be the case. A similar problem was reported recently at http://www.mail-archive.com/[EMAIL PROTECTED]/msg 132875.html However, the resolution to that referred to problematic versions which we aren't using Our exact versions are below.. linux Red Hat EL kernel 2.4.21-17.ELsmp (as per recommendation on Bug 120341 for ibm blades) tomcat 4.1.30 apache 2.0.49 mod_jk 2.04 glibc 2.3.2-95.20 java 1.4.2_02 - Sun VM Any help would be greatly appreciated, Brad McEvoy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with SSL configuration
Hi all, Can somebody help me in solving this? Regards Binoy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 05 August 2004 16:06 To: [EMAIL PROTECTED] Subject: RE: Problem with SSL configuration Hi, This is how my server.xml looks like Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true Factory className=org.apache.coyote.tomcat5.CoyoteConnector clientAuth=false sslProtocol=TLS keystorePass = binoy/ /Connector Binoy -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 05 August 2004 14:27 To: Tomcat Users List Subject: RE: Problem with SSL configuration Hi, You don't have to quote the whole stack trace ;) Can you post your server.xml, as some attribute type is incorrect apparently? ;) Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 9:25 AM To: [EMAIL PROTECTED] Subject: Problem with SSL configuration Hi, I have configured SSL with Tomcat, I get this error when starting Tomcat 04-Aug-2004 17:16:55 org.apache.commons.digester.Digester endElement SEVERE: End event threw exception java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at ... Can somebody help me please? 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: worker2.properties conf
try the following out .. i've not tested it though :p [logger] level=INFO [logger.file:0] level=INFO file=d:\\jakarta-tomcat-5.0.25\\logs\\jk2.log [workerEnv:] info=Global server options timing=1 debug=0 logger=logger.file:0 [shm] file=d:\\jakarta-tomcat-5.0.25\\work\\jk2.shm size=1048576 Tomcat Development Instance 1 [channel.socket:localhost:8009] info=Ajp13 worker, connects to tomcat instance using AJP 1.3 protocol tomcatId=localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/samples/*] info=sample to jsp-samples context=/jsp-samples worker=ajp13:localhost:8009 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with SSL configuration
On 8/6/2004 1:05 AM, [EMAIL PROTECTED] wrote: Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true Factory className=org.apache.coyote.tomcat5.CoyoteConnector clientAuth=false sslProtocol=TLS keystorePass = binoy/ ^ ^ Can you get rid of these spaces and try again? /Connector -- Dennis Dai [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with SSL configuration
Yes I tried that, still I get the same error. Binoy -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: 06 August 2004 09:12 To: Tomcat Users List Subject: Re: Problem with SSL configuration On 8/6/2004 1:05 AM, [EMAIL PROTECTED] wrote: Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true Factory className=org.apache.coyote.tomcat5.CoyoteConnector clientAuth=false sslProtocol=TLS keystorePass = binoy/ ^ ^ Can you get rid of these spaces and try again? /Connector -- Dennis Dai [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]
Database connection
Hi! Thanks a lot for the reply. We have tried all this and also followed the tomcat doc but still not able to connect the application to the db2 database. Regards Bhaskar - Original Message - From: Pradeep Chauhan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, August 05, 2004 1:26 PM Subject: RE: [SPAM_EMAIL] - Re: Migration to TOMCAT 5 - Found word(s) list error in the Text body. Hi , Here is the example how to it. Server.xml GlobalNamingResources!--Define Resource Name-- Resource name=jdbc/Test scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/Test parameter ... /parameter /ResourceParams /GlobalNamingResources Context ResourceLink global=jdbc/Test name=TEST/!--Give reference name to ur Resource -- /context In Web.xml ( present in root/webapps/Appicationfolder/web-inf/ resource-ref!--tell application which Reference name is to use -- descriptionOracle Datasource example/description res-ref-nameTEST/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref And if you are Defining ur Resource name in Context tag it self then i think there is no need to do any modification in Web.xml Regards, Pradeep Chauhan -Original Message- From: Bhaskar Jyoti Phukan [mailto:[EMAIL PROTECTED] Sent: 05.08.2004 12:10 To: Tomcat Users List Subject: [SPAM_EMAIL] - Re: Migration to TOMCAT 5 - Found word(s) list error in the Text body. Hi! It is showing null pointer exception in STDout.log file. I think this is because there is no database connectivity. We are not able to configure the server.xml file and web.xml file for our use. Can you help please Thanks and regards Bhaskar - Original Message - From: Pradeep Chauhan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, August 05, 2004 11:36 AM Subject: RE: Migration to TOMCAT 5 Can you tell us what all you have done for configuration and what Problem (Error in STDout.log or prompt ) you are facing. Regards, Pradeep - Original Message - From: Bhaskar Jyoti Phukan To: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 7:00 PM Subject: Migration to TOMCAT 5 Hi! We have an application which was installed in TOMCAT 3. The database is IBM DB2. We want to migrate to TOMCAT 5. We have installed TOMCAT 5 but not able to establish database connectivity. Can you help? Sincerely yours, Bhaskar Jyoti Phukan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where is the jk2 documentation gone ?
Hi everyone, Sorry to bother you, but at the end of the page: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/ajp.html There is a broken link to: http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/doc/ It is not that I need a so special configuration at the time, but I am lost with a silly question. When to use Jk2 and when to use Jk1.2? Is it related to the JSP spec version? Where can I find a simple doc for it without downloading the whole source code? Thanks for any tip. François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [SPAM_EMAIL] - Database connection - Found word(s) list error in the Text body.
Ok then do one thing post your web.xml and server.xml -Original Message- From: Bhaskar Jyoti Phukan [mailto:[EMAIL PROTECTED] Sent: 06.08.2004 15:13 To: Tomcat Users List Subject: [SPAM_EMAIL] - Database connection - Found word(s) list error in the Text body. Hi! Thanks a lot for the reply. We have tried all this and also followed the tomcat doc but still not able to connect the application to the db2 database. Regards Bhaskar - Original Message - From: Pradeep Chauhan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, August 05, 2004 1:26 PM Subject: RE: [SPAM_EMAIL] - Re: Migration to TOMCAT 5 - Found word(s) list error in the Text body. Hi , Here is the example how to it. Server.xml GlobalNamingResources!--Define Resource Name-- Resource name=jdbc/Test scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/Test parameter ... /parameter /ResourceParams /GlobalNamingResources Context ResourceLink global=jdbc/Test name=TEST/!--Give reference name to ur Resource -- /context In Web.xml ( present in root/webapps/Appicationfolder/web-inf/ resource-ref!--tell application which Reference name is to use -- descriptionOracle Datasource example/description res-ref-nameTEST/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref And if you are Defining ur Resource name in Context tag it self then i think there is no need to do any modification in Web.xml Regards, Pradeep Chauhan -Original Message- From: Bhaskar Jyoti Phukan [mailto:[EMAIL PROTECTED] Sent: 05.08.2004 12:10 To: Tomcat Users List Subject: [SPAM_EMAIL] - Re: Migration to TOMCAT 5 - Found word(s) list error in the Text body. Hi! It is showing null pointer exception in STDout.log file. I think this is because there is no database connectivity. We are not able to configure the server.xml file and web.xml file for our use. Can you help please Thanks and regards Bhaskar - Original Message - From: Pradeep Chauhan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, August 05, 2004 11:36 AM Subject: RE: Migration to TOMCAT 5 Can you tell us what all you have done for configuration and what Problem (Error in STDout.log or prompt ) you are facing. Regards, Pradeep - Original Message - From: Bhaskar Jyoti Phukan To: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 7:00 PM Subject: Migration to TOMCAT 5 Hi! We have an application which was installed in TOMCAT 3. The database is IBM DB2. We want to migrate to TOMCAT 5. We have installed TOMCAT 5 but not able to establish database connectivity. Can you help? Sincerely yours, Bhaskar Jyoti Phukan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database connection
HI Thanks a lot. I am sending the server.xml and web.xml files below. 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 description= name=maxExcemptions override=false type=java.lang.Integer value=10 / 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 description= name=EIRPDB1 type=org.apache.catalina.UserDatabase / Resource name=jdbc/db2 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=EIRPDB1 - parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter - parameter namepathname/name valueD:\DB2\NODE\/value /parameter /ResourceParams - ResourceParams name=jdbc/db2 - parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter - parameter namemaxWait/name value5000/value /parameter - parameter namemaxActive/name value10/value /parameter - parameter namepassword/name valuedb2admin/value /parameter - parameter nameurl/name valuejdbc:db2:EIRPDB1/value /parameter - parameter namedriverClassName/name valueCOM.ibm.db2.jdbc.app.DB2Driver/value /parameter - parameter namemaxIdle/name value2/value /parameter - parameter nameusername/name valuedb2admin/value /parameter /ResourceParams /GlobalNamingResources - Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 / Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 / - Engine defaultHost=localhost name=Catalina - 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 web.xml: ?xml version=1.0 encoding=ISO-8859-1 ? + !-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- - web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameWelcome to Tomcat/display-name descriptionWelcome to Tomcat/description - !-- JSPC servlet mappings start -- - servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet - servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping - !-- JSPC servlet mappings end -- - resource-ref descriptionDB2 Datasource example/description res-ref-namejdbc/db2/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref - resource-env-ref descriptionObject factory for MyBean instances./description resource-env-ref-namebean/MyBeanFactory/resource-env-ref-name resource-env-ref-typecom.iipl.eirp.dbconnection.test/resource-env-ref-typ e /resource-env-ref /web-app You have take so much of trouble to help. Thanks a lot once again. Regards Bhaskar - Original Message - From: Pradeep Chauhan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 06, 2004 3:58 PM Subject: RE: [SPAM_EMAIL] - Database connection - Found word(s) list error in the Text body. Ok then do one thing post your web.xml and server.xml -Original Message- From: Bhaskar Jyoti Phukan [mailto:[EMAIL PROTECTED] Sent: 06.08.2004 15:13 To: Tomcat Users List Subject: [SPAM_EMAIL] - Database connection - Found word(s) list error in the Text body. Hi! Thanks a lot for the reply. We have tried all this and also followed the tomcat
Cannot get log4j logs into tomcat logs folder using relative mechanism
Hi Guys, Our developers use the same log4j configuration file, but have separate instances of tomcat on the server. At the moment we have to do a search and replace for the File attribute to make sure the directory is correct per developer instance. At the moment this works for an instance ... log4j.appender.ErrorsA.File=d:/jakarta-tomcat-5.0.25/logs/iq2-sys-errors.log I have set my user.dir property with -Duser.dir=%CATALINA_HOME% And printing the value in a JSP gives d:\jakarta-tomcat-5.0.25 Yet when trying # trying to go forward into tomcat logs from relative user.dir log4j.appender.ErrorsA.File=logs/iq2-sys-errors.log give error java.io.FileNotFoundException: logs\iq2-core-actions.log (The system cannot find the path specified) Thanks, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [SPAM_EMAIL] - Re: Database connection - Found word(s) list error in the Text body.
Hi , In GlobalResource you have declared 2 resource 1. EIRPDB1 2. jdbc/db2 In defination section you deifne EIRPDB1 and jdbc/db2 In web.xml you refer 'jdbc/db2' i guess you are using jdbc/db2 to connect to DB2 but you forget to copy paste the Context of you application where you have declare application is using which resource. I need that also to tell you the excat issue. Regards, Pradeep -Original Message- From: Bhaskar Jyoti Phukan [mailto:[EMAIL PROTECTED] Sent: 06.08.2004 16:49 To: Tomcat Users List Subject: [SPAM_EMAIL] - Re: Database connection - Found word(s) list error in the Text body. HI Thanks a lot. I am sending the server.xml and web.xml files below. 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 description= name=maxExcemptions override=false type=java.lang.Integer value=10 / 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 description= name=EIRPDB1 type=org.apache.catalina.UserDatabase / Resource name=jdbc/db2 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=EIRPDB1 - parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter - parameter namepathname/name valueD:\DB2\NODE\/value /parameter /ResourceParams - ResourceParams name=jdbc/db2 - parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter - parameter namemaxWait/name value5000/value /parameter - parameter namemaxActive/name value10/value /parameter - parameter namepassword/name valuedb2admin/value /parameter - parameter nameurl/name valuejdbc:db2:EIRPDB1/value /parameter - parameter namedriverClassName/name valueCOM.ibm.db2.jdbc.app.DB2Driver/value /parameter - parameter namemaxIdle/name value2/value /parameter - parameter nameusername/name valuedb2admin/value /parameter /ResourceParams /GlobalNamingResources - Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 / Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 / - Engine defaultHost=localhost name=Catalina - 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 web.xml: ?xml version=1.0 encoding=ISO-8859-1 ? + !-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- - web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameWelcome to Tomcat/display-name descriptionWelcome to Tomcat/description - !-- JSPC servlet mappings start -- - servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet - servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping - !-- JSPC servlet mappings end -- - resource-ref descriptionDB2 Datasource example/description res-ref-namejdbc/db2/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref - resource-env-ref descriptionObject factory for MyBean instances./description resource-env-ref-namebean/MyBeanFactory/resource-env-ref-name resource-env-ref-typecom.iipl.eirp.dbconnection.test/resource-env-ref-typ e /resource-env-ref /web-app You have take so much of trouble to help. Thanks a lot once
Re: classloader hangs
loadClass method, and it is not reporting anything, and to the best of my knowledge, an error should terminate the JVM right? No, it shouldn't. You can catch errors also by catching Throwable instead of Exception. Thanks very much for this bit of advice, as it turns out it was throwing a ClassDefNotFoundError. However, now that I am catching this error, I am still bewildered. When I am trying to load class A, the message in the ClassDefNotFoundError is simply B which is the class that A extends (which is present in the directory containing the loading code). If Tomcat's webapp loader loaded the loading code, why isn't it loading class B as well? Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat does not see web.xml, which is the part of the war file
Hi, The WAR structure looks good. Try unpacking it and copying the directory into Tomcat's webapps directory: that is, try deploying an unpacked webapp as opposed to a packed WAR, and see what happens. Yoav Shapira Millennium Research Informatics -Original Message- From: Piotr Galecki [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 6:52 PM To: Tomcat Users List Subject: RE: Tomcat does not see web.xml, which is the part of the war file Hi Yoav, Here is the war file content: C:\JavaAdvTopics\edu\brandeis\PiotrGalecki\Homework2\login\dist\lib\JB uild erX\j dk1.4\bin\jar.exe tvf login.war 0 Thu Aug 05 18:49:28 EDT 2004 META-INF/ 106 Thu Aug 05 18:49:28 EDT 2004 META-INF/MANIFEST.MF 0 Thu Aug 05 00:26:04 EDT 2004 WEB-INF/ 8481 Tue Jul 02 02:32:24 EDT 2002 WEB-INF/struts-bean.tld 3629 Thu Aug 05 00:09:52 EDT 2004 WEB-INF/struts-config.xml 59225 Tue Jul 02 02:32:24 EDT 2002 WEB-INF/struts-html.tld 13871 Tue Jul 02 02:32:24 EDT 2002 WEB-INF/struts-logic.tld 1466 Thu Aug 05 01:17:10 EDT 2004 WEB-INF/web.xml 663 Wed Aug 04 23:30:26 EDT 2004 login.jsp 0 Thu Aug 05 18:49:30 EDT 2004 WEB-INF/classes/ 0 Thu Aug 05 00:21:56 EDT 2004 WEB-INF/classes/edu/ 0 Thu Aug 05 00:21:56 EDT 2004 WEB-INF/classes/edu/brandeis/ 0 Thu Aug 05 00:21:56 EDT 2004 WEB-INF/classes/edu/brandeis/PiotrGalecki/ 0 Thu Aug 05 00:21:56 EDT 2004 WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho mework2/ 0 Thu Aug 05 00:21:56 EDT 2004 WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho mework2/login/ 0 Thu Aug 05 00:21:56 EDT 2004 WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho mework2/login/src/ 1249 Thu Aug 05 18:49:28 EDT 2004 WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho mework2/login/src/LoginAction.class 637 Thu Aug 05 18:49:28 EDT 2004 WEB-INF/classes/edu/brandeis/PiotrGalecki/Ho mework2/login/src/LoginForm.class 0 Thu Aug 05 18:49:30 EDT 2004 WEB-INF/lib/ 485731 Mon Dec 30 22:37:52 EST 2002 WEB-INF/lib/struts.jar C:\JavaAdvTopics\edu\brandeis\PiotrGalecki\Homework2\login\dist\lib - Piotr --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, Post your WAR file structure (obtainable from a jar tvf command). Yoav Shapira Millennium Research Informatics -Original Message- From: Piotr Galecki [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 4:21 PM To: [EMAIL PROTECTED] Subject: Tomcat does not see web.xml, which is the part of the war file I'm having a problem with Tomcat, which doesn't see the web.xml file, when processing a war file. I checked many times - the web.xml file is in the war file, which is created by ant. However, when the war file is deployed, Tomcat complains that web.xml is not there. Here is the Tomcat log: INFO: Installing web application at context path /login from URL file:D:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/login Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path Aug 5, 2004 1:57:03 AM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path Aug 5, 2004 1:57:03 AM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine [Catalina].StandardHost[localhost].StandardContext[/login] What could be the problem here? Any help is appreciated, Piotr - 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] This e-mail, including any attachments, is a confidential business communication, and may contain
RE: Cannot get log4j logs into tomcat logs folder using relative mechanism
Hi, You have to include the variable as ${varName} in your File attribute, e.g. ${user.dir}/logs/myLog. See http://marc.theaimsgroup.com/?l=log4j-userm=108609662415067w=2. However, I recommend a more robust approach. Maybe this is because I dislike relying on platform-specific settings like environment variables. But anyways, use Ant to do this for you. Have ant fill in the File attribute value when you're deploying your webapp. You can do this with filter tokens and build.properties files for every developer. Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 7:43 AM To: [EMAIL PROTECTED] Subject: Cannot get log4j logs into tomcat logs folder using relative mechanism Hi Guys, Our developers use the same log4j configuration file, but have separate instances of tomcat on the server. At the moment we have to do a search and replace for the File attribute to make sure the directory is correct per developer instance. At the moment this works for an instance ... log4j.appender.ErrorsA.File=d:/jakarta-tomcat-5.0.25/logs/iq2-sys- errors.log I have set my user.dir property with -Duser.dir=%CATALINA_HOME% And printing the value in a JSP gives d:\jakarta-tomcat-5.0.25 Yet when trying # trying to go forward into tomcat logs from relative user.dir log4j.appender.ErrorsA.File=logs/iq2-sys-errors.log give error java.io.FileNotFoundException: logs\iq2-core-actions.log (The system cannot find the path specified) Thanks, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Where is the jk2 documentation gone ?
Hi, It's not a bother: thanks for reporting the broken link. I've fixed it in CVS and the site will be updated during our next release. For now, use the main JK documentation link (JK Documentation from the Reference section of the Tomcat 5 Docs home), or just bookmark http://jakarta.apache.org/tomcat/connectors-doc/jk2/index.html. Yoav Shapira Millennium Research Informatics -Original Message- From: Francois JEANMOUGIN [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 5:59 AM To: Tomcat Users List Subject: Where is the jk2 documentation gone ? Hi everyone, Sorry to bother you, but at the end of the page: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/ajp.html There is a broken link to: http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/doc/ It is not that I need a so special configuration at the time, but I am lost with a silly question. When to use Jk2 and when to use Jk1.2? Is it related to the JSP spec version? Where can I find a simple doc for it without downloading the whole source code? Thanks for any tip. François. - 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: Cannot get log4j logs into tomcat logs folder using relative mechanism
Great, that worked, thanks. By the way Yoav, I have added the LogFactory.shutdown() to the context listeners and will be keeping an eye on whether the ThreadDeath problem occurs again. I'll update the bug next week with my findings. Cheers, Allistair -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 06 August 2004 14:05 To: Tomcat Users List Subject: RE: Cannot get log4j logs into tomcat logs folder using relative mechanism Hi, You have to include the variable as ${varName} in your File attribute, e.g. ${user.dir}/logs/myLog. See http://marc.theaimsgroup.com/?l=log4j-userm=108609662415067w=2. However, I recommend a more robust approach. Maybe this is because I dislike relying on platform-specific settings like environment variables. But anyways, use Ant to do this for you. Have ant fill in the File attribute value when you're deploying your webapp. You can do this with filter tokens and build.properties files for every developer. Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 7:43 AM To: [EMAIL PROTECTED] Subject: Cannot get log4j logs into tomcat logs folder using relative mechanism Hi Guys, Our developers use the same log4j configuration file, but have separate instances of tomcat on the server. At the moment we have to do a search and replace for the File attribute to make sure the directory is correct per developer instance. At the moment this works for an instance ... log4j.appender.ErrorsA.File=d:/jakarta-tomcat-5.0.25/logs/iq2-sys- errors.log I have set my user.dir property with -Duser.dir=%CATALINA_HOME% And printing the value in a JSP gives d:\jakarta-tomcat-5.0.25 Yet when trying # trying to go forward into tomcat logs from relative user.dir log4j.appender.ErrorsA.File=logs/iq2-sys-errors.log give error java.io.FileNotFoundException: logs\iq2-core-actions.log (The system cannot find the path specified) Thanks, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classloader hangs
My attempts to abate this error are proving quite fruitless. So I was wondering... what is the preferred method to programatically reload a class in Tomcat? I've searched the web but I am stuck. Thanks Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot get log4j logs into tomcat logs folder using relative mechanism
Hi, Good, I hope it works. Have a good weekend, Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 9:18 AM To: Tomcat Users List Subject: RE: Cannot get log4j logs into tomcat logs folder using relative mechanism Great, that worked, thanks. By the way Yoav, I have added the LogFactory.shutdown() to the context listeners and will be keeping an eye on whether the ThreadDeath problem occurs again. I'll update the bug next week with my findings. Cheers, Allistair -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 06 August 2004 14:05 To: Tomcat Users List Subject: RE: Cannot get log4j logs into tomcat logs folder using relative mechanism Hi, You have to include the variable as ${varName} in your File attribute, e.g. ${user.dir}/logs/myLog. See http://marc.theaimsgroup.com/?l=log4j-userm=108609662415067w=2. However, I recommend a more robust approach. Maybe this is because I dislike relying on platform-specific settings like environment variables. But anyways, use Ant to do this for you. Have ant fill in the File attribute value when you're deploying your webapp. You can do this with filter tokens and build.properties files for every developer. Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 7:43 AM To: [EMAIL PROTECTED] Subject: Cannot get log4j logs into tomcat logs folder using relative mechanism Hi Guys, Our developers use the same log4j configuration file, but have separate instances of tomcat on the server. At the moment we have to do a search and replace for the File attribute to make sure the directory is correct per developer instance. At the moment this works for an instance ... log4j.appender.ErrorsA.File=d:/jakarta-tomcat-5.0.25/logs/iq2-sys- errors.log I have set my user.dir property with -Duser.dir=%CATALINA_HOME% And printing the value in a JSP gives d:\jakarta-tomcat-5.0.25 Yet when trying # trying to go forward into tomcat logs from relative user.dir log4j.appender.ErrorsA.File=logs/iq2-sys-errors.log give error java.io.FileNotFoundException: logs\iq2-core-actions.log (The system cannot find the path specified) Thanks, Allistair FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: classloader hangs
Hi, You can simply set reloadable=true for your Context and Tomcat will monitor your classes and reload the webapp (not just the class) as needed. You can also programmatically invoke the Manager webapp and use its reload feature. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 9:36 AM To: Tomcat Users List Subject: Re: classloader hangs My attempts to abate this error are proving quite fruitless. So I was wondering... what is the preferred method to programatically reload a class in Tomcat? I've searched the web but I am stuck. Thanks Ben - 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: classloader hangs
You can simply set reloadable=true for your Context and Tomcat will monitor your classes and reload the webapp (not just the class) as needed. You can also programmatically invoke the Manager webapp and use its reload feature. What if these classes aren't located in the Tomcat directory? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: classloader hangs
Hi, Then you have to write your own custom Loader to handle this. But don't expect much help or support, as you're going outside the Servlet Spec and most people stop caring as much ;) Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 10:09 AM To: Tomcat Users List Subject: Re: classloader hangs You can simply set reloadable=true for your Context and Tomcat will monitor your classes and reload the webapp (not just the class) as needed. You can also programmatically invoke the Manager webapp and use its reload feature. What if these classes aren't located in the Tomcat directory? - 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: classloader hangs
Why must I write a custom Loader, isn't URLClassLoader already suited for this task? What is it about URLClassLoader that makes it incompatable with Tomcat? Then you have to write your own custom Loader to handle this. But don't expect much help or support, as you're going outside the Servlet Spec and most people stop caring as much ;) Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 10:09 AM To: Tomcat Users List Subject: Re: classloader hangs You can simply set reloadable=true for your Context and Tomcat will monitor your classes and reload the webapp (not just the class) as needed. You can also programmatically invoke the Manager webapp and use its reload feature. What if these classes aren't located in the Tomcat directory? - 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: classloader hangs
Hi, URLClassLoader is not a reloader. Why did you get the idea it is? There's nothing in it that's incompatible with Tomcat, in fact Tomcat just extends it and uses its code. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 10:18 AM To: Tomcat Users List Subject: Re: classloader hangs Why must I write a custom Loader, isn't URLClassLoader already suited for this task? What is it about URLClassLoader that makes it incompatable with Tomcat? Then you have to write your own custom Loader to handle this. But don't expect much help or support, as you're going outside the Servlet Spec and most people stop caring as much ;) Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 10:09 AM To: Tomcat Users List Subject: Re: classloader hangs You can simply set reloadable=true for your Context and Tomcat will monitor your classes and reload the webapp (not just the class) as needed. You can also programmatically invoke the Manager webapp and use its reload feature. What if these classes aren't located in the Tomcat directory? - 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] 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: classloader hangs
I apologize for not being clear the first time. My class loading scheme works by first loading classes with a URLClassLoader and then when the program wants to reload them, it creates a new URLClassLoader whose parent is the first URLClassLoader, thus staying within the delegation model of class loaders (i hope?). URLClassLoader is not a reloader. Why did you get the idea it is? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Source Control Ideas.
Since this is a nice active list of plenty of developers and I have no other idea where I can post theses questions... My questions are concerning source control in general 1- Is there any good books, articles, web sites tutorials... 2- May I pick the brains of a few of you guys... Now here is my situation Lets say I have 2 products Each product has it's own databases, executables, web applications etc... Also these 2 products might share a database or two, maybe an executable or even a web application... So... Product 1 has: 2 databases called: p1db1 and p1db2 1 executable called: p1exe1 2 web apps called: p1web1 and p1web2 Product 2 has: 1 database called: p2db1 1 web app called p2web1 Now all of a sudden I realise that product2 can also use p1web1 which in turn uses p1db2. So now I have to make slight changes to p1web1 and p1db2 to support product 2. Now both products share p1web1 and p1db2. Lets say a bug is found on p1web1. Analysis is done and the bug only affects product1... How could source control be managed, structured when multiple products may share mutltiple components Another issue also would be what if you are working on one version of a product, then halt work on that version to begin new work of the same product because of some business decision. Then come back to the halted version and continue working on it, mean while the other version has been deployed in production and requires it's own bug fixes / hot fixes etc... Seems like alot to swallow. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OFF-TOPIC] RE: Source Control Ideas.
Hola, (or perhaps, Kalimera?) Since this is a nice active list of plenty of developers and I have no other idea where I can post theses questions... My questions are concerning source control in general We ask that you prepend [OFF-TOPIC] to the subject line of messages not related to Tomcat. I'll also point you at some other resources for your future reference: http://www.jguru.com/forums/index.jsp http://forum.java.sun.com/ http://groups.google.com/groups?hl=enlr=ie=UTF-8group=comp.lang.java 1- Is there any good books, articles, web sites tutorials... Yes, there are plenty: Google is your friend. Now all of a sudden I realise that product2 can also use p1web1 which in turn uses p1db2. So now I have to make slight changes to p1web1 and p1db2 to support product 2. Now both products share p1web1 and p1db2. Lets say a bug is found on p1web1. Analysis is done and the bug only affects product1... How could source control be managed, structured when multiple products may share mutltiple components The general approach is to set up a separate component in source control for each component of your code that can be depended upon. All modern source control systems allow you to label branches, so you can have a DB1_1.0 label for database 1 code version 1.0. Product 1 can depend on this. Then as you make further changes you label is DB1_1.1 or maybe DB1_2.0 as you wish, and you change dependencies accordingly. Product 1 can still depend on 1.0 if it wishes, and you can still make changes in the 1.0 branch. As to your other question, all modern source control systems allow you set views and work with branches, and then merge them if/when you see fit. These are fairly basic source control questions, so maybe you should check out a book or article like http://www-106.ibm.com/developerworks/rational/library/2110.html http://cvsbook.red-bean.com/ http://www.utexas.edu/cc/unix/UsingSCCS.html http://www.developer.com/mgmt/article.php/3330801 or a class like http://www.inferdata.com/training/websphere/ClearCase.html As I said, Google is your friend -- this information is not hard to find. Yoav 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: [OFF-TOPIC] RE: Source Control Ideas.
Shapira, Yoav wrote: Hola, (or perhaps, Kalimera?) Since this is a nice active list of plenty of developers and I have no other idea where I can post theses questions... My questions are concerning source control in general We ask that you prepend [OFF-TOPIC] to the subject line of messages not related to Tomcat. I'll also point you at some other resources for your future reference: http://www.jguru.com/forums/index.jsp http://forum.java.sun.com/ http://groups.google.com/groups?hl=enlr=ie=UTF-8group=comp.lang.java 1- Is there any good books, articles, web sites tutorials... Yes, there are plenty: Google is your friend. Now all of a sudden I realise that product2 can also use p1web1 which in turn uses p1db2. So now I have to make slight changes to p1web1 and p1db2 to support product 2. Now both products share p1web1 and p1db2. Lets say a bug is found on p1web1. Analysis is done and the bug only affects product1... How could source control be managed, structured when multiple products may share mutltiple components The general approach is to set up a separate component in source control for each component of your code that can be depended upon. All modern source control systems allow you to label branches, so you can have a DB1_1.0 label for database 1 code version 1.0. Product 1 can depend on this. Then as you make further changes you label is DB1_1.1 or maybe DB1_2.0 as you wish, and you change dependencies accordingly. Product 1 can still depend on 1.0 if it wishes, and you can still make changes in the 1.0 branch. But what happens, when both products depend/share functionality on this component simultanously. As to your other question, all modern source control systems allow you set views and work with branches, and then merge them if/when you see fit. These are fairly basic source control questions, so maybe you should check out a book or article like http://www-106.ibm.com/developerworks/rational/library/2110.html http://cvsbook.red-bean.com/ http://www.utexas.edu/cc/unix/UsingSCCS.html http://www.developer.com/mgmt/article.php/3330801 or a class like http://www.inferdata.com/training/websphere/ClearCase.html As I said, Google is your friend -- this information is not hard to find. Yoav 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: [OFF-TOPIC] RE: Source Control Ideas.
Hola, But what happens, when both products depend/share functionality on this component simultanously. Product1 depends on version 1 of DB1. Product2 depends on version 2 of DB1. Substitute version in the above sentence with branch and this is supported by all modern source control systems. It's not hard to do at all. If you need to patch version 1 or version 2, you can. Or you can merge their branches at some point, and have both products 1 and 2 depend son the merged version of DB1. Yoav 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: [OFF-TOPIC] RE: Source Control Ideas.
On Friday 06 August 2004 11:36 am, Anastasios Angelidis wrote: The general approach is to set up a separate component in source control for each component of your code that can be depended upon. All modern source control systems allow you to label branches, so you can have a DB1_1.0 label for database 1 code version 1.0. Product 1 can depend on this. Then as you make further changes you label is DB1_1.1 or maybe DB1_2.0 as you wish, and you change dependencies accordingly. Product 1 can still depend on 1.0 if it wishes, and you can still make changes in the 1.0 branch. But what happens, when both products depend/share functionality on this component simultanously. Don't forget how java shares code: jar files If you build your shared functionality into a jar, you can deploy that jar in support of that functionality. Building different versions of a particular shared code base is simply a matter of extracting a particular branch of source and performing the build. Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
application not working on unix.
I am trying to deploy my prototype shoppingcart application onto linux environment , i am using apache tomcat4.0.4, and struts 1.1. The same application was deployed successfully on windows. I have copied prototype.war into /var/lib/tomcat4/webapps. restarted tomcat as /etc/init.d/tomcat4 restart and it does not work. I have the following errors in catalina.out and local_host.log ..please help. I get this error in catlina.out Aug 6, 2004 3:32:25 AM org.apache.commons.digester.Digester getParser SEVERE: Digester.getParser: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) at java.security.AccessControlContext.checkPermission(AccessControlContext.java :269) at java.security.AccessController.checkPermission(AccessController.java:401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at java.lang.ClassLoader.getParent(ClassLoader.java:1034) at org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java :888) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:34 2) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:226) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134) at org.apache.commons.digester.Digester.getFactory(Digester.java:512) at org.apache.commons.digester.Digester.getParser(Digester.java:686) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 8) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) = And i get this error in log file :...localhost_log.2004-08-06.txt == 2004-08-06 03:32:25 StandardContext[/prototype]: Servlet /prototype threw load() exception javax.servlet.ServletException: Servlet.init() for servlet action threw exceptio n at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:946) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81 0) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78 5) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at
Re: application not working on unix.
On Friday 06 August 2004 11:52 am, Shilpa Nalgonda wrote: I am trying to deploy my prototype shoppingcart application onto linux environment , i am using apache tomcat4.0.4, and struts 1.1. The same application was deployed successfully on windows. I have copied Did you by chance make *any* changes to catalina.policy in the config folder of Tomcat 4 on Windows? If so, those changes need to be migrated as well. Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OFF-TOPIC] RE: Source Control Ideas.
Robert Bateman wrote: On Friday 06 August 2004 11:36 am, Anastasios Angelidis wrote: The general approach is to set up a separate component in source control for each component of your code that can be depended upon. All modern source control systems allow you to label branches, so you can have a DB1_1.0 label for database 1 code version 1.0. Product 1 can depend on this. Then as you make further changes you label is DB1_1.1 or maybe DB1_2.0 as you wish, and you change dependencies accordingly. Product 1 can still depend on 1.0 if it wishes, and you can still make changes in the 1.0 branch. But what happens, when both products depend/share functionality on this component simultanously. Don't forget how java shares code: jar files If you build your shared functionality into a jar, you can deploy that jar in support of that functionality. Building different versions of a particular shared code base is simply a matter of extracting a particular branch of source and performing the build. Bob Thats cool, though am more intersted in general. Most of our stuff is MS SQL and C++ related, java is used less. - 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]
Problem Configuring Datasource With Tomcat !
Hi, We are using eclipse with tomcat to deploy our web application that uses oracle data source. Following steps were performed to get connection pool: 1) Changes in server.xml of tomcat , added these lines in application context Resource name=jdbc/JOBS_DataSource auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/JOBS_DataSource parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@150.235.31.48:1521:EHRS/value /parameter parameter nameusername/name valuejasadm/value /parameter parameter namepassword/name valuejasadm/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams 2) Changes in web.xml of application, added these lines resource-ref descriptionJOBS Datasource/description res-ref-namejdbc/JOBS_DataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 3) Used two different approaches in code to access the datasource First - java.util.Hashtable props = new java.util.Hashtable(); props.put(javax.naming.InitialContext.INITIAL_CONTEXT_FACTORY, org.apache.commons.dbcp.BasicDataSourceFactory); javax.naming.InitialContext context = new javax.naming.InitialContext(props); Object dataSourceObject = context.lookup(jdbc/JOBS_DataSource); myDataSource = (DataSource)javax.rmi.PortableRemoteObject.narrow(dataSourceObject, DataSource.class); //third line throws naming exception - Cannot instantiate class: org.apache.commons.dbcp.BasicDataSourceFactory Second- javax.naming.InitialContext initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); Object dataSourceObject = envContext.lookup(jdbc/JOBS_DataSource); //last line throws errors - Source not found for NamingContext.lookup(String) line: 197 //Source not found for BasicDataSource.getConnection(String, String) line: 532 Have placed the required commons-dbcp.jar ,commons-pool.jar , commons-collection.jar, classes12.jar in tomcat-install-dir\common\lib folder. Any help in this regard will be highly appreciated. Thanks Regards, Sandeep Tandon JOBS - CSPD C-09 / X-6165
RE: application not working on unix.
Nope i di dnot make any cnages there... -Original Message- From: Robert Bateman [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 11:52 AM To: Tomcat Users List Subject: Re: application not working on unix. On Friday 06 August 2004 11:52 am, Shilpa Nalgonda wrote: I am trying to deploy my prototype shoppingcart application onto linux environment , i am using apache tomcat4.0.4, and struts 1.1. The same application was deployed successfully on windows. I have copied Did you by chance make *any* changes to catalina.policy in the config folder of Tomcat 4 on Windows? If so, those changes need to be migrated as well. Bob - 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: log4j SEVERE ThreadDeath in Tomcat 5.0.25
Hi Yoav, I'm afraid no success using this method; public void contextDestroyed(ServletContextEvent scE) { LogManager.shutdown(); LogFactory.releaseAll(); logger.info(Renewals Application Destroyed); } The following stack trace occurred after a recompile of a class... 06-Aug-2004 16:11:01 org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started 06-Aug-2004 16:11:02 org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact) 06-Aug-2004 16:11:02 org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact) 06-Aug-2004 16:11:02 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.ThreadDeath at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1270) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at org.apache.log4j.spi.LoggingEvent.init(LoggingEvent.java:241) at org.apache.log4j.Category.forcedLog(Category.java:431) at org.apache.log4j.Category.log(Category.java:966) at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:195) at org.apache.catalina.session.StandardManager.start(StandardManager.java:706) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4226) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2990) at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4584) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1671) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1671) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1651) at java.lang.Thread.run(Unknown Source) FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: log4j SEVERE ThreadDeath in Tomcat 5.0.25
Hi, Did you see this part: the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact) ? Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 12:05 PM To: Tomcat Users List Subject: RE: log4j SEVERE ThreadDeath in Tomcat 5.0.25 Hi Yoav, I'm afraid no success using this method; public void contextDestroyed(ServletContextEvent scE) { LogManager.shutdown(); LogFactory.releaseAll(); logger.info(Renewals Application Destroyed); } The following stack trace occurred after a recompile of a class... 06-Aug-2004 16:11:01 org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started 06-Aug-2004 16:11:02 org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact) 06-Aug-2004 16:11:02 org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact) 06-Aug-2004 16:11:02 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.ThreadDeath at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja va:1270) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja va:1230) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at org.apache.log4j.spi.LoggingEvent.init(LoggingEvent.java:241) at org.apache.log4j.Category.forcedLog(Category.java:431) at org.apache.log4j.Category.log(Category.java:966) at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:195) at org.apache.catalina.session.StandardManager.start(StandardManager.java: 706) at org.apache.catalina.core.StandardContext.start(StandardContext.java:422 6) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:29 90) at org.apache.catalina.core.StandardContext.backgroundProcess(StandardCont ext. java:4584) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.pro cess Children(ContainerBase.java:1662) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.pro cess Children(ContainerBase.java:1671) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.pro cess Children(ContainerBase.java:1671) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run (Con tainerBase.java:1651) at java.lang.Thread.run(Unknown Source) FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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]
Hanging after 8 sendRedirect()s
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've been going nuts trying to diagnose two applications I'm working on, which seem to crash if a user opens 8 (maybe 9) servlets that use sendRedirect(), in a row. These do not return anything to the user (to the extent of not retrieving a PrintWriter or OutputStream). This happens both through Apache (with mod_jk), and just by connectiong normally. This is under Tomcat 5.0.27 with J2SDK 1.4.2, running on Linux 2.4.22 (although it's been demonstrated on other configurations). So, imagine there's page A, which links to page B. Page B redirects the user back to page A. The user clicks on the link to B, and ends up back at A. They repeat this a further 7 times, at which point the returned page for A isn't completely received. Any further attempts to communicate with the servlet appear to be received okay, but no response gets back to the user. Any ideas? -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBE66kEYciZnlEX74RAirjAJsHGBLnCzNijA6W2l26uNCNqoUONwCeIUu/ vFeKSE1jkvV8alKrDohx2NI= =+3CK -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
I am trying to deploy my prototype shoppingcart application onto linux environment , i am using apache tomcat4.0.4, and struts 1.1. The same application was deployed successfully on windows. I have copied prototype.war into /var/lib/tomcat4/webapps. restarted tomcat as /etc/init.d/tomcat4 restart and it does not work. I please help. And i get this error in log file :...localhost_log.2004-08-06.txt == 2004-08-06 03:32:25 StandardContext[/prototype]: Servlet /prototype threw load() exception javax.servlet.ServletException: Servlet.init() for servlet action threw exceptio n at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:946) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81 0) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78 5) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343 ) at org.apache.catalina.core.StandardService.start(StandardService.java:3 88) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - - Root Cause - java.lang.NullPointerException at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java :1433) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:918) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81 0) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78 5) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343 ) at org.apache.catalina.core.StandardService.start(StandardService.java:3 88) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
RE: Hanging after 8 sendRedirect()s
Hi, There might be some browser checks for this sort of stuff. I remember reading about a virus that repeatedly redirected a hidden frame to its own URL for reading session data (cookies), and subsequently Microsoft and other vendors putting safeguards in their browsers against this sort of behavior. But then again, this paragraph is based upon dull recollections of events that are at least four years old and may just be in my imagination, given that it's Friday afternoon after a long week. Do the first few redirects work OK? Does the AccessLogValve show anything interesting for the 8th and subsequent redirects? Yoav Shapira Millennium Research Informatics -Original Message- From: J Ross Nicoll [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 12:16 PM To: Tomcat Users List Subject: Hanging after 8 sendRedirect()s -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've been going nuts trying to diagnose two applications I'm working on, which seem to crash if a user opens 8 (maybe 9) servlets that use sendRedirect(), in a row. These do not return anything to the user (to the extent of not retrieving a PrintWriter or OutputStream). This happens both through Apache (with mod_jk), and just by connectiong normally. This is under Tomcat 5.0.27 with J2SDK 1.4.2, running on Linux 2.4.22 (although it's been demonstrated on other configurations). So, imagine there's page A, which links to page B. Page B redirects the user back to page A. The user clicks on the link to B, and ends up back at A. They repeat this a further 7 times, at which point the returned page for A isn't completely received. Any further attempts to communicate with the servlet appear to be received okay, but no response gets back to the user. Any ideas? -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBE66kEYciZnlEX74RAirjAJsHGBLnCzNijA6W2l26uNCNqoUONwCeIUu/ vFeKSE1jkvV8alKrDohx2NI= =+3CK -END PGP SIGNATURE- - 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]
web.xml and servlets used in an app
Hello! Do I have to map all the servlets that my application uses in web.xml? I am using Tomcat 5.0 on Windows. I didn't have to do this on Tomcat 4.1 on Linux. Thanks. Deepa
RE: web.xml and servlets used in an app
Hi, http://jakarta.apache.org/tomcat/faq/misc.html#invoker You should map them all. If you really dislike that, comment the invoker servlet back in. Yoav Shapira Millennium Research Informatics -Original Message- From: Deepa Ramamurthy [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 12:25 PM To: [EMAIL PROTECTED] Subject: web.xml and servlets used in an app Hello! Do I have to map all the servlets that my application uses in web.xml? I am using Tomcat 5.0 on Windows. I didn't have to do this on Tomcat 4.1 on Linux. Thanks. Deepa 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: web.xml and servlets used in an app
As the default invoker servlet is now disabled by default you have to register your servlets in web.xml so in short, yes. If I am not correct here somebody please correct me so I can also update my knowledge but this is how I understand it currently. Deepa Ramamurthy wrote: Hello! Do I have to map all the servlets that my application uses in web.xml? I am using Tomcat 5.0 on Windows. I didn't have to do this on Tomcat 4.1 on Linux. Thanks. Deepa -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
System Clock Issues with Webapps
Server: SunOS 5.9 Generic_112233-07 sun4u sparc SUNW,Ultra-250 Apache: 2.0.47 Tomcat: 4.1.29 Our server is used by divisions in multiple timezones, so the system clock is set to UTC to simplify log writing etc; Each system user--including root--has a profile which masks the system clock to the appropriate time zone; root is masked to US-Pacific, the physical location of the server (confirmed by running date as root). Apache and Tomcat run as root processes and should use root's profile; however, they sometimes bypass the profile and report UTC date/time value (evidenced by outputting the value of a java.util.Date in a JSP). Doing an Apache/Tomcat restart will correct this system--so that our time JSP reports US-Pacific time as expected; however, Apache/Tomcat will revert (usually in less than a day) to reporting UTC time. Any ideas on why this is happening? and how we can correct it? -- David Rickard Software Engineer The GTS Companies A TechBooks Company -- The GTS Companies: GTS Publishing Services, GTS Graphics, GTS Innova: Your Single-Source Solution! Los Angeles CA * York, PA * Boston MA * New Delhi, India -- [EMAIL PROTECTED] Visit us on the World Wide Web http://www.gtscompanies.com 5650 Jillson St., Los Angeles, CA 90040 (323) 888-8889 x331 (323) 888-1849 [fax]
Re: System Clock Issues with Webapps
Use the JAVA_OPTS option on startup to set the timezone property. -Tim David Rickard wrote: Server: SunOS 5.9 Generic_112233-07 sun4u sparc SUNW,Ultra-250 Apache: 2.0.47 Tomcat: 4.1.29 Our server is used by divisions in multiple timezones, so the system clock is set to UTC to simplify log writing etc; Each system user--including root--has a profile which masks the system clock to the appropriate time zone; root is masked to US-Pacific, the physical location of the server (confirmed by running date as root). Apache and Tomcat run as root processes and should use root's profile; however, they sometimes bypass the profile and report UTC date/time value (evidenced by outputting the value of a java.util.Date in a JSP). Doing an Apache/Tomcat restart will correct this system--so that our time JSP reports US-Pacific time as expected; however, Apache/Tomcat will revert (usually in less than a day) to reporting UTC time. Any ideas on why this is happening? and how we can correct it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat blocked on threads, high CPU
Hey folks: I got a stack dump of all threads in tomcat, when tomcat was not responding, and looks like the TP Monitor is also blocked. I saw GC ( garbage collector ) also blocked. TP-Monitor daemon prio=1 tid=0x088334f8 nid=0x1fcd in Object.wait() [a6b8b000..a6b8b87c] at java.lang.Object.wait(Native Method) - waiting on 0xab7992a0 (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnabl e) at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:564) - locked 0xab7992a0 (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable) at java.lang.Thread.run(Thread.java:534) TP-Processor4 daemon prio=1 tid=0x088328b8 nid=0x1fcd runnable [a6c0c000..a6c0c87c] at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) - locked 0xab799328 (a java.net.PlainSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:312) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:613) at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:810) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688) at java.lang.Thread.run(Thread.java:534) http8443-Processor20 daemon prio=1 tid=0x08812d70 nid=0x1fcd in Object.wait() [a7122000..a712287c] at java.lang.Object.wait(Native Method) - waiting on 0xab769c68 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:429) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:660) - locked 0xab769c68 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:534) How do I find out what the wait on object is? Any pointers are appreciated. thanks, -sunitha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Compile all JSPs on startup
Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your web.xml file. Since you would code this servlet, you can handle enable/disable of this precompilation however you want. A likely choice would be a simple servlet init-parameter, also in web.xml. This is not specific to Tomcat and would not go in Tomcat's configuration files. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
digester.getparser error...
I am getting this error when i start my Tomcat 4.0.4 insatance, with struts application. what exactly is this? Aug 6, 2004 8:02:11 AM org.apache.commons.digester.Digester getParser SEVERE: Digester.getParser: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) at java.security.AccessControlContext.checkPermission(AccessControlContext.java :269) at java.security.AccessController.checkPermission(AccessController.java:401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at java.lang.ClassLoader.getParent(ClassLoader.java:1034) at org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java :888) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:34 2) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:226) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134) at org.apache.commons.digester.Digester.getFactory(Digester.java:512) at org.apache.commons.digester.Digester.getParser(Digester.java:686) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 8) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) -- INSERT -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compile all JSPs on startup
this is what you are looking for: http://cvs.apache.org/~fhanik/precompile.html Filip - Original Message - From: Dan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 06, 2004 2:54 PM Subject: RE: Compile all JSPs on startup Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your web.xml file. Since you would code this servlet, you can handle enable/disable of this precompilation however you want. A likely choice would be a simple servlet init-parameter, also in web.xml. This is not specific to Tomcat and would not go in Tomcat's
Re: Compile all JSPs on startup
and this you can do before tomcat even starts up! imagine that :) Filip - Original Message - From: Filip Hanik - Dev [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 06, 2004 3:20 PM Subject: Re: Compile all JSPs on startup this is what you are looking for: http://cvs.apache.org/~fhanik/precompile.html Filip - Original Message - From: Dan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 06, 2004 2:54 PM Subject: RE: Compile all JSPs on startup Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your
Re: application not working on unix.
Shilpa Nalgonda wrote: Nope i di dnot make any cnages there... -Original Message- From: Robert Bateman [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 11:52 AM To: Tomcat Users List Subject: Re: application not working on unix. On Friday 06 August 2004 11:52 am, Shilpa Nalgonda wrote: I am trying to deploy my prototype shoppingcart application onto linux environment , i am using apache tomcat4.0.4, and struts 1.1. The same application was deployed successfully on windows. I have copied Did you by chance make *any* changes to catalina.policy in the config folder of Tomcat 4 on Windows? If so, those changes need to be migrated as well. Bob - 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] I would check the files and make sure there are no differences. Wade - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: application not working on unix.
Maybe the more direct question is: Are you running with the Security Manager on at your desktop? If not, get a copy of the server's policy file, and refer to the Security Manager How-To to make sure that you're correctly mimicking the permissions on the server on your desktop. An AccessControlException generally means that you lack permissions (in this case, to get the classLoader). Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 10:59 AM To: Tomcat Users List Subject: RE: application not working on unix. Nope i di dnot make any cnages there... -Original Message- From: Robert Bateman [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 11:52 AM To: Tomcat Users List Subject: Re: application not working on unix. On Friday 06 August 2004 11:52 am, Shilpa Nalgonda wrote: I am trying to deploy my prototype shoppingcart application onto linux environment , i am using apache tomcat4.0.4, and struts 1.1. The same application was deployed successfully on windows. I have copied Did you by chance make *any* changes to catalina.policy in the config folder of Tomcat 4 on Windows? If so, those changes need to be migrated as well. Bob - 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]
Bizzare bug with my class and sharing values between different instances
Hello, list! I am currently busting my brain over this problem... I have the following class: package net.olaes; import java.lang.String; public class NumAndString { private static int iNum; private static String sString; public NumAndString(int iNum, String sString){ this.iNum = iNum; this.sString = sString; } public int getNum(){ return this.iNum; } public String getString(){ return this.sString; } } When I try to do the following in my JSP: Vector v = new Vector(); v.add(new NumAndString(1, a)); v.add(new NumAndString(2, b)); v.add(new NumAndString(3, c)); Iterator i = v.iterator(); while(i.hasNext()){ NumAndString nasThisOne = (NumAndString) i.next(); out.println(nasThisOne.getNum()); out.println(nasThisOne.getString()); } I get: 3 c 3 c 3 c I don't understand what I'm doing wrong, my gut says to check my class definition, but I don't even know how to google up this problem because I've never seen it before. Anywho, I'll keep checking the net for my problem, but if anyone has a quickie solution to my class up above, please help. Thank you very much for your time and assistance in advance. -TJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Bizzare bug with my class and sharing values between different instances
Your intended instance members are static. That means that all instances of the class share them. That's not what you want. Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Thomas Joseph Olaes [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 4:05 PM To: [EMAIL PROTECTED] Subject: Bizzare bug with my class and sharing values between different instances Hello, list! I am currently busting my brain over this problem... I have the following class: package net.olaes; import java.lang.String; public class NumAndString { private static int iNum; private static String sString; public NumAndString(int iNum, String sString){ this.iNum = iNum; this.sString = sString; } public int getNum(){ return this.iNum; } public String getString(){ return this.sString; } } When I try to do the following in my JSP: Vector v = new Vector(); v.add(new NumAndString(1, a)); v.add(new NumAndString(2, b)); v.add(new NumAndString(3, c)); Iterator i = v.iterator(); while(i.hasNext()){ NumAndString nasThisOne = (NumAndString) i.next(); out.println(nasThisOne.getNum()); out.println(nasThisOne.getString()); } I get: 3 c 3 c 3 c I don't understand what I'm doing wrong, my gut says to check my class definition, but I don't even know how to google up this problem because I've never seen it before. Anywho, I'll keep checking the net for my problem, but if anyone has a quickie solution to my class up above, please help. Thank you very much for your time and assistance in advance. -TJ - 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: Bizzare bug with my class and sharing values between different instances
The problem is that your data members are static. That means that for each instance of the class, they all point to the same data member. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Thomas Joseph Olaes [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 3:05 PM To: [EMAIL PROTECTED] Subject: Bizzare bug with my class and sharing values between different instances Hello, list! I am currently busting my brain over this problem... I have the following class: package net.olaes; import java.lang.String; public class NumAndString { private static int iNum; private static String sString; public NumAndString(int iNum, String sString){ this.iNum = iNum; this.sString = sString; } public int getNum(){ return this.iNum; } public String getString(){ return this.sString; } } When I try to do the following in my JSP: Vector v = new Vector(); v.add(new NumAndString(1, a)); v.add(new NumAndString(2, b)); v.add(new NumAndString(3, c)); Iterator i = v.iterator(); while(i.hasNext()){ NumAndString nasThisOne = (NumAndString) i.next(); out.println(nasThisOne.getNum()); out.println(nasThisOne.getString()); } I get: 3 c 3 c 3 c I don't understand what I'm doing wrong, my gut says to check my class definition, but I don't even know how to google up this problem because I've never seen it before. Anywho, I'll keep checking the net for my problem, but if anyone has a quickie solution to my class up above, please help. Thank you very much for your time and assistance in advance. -TJ - 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: Bizzare bug with my class and sharing values between different instances
- remove the static keyword, package net.olaes; import java.lang.String; public class NumAndString { private int iNum; //should NOT be static private String sString; public NumAndString(int iNum, String sString){ this.iNum = iNum; this.sString = sString; } - Original Message - From: Thomas Joseph Olaes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 06, 2004 4:05 PM Subject: Bizzare bug with my class and sharing values between different instances Hello, list! I am currently busting my brain over this problem... I have the following class: package net.olaes; import java.lang.String; public class NumAndString { private static int iNum; private static String sString; public NumAndString(int iNum, String sString){ this.iNum = iNum; this.sString = sString; } public int getNum(){ return this.iNum; } public String getString(){ return this.sString; } } When I try to do the following in my JSP: Vector v = new Vector(); v.add(new NumAndString(1, a)); v.add(new NumAndString(2, b)); v.add(new NumAndString(3, c)); Iterator i = v.iterator(); while(i.hasNext()){ NumAndString nasThisOne = (NumAndString) i.next(); out.println(nasThisOne.getNum()); out.println(nasThisOne.getString()); } I get: 3 c 3 c 3 c I don't understand what I'm doing wrong, my gut says to check my class definition, but I don't even know how to google up this problem because I've never seen it before. Anywho, I'll keep checking the net for my problem, but if anyone has a quickie solution to my class up above, please help. Thank you very much for your time and assistance in advance. -TJ - 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]
Possible bug in Tomcat5.0.27
Hi! It seems that setting Content-Length header on response commits that response (which shouldn't happen). protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { httpServletResponse.setIntHeader(Content-Length, 0); httpServletResponse.sendError(404); } After invoking such a servlet I'm getting IllegalStateException java.lang.IllegalStateException org.apache.coyote.tomcat5.CoyoteResponseFacade.sendError(CoyoteResponseFacade.java:338) com.fcs.TestServlet.doGet(TestServlet.java:32) I tried the following combination httpServletResponse.setIntHeader(Content-Length, 0); httpServletResponse.setStatus(304); Using sniffer I see that there is no 304 response, but 200 Ok. Can somebody clarify this? Regards, Viktor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem Configuring Datasource With Tomcat !
Hi, You havent mentioned where the code is deployed. It might be in ROOT or a webapp of your own; either way this is a case of not finding the jndi resource. You ought to insert the resource entry in server.xml inside the Context which you plan to use the resource. You can opt to define the resource inside the Context. The context might be defined in another file(depending on tomcat version) at $CATALINA/conf/Catalina/localhost/YourWebApp.xml (ROOT.xml for default). Another option would be to define a resource-ref tag inside your context to make the resource visible inside your context. hope this helps.shoot back if you have more trouble. Gig 'em Ciji Isen sandeep tandon wrote: Hi, We are using eclipse with tomcat to deploy our web application that uses oracle data source. Following steps were performed to get connection pool: 1) Changes in server.xml of tomcat , added these lines in application context Resource name=jdbc/JOBS_DataSource auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/JOBS_DataSource parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@150.235.31.48:1521:EHRS/value /parameter parameter nameusername/name valuejasadm/value /parameter parameter namepassword/name valuejasadm/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams 2) Changes in web.xml of application, added these lines resource-ref descriptionJOBS Datasource/description res-ref-namejdbc/JOBS_DataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 3) Used two different approaches in code to access the datasource First - java.util.Hashtable props = new java.util.Hashtable(); props.put(javax.naming.InitialContext.INITIAL_CONTEXT_FACTORY, org.apache.commons.dbcp.BasicDataSourceFactory); javax.naming.InitialContext context = new javax.naming.InitialContext(props); Object dataSourceObject = context.lookup(jdbc/JOBS_DataSource); myDataSource = (DataSource)javax.rmi.PortableRemoteObject.narrow(dataSourceObject, DataSource.class); //third line throws naming exception - Cannot instantiate class: org.apache.commons.dbcp.BasicDataSourceFactory Second- javax.naming.InitialContext initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); Object dataSourceObject = envContext.lookup(jdbc/JOBS_DataSource); //last line throws errors - Source not found for NamingContext.lookup(String) line: 197 //Source not found for BasicDataSource.getConnection(String, String) line: 532 Have placed the required commons-dbcp.jar ,commons-pool.jar , commons-collection.jar, classes12.jar in tomcat-install-dir\common\lib folder. Any help in this regard will be highly appreciated. Thanks Regards, Sandeep Tandon JOBS - CSPD C-09 / X-6165 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SingleSiteLogon working, now how do I log them out?
I have Single site logon working great with my application, however, I am having a hard time trying to figure out how to log the user out when they select log out. Anyone..please Keith Have you ever noticed that the word 'complaint' and 'compliant' are spelled almost the same except the transposition of a single letter. I wonder why that is?
Re: Bizzare bug with my class and sharing values between different instances
I dont think a static member is what you wanted. What you seem to want to is to store a data object. That be the case there is no point making them static. remove the static key word in. private static int iNum; private static String sString; and try. Gig 'em, Ciji Isen ps: If you where to use an IDE like Eclipse or so I think it would have suggested this as you write it. Thomas Joseph Olaes wrote: Hello, list! I am currently busting my brain over this problem... I have the following class: package net.olaes; import java.lang.String; public class NumAndString { private static int iNum; private static String sString; public NumAndString(int iNum, String sString){ this.iNum = iNum; this.sString = sString; } public int getNum(){ return this.iNum; } public String getString(){ return this.sString; } } When I try to do the following in my JSP: Vector v = new Vector(); v.add(new NumAndString(1, a)); v.add(new NumAndString(2, b)); v.add(new NumAndString(3, c)); Iterator i = v.iterator(); while(i.hasNext()){ NumAndString nasThisOne = (NumAndString) i.next(); out.println(nasThisOne.getNum()); out.println(nasThisOne.getString()); } I get: 3 c 3 c 3 c I don't understand what I'm doing wrong, my gut says to check my class definition, but I don't even know how to google up this problem because I've never seen it before. Anywho, I'll keep checking the net for my problem, but if anyone has a quickie solution to my class up above, please help. Thank you very much for your time and assistance in advance. -TJ - 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: SingleSiteLogon working, now how do I log them out?
Hi, Well I suppose you are storing something in the session to store validation flag or you might be persisting a struts form object. Either way you can just remove that object or just invalidate the session. session.removeValue(value) or session.invalidate() Thats my take on your question.:-) Gig 'em Ciji Isen Keith Bottner wrote: I have Single site logon working great with my application, however, I am having a hard time trying to figure out how to log the user out when they select log out. Anyone..please Keith Have you ever noticed that the word 'complaint' and 'compliant' are spelled almost the same except the transposition of a single letter. I wonder why that is? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SingleSiteLogon working, now how do I log them out?
That was how I did handle it when I rolled my own security model through a base action. But now that I am using Single Site Logon it sets a Principal on the HttpServletRequest and I do not know how to invalidate the Principal. In Tomcat you can actually retrieve the user name and password that was used to log the user in through SingleSignOn using (BASIC, FORM, etc.) by doing a import org.apache.catalina.realm.GenericPrincipal; GenericPrincipal p = (GenericPrincipal)request.getUserPrincipal(); if ( p != null ) { String username = p.getName(); String password = p.getPassword(); } But this principal is now ATTACHED to the session and I can't seem to find a way to invalidate it or remote it? It is stored deep down in the bowels for Tomcat in something called their notes in CoyoteRequest which ends up being wrapped by CoyoteRequestFacade which does not allow access. Anyone else... Keith -Original Message- From: Isen,Ciji [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 4:39 PM To: Tomcat Users List Subject: Re: SingleSiteLogon working, now how do I log them out? Hi, Well I suppose you are storing something in the session to store validation flag or you might be persisting a struts form object. Either way you can just remove that object or just invalidate the session. session.removeValue(value) or session.invalidate() Thats my take on your question.:-) Gig 'em Ciji Isen Keith Bottner wrote: I have Single site logon working great with my application, however, I am having a hard time trying to figure out how to log the user out when they select log out. Anyone..please Keith Have you ever noticed that the word 'complaint' and 'compliant' are spelled almost the same except the transposition of a single letter. I wonder why that is? - 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: Re: Bizzare bug with my class and sharing values between different instances
Thanks alot everyone! For some reason I thought I had to declare a class variable static so the different functions inside would be able to access the variable. -TJ On Fri, 06 Aug 2004 16:32:40 -0500, Isen,Ciji [EMAIL PROTECTED] wrote: I dont think a static member is what you wanted. What you seem to want to is to store a data object. That be the case there is no point making them static. remove the static key word in. private static int iNum; private static String sString; and try. Gig 'em, Ciji Isen ps: If you where to use an IDE like Eclipse or so I think it would have suggested this as you write it. Thomas Joseph Olaes wrote: Hello, list! I am currently busting my brain over this problem... I have the following class: package net.olaes; import java.lang.String; public class NumAndString { private static int iNum; private static String sString; public NumAndString(int iNum, String sString){ this.iNum = iNum; this.sString = sString; } public int getNum(){ return this.iNum; } public String getString(){ return this.sString; } } When I try to do the following in my JSP: Vector v = new Vector(); v.add(new NumAndString(1, a)); v.add(new NumAndString(2, b)); v.add(new NumAndString(3, c)); Iterator i = v.iterator(); while(i.hasNext()){ NumAndString nasThisOne = (NumAndString) i.next(); out.println(nasThisOne.getNum()); out.println(nasThisOne.getString()); } I get: 3 c 3 c 3 c I don't understand what I'm doing wrong, my gut says to check my class definition, but I don't even know how to google up this problem because I've never seen it before. Anywho, I'll keep checking the net for my problem, but if anyone has a quickie solution to my class up above, please help. Thank you very much for your time and assistance in advance. -TJ - 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: Compile all JSPs on startup
I don't believe this will work. I need something that runs automatically when Tomcat is restarted, and I prefer to do it without external scripts or batch files, etc.. At 04:20 PM 8/6/2004, you wrote: this is what you are looking for: http://cvs.apache.org/~fhanik/precompile.html Filip - Original Message - From: Dan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 06, 2004 2:54 PM Subject: RE: Compile all JSPs on startup Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your web.xml file. Since you would code this servlet, you can handle enable/disable of this precompilation
RE: Compile all JSPs on startup
What I ended up doing was to spawn a Thread from my servlet class. This thread waits for 60 seconds and then fetches the JSP pages. Not the best solution but it works for now. At 03:54 PM 8/6/2004, you wrote: Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your web.xml file. Since you would code this servlet, you can handle enable/disable of this precompilation however you want. A likely choice would be a simple servlet init-parameter, also in web.xml. This is not specific to Tomcat and would not go in Tomcat's configuration files.
RE: SingleSiteLogon working, now how do I log them out?
Got it! Set all of the cookies max age to 0, and then call invalidate() on the session. In addition have the Action's success forward with redirect set to true and walla totally leveraged SSO integrated into your application with little to no effort. Keith -Original Message- From: Keith Bottner [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 4:47 PM To: 'Tomcat Users List' Subject: RE: SingleSiteLogon working, now how do I log them out? That was how I did handle it when I rolled my own security model through a base action. But now that I am using Single Site Logon it sets a Principal on the HttpServletRequest and I do not know how to invalidate the Principal. In Tomcat you can actually retrieve the user name and password that was used to log the user in through SingleSignOn using (BASIC, FORM, etc.) by doing a import org.apache.catalina.realm.GenericPrincipal; GenericPrincipal p = (GenericPrincipal)request.getUserPrincipal(); if ( p != null ) { String username = p.getName(); String password = p.getPassword(); } But this principal is now ATTACHED to the session and I can't seem to find a way to invalidate it or remote it? It is stored deep down in the bowels for Tomcat in something called their notes in CoyoteRequest which ends up being wrapped by CoyoteRequestFacade which does not allow access. Anyone else... Keith -Original Message- From: Isen,Ciji [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 4:39 PM To: Tomcat Users List Subject: Re: SingleSiteLogon working, now how do I log them out? Hi, Well I suppose you are storing something in the session to store validation flag or you might be persisting a struts form object. Either way you can just remove that object or just invalidate the session. session.removeValue(value) or session.invalidate() Thats my take on your question.:-) Gig 'em Ciji Isen Keith Bottner wrote: I have Single site logon working great with my application, however, I am having a hard time trying to figure out how to log the user out when they select log out. Anyone..please Keith Have you ever noticed that the word 'complaint' and 'compliant' are spelled almost the same except the transposition of a single letter. I wonder why that is? - 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: Re: Bizzare bug with my class and sharing values between different instances
On Fri, Aug 06, 2004 at 02:57:21PM -0700, Thomas Joseph Olaes wrote: : For some reason I thought I had to declare a class variable static so : the different functions inside would be able to access the variable. Only if those methods themselves are static. static data = class data = used in a static context non-static data = (per-)object data = individual to the object -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: Compile all JSPs on startup
:I need something that runs :automatically when Tomcat is restarted, and I prefer to do it without :external scripts or batch files, etc.. If you don't mind me asking, what's your end-goal in all of this? If you treat app deployment/changes as formal migrations (and I realize some shops do not), you can include precompilation as part of your build process and even catch JSP comp errors before the app goes live. Just curious. -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]
connection pool problems, etc.
It looks like lots of people are having various kinds of problems involving pools, and threads, and connections (perhaps to databases), and starvation, and hanging, and such. (In fact, it was to ask about just such a problem that I joined this list.) I don't have all the information yet, but I've discovered that my problems were probably due to -- or at least seem to have been fixed by updating -- a couple of .jar files: * The Jakarta common classes commons-dbcp.jar and commons-pool.jar * The Oracle JDBC driver classes12.jar or ojdbc14.jar As I understand it, both Jakarta and Oracle have recently had to fix bugs in these classes which involved pools, and threads, and connections, and starvation, and hanging, and such. The new versions of the Jakarta classes are commons-dbcp-1.2.1.jar and commons-pool-1.2.jar, and I downloaded them from http://jakarta.apache.org/commons/. The new versions of the Oracle JDBC drivers come with newer versions of Oracle, or can (so my dba tells me) be downloaded from Oracle's site. (Apologies if this is old news to everyone.) Steve Summit [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NodeDataDefinitions not found and Magnolia
I've tried getting someone from the magnolia development to respond to their mailing list NO LuCk? So I'm hoping someone here can help me. Basically, if you are not already familiar with the Magnolia CMS, it consists of two Tomcat Instances. Author an Public respectively. Here is the output of the catalina.out log of the Public instace: 06.08.2004 05:17:51 *ERROR* [main] ParagraphInfo: NodeDataDefinitions not found (ParagraphInfo.java, line 132) 06.08.2004 05:17:51 *ERROR* [main] ParagraphInfo: Please rename AtomDefinitions in dialog xml files to NodeDataDefinitions (ParagraphInfo.java, line 133) 06.08.2004 05:20:33 *ERROR* [http8082-Processor4] Aggregator: Failed to set request receiver (Aggregator.java, line 202) 06.08.2004 05:21:10 *ERROR* [http8082-Processor2] Aggregator: Failed to set request receiver (Aggregator.java, line 202) 06.08.2004 05:21:10 *ERROR* [http8082-Processor4] Aggregator: Failed to set request receiver (Aggregator.java, line 202) 06.08.2004 05:21:31 *ERROR* [http8082-Processor4] Aggregator: Failed to set request receiver (Aggregator.java, line 202) 06.08.2004 05:21:31 *ERROR* [http8082-Processor2] ResourceDispatcher: Resource not found - (ResourceDispatcher.java, line 155) Can anyone help with this? thanks, Samuel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]