Re: Tomcat triggers ServletRequestListener twice per request...
N G wrote: Hi, I have a regular HTML page and a ServletRequestListener. For some reason Tomcat invokes requestInitialized and requestDestroyed twice for every client request. In other words: requestInitialized requestDestroyed requestInitialized requestDestroyed Could someone explain to me why this is happening? I have NO Filters or MVC going on here. Just a regular HTML page. At a guess, the browser is making two requests. One for your page and one for favicon.ico Use ieHttpheaders (for IE) or Live Http Headers (for Firefox) to confirm this. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem starting tomcat with jsvc cron job
Hello, I'm stopping restarting tomcat ervery night with a cron job. I do this because we have many applications running and sometimes we need to simply clean the system. The cron job invokes a shell script which then starts tomcat with jsvc. Up to now this worked fine. But now tomcat does not restart again and I get this confusing error message: -catalina.out-- jsvc.exec error: Service exit with a return value of 143 Apr 5, 2006 12:45:00 AM org.apache.catalina.startup.Catalina load WARNING: Can't load server.xml Apr 5, 2006 12:45:00 AM org.apache.catalina.startup.Catalina load WARNING: Can't load server.xml Apr 5, 2006 12:45:00 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 0 ms If I invoke the shell script manually I get no error. What is wrong here? I don't understand this. Shell script crontab is attached below. OS: SuSE ES 9 Java: 1.5.0_04 Tomcat: 5.5.9 Cheers, Peter ---crontab 30 0 * * * root /etc/init.d/tomcat5 stop 45 0 * * * root /etc/init.d/tomcat5 start --shell-script JAVA_HOME1=/usr/local/jdk1.5.0_04 CATALINA_HOME=/usr/local/jakarta-tomcat-5.5.9 DAEMON_BIN=/usr/local/jakarta-tomcat-5.5.9/bin/jsvc TOMCAT_USER=root TMP_DIR=/var/tmp CATALINA_OPTS=-Xmx2048m -Xms1536m CLASSPATH=/usr/local/java/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar case $1 in start) # # Start Tomcat # $DAEMON_BIN \ -user $TOMCAT_USER \ -home $JAVA_HOME1 \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$TMP_DIR \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ ;; stop) # # Stop Tomcat # PID=`cat /var/run/jsvc.pid` kill $PID ;; *) echo Usage tomcat.sh start/stop exit 1;; esac - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Caching Problem
hi, We are using 'cname' to connect to a server to use a java servelet. We are getting the following exception if we move the code to some other server and the functionality related to that code in our web application is not working. Please help me. If you want more information, please let me know. the exception: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:507) at java.net.Socket.connect(Socket.java:457) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:365) at sun.net.www.http.HttpClient.openServer(HttpClient.java:477) at sun.net.www.http.HttpClient.init(HttpClient.java:214) at sun.net.www.http.HttpClient.New(HttpClient.java:287) at sun.net.www.http.HttpClient.New(HttpClient.java:299) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConn ection.java:792) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnecti on.java:744) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.ja va:669) at deshaw.bizapps.wrs.webapps.UserInfo.handleRequest(UserInfo.java:104) at deshaw.bizapps.wrs.webapps.UserInfo.doGet(UserInfo.java:63) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:157) at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:147) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc essLogValve.java:481) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 5) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:731) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:526) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow erWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:684) at java.lang.Thread.run(Thread.java:595) [ 2006-04-03 12:05:52,555 [http-3366-Processor19] webapps.WRSUtils.getRemoteUserName():233 DEBUG]: NTL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
restricting webapp reloading on ressources changes
Hello, I have configured my developpment tomcat to automatically check for ressoures changes in the webapp folder, making it easier to update JSPs. The webapp is slow to load because of a few servelt i need along with those jsps. during development, i sometimes need to update the resource bundles for i18n. Those are located in WEB-INF/classes/path/bundle_language.properties As they are in WEB-INF/classes, tomcat things classes have changed and it need to reload the webapp, which take a bunch of time, each time i update an i18n. Is there a way to tell tomcat to not reload webapp on changes to WEB-INF/classes/**.properties ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Private variables in custom tags on Tomcat
Hello all, I've come across a problem with using private variables in custom tags with Tomcat. I have this tag class: public class TestTag extends TagSupport { private Date testDate = new Date(); public int doStartTag() throws JspException { pageContext.setAttribute(date, testDate); return Tag.EVAL_BODY_INCLUDE; } } accessed from a jsp via: t:Test${date}/Test There's also a tld file that defines the Test tag linked to the TestTag class with one variable (date). If I open my browser and go to the jsp it displays the current date/time. If I then open a browser on a different machine and go to the jsp it displays the same date/time, which means (I think) that Tomcat is creating one instance of my TestTag class in the application context and handing out references to it to all users. The problem with this is that private variables are usually used to store the value of tag attributes after they are set via setter methods. If 2 people access the tag at more or less the same time then there's a chance that one user's attributes will clobber the other's. Can someone tell me whether I'm doing something wrong here - and if not perhaps Tomcat should be creating a separate instance of the tag class for each session? Thanks, Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Private variables in custom tags on Tomcat
Stephen Gray a écrit : Hello all, I've come across a problem with using private variables in custom tags with Tomcat. I have this tag class: public class TestTag extends TagSupport { private Date testDate = new Date(); public int doStartTag() throws JspException { pageContext.setAttribute(date, testDate); return Tag.EVAL_BODY_INCLUDE; } } accessed from a jsp via: t:Test${date}/Test You doing it wrong, the specs tell you that the tag will not be altered between begin of doStartTag() and exit doEndTag(), so you can not assume the state of local variables to stay constant or be reset after doEndTag() has been called. You don't even have guarantees the same tag instance won't be used in separate pages :) If you take a look at generated code from .jsp in catalina you will notice tomcat is doing tag pooling. I suggest you read details of doStartTag() and doEndTag() in javadoc: http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/Tag.html#doStartTag() http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/Tag.html#doEndTag() In short: The doStartTag method assumes that the properties pageContext and parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated. That's all you can assume :) in you case, i suggest you do public int doStartTag() throws JspException { testDate = new Date(); There's also a tld file that defines the Test tag linked to the TestTag class with one variable (date). If I open my browser and go to the jsp it displays the current date/time. If I then open a browser on a different machine and go to the jsp it displays the same date/time, which means (I think) that Tomcat is creating one instance of my TestTag class in the application context and handing out references to it to all users. The problem with this is that private variables are usually used to store the value of tag attributes after they are set via setter methods. If 2 people access the tag at more or less the same time then there's a chance that one user's attributes will clobber the other's. no, there is no clash, as a tag won't be shared between doStartTag() and doEndTag() Can someone tell me whether I'm doing something wrong here - and if not perhaps Tomcat should be creating a separate instance of the tag class for each session? Tomcat uses pooling for performance reason. A set of instances is reused when it is safe to do so. Thanks, Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] David Delbecq - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] AIX filtering Explorer?
2006/4/4, Sheets, Jerald [EMAIL PROTECTED]: Do you have a web proxy in your environment? That would be transparent, or hand-configured. We don't use a proxy to connect to the Tomcat, normally. I've configured it only to inspect the request headers that are sent by the browsers. An example of a MSIE GET request followed by a CONNECT is: 1144165210.106 42 10.0.2.210 TCP_MISS/302 452 GET http://rsaixtest.cicciopasticcio.com:8080/cicciastar/ - DIRECT/10.0.2.202 text/html [Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*\r\nAccept-Language: en-gb\r\nCookie: JSESSIONID=9F008108B1A0C248DE6357F135FF7CD4\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\nHost: rsaixtest.cicciopasticcio.com:8080\r\nProxy-Connection: Keep-Alive\r\n] [HTTP/1.1 302 Moved Temporarily\r\nServer: Apache-Coyote/1.1\r\nPragma: No-cache\r\nCache-Control: no-cache\r\nExpires: Thu, 01 Jan 1970 01:00:00 GMT\r\nLocation: https://rsaixtest.cicciopasticcio.com:8443/cicciastar/WEB-INF/jsp/logon/logon.jsp\r\nContent-Type: text/html;charset=iso-8859-1\r\nContent-Length: 0\r\nDate: Tue, 04 Apr 2006 15:42:07 GMT\r\nConnection: keep-alive\r\n\r] 1144165210.113 3 10.0.2.210 TCP_MISS/200 124 CONNECT rsaixtest.cicciopasticcio.com:8443 - DIRECT/10.0.2.202 - [User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\nHost: rsaixtest.cicciopasticcio.com:8443\r\nContent-Length: 0\r\nProxy-Connection: Keep-Alive\r\nPragma: no-cache\r\n] [] While Firefox says: 1144225430.516 78 10.0.2.210 TCP_MISS/302 517 GET http://rsaixtest.cicciopasticcio.com:8080/cicciastar/ - DIRECT/10.0.2.202 text/html [Host: rsaixtest.cicciopasticcio.com:8080\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1\r\nAccept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nKeep-Alive: 300\r\nProxy-Connection: keep-alive\r\n] [HTTP/1.1 302 Moved Temporarily\r\nServer: Apache-Coyote/1.1\r\nPragma: No-cache\r\nCache-Control: no-cache\r\nExpires: Thu, 01 Jan 1970 01:00:00 GMT\r\nSet-Cookie: JSESSIONID=BC2376254AD401F328599C5148E41032; Path=/\r\nLocation: https://rsaixtest.cicciopasticcio.com:8443/cicciastar/WEB-INF/jsp/logon/logon.jsp\r\nContent-Type: text/html;charset=iso-8859-1\r\nContent-Length: 0\r\nDate: Wed, 05 Apr 2006 08:25:49 GMT\r\nConnection: keep-alive\r\n\r] 1144225494.522 63999 10.0.2.210 TCP_MISS/200 24904 CONNECT rsaixtest.cicciopasticcio.com:8443 - DIRECT/10.0.2.202 - [User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1\r\nProxy-Connection: keep-alive\r\nHost: rsaixtest.cicciopasticcio.com:8443\r\n] [] I'm checking if this has nothing to do with the different byte order of the AIX operating system, but at the moment I'm only guessing TREMALNAIK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and OpenSSL
Hi, I'm using OpenSSL + Tomcat 5. I have configured OpenSSL Tomcat successfully but it just 1-way authentication. Now I want both Server and Client authenticate each other. Can you help me? Thanks in advance! Hung. - How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
Character behaviour Unix vs Windows ß
Hi Any having idea about why my latin characterß getting converted to 'SS' all the time however my other character are going smoothly indatabase except above i am trying to insert into data base , I am usign oracle 9i and ISO-8859-1 encoding and this is happening in the unix environment and not in my pc environment . Did anyone face any problem with this character basically there is similar character in greek to 'β' , Any pointer please Thanks Birendar Singh Waldiya Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
RE: Character behaviour Unix vs W indows ß
Technically ss is what that symbol (doppel S) stands for, so it might be intended behaviour in your DB or DB driver rather than a bad encoding. You should check your DB/driver manual perhaps. Allistair. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 05 April 2006 10:59 To: Tomcat Users List Subject: Character behaviour Unix vs Windows ß Hi Any having idea about why my latin characterß getting converted to 'SS' all the time however my other character are going smoothly indatabase except above i am trying to insert into data base , I am usign oracle 9i and ISO-8859-1 encoding and this is happening in the unix environment and not in my pc environment . Did anyone face any problem with this character basically there is similar character in greek to 'β' , Any pointer please Thanks Birendar Singh Waldiya Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
noverify option for Tomcat 5 Service
Hello I need to use the -noverify option for Tomcat running as a service. I am able to add this option when I run it by launching the startup.bat script and this works properly, as shown below: set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties -noverify I have tried in vain to make the service (tomcatw.exe) work in this way. I tried: tomcat5/exe //US//tomcat5 ++JvmOptions -noverify but it did not work. I also tried typing the -noverify option in the Java tab on the Tomcat service console window but this did not work either. (I was restarting the service, and sometimes rebooting the PC after the changes). I have even tried amending the registry keys without joy. Do I need to re-install the service after an installation of Tomcat itself? Are there Windows permissions (admin rights) issues to deal with also? Any help is appreciated. Thanks. -- View this message in context: http://www.nabble.com/noverify-option-for-Tomcat-5-Service-t1398686.html#a3761924 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jdk1.5, tomcat 5.5.9 and jsp compilation
Mylene, Yes I saw this as I mentioned in the final paragraph, however I put it into the conf/jkcon.ant.xml and it hasn't made any difference. I'm not sure I'm configuring the tag correctly or in the right config file. Any ideas? Leon, I'm compiling them at runtime and no I haven't tried 5.5.16. I was quite happy with 5.5.9 until I tried using generics. This is now in production and I don't want to have to upgrade the server continuously to dodge a bug. However, if there is no solution I will either have to revert the code to good old class casting (rather not) or upgrade tomcat to a version that supports 1.5 fully. Nick by mylene 2006-04-05 06:53 It could be ant... javac srcdir=${src} destdir=${build} fork=java$$javac.exe source=1.5 - / (see the Ant manual at http://ant.apache.org/manual http://ant.apache.org/manual - core tasks - javac) Success, Mylène On 4/4/06, CUCKSON, Nick, GBM [EMAIL PROTECTED] wrote: I've a problem compiling jsp's against jdk1.5. I've searched the archives, google, tomcat docs etc but found no help on my specific issue although I can see anumber of people have had problems with generics support. I've changed to the Ant compiler and copied the ant.jar to common/lib, added the compiler parameters to conf/web.xml to enable 1.5 compilation. I still get a message saying that generics are not supported and I should change the -source 1.4 to -source 1.5. I've looked through the ant docs and this appears to be related to the javac tag in build.xml, but I'm not sure where to put this tag in the context of a tomcat installation. I've looked through the tomcat docs on jasper (how-to) but I believe I've removed the dependency on japser so I dont think this is relevant, although it does mention using the 'javac' argument with catalina.sh. I've tried this with no success, but it's quite possible I didn't configure this properly as I'm not sure where catalina.sh is called from. I've looked through the .sh files but it's not clear. To sum up, I would like to know how to configure '-source 1.4' to '-source 1.5' or am I barking up the wrong tree? thanks *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorized and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbos.com http://www.rbsmarkets.com ***
RE: Diagnosing DBCP JDBC connection leak using removeAbandoned parm
Can you change your code to something similar to below? I have seen issues with certain implementations of database drivers in which the JDBC interfaces are not being implemented/coded properly. Just remember that the order you call your close statements does matter (although yours looked correct). Hth Marc Connection conn = new Connector().CreateConnection(); Statement stmt=null; ResultSet rset=null; try { String open_total = -100; stmt = conn.createStatement(); rset = stmt.executeQuery (select count(OPEN_MAIL_MEMBER_ID) from OPEN_MAIL where OPEN_MAIL_MEMBER_ID=+memberid); while (rset.next()) { open_total = rset.getString(1); } stmt = conn.createStatement(); stmt.executeUpdate (update EMAIL_ADDR set OPEN_MAIL_TOTAL=+open_total+ where EMAIL_ADDR_ID=+memberid); rset.close(); rset = null; stmt.close(); stmt = null; conn.close(); conn = null; } catch (Exception e) { SharedUtilities.logError(e); } finally { try { if (rset != null) { rset.close(); } catch (SQLException e) { //Exception ignored } try { if (stmt != null) { stmt.close(); } catch (SQLException e) { //Exception ignored } try { if (conn != null) { conn.close(); } catch (SQLException e) { //Exception ignored } } -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 04, 2006 10:57 PM To: users@tomcat.apache.org Subject: Diagnosing DBCP JDBC connection leak using removeAbandoned parm Bear with me, I'll try to make this short, but want to give enough info/background that it makes sense. Basically we are a bit confused by the output of the DBCP logAbandoned parameter. Any help is appreciated. Environment: We are using Tomcat 4.1.18 (for now), MySQL 4.0.18, Java 1.5.0_04-b05, all running under Linux kernel 2.4.22-1.2115.nptlsmp on a dual Xeon dedicated server. Anyway, we determined that we had a connection leak when our application froze today. We obtained a thread dump and it showed that everyone of the Tomcat threads that were running application code, were waiting to get a connection from the DBCP pool. Each process looked something like this in the thread dump: Thread-171 daemon prio=1 tid=0x8a88a528 nid=0x46e9 in Object.wait() [0x9559f000..0x955a0700] at java.lang.Object.wait(Native Method) - waiting on 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at java.lang.Object.wait(Object.java:474) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source) - locked 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool .java:117) - locked 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:110) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3 12) at com.acme.Connector.CreateConnection(Connector.java:56) at com.acme.OpenMailData.insert(OpenMailData.java:282) at com.acme.trackopenmail.doPost(trackopenmail.java:127) at com.acme.trackopenmail.doGet(trackopenmail.java:65) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at
Re: Tomcat Web Services
hung ngole wrote: I' new in Tomcat. I'm using Tomcat 5 and I don't know how I can create a web service! Can you help me? You might want to look here http://ws.apache.org/ and especially here http://ws.apache.org/axis/ Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PostgreSQL access via JNDI
Hi, I'm successfuly using PostgreSQL 8.1.3 with Tomcat 5.5.15 with JDBC drivers 405 (build)... I have the Resource ... / definition in the META-INF/context.xml and in the WEB-INF/web.xml I have the resource-ref/ element. The resource-env-ref/ I'm using for the ActiveMQ client connection. Also the JDBC drivers are placed in the common/lib directory. If you search the list, you will find my previous posts containing all the configuration files. Have a lot of fun! PETR On 4/5/06, Amila Suriarachchi [EMAIL PROTECTED] wrote: On 4/5/06, Mark Slater [EMAIL PROTECTED] wrote: I've been trying to get PostgreSQL set up to be accessed through JNDI in Tomcat 5.5.x. I found the docs page describing it, jndi- datasource-examples-howto.html, and followed the example there, but it still doesn't work. I'm trying to provide access to PostgreSQL for use by both JDO and JCR in my web-apps. Here's the Resource definition I'm using: Resource name=jdbc/whisper_db auth=Container type=javax.sql.Datasource S should be capital as well DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql://127.0.0.1:5432/my_db this is a postgres problem rather than tomcat problem. try here jdbc:postgresql://localhost:5432/my_db (or template1) if you want to access the database giving 127.0.0.1 you have to put an entry in pg_hda.conf file. username=--- password=--- maxActive=10 maxIdle=100 maxWait=3000 / In my application's META-INF/context.xml, I have the following ResourceLink: ResourceLink global=jdbc/whisper_db name=jdbc/whisper_orm type=javax.sql.Datasource / In my application's WEB-INF/web.xml, I have the following resource- env-ref: resource-env-ref descriptionWhisper's Database/description resource-env-ref-namejdbc/whisper_orm/resource-env-ref-name resource-env-ref-typejavax.sql.Datasource/resource-env- ref-type /resource-env-ref Depending on where I put the Resource definition, I get different errors. If I put it in the web-app's META-INF/context.xml, or in $TOMCAT_HOME/ conf/context.xml, my JDO implementation complains: NestableRuntimeException: There was an error duing JNDI lookup of the name java:comp/env/jdbc/whisper_orm. Caused by: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context If I put it in $TOMCAT_HOME/conf/server.xml, in the GlobalNamingResources section, I get: 2006-04-04 11:58:27,866 ERROR [org.apache.catalina.mbeans.GlobalResourcesLifecycleListener] - Exception processing Global JNDI Resources javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance (ResourceFactory.java:132) at javax.naming.spi.NamingManager.getObjectInstance (NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java: 792) at org.apache.naming.NamingContext.lookup (NamingContext.java: 152) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans (GlobalResourcesLifecycleListener.java:138) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans (GlobalResourcesLifecycleListener.java:143) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans (GlobalResourcesLifecycleListener.java:108) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEve nt(GlobalResourcesLifecycleListener.java:80) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start (StandardServer.java:693) at org.apache.catalina.startup.Catalina.start(Catalina.java: 551) 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:585) at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java: 413) I'm assuming these errors are related, and that whatever is causing the NamingException is the same fundamental problem causing the NameNotFoundException in the context-based configuration. My problem is that I can't figure out what it is. The driver for the database (postgresql-8.1-405.jdbc3.jar ) is in $TOMCAT_HOME/common/lib/, and I've also tried
Re: Tomcat Web Services
Hi Hung, I use Axis to create my web services. You can check it out on this url: http://ws.apache.org/axis/ Any doubts we are here! Regards, Marco Brasil - Original Message - From: hung ngole [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, April 05, 2006 8:36 AM Subject: Tomcat Web Services Hi, I' new in Tomcat. I'm using Tomcat 5 and I don't know how I can create a web service! Can you help me? Thanks, Hung. - New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New to Tomcat
Hi there... Running Fedora Core 4 and installed Tomcat via yum installs I'm trying to get Nutch search engine working and keep getting the following errors. I'm told by the nutch mailing list that this is a specific issue to Tomcat?? HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.compiler.DefaultErrorHandler.javacError(java.lang.Stri ng, java.lang.Exception) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.ErrorDispatcher.javacError(java.lang.String, java.lang.Exception) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.generateClass(java.lang.String[]) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.JspCompilationContext.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so) org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.R equest, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Reques t, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream) (/usr/lib/libtomcat-http11-5.0.30.jar.so) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object[]) (/usr/lib/libtomcat-http11-5.0.30.jar.so) org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object[]) (/tmp/libtomcat-util-5.0.30.jar.so9a2vfs.so) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.so9a2vfs.so) java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0) root cause Error starting modern compiler org.apache.tools.ant.taskdefs.compilers.Javac13.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.compile() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.jasper.compiler.Compiler.generateClass(java.lang.String[]) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.JspCompilationContext.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so) org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.R equest, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
Re: New to Tomcat
root cause Error starting modern compiler org.apache.tools.ant.taskdefs.compilers.Javac13.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.compile() check that your JAVA_HOME points to a jdk, not a jre. It may be jasper compiler don't find a suitable java compiler. Btw, this is quite curious: /usr/lib/libjasper5-compiler-5.0.30.jar.so You should probably use the official tomcat release files available on apache.org to be sure it's not a distro related problem. Please also note 5.0.30 is a beta, latest 5.0.x tomcat stable version is 5.0.28 The .jar.so extension is . frightening :) Paul Stewart a écrit : Hi there... Running Fedora Core 4 and installed Tomcat via yum installs I'm trying to get Nutch search engine working and keep getting the following errors. I'm told by the nutch mailing list that this is a specific issue to Tomcat?? HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.compiler.DefaultErrorHandler.javacError(java.lang.Stri ng, java.lang.Exception) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.ErrorDispatcher.javacError(java.lang.String, java.lang.Exception) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.generateClass(java.lang.String[]) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.JspCompilationContext.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so) org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.R equest, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Reques t, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream) (/usr/lib/libtomcat-http11-5.0.30.jar.so) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object[]) (/usr/lib/libtomcat-http11-5.0.30.jar.so) org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object[]) (/tmp/libtomcat-util-5.0.30.jar.so9a2vfs.so) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.so9a2vfs.so) java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0) root cause Error starting modern compiler org.apache.tools.ant.taskdefs.compilers.Javac13.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.compile() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.jasper.compiler.Compiler.generateClass(java.lang.String[]) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.JspCompilationContext.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
Re: New to Tomcat
David Delbecq ha scritto: Btw, this is quite curious: /usr/lib/libjasper5-compiler-5.0.30.jar.so You should probably use the official tomcat release files available on apache.org to be sure it's not a distro related problem. Please also note 5.0.30 is a beta, latest 5.0.x tomcat stable version is 5.0.28 The .jar.so extension is . frightening :) It is compiled natively with GCJ, maybe this is the cause of his problem. Paul, try to use Tomcat with Sun's JVM and see if you have the same problem. Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New to Tomcat
I'm guess tomcat compiled into native code. I may wrong but in fedora5 all of Apache Jakarta Project and Apache Geronimo are compiled in native code. As for me it's a bad idea On 4/5/06, David Delbecq [EMAIL PROTECTED] wrote: root cause Error starting modern compiler org.apache.tools.ant.taskdefs.compilers.Javac13.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.compile() check that your JAVA_HOME points to a jdk, not a jre. It may be jasper compiler don't find a suitable java compiler. Btw, this is quite curious: /usr/lib/libjasper5-compiler-5.0.30.jar.so You should probably use the official tomcat release files available on apache.org to be sure it's not a distro related problem. Please also note 5.0.30 is a beta, latest 5.0.x tomcat stable version is 5.0.28 The .jar.so extension is . frightening :) Paul Stewart a écrit : Hi there... Running Fedora Core 4 and installed Tomcat via yum installs I'm trying to get Nutch search engine working and keep getting the following errors. I'm told by the nutch mailing list that this is a specific issue to Tomcat?? HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.compiler.DefaultErrorHandler.javacError(java.lang.Stri ng, java.lang.Exception) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.ErrorDispatcher.javacError(java.lang.String, java.lang.Exception) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.generateClass(java.lang.String[]) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.JspCompilationContext.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.H ttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServ letRequest, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so) org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.R equest, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Reques t, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream) (/usr/lib/libtomcat-http11-5.0.30.jar.so) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object[]) (/usr/lib/libtomcat-http11-5.0.30.jar.so) org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object[]) (/tmp/libtomcat-util-5.0.30.jar.so9a2vfs.so) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.so9a2vfs.so) java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0) root cause Error starting modern compiler org.apache.tools.ant.taskdefs.compilers.Javac13.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.compile() (/usr/lib/libant-1.6.2.jar.so) org.apache.tools.ant.taskdefs.Javac.execute() (/usr/lib/libant-1.6.2.jar.so) org.apache.jasper.compiler.Compiler.generateClass(java.lang.String[]) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile(boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.compiler.Compiler.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.JspCompilationContext.compile() (/usr/lib/libjasper5-compiler-5.0.30.jar.so) org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.H ttpServletRequest,
Re: Tomcat triggers ServletRequestListener twice per request...
Ah! I forgot about the stylesheet! Make perfect sense! Thanks! On 4/5/06, Tim Lucia [EMAIL PROTECTED] wrote: Or the HTML page has a stylesheet link or javascript link or an image tag or anything else. As Mark says, use a client tool to trace the requests from the browser. Tim -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 2:14 AM To: Tomcat Users List Subject: Re: Tomcat triggers ServletRequestListener twice per request... N G wrote: Hi, I have a regular HTML page and a ServletRequestListener. For some reason Tomcat invokes requestInitialized and requestDestroyed twice for every client request. In other words: requestInitialized requestDestroyed requestInitialized requestDestroyed Could someone explain to me why this is happening? I have NO Filters or MVC going on here. Just a regular HTML page. At a guess, the browser is making two requests. One for your page and one for favicon.ico Use ieHttpheaders (for IE) or Live Http Headers (for Firefox) to confirm this. Mark - 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] -- Thanks, NG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: Connecting Apache 2.2 and Tomcat 5.5.16
I believe that's it, although someone who knows more about the load balancing might know better. I built Apache 2.2.0 with the following configure arguments... --enable-ssl=shared --enable-proxy=shared --enable-proxy-ajp=shared ...which created the .so shared modules: mod_ssl, mod_proxy, and mod_proxy_ajp. Bernie Erik Gulliksen (maillist) wrote: For my contect I have a feeling I would need these modules; - mod_proxy - mod_proxy_ajp - mod_proxy_balancer - mod_ssl Anything else I need to set up? (And if so, why?) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem whith constructs of directories?
Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this context: Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / When i launch tomcat it return this error: 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Error filterStart 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Fall¾ en arranque del Contexto debido a errores previos and the context don't run. Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem whith constructs of directories?
Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:17 AM To: users@tomcat.apache.org Subject: Problem whith constructs of directories? Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this context: Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / When i launch tomcat it return this error: 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Error filterStart 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Fall¾ en arranque del Contexto debido a errores previos and the context don't run. Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. Ce message (ainsi que les eventuelles pieces jointes) est exclusivement adresse au destinataire et contient des informations confidentielles. La copie, la communication ou la distribution du contenu de ce message sans l'accord prealable de l'expediteur sont strictement interdits et peuvent constituer un delit. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. Si vous avez des questions se rapportant a ce courrier electronique, merci de bien vouloir notifier l'expediteur immediatement. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem whith constructs of directories?
Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:17 AM To: users@tomcat.apache.org Subject: Problem whith constructs of directories? Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this context: Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / When i launch tomcat it return this error: 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Error filterStart 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Fall¾ en arranque del Contexto debido a errores previos and the context don't run. Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. Ce message (ainsi que les eventuelles pieces jointes) est exclusivement adresse au destinataire et contient des informations confidentielles. La copie, la communication ou la distribution du contenu de ce message sans l'accord prealable de l'expediteur sont strictement interdits et peuvent constituer un delit. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. Si vous avez des questions se rapportant a ce courrier electronique, merci de bien vouloir notifier l'expediteur immediatement. - 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 whith constructs of directories?
The second error is expected because surely in your trunk folder you have'nt the web.xml Now, check out the sysout and syserror logs, is there additional info ? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:33 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:17 AM To: users@tomcat.apache.org Subject: Problem whith constructs of directories? Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this context: Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / When i launch tomcat it return this error: 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Error filterStart 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Fall¾ en arranque del Contexto debido a errores previos and the context don't run. Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. Ce message (ainsi que les eventuelles pieces jointes) est exclusivement adresse au destinataire et contient des informations confidentielles. La copie, la communication ou la distribution du contenu de ce message sans l'accord prealable de l'expediteur sont strictement interdits et peuvent constituer un delit. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. Si vous avez des questions se rapportant a ce courrier electronique, merci de bien vouloir notifier l'expediteur immediatement. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you
Caching Problem
Please see this problem. Thanks, Kishore. -Original Message- From: Pusukuri, Kishore_Kumar Sent: Wednesday, April 05, 2006 1:16 PM To: users@tomcat.apache.org Subject: Caching Problem Importance: High hi, We are using 'cname' to connect to a server to use a java servelet. We are getting the following exception if we move the code to some other server and the functionality related to that code in our web application is not working. Please help me to find the reason for this problem. If you want more information, please let me know. the exception: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:507) at java.net.Socket.connect(Socket.java:457) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:365) at sun.net.www.http.HttpClient.openServer(HttpClient.java:477) at sun.net.www.http.HttpClient.init(HttpClient.java:214) at sun.net.www.http.HttpClient.New(HttpClient.java:287) at sun.net.www.http.HttpClient.New(HttpClient.java:299) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConn ection.java:792) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnecti on.java:744) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.ja va:669) at deshaw.bizapps.wrs.webapps.UserInfo.handleRequest(UserInfo.java:104) at deshaw.bizapps.wrs.webapps.UserInfo.doGet(UserInfo.java:63) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:157) at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:147) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc essLogValve.java:481) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 5) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:731) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:526) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow erWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:684) at java.lang.Thread.run(Thread.java:595) [ 2006-04-03 12:05:52,555 [http-3366-Processor19] webapps.WRSUtils.getRemoteUserName():233 DEBUG]: NTL - 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: Caching Problem
Pusukuri, Kishore_Kumar ha scritto: We are getting the following exception if we move the code to some other server and the functionality related to that code in our web application is not working. the exception: java.net.ConnectException: Connection refused If you move your code onto another server and you try to connect to the old one, I think it's obvious that the new one has a different IP address! But maybe you wanted to write something else ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with jsp-examples/security/protected form-based login example
Hi! I noticed the following strange behaviour while playing with the form-based login example under http://localhost:8080/jsp-examples/security/protected/ on a freshly unpacked Tomcat core archive (tested with 5.0.28, 5.0.30beta and 5.5.16 under Linux and Windows with JDK 1.4.2, always identical behaviour): open http://localhost:8080/jsp-examples/security/protected/ - login.jsp displayed (OK) log in as tomcat/tomcat - You are logged in as remote user tomcat... (OK) log off by clicking here - login.jsp displayed (OK) log in in as foo/bar - Invalid username and/or password, please try again. (OK) click on try again - login.jsp displayed (OK) log in as tomcat/tomcat - login.jsp displayed (username and password reset) (STRANGE) log in as tomcat/tomcat - 404 error (VERY STRANGE) HTTP Status 404 - /jsp-examples/security/protected/j_security_check type Status report message /jsp-examples/security/protected/j_security_check description The requested resource (/jsp-examples/security/protected/j_security_check) is not available. Apache Tomcat/5.0.28 Could anybody please explain what is going on here? Configuration issue in web.xml? Bug in the j_security_check servlet? Bug in the login.jsp? Regards, Alex -- Alexander Frink Debeka Hauptverwaltung Abteilung IS/Q Ferdinand-Sauerbruch-Str. 18 56058 Koblenz Telefon (0261) 498-1455 Telefax (0261) 498-1496 E-Mail [EMAIL PROTECTED] Internet www.debeka.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem whith constructs of directories?
docBase value should be the upper level of WEB-INF directory? There is no more info on sysout and syserror logs. Which is the path of docBase so tomcat can understand the directory structure? Thanks in advance -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:38 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The second error is expected because surely in your trunk folder you have'nt the web.xml Now, check out the sysout and syserror logs, is there additional info ? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:33 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:17 AM To: users@tomcat.apache.org Subject: Problem whith constructs of directories? Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this context: Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / When i launch tomcat it return this error: 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Error filterStart 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Fall¾ en arranque del Contexto debido a errores previos and the context don't run. Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. Ce message (ainsi que les eventuelles pieces jointes) est exclusivement adresse au destinataire et contient des informations confidentielles. La copie, la communication ou la distribution du contenu de ce message sans l'accord prealable de l'expediteur sont strictement interdits et peuvent constituer un delit. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. Si vous avez des questions se rapportant a ce courrier electronique, merci de bien vouloir notifier l'expediteur immediatement. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments)
need inputs on connection pool
Hi, we are implementing the connection pooling in our application. connections are taken from the data source. After getting the connection i need to confirm whether i have to explictly close the connection like conn.close () i want to know in above case whether connection will be release to the pool or will get closed. i have a doubt as in above case the connection might be getting closed and might not be available for re-use. - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
need inputs on connection pool
Hi, we are implementing the connection pooling in our application. connections are taken from the data source. After getting the connection i need to confirm whether i have to explictly close the connection like conn.close () i want to know in above case whether connection will be release to the pool or will get closed. i have a doubt as in above case the connection might be getting closed and might not be available for re-use. - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
RE: need inputs on connection pool
It is always good practice to call the close methods on the Connection, Statement, PreparedStatement, ResultSet objects (if you use them). Depending on the connection pooling that you are using, they may or may not get released in a timely manner (for example, timeouts/etc). By explicitly calling the conn.close() method, you are telling the connection pooling manager that you are finished with this connection and it can immediately return the connection to the pool. -Original Message- From: Abh N [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:16 AM To: users@tomcat.apache.org Subject: need inputs on connection pool Hi, we are implementing the connection pooling in our application. connections are taken from the data source. After getting the connection i need to confirm whether i have to explictly close the connection like conn.close () i want to know in above case whether connection will be release to the pool or will get closed. i have a doubt as in above case the connection might be getting closed and might not be available for re-use. - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem whith constructs of directories?
The docBase should refer to where your jsps and/or html are. %docBase%/my.jsp /other.html /WEB-INF/lib /WEB-INF/classes /WEB-INF/web.xml Now, where are you declaring this context ? Into a context file inside %TOMCAT%/conf/Catalina/localhost/CoffeeNET.xml ?? Or in %TOMCAT%/conf/server.xml ?? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:06 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? docBase value should be the upper level of WEB-INF directory? There is no more info on sysout and syserror logs. Which is the path of docBase so tomcat can understand the directory structure? Thanks in advance -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:38 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The second error is expected because surely in your trunk folder you have'nt the web.xml Now, check out the sysout and syserror logs, is there additional info ? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:33 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:17 AM To: users@tomcat.apache.org Subject: Problem whith constructs of directories? Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this context: Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / When i launch tomcat it return this error: 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Error filterStart 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Fall¾ en arranque del Contexto debido a errores previos and the context don't run. Thank you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. Ce message (ainsi que les eventuelles pieces jointes) est exclusivement adresse au destinataire et contient des informations confidentielles. La copie, la communication ou la distribution du contenu de ce
Re: need inputs on connection pool
Calling close() on a pooled connection simply returns it to the pool, however, i have seen some cases where calling ti twice closes it for real. Don't do that. If you are interested in other options that eliminate that concern, you may want to try iBATIS - you would still use SQL, but it manages the connections, statements, resultsets, etc, and maps the results of the SQL to objects. Larry On 4/5/06, Abh N [EMAIL PROTECTED] wrote: Hi, we are implementing the connection pooling in our application. connections are taken from the data source. After getting the connection i need to confirm whether i have to explictly close the connection like conn.close () i want to know in above case whether connection will be release to the pool or will get closed. i have a doubt as in above case the connection might be getting closed and might not be available for re-use. - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: need inputs on connection pool
Thanks Marc. I was reading an article http://java.sun.com/developer/technicalArticles/J2EE/pooling/ it says with con.close() the connection will be released to connection pool in jdbc 2.0 , in 1.0 it will be closed with the stmt. Farrow, Marc [EMAIL PROTECTED] wrote: It is always good practice to call the close methods on the Connection, Statement, PreparedStatement, ResultSet objects (if you use them). Depending on the connection pooling that you are using, they may or may not get released in a timely manner (for example, timeouts/etc). By explicitly calling the conn.close() method, you are telling the connection pooling manager that you are finished with this connection and it can immediately return the connection to the pool. -Original Message- From: Abh N [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:16 AM To: users@tomcat.apache.org Subject: need inputs on connection pool Hi, we are implementing the connection pooling in our application. connections are taken from the data source. After getting the connection i need to confirm whether i have to explictly close the connection like conn.close () i want to know in above case whether connection will be release to the pool or will get closed. i have a doubt as in above case the connection might be getting closed and might not be available for re-use. - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
RE: Problem whith constructs of directories?
Is your IDE or your tomcat who create the CoffeeNet.xml in the catalina/localhost ? I recommend you use the CoffeeNet.xml in the catalina and delete the context from the server.xml The below folders structure MUST be kept, if your tomcat do not found the web.xml into your webapp, that context will never raise. -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:35 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? I have the context declaring in the server.xml but tomcat make a CoffeeNet.xml into /Catalina/localhost. When i delete the context into server.xml the error is the next: 05-abr-2006 17:30:12 org.apache.catalina.core.StandardHostDeployer install INFO: Procesando URL de archivo de configuraci¾n de Contexto file:C:\Tomcat\con\Catalina\localhost\CoffeeNet.xml 05-abr-2006 17:30:12 org.apache.catalina.startup.ContextConfig applicationConfi INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeNet] If you saw muy directories don't have the same path. Por example, classes and lib is out of WEB-INF. Thank you. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 17:21 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The docBase should refer to where your jsps and/or html are. %docBase%/my.jsp /other.html /WEB-INF/lib /WEB-INF/classes /WEB-INF/web.xml Now, where are you declaring this context ? Into a context file inside %TOMCAT%/conf/Catalina/localhost/CoffeeNET.xml ?? Or in %TOMCAT%/conf/server.xml ?? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 11:06 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? docBase value should be the upper level of WEB-INF directory? There is no more info on sysout and syserror logs. Which is the path of docBase so tomcat can understand the directory structure? Thanks in advance -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:38 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? The second error is expected because surely in your trunk folder you have'nt the web.xml Now, check out the sysout and syserror logs, is there additional info ? -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:33 AM To: 'Tomcat Users List' Subject: RE: Problem whith constructs of directories? Hola, gracias por la respuesta. Ahora lo tengo así Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk/src/webapp workDir=C:/CoffeeNET/RepositorioSVN/work / pero me sigue generando el mismo error. Si lo dejo así: Context path=/CoffeeNet reloadable=true docBase=C:/CoffeeNET/RepositorioSVN/trunk workDir=C:/CoffeeNET/RepositorioSVN/work / El error que me devuelve es el siguiente: 05-abr-2006 16:29:58 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Falta el archivo web.xml de la aplicaci¾nb. Utilizando los parßmetros por defecto StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CoffeeNet] Muchas gracias. -Mensaje original- De: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de abril de 2006 16:19 Para: Tomcat Users List Asunto: RE: Problem whith constructs of directories? Context docBase=C:\projects\MyApp path=/MyApp reloadable=true workDir=C:\projects\work\MyApp /Context Intenta unificando los slashs \ / y sin poner backslash al final en docBase Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / -Original Message- From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 10:17 AM To: users@tomcat.apache.org Subject: Problem whith constructs of directories? Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this
Re: Problem whith constructs of directories?
I'm not well versed in Eclipse, but wouldn't you really want to point your context at the top of the webapp structure in either build or bin? At least in NetBeans, there's a build/web folder with the whole webapp including libraries and compiled sources. Check RepositorioSVN/build or RepositorioSVN/bin for the expected web application structure similar to: +jsp +resources +WEB-INF -web.xml +classes +lib At that point all you would have to do is build the project and then start/stop the context from the manager webapp for testing. --David José María Tristán wrote: Hello: I have this directories in my project of eclipse: RepositorioSVN trunk src java resources webapp WEB-INF web.xml jasper jsp build lib bin In the server.xml of tomcat 5.29 I have this context: Context path=/CoffeeNet reloadable=true docBase=C:\CoffeeNET\RepositorioSVN\trunk\src\webapp\ workDir=C:\CoffeeNET\RepositorioSVN/work / When i launch tomcat it return this error: 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Error filterStart 05-abr-2006 16:14:41 org.apache.catalina.core.StandardContext start GRAVE: Fall¾ en arranque del Contexto debido a errores previos and the context don't run. Thank you very much. - 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]
JAAS Realm Help
Hi, Trying to get a custom login through a JAAS LoginModule. Got the authentication to work (confirmed thru println()), but get back a HTTP unauthorized error in the browser. Gets to the commit() of LoginModule, where I add a Principal based on the one role defined in tomcats web.xml ... same as SampleLoginModule example. How does authorization work in general once you have a authenticated user ? Ideally, don't want to list any users or Roles in *any* tomcat config file. Possible ? Thanks Background INfo === 1) Have a security-constraint in web.xml 2) Also have a auth-constraint, with one role 3) This role is also listed in security-role - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: connecting IIS and tomcat
dagd wrote: hi, excuse me for this post i'm a new user to Tomcat. At work they just give me the task to connect IIS 6.0 to Tomcat using isapi_redirect.dll. I'm using Win2003 server, Tomcat 5.0.28 and isapi_redirect.dll v1.2.14. I already did add keys to windows registry create workers.properties and uriworkermap.properties ajp12 is unsupported protocol (it works only with Tomcat 3). Also use 1.2.15 version. workers.properties worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 uriworkermap.properties /Base|/*=ajp13w Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache/1.3.33 - mod_jk/1.2.15 - tomcat 5.0.28 loses connection?
Kurt Overberg wrote: It seems that the number of connections between the apache and the tomcats just start escalating for some reason. mod_jk.log shows a ton (50) of these errors: Hard to tell without httpd.conf and server.xml. Two things you should know: 1. MaxClients shuld be = maxThreads 2. If you have MaxRequestsPerChild != 0 you must set connectionTimeout in server.xml If you have connectionTimeout in server.xml add connect_timeout=6 and prepost_timeout=6 to each worker (except loadbalancer). Also if you have a firewall between Apache Httpd and Tomcat use connect_timeout and prepost_timeout because the firewall can cut the inactive connections. Also add connectionTimeout that will reflect the firewall cut time. Anyhow AJP13 protocol is persistent, so if any part can close the socket (simple restart) the other one will not know about that, the socket will be half-closed and the connection count will rise until one part breaks down (usually Tomcat). To deal with that issues add connectionTimeout=60 (10 minutes) to server.xml and ... worker.xxx.connect_timeout=6 (1 minute) worker.xxx.prepost_timeout=6 (1 minute) The later will force so called PING/PONG packets to be send between web server and Tomcat. If the response packet is not received within the specified time the socket will be closed and the new one will be created. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lifecycle listener class loading problem
Then just for kicks, place it in the server/classes directory and also the shared/classes directory. -Original Message- From: Simon Watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 1:29 PM To: Tomcat Users List Subject: Re: Lifecycle listener class loading problem That's what I'm doing: If I put my listener class in common/classes then I get an error on startup: SEVERE: Begin event threw error java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener Putting the Listener tag in server.xml seems straightforward, and it's loading my listener class but is unable to load the server classes it depends on unless I put it in the server/classes directory. On 4/5/06, Farrow, Marc [EMAIL PROTECTED] wrote: I am not an expert on this, but here are my thoughts for what it is worth. You will need to place the class in the COMMON folder so both your webapps and TOMCAT itself can see it. However, you will have to dig through the docs on Tomcat and see what parameter (probably in the server.xml) file you will have to set to use your LifeCycleListener class instead of TOMCAT's. -Original Message- From: Simon Watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 12:29 PM To: users@tomcat.apache.org Subject: Lifecycle listener class loading problem I'm trying to implement a lifecycle listener to initialise and, more importantly, shutdown a resource that I wish to access from multiple webapps. If I put my listener class in common/classes then I get an error on startup: SEVERE: Begin event threw error java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener If I put the listener class in server/classes then the server starts up ok but the class can't be used by any webapps. Is there a way around this? To describe the bigger picture, I have a singleton class that is managing a resource via JNI that is required by several webapps. It's important that I can control the initialisation/shutdown of this resource. I've tried a shutdownhook and a finalize method but neither of these are invoked by Tomcat when it shuts down, hence my interest in a lifecycle listener. Because the resource is used across multiple webapps, the standard contextlistener approach won't work. I'm running Tomcat 5.5 as a Windows service. Any help/suggestions would be much appreciated. Simon. - 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: Lifecycle listener class loading problem
Again: If I put the listener class in server/classes then the server starts up ok but the class can't be used by any webapps. I guess what I'm asking is can I configure Tomcat to load my listener class in a way that my webapps can also have access to. On 4/5/06, Farrow, Marc [EMAIL PROTECTED] wrote: Then just for kicks, place it in the server/classes directory and also the shared/classes directory. -Original Message- From: Simon Watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 1:29 PM To: Tomcat Users List Subject: Re: Lifecycle listener class loading problem That's what I'm doing: If I put my listener class in common/classes then I get an error on startup: SEVERE: Begin event threw error java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener Putting the Listener tag in server.xml seems straightforward, and it's loading my listener class but is unable to load the server classes it depends on unless I put it in the server/classes directory. On 4/5/06, Farrow, Marc [EMAIL PROTECTED] wrote: I am not an expert on this, but here are my thoughts for what it is worth. You will need to place the class in the COMMON folder so both your webapps and TOMCAT itself can see it. However, you will have to dig through the docs on Tomcat and see what parameter (probably in the server.xml) file you will have to set to use your LifeCycleListener class instead of TOMCAT's. -Original Message- From: Simon Watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 12:29 PM To: users@tomcat.apache.org Subject: Lifecycle listener class loading problem I'm trying to implement a lifecycle listener to initialise and, more importantly, shutdown a resource that I wish to access from multiple webapps. If I put my listener class in common/classes then I get an error on startup: SEVERE: Begin event threw error java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener If I put the listener class in server/classes then the server starts up ok but the class can't be used by any webapps. Is there a way around this? To describe the bigger picture, I have a singleton class that is managing a resource via JNI that is required by several webapps. It's important that I can control the initialisation/shutdown of this resource. I've tried a shutdownhook and a finalize method but neither of these are invoked by Tomcat when it shuts down, hence my interest in a lifecycle listener. Because the resource is used across multiple webapps, the standard contextlistener approach won't work. I'm running Tomcat 5.5 as a Windows service. Any help/suggestions would be much appreciated. Simon. - 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: PostgreSQL access via JNDI
My mis-capitalization of DataSource was the main problem. Also, I was trying to use Resource and ResourceLink in META-INF/context.xml; ResourceLink is apparently not needed if the Resource is local to the webapp. Thank you both for your help! Mark On Apr 5, 2006, at 5:11 AM, Hadraba Petr wrote: Hi, I'm successfuly using PostgreSQL 8.1.3 with Tomcat 5.5.15 with JDBC drivers 405 (build)... I have the Resource ... / definition in the META-INF/context.xml and in the WEB-INF/web.xml I have the resource-ref/ element. The resource-env-ref/ I'm using for the ActiveMQ client connection. Also the JDBC drivers are placed in the common/lib directory. If you search the list, you will find my previous posts containing all the configuration files. Have a lot of fun! PETR On 4/5/06, Amila Suriarachchi [EMAIL PROTECTED] wrote: On 4/5/06, Mark Slater [EMAIL PROTECTED] wrote: I've been trying to get PostgreSQL set up to be accessed through JNDI in Tomcat 5.5.x. I found the docs page describing it, jndi- datasource-examples-howto.html, and followed the example there, but it still doesn't work. I'm trying to provide access to PostgreSQL for use by both JDO and JCR in my web-apps. Here's the Resource definition I'm using: Resource name=jdbc/whisper_db auth=Container type=javax.sql.Datasource S should be capital as well DataSource - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PostgreSQL access via JNDI
That is correct. ResourceLink is for linking in Global resources (DataSources, Environment Entries, etc) that are defined in the Server.xml file. -Original Message- From: Mark Slater [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 1:40 PM To: Tomcat Users List Subject: Re: PostgreSQL access via JNDI My mis-capitalization of DataSource was the main problem. Also, I was trying to use Resource and ResourceLink in META-INF/context.xml; ResourceLink is apparently not needed if the Resource is local to the webapp. Thank you both for your help! Mark On Apr 5, 2006, at 5:11 AM, Hadraba Petr wrote: Hi, I'm successfuly using PostgreSQL 8.1.3 with Tomcat 5.5.15 with JDBC drivers 405 (build)... I have the Resource ... / definition in the META-INF/context.xml and in the WEB-INF/web.xml I have the resource-ref/ element. The resource-env-ref/ I'm using for the ActiveMQ client connection. Also the JDBC drivers are placed in the common/lib directory. If you search the list, you will find my previous posts containing all the configuration files. Have a lot of fun! PETR On 4/5/06, Amila Suriarachchi [EMAIL PROTECTED] wrote: On 4/5/06, Mark Slater [EMAIL PROTECTED] wrote: I've been trying to get PostgreSQL set up to be accessed through JNDI in Tomcat 5.5.x. I found the docs page describing it, jndi- datasource-examples-howto.html, and followed the example there, but it still doesn't work. I'm trying to provide access to PostgreSQL for use by both JDO and JCR in my web-apps. Here's the Resource definition I'm using: Resource name=jdbc/whisper_db auth=Container type=javax.sql.Datasource S should be capital as well DataSource - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running two instances of tomcat
I've tried following the instructions below, and tried using service.bat, but either way I always end up with a small pop-up window with Application System ... in the title bar, and it says NonAlpha 45. Any clue what's going on here? David Nic Daniau wrote: OK here we go. What was said above is true but it's not all about the service, therefore the service.bat script is not enough to resolve the problem. If you read the nsi install script from the source, you can see everything that it does, and the setup of the service is just one thing. The tested procedure which I've used live is as follows: I assume you have installed tomcat under C:\tomcat-x1 with the intention to install C:\tomcat-x2, C:\tomcat-x3, etc.. The service names will be called TomcatX1, TomcatX2, TomcatX3, etc. The Display Names will be Apache Tomcat #1, Apache Tomcat #2, etc. And of course the ports will be configurred differently (I use for shutdown: 40051, 40052, etc., for http/1.1: 40801, 40802, etc. for ajp/1.3: 40091, 40092, etc.) First run the following after adapting to your environment: set TOMCAT_NO=1 set JAVA_HOME=C:\jdk1.5.0_03 set CATALINA_HOME=C:\tomcat-x1 As you can see %TOMCAT_NO% is the iterative number I give to the Tomcat install I'm dealing with. Then you can run %CATALINA_HOME%\bin\tomcat5.exe //DS//Tomcat5 as the service name is hardcoded Tomcat5 in the current tomcat dist. Then you're free to run: %CATALINA_HOME%\bin\tomcat5.exe //IS//TomcatX%TOMCAT_NO% --DisplayName Apache Tomcat #%TOMCAT_NO% --Description v5.5.16 --LogPath D:\logs\tomcat-x%TOMCAT_NO% --Install %CATALINA_HOME%\bin\tomcat5.exe --Jvm %JAVA_HOME%\jre\bin\server\jvm.dll --StartPath %CATALINA_HOME% --StopPath %CATALINA_HOME% --Startup auto --Classpath %CATALINA_HOME%\bin\bootstrap.jar --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop --StartMode jvm --StopMode jvm --JvmOptions - Dcatalina.home=%CATALINA_HOME%#-Dcatalina.base=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed#-Djava.io.tmpdir=%CATALINA_HOME%\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties --StdOutput auto --StdError auto (my logs go to a specially created folder on another drive D:/logs/tomcat-x1) This was inspired by the .nsi script, which to my mind is more reliable than the service.bat one. But that's not all. You need to edit the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5 - rename it to HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\#1 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 5.5 - rename it to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat #1 and change DisplayName value to Apache Tomcat #1 (remove only) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run - remove entry ApacheTomcatMonitor (yes: DELETE, you can always access the monitor with the menu, it's not needed in the tray esp. if you have many tomcats) And lastly, the menu in Program that has been created has also been hardcoded, so change Start / All Programs / Apache Tomcat 5.5 menu entry to Apache Tomcat #1and change the targets for Configure and Monitor (replace ..//Tomcat5 by ..//TomcatX1). Thar's where you can start the monitor for each tomcat if you really want to (IMHO you wont) That's it and it works like a charm! Don't take my word for it have a look into the .nsi script and you will see for yourself there is nothing else. Just a note if you need to unsistall, do a regular uninstallation followed by: - delete registry key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\#1 - delete registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat #1 - remove Start / All Programs / Apache Tomcat #1 menu entry HTH Nic On 22/03/06, Jim the Standing Bear [EMAIL PROTECTED] wrote: Thanks, Chuck. I will take a closer look at RUNNING.txt. However, i still think there is something else causing our problems.. We installed two copies of the tomcat code, one running at root, and the other running as a regular user. Now, even if the ports were conflicting, it would prevent one instance from being launched, instead of killing another instance, would it? At one time when i was playing with it on a testing platform (also linux), the launching of the 2nd instance of tomcat 5.5 even killed a running tomcat 4.1.31! It was incredible :P -- Jim On 3/22/06, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Jim the Standing Bear [mailto:[EMAIL PROTECTED] Subject: Re: running two instances of tomcat Is there anything special we need to configure to allow the co-existence (other than the port numbers)? That should be it, just make sure yout get _all_ the ports. By default, there are three for each
RE: need inputs on connection pool
You'll have to release the connection to the pool and _NOT_ close the connection. It's something like this : * Create a resource pool that maintains the pool * release the resource from the pool upon request ( if the resource Is already there in the pool and can be utilized ) * Else create a resource ( if the resource pool limit is not reached ) upon request and once the resource is used, _RELEASE_ it to the pool and _NOT_CLOSE_ the connection. * Else wait for a resource to be released from one of the threads ( this is tricky, say there's a DB resource leak and all the resources in the pool are leaks, then you'll run into a freeze. Your waiting thread will have to wait indefinitely for a DB resource to be released while they are actually leaks ) Hope this helps. Lenin -Original Message- From: Abh N [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 8:16 AM To: users@tomcat.apache.org Subject: need inputs on connection pool Hi, we are implementing the connection pooling in our application. connections are taken from the data source. After getting the connection i need to confirm whether i have to explictly close the connection like conn.close () i want to know in above case whether connection will be release to the pool or will get closed. i have a doubt as in above case the connection might be getting closed and might not be available for re-use. - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why Mozilla sends 2 more requests if the respond is an image
Hi, I have a Java Servlet which returns an image for each request. But when I use mozilla to access that Java Servlet, it also sends 2 more requests after it get the respond image back. Can you pleae tell me why? Here is the http log from live http header extension? http://localhost:8080/myWAR/MyServlet?a=1 GET /myWAR/MyServlet?a=1 HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Server: Apache-Coyote/1.1 Content-Type: image/png Content-Length: 45542 Date: Mon, 03 Apr 2006 02:43:13 GMT -- http://localhost:8080/myWAR/MyServlet?a=1 GET /myWAR/MyServlet?a=1 HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text Accept: image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Server: Apache-Coyote/1.1 Content-Length: 0 Date: Mon, 03 Apr 2006 02:43:13 GMT -- http://localhost:8080/myWAR/MyServlet?a=1 GET /myWAR/MyServlet?a=1 HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Server: Apache-Coyote/1.1 Content-Length: 0 Date: Mon, 03 Apr 2006 02:43:13 GMT -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Out of Memory problem
Hello Tomcat Users, When our web application runs overnight on Tomcat 5.0.19 we get the following error. I searched on the Tomcat Users and Developers Mailing list archives on nabble but did not find any mention of this problem. Anyone seen this before ? SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:16:55 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:17:08 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:17:47 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:17:58 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:09 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:21 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:32 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:43 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:19:37 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:19:47 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:19:59 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Bindu Variam EMail [EMAIL PROTECTED] Bindu Variam Phone(714) 445 5680 Fax(714)784 4485 EMail [EMAIL PROTECTED]
Re: running two instances of tomcat
service name must be A-Za-z0-9 (no space no _ or any funky character) On 05/04/06, David Rush [EMAIL PROTECTED] wrote: I've tried following the instructions below, and tried using service.bat, but either way I always end up with a small pop-up window with Application System ... in the title bar, and it says NonAlpha 45. Any clue what's going on here? David Nic Daniau wrote: OK here we go. What was said above is true but it's not all about the service, therefore the service.bat script is not enough to resolve the problem. If you read the nsi install script from the source, you can see everything that it does, and the setup of the service is just one thing. The tested procedure which I've used live is as follows: I assume you have installed tomcat under C:\tomcat-x1 with the intention to install C:\tomcat-x2, C:\tomcat-x3, etc.. The service names will be called TomcatX1, TomcatX2, TomcatX3, etc. The Display Names will be Apache Tomcat #1, Apache Tomcat #2, etc. And of course the ports will be configurred differently (I use for shutdown: 40051, 40052, etc., for http/1.1: 40801, 40802, etc. for ajp/1.3: 40091, 40092, etc.) First run the following after adapting to your environment: set TOMCAT_NO=1 set JAVA_HOME=C:\jdk1.5.0_03 set CATALINA_HOME=C:\tomcat-x1 As you can see %TOMCAT_NO% is the iterative number I give to the Tomcat install I'm dealing with. Then you can run %CATALINA_HOME%\bin\tomcat5.exe //DS//Tomcat5 as the service name is hardcoded Tomcat5 in the current tomcat dist. Then you're free to run: %CATALINA_HOME%\bin\tomcat5.exe //IS//TomcatX%TOMCAT_NO% --DisplayName Apache Tomcat #%TOMCAT_NO% --Description v5.5.16 --LogPath D:\logs\tomcat-x%TOMCAT_NO% --Install %CATALINA_HOME%\bin\tomcat5.exe --Jvm %JAVA_HOME%\jre\bin\server\jvm.dll --StartPath %CATALINA_HOME% --StopPath %CATALINA_HOME% --Startup auto --Classpath %CATALINA_HOME%\bin\bootstrap.jar --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop --StartMode jvm --StopMode jvm --JvmOptions - Dcatalina.home=%CATALINA_HOME%#-Dcatalina.base=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed#-Djava.io.tmpdir=%CATALINA_HOME%\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties --StdOutput auto --StdError auto (my logs go to a specially created folder on another drive D:/logs/tomcat-x1) This was inspired by the .nsi script, which to my mind is more reliable than the service.bat one. But that's not all. You need to edit the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5 - rename it to HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\#1 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 5.5 - rename it to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat #1 and change DisplayName value to Apache Tomcat #1 (remove only) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run - remove entry ApacheTomcatMonitor (yes: DELETE, you can always access the monitor with the menu, it's not needed in the tray esp. if you have many tomcats) And lastly, the menu in Program that has been created has also been hardcoded, so change Start / All Programs / Apache Tomcat 5.5 menu entry to Apache Tomcat #1and change the targets for Configure and Monitor (replace ..//Tomcat5 by ..//TomcatX1). Thar's where you can start the monitor for each tomcat if you really want to (IMHO you wont) That's it and it works like a charm! Don't take my word for it have a look into the .nsi script and you will see for yourself there is nothing else. Just a note if you need to unsistall, do a regular uninstallation followed by: - delete registry key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\#1 - delete registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat #1 - remove Start / All Programs / Apache Tomcat #1 menu entry HTH Nic On 22/03/06, Jim the Standing Bear [EMAIL PROTECTED] wrote: Thanks, Chuck. I will take a closer look at RUNNING.txt. However, i still think there is something else causing our problems.. We installed two copies of the tomcat code, one running at root, and the other running as a regular user. Now, even if the ports were conflicting, it would prevent one instance from being launched, instead of killing another instance, would it? At one time when i was playing with it on a testing platform (also linux), the launching of the 2nd instance of tomcat 5.5 even killed a running tomcat 4.1.31! It was incredible :P -- Jim On 3/22/06, Caldarale, Charles R [EMAIL
Re: Apache/1.3.33 - mod_jk/1.2.15 - tomcat 5.0.28 loses connection?
Mladen, Thank you for this excellent information, it sounds like exactly what I needed- some context for those parameters. One last question with regards to setting connectionTimeout=xx in my server.xml. I'm using tomcat5.0.28- judging by the docs at http://tomcat.apache.org/tomcat-5.0-doc/config/ajp.html ...that parameter doesn't exist (it does exist, though, in the 5.5 docs). Am I just SOL on that parameter because I'm using 5.0.28? Many thanks again... /kurt Mladen Turk wrote: Kurt Overberg wrote: It seems that the number of connections between the apache and the tomcats just start escalating for some reason. mod_jk.log shows a ton (50) of these errors: Hard to tell without httpd.conf and server.xml. Two things you should know: 1. MaxClients shuld be = maxThreads 2. If you have MaxRequestsPerChild != 0 you must set connectionTimeout in server.xml If you have connectionTimeout in server.xml add connect_timeout=6 and prepost_timeout=6 to each worker (except loadbalancer). Also if you have a firewall between Apache Httpd and Tomcat use connect_timeout and prepost_timeout because the firewall can cut the inactive connections. Also add connectionTimeout that will reflect the firewall cut time. Anyhow AJP13 protocol is persistent, so if any part can close the socket (simple restart) the other one will not know about that, the socket will be half-closed and the connection count will rise until one part breaks down (usually Tomcat). To deal with that issues add connectionTimeout=60 (10 minutes) to server.xml and ... worker.xxx.connect_timeout=6 (1 minute) worker.xxx.prepost_timeout=6 (1 minute) The later will force so called PING/PONG packets to be send between web server and Tomcat. If the response packet is not received within the specified time the socket will be closed and the new one will be created. Regards, Mladen. - 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: Diagnosing DBCP JDBC connection leak using removeAbandoned parm - short version
I'm still curious about the crazy logAbandoned messages - not sure how to interpret or rely on them. I'll try a again with a briefer posting - maybe I was too detailed in the original post. We are getting strange (erroneous?) messages because of the logAbandoned parameter: 1) The dates look like they are from lalaland (e.g. a date of April 34,2006 in the second line below). Maybe I do not understand how remove abandoned is working - the timeout is supposed to start once a connection is determined to be idle. 2) Second the abandoned objects do not appear to be in order - they jump from 10:23 to 13:34, 13:01, 13:35, back to 10:29 (see below). Here is an extract/grep from our catalina.out: DBCP object created 2006-23-04 10:23:35 by the following code was never closed: DBCP object created 2006-34-04 13:34:55 by the following code was never closed: DBCP object created 2006-01-04 13:01:49 by the following code was never closed: DBCP object created 2006-35-04 13:35:00 by the following code was never closed: DBCP object created 2006-29-04 10:29:21 by the following code was never closed: DBCP object created 2006-36-04 13:36:39 by the following code was never closed: DBCP object created 2006-23-04 10:23:35 by the following code was never closed: DBCP object created 2006-36-04 13:36:43 by the following code was never closed: DBCP object created 2006-01-04 13:01:49 by the following code was never closed: DBCP object created 2006-36-04 13:36:56 by the following code was never closed: DBCP object created 2006-40-04 13:40:30 by the following code was never closed: DBCP object created 2006-15-04 15:15:02 by the following code was never closed: DBCP object created 2006-15-04 15:15:02 by the following code was never closed: DBCP object created 2006-11-04 14:11:46 by the following code was never closed: DBCP object created 2006-00-04 16:00:01 by the following code was never closed: DBCP object created 2006-00-04 16:00:01 by the following code was never closed: DBCP object created 2006-39-04 13:39:55 by the following code was never closed: DBCP object created 2006-00-04 16:00:02 by the following code was never closed: DBCP object created 2006-00-04 16:00:02 by the following code was never closed: DBCP object created 2006-11-04 14:11:46 by the following code was never closed: DBCP object created 2006-26-04 16:26:18 by the following code was never closed: DBCP object created 2006-26-04 16:26:18 by the following code was never closed: DBCP object created 2006-26-04 16:26:18 by the following code was never closed: And, here's the relevant portion of our server.xml: Host name=acme.com debug=0 autoDeploy=false appBase=/home/httpd/vhosts/acme.com Aliaswww.acme.com/Alias Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=acme.com_log. suffix=.txt timestamp=true/ Context path= docBase=httpdocs reloadable=true debug=0 Resource name=jdbc/acme.com auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/acme.com parameter nameurl/name valuejdbc:mysql://localhost/acme?autoReconnect=trueamp;zeroDateTimeBehavi or=convertToNullamp;noDatetimeStringSync=true/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameusername/name valueacme/value /parameter parameter namepassword/name valuesecret/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context /Host - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Diagnosing DBCP JDBC connection leak using removeAbandoned parm
Marc, Thank you - We are using a recent version of the MySQL Connector/J (3.1.10), but maybe that does not mean anything. - Richard -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 4:44 AM To: Tomcat Users List Subject: RE: Diagnosing DBCP JDBC connection leak using removeAbandoned parm Can you change your code to something similar to below? I have seen issues with certain implementations of database drivers in which the JDBC interfaces are not being implemented/coded properly. Just remember that the order you call your close statements does matter (although yours looked correct). Hth Marc Connection conn = new Connector().CreateConnection(); Statement stmt=null; ResultSet rset=null; try { String open_total = -100; stmt = conn.createStatement(); rset = stmt.executeQuery (select count(OPEN_MAIL_MEMBER_ID) from OPEN_MAIL where OPEN_MAIL_MEMBER_ID=+memberid); while (rset.next()) { open_total = rset.getString(1); } stmt = conn.createStatement(); stmt.executeUpdate (update EMAIL_ADDR set OPEN_MAIL_TOTAL=+open_total+ where EMAIL_ADDR_ID=+memberid); rset.close(); rset = null; stmt.close(); stmt = null; conn.close(); conn = null; } catch (Exception e) { SharedUtilities.logError(e); } finally { try { if (rset != null) { rset.close(); } catch (SQLException e) { //Exception ignored } try { if (stmt != null) { stmt.close(); } catch (SQLException e) { //Exception ignored } try { if (conn != null) { conn.close(); } catch (SQLException e) { //Exception ignored } } -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 04, 2006 10:57 PM To: users@tomcat.apache.org Subject: Diagnosing DBCP JDBC connection leak using removeAbandoned parm Bear with me, I'll try to make this short, but want to give enough info/background that it makes sense. Basically we are a bit confused by the output of the DBCP logAbandoned parameter. Any help is appreciated. Environment: We are using Tomcat 4.1.18 (for now), MySQL 4.0.18, Java 1.5.0_04-b05, all running under Linux kernel 2.4.22-1.2115.nptlsmp on a dual Xeon dedicated server. Anyway, we determined that we had a connection leak when our application froze today. We obtained a thread dump and it showed that everyone of the Tomcat threads that were running application code, were waiting to get a connection from the DBCP pool. Each process looked something like this in the thread dump: Thread-171 daemon prio=1 tid=0x8a88a528 nid=0x46e9 in Object.wait() [0x9559f000..0x955a0700] at java.lang.Object.wait(Native Method) - waiting on 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at java.lang.Object.wait(Object.java:474) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source) - locked 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool .java:117) - locked 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:110) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3 12) at com.acme.Connector.CreateConnection(Connector.java:56) at com.acme.OpenMailData.insert(OpenMailData.java:282) at com.acme.trackopenmail.doPost(trackopenmail.java:127) at com.acme.trackopenmail.doGet(trackopenmail.java:65) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at
Re: Problem starting tomcat with jsvc cron job
--- Peter Neu [EMAIL PROTECTED] wrote: Hello, I'm stopping restarting tomcat ervery night with a cron job. I do this because we have many applications running and sometimes we need to simply clean the system. The cron job invokes a shell script which then starts tomcat with jsvc. Up to now this worked fine. But now tomcat does not restart again and I get this confusing error message: -catalina.out-- jsvc.exec error: Service exit with a return value of 143 Apr 5, 2006 12:45:00 AM org.apache.catalina.startup.Catalina load WARNING: Can't load server.xml Either permission problem or CATALINA_HOME not set. --shell-script JAVA_HOME1=/usr/local/jdk1.5.0_04 CATALINA_HOME=/usr/local/jakarta-tomcat-5.5.9 DAEMON_BIN=/usr/local/jakarta-tomcat-5.5.9/bin/jsvc TOMCAT_USER=root TMP_DIR=/var/tmp CATALINA_OPTS=-Xmx2048m -Xms1536m CLASSPATH=/usr/local/java/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar case $1 in start) # # Start Tomcat # $DAEMON_BIN \ -user $TOMCAT_USER \ -home $JAVA_HOME1 \ -Dcatalina.home=$CATALINA_HOME \ This should have done it. I'd check permissions. Nix. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running two instances of tomcat
Aha. That did the trick. Thanks! David Nic Daniau wrote: service name must be A-Za-z0-9 (no space no _ or any funky character) On 05/04/06, David Rush [EMAIL PROTECTED] wrote: I've tried following the instructions below, and tried using service.bat, but either way I always end up with a small pop-up window with Application System ... in the title bar, and it says NonAlpha 45. Any clue what's going on here? David Nic Daniau wrote: OK here we go. What was said above is true but it's not all about the service, therefore the service.bat script is not enough to resolve the problem. If you read the nsi install script from the source, you can see everything that it does, and the setup of the service is just one thing. The tested procedure which I've used live is as follows: I assume you have installed tomcat under C:\tomcat-x1 with the intention to install C:\tomcat-x2, C:\tomcat-x3, etc.. The service names will be called TomcatX1, TomcatX2, TomcatX3, etc. The Display Names will be Apache Tomcat #1, Apache Tomcat #2, etc. And of course the ports will be configurred differently (I use for shutdown: 40051, 40052, etc., for http/1.1: 40801, 40802, etc. for ajp/1.3: 40091, 40092, etc.) First run the following after adapting to your environment: set TOMCAT_NO=1 set JAVA_HOME=C:\jdk1.5.0_03 set CATALINA_HOME=C:\tomcat-x1 As you can see %TOMCAT_NO% is the iterative number I give to the Tomcat install I'm dealing with. Then you can run %CATALINA_HOME%\bin\tomcat5.exe //DS//Tomcat5 as the service name is hardcoded Tomcat5 in the current tomcat dist. Then you're free to run: %CATALINA_HOME%\bin\tomcat5.exe //IS//TomcatX%TOMCAT_NO% --DisplayName Apache Tomcat #%TOMCAT_NO% --Description v5.5.16 --LogPath D:\logs\tomcat-x%TOMCAT_NO% --Install %CATALINA_HOME%\bin\tomcat5.exe --Jvm %JAVA_HOME%\jre\bin\server\jvm.dll --StartPath %CATALINA_HOME% --StopPath %CATALINA_HOME% --Startup auto --Classpath %CATALINA_HOME%\bin\bootstrap.jar --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop --StartMode jvm --StopMode jvm --JvmOptions - Dcatalina.home=%CATALINA_HOME%#-Dcatalina.base=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed#-Djava.io.tmpdir=%CATALINA_HOME%\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties --StdOutput auto --StdError auto (my logs go to a specially created folder on another drive D:/logs/tomcat-x1) This was inspired by the .nsi script, which to my mind is more reliable than the service.bat one. But that's not all. You need to edit the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5 - rename it to HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\#1 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 5.5 - rename it to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat #1 and change DisplayName value to Apache Tomcat #1 (remove only) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run - remove entry ApacheTomcatMonitor (yes: DELETE, you can always access the monitor with the menu, it's not needed in the tray esp. if you have many tomcats) And lastly, the menu in Program that has been created has also been hardcoded, so change Start / All Programs / Apache Tomcat 5.5 menu entry to Apache Tomcat #1and change the targets for Configure and Monitor (replace ..//Tomcat5 by ..//TomcatX1). Thar's where you can start the monitor for each tomcat if you really want to (IMHO you wont) That's it and it works like a charm! Don't take my word for it have a look into the .nsi script and you will see for yourself there is nothing else. Just a note if you need to unsistall, do a regular uninstallation followed by: - delete registry key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\#1 - delete registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat #1 - remove Start / All Programs / Apache Tomcat #1 menu entry HTH Nic On 22/03/06, Jim the Standing Bear [EMAIL PROTECTED] wrote: Thanks, Chuck. I will take a closer look at RUNNING.txt. However, i still think there is something else causing our problems.. We installed two copies of the tomcat code, one running at root, and the other running as a regular user. Now, even if the ports were conflicting, it would prevent one instance from being launched, instead of killing another instance, would it? At one time when i was playing with it on a testing platform (also linux), the launching of the 2nd
Re: need inputs on connection pool
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Out of Memory problem
Your web application has a memory and/or resource leak. Run a profiler to see what code is not releasing references to objects, closing files, etc., Given you've already said this happens overnight, you might want to start your analysis with the background process you have running. --David Bindu Variam wrote: Hello Tomcat Users, When our web application runs overnight on Tomcat 5.0.19 we get the following error. I searched on the Tomcat Users and Developers Mailing list archives on nabble but did not find any mention of this problem. Anyone seen this before ? SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:16:55 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:17:08 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:17:47 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:17:58 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:09 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:21 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:32 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:18:43 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:19:37 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:19:47 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Apr 5, 2006 2:19:59 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.OutOfMemoryError Bindu Variam EMail [EMAIL PROTECTED] Bindu Variam Phone(714) 445 5680 Fax(714)784 4485 EMail [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Character behaviour Unix vs Windows �
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.16 tried to start context when shutting down
For some reason, when I shut down my tomcat app, via commandline or the service, it tries to re-init my app. Has anyone seen this happen to them? I can't seem to find anything in the archives about it. Thanks, -C-
Re: Diagnosing DBCP JDBC connection leak using removeAbandoned parm
Sorry, I didn't take a very close look at this when you originally posted it. Taking a look at your original code: Connection conn = new Connector().CreateConnection(); Statement stmt=null; ResultSet rset=null; try { String open_total = -100; stmt = conn.createStatement(); rset = stmt.executeQuery (select count(OPEN_MAIL_MEMBER_ID) from OPEN_MAIL where OPEN_MAIL_MEMBER_ID=+memberid); while (rset.next()) { open_total = rset.getString(1); } stmt = conn.createStatement(); stmt.executeUpdate (update EMAIL_ADDR set OPEN_MAIL_TOTAL=+open_total+ where EMAIL_ADDR_ID=+memberid); } catch (Exception e) { SharedUtilities.logError(e); } finally { try { rset.close(); stmt.close(); conn.close(); } catch (Exception e) { SharedUtilities.logError(e); } } Shot in the dark here, but you might want to try explicitly closing your result set and first statement before attempting to open a new statement. Either that or use a different variable for your second statement and then close them both in the finally block. --David Richard Mixon wrote: Marc, Thank you - We are using a recent version of the MySQL Connector/J (3.1.10), but maybe that does not mean anything. - Richard -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 4:44 AM To: Tomcat Users List Subject: RE: Diagnosing DBCP JDBC connection leak using removeAbandoned parm Can you change your code to something similar to below? I have seen issues with certain implementations of database drivers in which the JDBC interfaces are not being implemented/coded properly. Just remember that the order you call your close statements does matter (although yours looked correct). Hth Marc Connection conn = new Connector().CreateConnection(); Statement stmt=null; ResultSet rset=null; try { String open_total = -100; stmt = conn.createStatement(); rset = stmt.executeQuery (select count(OPEN_MAIL_MEMBER_ID) from OPEN_MAIL where OPEN_MAIL_MEMBER_ID=+memberid); while (rset.next()) { open_total = rset.getString(1); } stmt = conn.createStatement(); stmt.executeUpdate (update EMAIL_ADDR set OPEN_MAIL_TOTAL=+open_total+ where EMAIL_ADDR_ID=+memberid); rset.close(); rset = null; stmt.close(); stmt = null; conn.close(); conn = null; } catch (Exception e) { SharedUtilities.logError(e); } finally { try { if (rset != null) { rset.close(); } catch (SQLException e) { //Exception ignored } try { if (stmt != null) { stmt.close(); } catch (SQLException e) { //Exception ignored } try { if (conn != null) { conn.close(); } catch (SQLException e) { //Exception ignored } } -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 04, 2006 10:57 PM To: users@tomcat.apache.org Subject: Diagnosing DBCP JDBC connection leak using removeAbandoned parm Bear with me, I'll try to make this short, but want to give enough info/background that it makes sense. Basically we are a bit confused by the output of the DBCP logAbandoned parameter. Any help is appreciated. Environment: We are using Tomcat 4.1.18 (for now), MySQL 4.0.18, Java 1.5.0_04-b05, all running under Linux kernel 2.4.22-1.2115.nptlsmp on a dual Xeon dedicated server. Anyway, we determined that we had a connection leak when our application froze today. We obtained a thread dump and it showed that everyone of the Tomcat threads that were running application code, were waiting to get a connection from the DBCP pool. Each process looked something like this in the thread dump: Thread-171 daemon prio=1 tid=0x8a88a528 nid=0x46e9 in Object.wait() [0x9559f000..0x955a0700] at java.lang.Object.wait(Native Method) - waiting on 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at java.lang.Object.wait(Object.java:474) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source) - locked 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool .java:117) - locked 0x4a08cb78 (a org.apache.commons.dbcp.AbandonedObjectPool) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:110) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3 12) at com.acme.Connector.CreateConnection(Connector.java:56) at com.acme.OpenMailData.insert(OpenMailData.java:282) at com.acme.trackopenmail.doPost(trackopenmail.java:127) at com.acme.trackopenmail.doGet(trackopenmail.java:65) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
Re: Diagnosing DBCP JDBC connection leak using removeAbandoned parm - short version
#1 Could be a logging bug. Notice how the day is always the same as the minute. On 4/5/06, Richard Mixon [EMAIL PROTECTED] wrote: I'm still curious about the crazy logAbandoned messages - not sure how to interpret or rely on them. I'll try a again with a briefer posting - maybe I was too detailed in the original post. We are getting strange (erroneous?) messages because of the logAbandoned parameter: 1) The dates look like they are from lalaland (e.g. a date of April 34,2006 in the second line below). Maybe I do not understand how remove abandoned is working - the timeout is supposed to start once a connection is determined to be idle. 2) Second the abandoned objects do not appear to be in order - they jump from 10:23 to 13:34, 13:01, 13:35, back to 10:29 (see below). Here is an extract/grep from our catalina.out: DBCP object created 2006-23-04 10:23:35 by the following code was never closed: DBCP object created 2006-34-04 13:34:55 by the following code was never closed: DBCP object created 2006-01-04 13:01:49 by the following code was never closed: DBCP object created 2006-35-04 13:35:00 by the following code was never closed: DBCP object created 2006-29-04 10:29:21 by the following code was never closed: DBCP object created 2006-36-04 13:36:39 by the following code was never closed: DBCP object created 2006-23-04 10:23:35 by the following code was never closed: DBCP object created 2006-36-04 13:36:43 by the following code was never closed: DBCP object created 2006-01-04 13:01:49 by the following code was never closed: DBCP object created 2006-36-04 13:36:56 by the following code was never closed: DBCP object created 2006-40-04 13:40:30 by the following code was never closed: DBCP object created 2006-15-04 15:15:02 by the following code was never closed: DBCP object created 2006-15-04 15:15:02 by the following code was never closed: DBCP object created 2006-11-04 14:11:46 by the following code was never closed: DBCP object created 2006-00-04 16:00:01 by the following code was never closed: DBCP object created 2006-00-04 16:00:01 by the following code was never closed: DBCP object created 2006-39-04 13:39:55 by the following code was never closed: DBCP object created 2006-00-04 16:00:02 by the following code was never closed: DBCP object created 2006-00-04 16:00:02 by the following code was never closed: DBCP object created 2006-11-04 14:11:46 by the following code was never closed: DBCP object created 2006-26-04 16:26:18 by the following code was never closed: DBCP object created 2006-26-04 16:26:18 by the following code was never closed: DBCP object created 2006-26-04 16:26:18 by the following code was never closed: And, here's the relevant portion of our server.xml: Host name=acme.com debug=0 autoDeploy=false appBase=/home/httpd/vhosts/acme.com Aliaswww.acme.com/Alias Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=acme.com_log. suffix=.txt timestamp=true/ Context path= docBase=httpdocs reloadable=true debug=0 Resource name=jdbc/acme.com auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/acme.com parameter nameurl/name valuejdbc:mysql://localhost/acme?autoReconnect=trueamp;zeroDateTimeBehavi or=convertToNullamp;noDatetimeStringSync=true/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameusername/name valueacme/value /parameter parameter namepassword/name valuesecret/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context /Host - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.16 tried to start context when shutting down
it could be happening because tomcat did not shutdown within some 'timeout' time, in which case it appears to do a 180 and try to start back up. did you see any 'cannot shutdown' messaged in log? -nikita Cord Awtry wrote: For some reason, when I shut down my tomcat app, via commandline or the service, it tries to re-init my app. Has anyone seen this happen to them? I can't seem to find anything in the archives about it. Thanks, -C- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Moving from Tomcat 4.1.29 to 4.1.31 on Macintosh 10.4.6
Greetings... As the subject suggests, I am looking to move from Tomcat 4.1.29 to 4.1.31 on a Macintosh G5 server running OS 10.4.6. Normally I believe that this would simply require that the 4.1.31 binary be extracted to the Tomcat directory on the server. The problem is that this server is running a library database that depends upon Tomcat... so there are files and directories in the Tomcat directory that are unique to this install and so cannot be overwritten. As I compare files in the 4.1.29 and 4.1.31 distributions it appears that there are several files that are exactly the same. So Which files are unique to the 4.1.31 distribution? Would moving just those unique files effectively accomplish what I am trying to do (move to 4.1.31)? Suggestions are appreciated. Tony Andrews - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
System.setProperty/System.getProperty
Is there an easy way within Tomcat to set System properties so that all webapps have access to them at startup? Basically, I would like to add my own properties to the System object at startup as opposed to using environment entries. Maybe I am over thinking things. Or better yet, what is the best way to use Resource Locales per O.S.? We test/deploy on win2k but have live server of OpenVMS. The main reason I need this is because File I/O is a lot different between the platforms. Thanks, Marc
RE: System.setProperty/System.getProperty
Wow. OpenVMS is still in existence? And it has a JVM? Double Wow! How come the I/O is different? Shouldn't Java handle that for you? Tim (Former DECcie, 1988-1997) -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:03 PM To: [EMAIL PROTECTED] Apache. Org (E-mail) Subject: System.setProperty/System.getProperty Is there an easy way within Tomcat to set System properties so that all webapps have access to them at startup? Basically, I would like to add my own properties to the System object at startup as opposed to using environment entries. Maybe I am over thinking things. Or better yet, what is the best way to use Resource Locales per O.S.? We test/deploy on win2k but have live server of OpenVMS. The main reason I need this is because File I/O is a lot different between the platforms. Thanks, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bad gateway 502 error trying to reach external URL through proxy
Hi, this is my first post and I'm killing myself trying to resolve this. I hope someone can shed some light... I've got a JSP and I'm simply trying to connect to an external URL from behind our corporate firewall going through a proxy. The reason I'm so confused is this works flawlessly with Jrun4, but I'm porting it over to Tomcat 5.5.15 (yay!). Jrun and Tomcat are on the same machine and are using jre1.5.0_06. The Tomcat install is pretty much default but I've configured mod_jk for use with Apache. I receive the same error whether I connect through Apache or directly to Tomcat via port 8080. My test code is below - I've changed domain names to protect the innocent. --- Properties systemSettings = System.getProperties(); systemSettings.put(http.proxyHost,my.proxyserver.com); systemSettings.put(http.proxyPort,8080); System.setProperties(systemSettings); URL writerURL = new URL(http://api.yellowbrix.com/api/?query=something;); URLConnection connection = writerURL.openConnection(); // dump url contents to screen for testing BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) out.println(inputLine+br /); in.close(); --- And the error: java.io.IOException: Server returned HTTP response code: 502 for URL: http://api.yellowbrix.com/api/?query=something sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) org.apache.jsp.testproxy_jsp._jspService(org.apache.jsp.testproxy_jsp:78) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks, Trent -- View this message in context: http://www.nabble.com/Bad-gateway-502-error-trying-to-reach-external-URL-through-proxy-t1402806.html#a3775342 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: System.setProperty/System.getProperty
The differences are between testing environment and production/semi-production environment between windows and other platforms. We store templates, etc in a certain folder and have to read them. However the path is different between Oses (not just specific to OpenVMS). I want to use some technique to handle the path differences. Just figured if I could add them to some Property/Locale Resource it would be easiest. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:18 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Wow. OpenVMS is still in existence? And it has a JVM? Double Wow! How come the I/O is different? Shouldn't Java handle that for you? Tim (Former DECcie, 1988-1997) -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:03 PM To: [EMAIL PROTECTED] Apache. Org (E-mail) Subject: System.setProperty/System.getProperty Is there an easy way within Tomcat to set System properties so that all webapps have access to them at startup? Basically, I would like to add my own properties to the System object at startup as opposed to using environment entries. Maybe I am over thinking things. Or better yet, what is the best way to use Resource Locales per O.S.? We test/deploy on win2k but have live server of OpenVMS. The main reason I need this is because File I/O is a lot different between the platforms. Thanks, Marc - 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: System.setProperty/System.getProperty
Why not use the property mechanism to find the template files? Any time you rely on a servlet/app using an absolute file path, you are asking for trouble. Tim -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:24 PM To: Tomcat Users List Subject: RE: System.setProperty/System.getProperty The differences are between testing environment and production/semi-production environment between windows and other platforms. We store templates, etc in a certain folder and have to read them. However the path is different between Oses (not just specific to OpenVMS). I want to use some technique to handle the path differences. Just figured if I could add them to some Property/Locale Resource it would be easiest. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:18 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Wow. OpenVMS is still in existence? And it has a JVM? Double Wow! How come the I/O is different? Shouldn't Java handle that for you? Tim (Former DECcie, 1988-1997) -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:03 PM To: [EMAIL PROTECTED] Apache. Org (E-mail) Subject: System.setProperty/System.getProperty Is there an easy way within Tomcat to set System properties so that all webapps have access to them at startup? Basically, I would like to add my own properties to the System object at startup as opposed to using environment entries. Maybe I am over thinking things. Or better yet, what is the best way to use Resource Locales per O.S.? We test/deploy on win2k but have live server of OpenVMS. The main reason I need this is because File I/O is a lot different between the platforms. Thanks, Marc - 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: System.setProperty/System.getProperty
P.S. For reference, here is an excellent how-to: http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:42 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Why not use the property mechanism to find the template files? Any time you rely on a servlet/app using an absolute file path, you are asking for trouble. Tim -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:24 PM To: Tomcat Users List Subject: RE: System.setProperty/System.getProperty The differences are between testing environment and production/semi-production environment between windows and other platforms. We store templates, etc in a certain folder and have to read them. However the path is different between Oses (not just specific to OpenVMS). I want to use some technique to handle the path differences. Just figured if I could add them to some Property/Locale Resource it would be easiest. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:18 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Wow. OpenVMS is still in existence? And it has a JVM? Double Wow! How come the I/O is different? Shouldn't Java handle that for you? Tim (Former DECcie, 1988-1997) -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:03 PM To: [EMAIL PROTECTED] Apache. Org (E-mail) Subject: System.setProperty/System.getProperty Is there an easy way within Tomcat to set System properties so that all webapps have access to them at startup? Basically, I would like to add my own properties to the System object at startup as opposed to using environment entries. Maybe I am over thinking things. Or better yet, what is the best way to use Resource Locales per O.S.? We test/deploy on win2k but have live server of OpenVMS. The main reason I need this is because File I/O is a lot different between the platforms. Thanks, Marc - 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: System.setProperty/System.getProperty
Thanks. This is what I needed to get started. I need to implement this through Tomcat as well. I will research tomorrow. Thanks for the lead. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 8:03 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty P.S. For reference, here is an excellent how-to: http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:42 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Why not use the property mechanism to find the template files? Any time you rely on a servlet/app using an absolute file path, you are asking for trouble. Tim -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:24 PM To: Tomcat Users List Subject: RE: System.setProperty/System.getProperty The differences are between testing environment and production/semi-production environment between windows and other platforms. We store templates, etc in a certain folder and have to read them. However the path is different between Oses (not just specific to OpenVMS). I want to use some technique to handle the path differences. Just figured if I could add them to some Property/Locale Resource it would be easiest. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:18 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Wow. OpenVMS is still in existence? And it has a JVM? Double Wow! How come the I/O is different? Shouldn't Java handle that for you? Tim (Former DECcie, 1988-1997) -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:03 PM To: [EMAIL PROTECTED] Apache. Org (E-mail) Subject: System.setProperty/System.getProperty Is there an easy way within Tomcat to set System properties so that all webapps have access to them at startup? Basically, I would like to add my own properties to the System object at startup as opposed to using environment entries. Maybe I am over thinking things. Or better yet, what is the best way to use Resource Locales per O.S.? We test/deploy on win2k but have live server of OpenVMS. The main reason I need this is because File I/O is a lot different between the platforms. Thanks, Marc - 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: System.setProperty/System.getProperty
Lucky for you, it's all Java! My suggestion would be to create a path underneath WEB-INF/classes, and then use the classloader to locate the file, and return an InputStream for it. As part of the compile / prepare rule, you would copy the template source files into the WEB-INF/classes/templates/ hierarchy. Voila! No more paths, except for relative, Java ones. Tim -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 8:05 PM To: Tomcat Users List Subject: RE: System.setProperty/System.getProperty Thanks. This is what I needed to get started. I need to implement this through Tomcat as well. I will research tomorrow. Thanks for the lead. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 8:03 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty P.S. For reference, here is an excellent how-to: http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:42 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Why not use the property mechanism to find the template files? Any time you rely on a servlet/app using an absolute file path, you are asking for trouble. Tim -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:24 PM To: Tomcat Users List Subject: RE: System.setProperty/System.getProperty The differences are between testing environment and production/semi-production environment between windows and other platforms. We store templates, etc in a certain folder and have to read them. However the path is different between Oses (not just specific to OpenVMS). I want to use some technique to handle the path differences. Just figured if I could add them to some Property/Locale Resource it would be easiest. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:18 PM To: 'Tomcat Users List' Subject: RE: System.setProperty/System.getProperty Wow. OpenVMS is still in existence? And it has a JVM? Double Wow! How come the I/O is different? Shouldn't Java handle that for you? Tim (Former DECcie, 1988-1997) -Original Message- From: Farrow, Marc [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 7:03 PM To: [EMAIL PROTECTED] Apache. Org (E-mail) Subject: System.setProperty/System.getProperty Is there an easy way within Tomcat to set System properties so that all webapps have access to them at startup? Basically, I would like to add my own properties to the System object at startup as opposed to using environment entries. Maybe I am over thinking things. Or better yet, what is the best way to use Resource Locales per O.S.? We test/deploy on win2k but have live server of OpenVMS. The main reason I need this is because File I/O is a lot different between the platforms. Thanks, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
undeploy then redeploy, sessionId valid?
Undeploy a web application, then redeploy it. Click a link in an old page(page before undeploy), making the first request after redeploy. In a filter: String sessionId = httpRequest.getRequestedSessionId(); boolean valid = httpRequest.isRequestedSessionIdValid(); sessionId is AD890098123763728AD80 valid: true. This means that the old sessionId is still valid. what is the criteria to determine whether a session id is valid or not? How to detect redeploy in a filter? Thanks! David - New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.