Regarding PSK and SRP support for Tomcat 9.0.37 server
Hi All, I am using Tomcat server with version 9.0.37 and JSSE is configured for TLS. *Use Case:* TLS Client, that uses OpenSSL1.1.1d internally, is trying to connect this Tomcat server using PSK and SRP based ciphers(Ex : _RSA-PSK-AES256-GCM-SHA384). Here we are observing a Fatal error on the client side. *Question:* Are PSK and SRP based ciphers supported by the Tomcat server configured with JSSE? I found one old article saying that it is not supported by JSSE( http://tomcat.10.x6.nabble.com/How-to-set-up-TLS-PSK-with-Tomcat-td5022729.html). Not sure if it is supported in the latest versions. If it is supported, how can I configure it. Any reference will be really appreciated. Any idea, if PSK and SRP based ciphers are only supported for any specific TLS protocol version? Thanks, Rahul.
Regarding PSK and SRP support for Tomcat 9.0.37 server
Hi All, I am using Tomcat server with version 9.0.37 and JSSE is configured for TLS. *Use Case:* TLS Client, that uses OpenSSL1.1.1d internally, is trying to connect this Tomcat server using PSK and SRP based ciphers(Ex : _RSA-PSK-AES256-GCM-SHA384). Here we are observing a Fatal error on the client side. *Question:* Are PSK and SRP based ciphers supported by the Tomcat server configured with JSSE? I found one old article saying that it is not supported by JSSE( http://tomcat.10.x6.nabble.com/How-to-set-up-TLS-PSK-with-Tomcat-td5022729.html). Not sure if it is supported in the latest versions. If it is supported, how can I configure it. Any reference will be really appreciated. Any idea, if PSK and SRP based ciphers are only supported for any specific TLS protocol version? Thanks, Rahul.
ApacheTomcat - 8.0. 37: Files are not displaying in sorted order.
Hi Team, I am facing an issue. I have a link [*href="http://pacir.st.tmt.com/nosrw/data/cast/data/ <http://pacir.st.tmt.com/nosrw/data/cast/data/>*] to "*CAST Reports*" on my webpage, that redirects to the directory on my server " */opt/app/pacir/nwpeb/data/cast/data/*" and shows entire files and folders of directory in browser. *Code to redirect: * http://pacir.st.tmt.com/nosrw/data/cast/data/; onMouseOver="self.status = ''; return true" onMouseOut="self.status = ''; return true">CAST Reports The issue is the files and folder is not showing in a sorted order. I am attaching you a screenshot for your reference. [image: image.png] As I know by default Apache-Tomcat displays the files in a sorted order. I don't know why it's behaving like that. Please help me to know, why it's displaying in unsorted order? *Regards,* [image: Lucida Technologies] RAHUL RANJAN C++ Developer | IBM Mob : 9570311276 Skype: rahulranjan.c...@gmail.com [image: facebook] <https://www.facebook.com/rahulranjancusb/> [image: linkedin] <https://www.linkedin.com/in/rahulranjancusb/>
Problem in ApacheTomcat - 8.0. 37: Files are not displaying in sorted order.
Hi Team, I am facing an issue which is related to ApacheTomcat-8.0.37. I wrote a code to display the files/folder in browser. By default it should display in alphabetically sorted order. But it's not showing. I have migrated my code from Unix to Linux. In Unix system my code was working fine. Can you please tell me what could be the problem? I am attaching you a screenshot for reference. I will appreciate any help. [image: image.png] *Regards,* [image: Lucida Technologies] RAHUL RANJAN C++ Developer | IBM Mob : 9570311276 Skype: rahulranjan.c...@gmail.com [image: facebook] <https://www.facebook.com/rahulranjancusb/> [image: linkedin] <https://www.linkedin.com/in/rahulranjancusb/>
After updating to Tomcat V7.0.78 from V7.0.54 JSP compilation fails due to 65535 bytes limit
Hi Tomcat Team, Thanks for your always support and guidence !! In one of the web application Tomcat is migrated from V7.0.54 to V7.0.78. After update one phenomena is reported regarding JSP file compilation at run time. >From stack trace analysis it is evident that JSP to JAVA compilation is >surpassing the 65535 bytes limit. After analysis we have found some solution, but we would like to knowin which version this chnage is introduced BW Tomcat 7.0.54 and Tomcat 7.0.78. If possible we would like to know what chnages has been done in tomcat that leads to this phenomena. JFYI, Same JSP was succesfully executed and compiled in Tomcat 7.0.54. and no information is mentioned in chnagelogs and relase notes related to this phenomena. Your eraly response is highly appriciated !! Regards, Rahul kumar Singh
Why Tomcat Session Replication requires Sticky Sessions
Hi, We are using Tomcat 7 My question is - Why does Tomcat Session Replication require Sticky sessions to be enabled? We cannot have a sticky session setup in our servers, due to policy issues. To maintain session state across different machines, we were planning to use session replication. But it seems stickiness is a pre-condition for session replication. Why? Is it not a replacement for sticky sessions? Regards, Rahul __ This email is intended only for the use of the individual(s) to whom it is addressed and may be privileged and confidential. Unauthorised use or disclosure is prohibited. If you receive this e-mail in error, please advise immediately and delete the original message. This message may have been altered without your or our knowledge and the sender does not accept any liability for any errors or omissions in the message. Emails are monitored by supervisory personnel in jurisdictions where monitoring is permitted. Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information.
Re: Tomcat 7.0.54 gives zero-byte .java and .class files for jsp in work directory that cause truncated class error
Dear Christopher, Thanks you very much for your response !! >Filesystem quota? Filesystem Quota is not enabled for this disk partition so there is no restrictions on disk usage. >Look at the timestamps on the zero-byte files, then find that same >place in catalina.out or one of the other Tomcat-specific log files. >See if there's anything in those log files that gives a reason for the >failure to compile your JSPs. We have seen the catlina.out and other tomcat logs but no such evidence regarding the compilation of JSP. during googling in various forums, we have observed that the same problem is occurred to one of the senior engineer of google, and it is unresolved/open yet. reference: http://stackoverflow.com/questions/8813509/how-does-tomcat-generate-its-work-directory-jsp-java-files-and-what-might-cau It is very critical problem in our production environments (occurring Many production environments), and it is raised as tomcat specific problem so occurrence condition and root cause may be required from tomcat team. Regards, Rahul Kumar Singh From: Christopher Schultz <ch...@christopherschultz.net> Sent: Sunday, July 31, 2016 5:38:13 PM To: Tomcat Users List Subject: Re: Tomcat 7.0.54 gives zero-byte .java and .class files for jsp in work directory that cause truncated class error -BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rahul, On 7/28/16 1:50 AM, Rahul Singh wrote: > Hi tomcat team, Thanks for your continued support and help. > > I am facing the a peculiar problem in Tomcat 7.0.54. Any chance for a Tomcat upgrade? Also, Java 7 has reached End-of-Life. > Configurations: OS: RHEL Tomcat:7.0.54 Java:1.7.79 If you are using RHEL packages, you may not have an upgrade path. :( > A jsp that was running properly gave the following exception after > graceful tomcat restart > > javax.servlet.ServletException: > java.lang.ClassFormatError: Truncated class file at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli cationFilterChain.java:303) > > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:208) > at > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:241) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi lterChain.java:208) > > at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:748) > at > org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicat ionDispatcher.java:486) > > at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:411) > at > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDisp atcher.java:338) > > at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletD ispatcherResult.java:154) > at > org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResult Support.java:186) > > at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:362) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionIn vocation.java:266) > > > > On checking the Tomcat work directory we discovered that the > corresponding .java and .class files were of zero byte size. In > other words these files were empty. This was the main reason why > Tomcat gave truncated class error. Corresponding to this we also > checked the disk utilization but it was at 54% only. So any > possibility for disk space are ruled out. Filesystem quota? > Also that the same jsp had not been modified and was running > properly initially. so after reboot of tomcat what happen? why the > jsp.java and jsp.class size is generated of 0 bytes. > > So my question is that what might have caused tomcat to generate > empty *_jsp.java files in its work directory? > > Hope tomcat team will help us to finding root cause. Look at the timestamps on the zero-byte files, then find that same place in catalina.out or one of the other Tomcat-specific log files. See if there's anything in those log files that gives a reason for the failure to compile your JSPs. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAled6i0ACgkQ9CaO5/Lv0PB59ACePn8ro2YsATZjgDFh8lTH1dU/ T5YAnjxaL4LZB4BdfL/wTJuPEeBfT4fh =pvZ5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7.0.54 gives zero-byte .java and .class files for jsp in work directory that cause truncated class error
Hi tomcat team, Thanks for your continued support and help. I am facing the a peculiar problem in Tomcat 7.0.54. Configurations: OS: RHEL Tomcat:7.0.54 Java:1.7.79 A jsp that was running properly gave the following exception after graceful tomcat restart javax.servlet.ServletException: java.lang.ClassFormatError: Truncated class file at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266) On checking the Tomcat work directory we discovered that the corresponding .java and .class files were of zero byte size. In other words these files were empty. This was the main reason why Tomcat gave truncated class error. Corresponding to this we also checked the disk utilization but it was at 54% only. So any possibility for disk space are ruled out. Also that the same jsp had not been modified and was running properly initially. so after reboot of tomcat what happen? why the jsp.java and jsp.class size is generated of 0 bytes. So my question is that what might have caused tomcat to generate empty *_jsp.java files in its work directory? Hope tomcat team will help us to finding root cause. Regards, Rahul Kumar singh
Http POST request is getting tempered in Tomcat7
Hello Tomcat Team, Thanks for your always support !! We have a Struts 2 application with Tomcat 7 that runs on a proxy network. In one partcular case while browsing the application it was observed that simply navigating one particular screen multiple times raised a NoSuchMethodException exception once. This was observed in IE-10 browser running on Windows 8. It was occuring on a single system only and could not be reproduced on other systems.. The request as obatined in Tomcat catalina logs is as follows: 192.168.103.105 - - [14/Jul/2016:15:41:54 +] "POST /application/framework/SessionAction.action HTTP/1.1" 200 105 192.168.103.105 - - [14/Jul/2016:15:41:54 +] "POST /application/framework/SessionAction.action HTTP/1.1" 200 105 192.168.103.105 - - [14/Jul/2016:15:41:55 +] "CHEDFLAG=TRUEPOST /application/framework/SessionAction.action HTTP/1.1" 200 58209 Also when used Internet Explorer to debug the request we get the following details for the problem scenario: Request Headers Key Value Request POST http://192.168.133.120/Myapp/application/rpc_SessionAction.action HTTP/1.1 Referer http://192.168.133.120:8585/application/ Content-Type application/x-www-form-urlencoded X-Requested-With XMLHttpRequest Accept application/json, text/javascript, / Accept-Language en-IN,en;q=0.8,ja;q=0.6,zh-Hans-CN;q=0.4,zh-Hans;q=0.2 Accept-Encoding gzip, deflate User-Agent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0) Host 192.168.133.120:8585 Content-Length 26 DNT 1 Proxy-Connection Keep-Alive Pragma no-cache Cookie JSESSIONID=7FE4DE04F3558B46B7D8252645ABFB5A; JSESSIONID=D4FD5A0D120AD35414A4E16C406DD06F Request Body method=fetch=tmpVal Response Headers Key Value Response HTTP/1.0 200 OK Server Apache-Coyote/1.1 Content-Type text/html;charset=utf-8 Date Thu, 14 Jul 2016 15:41:55 GMT X-Cache MISS from gateway1 X-Cache-Lookup MISS from gateway1 Via 1.0 gateway1 This request in the Struts filter gives null entry set. Why does the POST request get changed in this case and also entry set bencomes null? Regards, Rahul Kumar Singh
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Apart from below information, one additional information. We have used the jQuery form plugin js in our project. This handles the form and request submit. The code is as attached here. From: Rahul Singh <rksing...@hotmail.com> Sent: Tuesday, January 19, 2016 11:30 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] Hi Christopher , >>So... what makes you sure that the browser actually made the request? >>I'd like to see some kind of confirmation using a tool you didn't >>write. Perhaps something like Firebug, LiveHttpHeaders, Fiddler, or >>even Wireshark showing that the request was made, what headers it had, >>etc. OK, We have used HTTP Analayzer for file upload via Internet Explorer-8. Following are the scenario observed. For lesser than 2gb file uploads : The request header shows the correct content-length value of the file.The uploads works fine further also. For more than 2gb file uploads: The file length is 2151533567 bytes(which is roughly 2.15 Gb). The request is aborted in this case and the request header shows the content length as -214343325 bytes (which is rougly 214 Mb).The upload process does not proceed further in this case. both cases request headers are attached in screenshot. From: Christopher Schultz <ch...@christopherschultz.net> Sent: Monday, January 18, 2016 11:17 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, On 1/17/16 11:28 PM, Rahul Singh wrote: > Code flow is attached, forgot to attach in trailing mail. > > ------ - -- > > *From:* Rahul Singh <rksing...@hotmail.com> > *Sent:* Monday, January 18, 2016 8:39 AM *To:* Tomcat Users List > *Subject:* Re: File size >= 2GB not uploaded in application > [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] > > Hello Christopher, thanks for your prompt response !! > >> Why didn't you come to the Tomcat community first? > Sorry for the delay, we wanted to make sure about the component > causing the problem. > > >>> I don't have a test-case in front of me, but I'm fairly >>> confident that Tomcat allows file uploads of greater than 2GiB. >>> I suspect the problem > is another component. >>> Are you using Servlet 3.0-based file upload, or are you >>> allowing Struts to handle the file-upload for you? If you use >>> Servlet-3.0 file-upload, then you'll have code that deals with >>> Multipart classes and configuration in web.xml. If you are >>> using Struts's file-upload, then you'll mostly just be calling >>> getFile or getInputStream or however Struts 2 does things (I >>> can't remember how it all works off the top of my head). > > > In our case the filter class implements the javax.servlet.flter > and imports javax.servlet.* The Filter class mentioned in the > previous threads is the first one as declared in the web.xml > (followed by other struts filters). All (url) requests are mapped > to this filter. So this is where our file upload request goes. It > is only in greater than 2 gb file upload request that the > dofilter() fails to get any request. So we feel servlet 3.0 being > used in our case the Filter is not being able to handle greater > than 2 gb requests. > > >>> The point is, if you are using Struts, then Tomcat will not >>> touch the request and Struts is handling the whole thing. If >>> Struts is the problem, you'll need to talk to the Struts >>> team[1]. > >>> If you are using Servlet-3.0 file-upload, then Struts is just a >>> red herring and this is the right place to get your issue >>> solved. > > As mentioned above Servlet 3.0 is being used. So request the > tomcat community to please look into our issue. > >>> So far, you have posted some configuration for Struts and some >>> JSP tablib-filled code, plus some Java code for a Filter. You >>> didn't say where the Filter was in the filter chain (before or >>> after Struts filter). You also mentioned that the form is >>> actually posted using XMLHttpRequest and not through a standard >>> form, but you didn't explain what component is doing that or >>> how it actually works. > >>> There isn't enough information here to make any sense of the >>> situation. Can you please address all of the questions I've >>> posed above and maybe we can then help you? > > > <<>>
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hi Christopher , >>So... what makes you sure that the browser actually made the request? >>I'd like to see some kind of confirmation using a tool you didn't >>write. Perhaps something like Firebug, LiveHttpHeaders, Fiddler, or >>even Wireshark showing that the request was made, what headers it had, >>etc. OK, We have used HTTP Analayzer for file upload via Internet Explorer-8. Following are the scenario observed. For lesser than 2gb file uploads : The request header shows the correct content-length value of the file.The uploads works fine further also. For more than 2gb file uploads: The file length is 2151533567 bytes(which is roughly 2.15 Gb). The request is aborted in this case and the request header shows the content length as -214343325 bytes (which is rougly 214 Mb).The upload process does not proceed further in this case. both cases request headers are attached in screenshot. From: Christopher Schultz <ch...@christopherschultz.net> Sent: Monday, January 18, 2016 11:17 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, On 1/17/16 11:28 PM, Rahul Singh wrote: > Code flow is attached, forgot to attach in trailing mail. > > -- - -- > > *From:* Rahul Singh <rksing...@hotmail.com> > *Sent:* Monday, January 18, 2016 8:39 AM *To:* Tomcat Users List > *Subject:* Re: File size >= 2GB not uploaded in application > [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] > > Hello Christopher, thanks for your prompt response !! > >> Why didn't you come to the Tomcat community first? > Sorry for the delay, we wanted to make sure about the component > causing the problem. > > >>> I don't have a test-case in front of me, but I'm fairly >>> confident that Tomcat allows file uploads of greater than 2GiB. >>> I suspect the problem > is another component. >>> Are you using Servlet 3.0-based file upload, or are you >>> allowing Struts to handle the file-upload for you? If you use >>> Servlet-3.0 file-upload, then you'll have code that deals with >>> Multipart classes and configuration in web.xml. If you are >>> using Struts's file-upload, then you'll mostly just be calling >>> getFile or getInputStream or however Struts 2 does things (I >>> can't remember how it all works off the top of my head). > > > In our case the filter class implements the javax.servlet.flter > and imports javax.servlet.* The Filter class mentioned in the > previous threads is the first one as declared in the web.xml > (followed by other struts filters). All (url) requests are mapped > to this filter. So this is where our file upload request goes. It > is only in greater than 2 gb file upload request that the > dofilter() fails to get any request. So we feel servlet 3.0 being > used in our case the Filter is not being able to handle greater > than 2 gb requests. > > >>> The point is, if you are using Struts, then Tomcat will not >>> touch the request and Struts is handling the whole thing. If >>> Struts is the problem, you'll need to talk to the Struts >>> team[1]. > >>> If you are using Servlet-3.0 file-upload, then Struts is just a >>> red herring and this is the right place to get your issue >>> solved. > > As mentioned above Servlet 3.0 is being used. So request the > tomcat community to please look into our issue. > >>> So far, you have posted some configuration for Struts and some >>> JSP tablib-filled code, plus some Java code for a Filter. You >>> didn't say where the Filter was in the filter chain (before or >>> after Struts filter). You also mentioned that the form is >>> actually posted using XMLHttpRequest and not through a standard >>> form, but you didn't explain what component is doing that or >>> how it actually works. > >>> There isn't enough information here to make any sense of the >>> situation. Can you please address all of the questions I've >>> posed above and maybe we can then help you? > > > <<>>> We need to model the following code to be told: > jsp submit of the form How the .js submit it further in > XmlHttpRequest How the Filter is declared How the web.xml is > declared > > >> Are you sure the request is even made to the server in these >> cases?What if the Javascript upload component is failing before >> it even starts? > > Yes the request is made in these cases. We have compared the > scenari
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Code flow is attached, forgot to attach in trailing mail. From: Rahul Singh <rksing...@hotmail.com> Sent: Monday, January 18, 2016 8:39 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] Hello Christopher, thanks for your prompt response !! > Why didn't you come to the Tomcat community first? Sorry for the delay, we wanted to make sure about the component causing the problem. >>I don't have a test-case in front of me, but I'm fairly confident that >>Tomcat allows file uploads of greater than 2GiB. I suspect the problem is another component. >>Are you using Servlet 3.0-based file upload, or are you allowing >>Struts to handle the file-upload for you? If you use Servlet-3.0 >>file-upload, then you'll have code that deals with Multipart classes >>and configuration in web.xml. If you are using Struts's file-upload, >>then you'll mostly just be calling getFile or getInputStream or >>however Struts 2 does things (I can't remember how it all works off >>the top of my head). In our case the filter class implements the javax.servlet.flter and imports javax.servlet.* The Filter class mentioned in the previous threads is the first one as declared in the web.xml (followed by other struts filters). All (url) requests are mapped to this filter. So this is where our file upload request goes. It is only in greater than 2 gb file upload request that the dofilter() fails to get any request. So we feel servlet 3.0 being used in our case the Filter is not being able to handle greater than 2 gb requests. >>The point is, if you are using Struts, then Tomcat will not touch the >>request and Struts is handling the whole thing. If Struts is the >>problem, you'll need to talk to the Struts team[1]. >>If you are using Servlet-3.0 file-upload, then Struts is just a red >>herring and this is the right place to get your issue solved. As mentioned above Servlet 3.0 is being used. So request the tomcat community to please look into our issue. >>So far, you have posted some configuration for Struts and some JSP >>tablib-filled code, plus some Java code for a Filter. You didn't say >>where the Filter was in the filter chain (before or after Struts >>filter). You also mentioned that the form is actually posted using >>XMLHttpRequest and not through a standard form, but you didn't explain >>what component is doing that or how it actually works. >>There isn't enough information here to make any sense of the >>situation. Can you please address all of the questions I've posed >>above and maybe we can then help you? <<>>> We need to model the following code to be told: jsp submit of the form How the .js submit it further in XmlHttpRequest How the Filter is declared How the web.xml is declared >Are you sure the request is even made to the server in these cases?What if the >Javascript upload component is failing before it even starts? Yes the request is made in these cases. We have compared the scenario for greater than 2gb and lesser size file uploads and drawn the following inference from it.We have checked the request and content length for dofilter() method in our logs. The JavaScript is not the culprit in this case. The JavaScript sets the AJAX field to success after sending request and thereafter waits for response(which is not received in our case). Our application works fine for lesser than 2 gb fie uploads but fails for greater size files as the request fails to reach the dofilter() method after which the request can be forwarded to the requested method. Regards, Rahul From: Christopher Schultz <ch...@christopherschultz.net> Sent: Saturday, January 16, 2016 9:33 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, On 1/15/16 1:02 AM, Rahul Singh wrote: > Thanks for your guidelines, we have big hope from Apache Tomcat > Team to solve this problem as this is show stopper for our > application, we have also raise this question on various forum like > stack overflow and other, but no relevant reply till now. Why didn't you come to the Tomcat community first? > Hope you understand my situation, > > please refer the below stackoverflow reference for more detail > about this issue. > > http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any- [http://cdn.sstatic.net/stackoverflow/img/apple-touch-i...@2.png?v=73d79a89bded]<http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any-> doFilter() fails to get any request for the file upload > 2gb<http://stacko
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Christopher, thanks for your prompt response !! > Why didn't you come to the Tomcat community first? Sorry for the delay, we wanted to make sure about the component causing the problem. >>I don't have a test-case in front of me, but I'm fairly confident that >>Tomcat allows file uploads of greater than 2GiB. I suspect the problem is another component. >>Are you using Servlet 3.0-based file upload, or are you allowing >>Struts to handle the file-upload for you? If you use Servlet-3.0 >>file-upload, then you'll have code that deals with Multipart classes >>and configuration in web.xml. If you are using Struts's file-upload, >>then you'll mostly just be calling getFile or getInputStream or >>however Struts 2 does things (I can't remember how it all works off >>the top of my head). In our case the filter class implements the javax.servlet.flter and imports javax.servlet.* The Filter class mentioned in the previous threads is the first one as declared in the web.xml (followed by other struts filters). All (url) requests are mapped to this filter. So this is where our file upload request goes. It is only in greater than 2 gb file upload request that the dofilter() fails to get any request. So we feel servlet 3.0 being used in our case the Filter is not being able to handle greater than 2 gb requests. >>The point is, if you are using Struts, then Tomcat will not touch the >>request and Struts is handling the whole thing. If Struts is the >>problem, you'll need to talk to the Struts team[1]. >>If you are using Servlet-3.0 file-upload, then Struts is just a red >>herring and this is the right place to get your issue solved. As mentioned above Servlet 3.0 is being used. So request the tomcat community to please look into our issue. >>So far, you have posted some configuration for Struts and some JSP >>tablib-filled code, plus some Java code for a Filter. You didn't say >>where the Filter was in the filter chain (before or after Struts >>filter). You also mentioned that the form is actually posted using >>XMLHttpRequest and not through a standard form, but you didn't explain >>what component is doing that or how it actually works. >>There isn't enough information here to make any sense of the >>situation. Can you please address all of the questions I've posed >>above and maybe we can then help you? <<>>> We need to model the following code to be told: jsp submit of the form How the .js submit it further in XmlHttpRequest How the Filter is declared How the web.xml is declared >Are you sure the request is even made to the server in these cases?What if the >Javascript upload component is failing before it even starts? Yes the request is made in these cases. We have compared the scenario for greater than 2gb and lesser size file uploads and drawn the following inference from it.We have checked the request and content length for dofilter() method in our logs. The JavaScript is not the culprit in this case. The JavaScript sets the AJAX field to success after sending request and thereafter waits for response(which is not received in our case). Our application works fine for lesser than 2 gb fie uploads but fails for greater size files as the request fails to reach the dofilter() method after which the request can be forwarded to the requested method. Regards, Rahul From: Christopher Schultz <ch...@christopherschultz.net> Sent: Saturday, January 16, 2016 9:33 AM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, On 1/15/16 1:02 AM, Rahul Singh wrote: > Thanks for your guidelines, we have big hope from Apache Tomcat > Team to solve this problem as this is show stopper for our > application, we have also raise this question on various forum like > stack overflow and other, but no relevant reply till now. Why didn't you come to the Tomcat community first? > Hope you understand my situation, > > please refer the below stackoverflow reference for more detail > about this issue. > > http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any- request-for-the-file-upload-2gb?noredirect=1#comment57315528_34783438 > > > for more information: > > -No error are printed in tomcat logs. - how to configure "call > HttpServletRequest.getHeader("Content-Length") as a String and > parse it yourself." I don't have a test-case in front of my, but I'm fairly confident that Tomcat allows file uploads of greater than 2GiB. I suspect the problem is another component. Are you using Servlet 3.0-based file upload, or are you allowing Struts to handle the file-upload for you?
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Christopher , Thanks for your input, >ServletRequest.getContentLength is declared to return an int value (32-bit): >* Integer.MAX_VALUE = 2^31 - 1 = 2147483647 >* 2GiB = 2 * 1024 * 1024 * 1024 = 2147483648 >* 2147483648 > 2147483647 >Therefore, request.getContentLength cannot be used to fetch >content-lengths over 2GiB - 1byte. Yes above is already investigated, BTW thanks . You have to use >ServletRequest.getContentLengthLong (new in servlet 3.1) for this we have to upgrade tomcat 8, currently we are using tomcat 7.0.54. > or call >HttpServletRequest.getHeader("Content-Length") as a String and parse it >yourself. OK, but where we need to do this, in init() method or in doFilter() method, but FYI, the request(upload file >2GB) is not reached to doFilter(). Apart from above thread we want to share more information so that tomcat team help us to get out from this issue. For my struts project the doFilter() fails to get any request from the file upload form in cases the size of the file is greater than 2gb. Below is the code fragment: Filter is as follows: public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; HttpSession session = request.getSession(false); request.setCharacterEncoding("UTF-8"); /* do the other business work example request response monitoring and logging */ chain.doFilter(request, response); } jsp is : For my jsp the form is submitted as a XMLHttpRequest via the underlying javascipt. Now when I upload a a file (lesser than 2gb) ,in my dofilter() method I have checked the uri and request length for the request. They are as expected via the action called in the jsp form and the file size. The file upload works fine in this case. But in case where the file size is greater than 2gb , in my doFilter() method no request is available for the file upload action called by the form submit(for file size greater than 2 gb). Thus the upload does not proceed further in such cases. I am using servlet 3.0. What do I need to do to support larger than 2 gb file uploads, so that the request reaches the doFilter() method? From: Christopher Schultz <ch...@christopherschultz.net> Sent: Wednesday, January 13, 2016 8:11 PM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] Rahul, On 1/12/16 10:56 PM, Rahul Singh wrote: > Hi, > >> Define "Not successful"? Exceptions thrown? File truncated? Upload >> never starts? Never finishes? > > Not successful : > > Request Never finishes, we have trace the HttpServlet request object > and request.getContentLength return 0 in case when file size is >=2GB, > > No exception thrown, as well as when file size is less than 2GB, then > request.getContentLength return the correct value of file size in > byte. ServletRequest.getContentLength is declared to return an int value (32-bit): * Integer.MAX_VALUE = 2^31 - 1 = 2147483647 * 2GiB = 2 * 1024 * 1024 * 1024 = 2147483648 * 2147483648 > 2147483647 Therefore, request.getContentLength cannot be used to fetch content-lengths over 2GiB - 1byte. You have to use ServletRequest.getContentLengthLong (new in servlet 3.1) or call HttpServletRequest.getHeader("Content-Length") as a String and parse it yourself. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Dear Christopher, Thanks for your guidelines, we have big hope from Apache Tomcat Team to solve this problem as this is show stopper for our application, we have also raise this question on various forum like stack overflow and other,but no relevant reply till now. Hope you understand my situation, please refer the below stackoverflow reference for more detail about this issue. http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any-request-for-the-file-upload-2gb?noredirect=1#comment57315528_34783438 for more information: -No error are printed in tomcat logs. - how to configure "call HttpServletRequest.getHeader("Content-Length") as a String and parse it yourself." From: Christopher SchultzSent: Thursday, January 14, 2016 8:43 PM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] André, On 1/14/16 5:02 AM, André Warnier (tomcat) wrote: > I have not followed this thread in details, but did you check this : > > http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attributes > --> maxPostSize +1 > The maximum size in bytes of the POST which will be handled by the > container FORM URL parameter parsing. The limit can be disabled by > setting this attribute to a value less than zero. If not specified, this > attribute is set to 2097152 (2 megabytes). Note that the > FailedRequestFilter can be used to reject requests that exceed this limit. > > Note: the size above might relate to the *encoded* size of the file, as > it is transmitted over the WWW (possibly encoded as Base64 e.g.), which > may mean that an original 1 MB file translates to more than 1 MB bytes > while being uploaded. > > Note also : maybe "Struts" is setting this to some other default value.. > > Another question : did you check the Tomcat logs ? IIRC, Tomcat doesn't log anything in these cases. You have to use the FailedRequestFilter to detect and report the condition. I wouldn't use that Filter in productio, but it would be good as a simple test to see if this is the error that is occurring. When Tomcat refuses to allow a file upload that it too large, it simply does not parse the parameters, but the request continues to process as usual (but the servlet doesn't end up getting any of the parameters). I'm surprised that Struts isn't getting the request in these cases. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hi André Warnier, its 64 bit (OS and JVM) From: André Warnier (tomcat) <a...@ice-sa.com> Sent: Wednesday, January 13, 2016 2:17 PM To: users@tomcat.apache.org Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] maybe a stupid question nowadays, but : is the platform on which you are running this 32-bit, or 64-bit ? (OS and JVM) On 13.01.2016 04:56, Rahul Singh wrote: > Hi, > >> Define "Not successful"? Exceptions thrown? File truncated? Upload >> never starts? Never finishes? > > Not successful : > > Request Never finishes, we have trace the HttpServlet request object and > request.getContentLength return 0 in case when file size is >=2GB, > > No exception thrown, as well as when file size is less than 2GB, then > request.getContentLength return the correct value of file size in byte. > > > Regards, > Rahul Kumar Singh > > From: David kerber <dcker...@verizon.net> > Sent: Tuesday, January 12, 2016 6:07 PM > To: Tomcat Users List > Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 > Struts: 2.3.24 JAVA: openJDK 1.7.79] > > On 1/12/2016 12:01 AM, Rahul Singh wrote: >> >> Hello Apache Tomcat team, >> >> Sending again with some corrections, >> >> File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK >> 1.7.79) is not successful for greater than 2 gb. After previous discussion >> here on previous thread, I migrated my application to struts 2.3.24 as the >> only possible solution in form of jakarta-stream parser for large size >> uploads (greater than 2gb). >> But after successfully migrating to struts 2.3.24 from 2.1.8, file upload >> greater than 2 gb still not supported. I want to use jakarta-streams for >> this purpose.Following is the code >> snippet: >> >> >> In struts.xml: >> >> >> >> >> >> In JSP: >> === >> >> > namespace="xyz" validateFields="false" method="post" >> enctype="multipart/form-data"> >> >> >> Alongwith with configuring server.xml with maxPostSize element and >> mutipart-config in web.xml But still the file upload request for greater >> than 2 gb not successful. > > Define "Not successful"? Exceptions thrown? File truncated? Upload > never starts? Never finishes? > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hi, >Define "Not successful"? Exceptions thrown? File truncated? Upload >never starts? Never finishes? Not successful : Request Never finishes, we have trace the HttpServlet request object and request.getContentLength return 0 in case when file size is >=2GB, No exception thrown, as well as when file size is less than 2GB, then request.getContentLength return the correct value of file size in byte. Regards, Rahul Kumar Singh From: David kerber <dcker...@verizon.net> Sent: Tuesday, January 12, 2016 6:07 PM To: Tomcat Users List Subject: Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79] On 1/12/2016 12:01 AM, Rahul Singh wrote: > > Hello Apache Tomcat team, > > Sending again with some corrections, > > File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK > 1.7.79) is not successful for greater than 2 gb. After previous discussion > here on previous thread, I migrated my application to struts 2.3.24 as the > only possible solution in form of jakarta-stream parser for large size > uploads (greater than 2gb). > But after successfully migrating to struts 2.3.24 from 2.1.8, file upload > greater than 2 gb still not supported. I want to use jakarta-streams for this > purpose.Following is the code > snippet: > > > In struts.xml: > > > > > > In JSP: > === > > namespace="xyz" validateFields="false" method="post" > enctype="multipart/form-data"> > > > Alongwith with configuring server.xml with maxPostSize element and > mutipart-config in web.xml But still the file upload request for greater than > 2 gb not successful. Define "Not successful"? Exceptions thrown? File truncated? Upload never starts? Never finishes? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Apache Tomcat team, File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79) is not successful for greater than 2 gb. After previous discussion here on previous thread, I migrated my application to struts 2.3.24 as the only possible solution in form of jakarta-stream parser for large size uploads (greater than 2gb). But after successfully migrating to struts 2.3.24 from 2.1.8, file upload greater than 2 gb still not supported. I want to use jakarta-streams for this purpose.Following is the code snippet: In struts.xml:constant name="struts.multipart.parser" value="jakarta-stream" /constant name="struts.multipart.maxSize" value="3147483648" / jsp file:s:form id="uploadData" action="abc_UploadAction" namespace="xyz" validateFields="false" method="post" enctype="multipart/form-data" Alongwith with configuring server.xml with maxPostSize element and mutipart-config in web.xml But still the file upload request for greater than 2 gb not successful. Thanks Rahul
Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]
Hello Apache Tomcat team, Sending again with some corrections, File upload in my application(Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79) is not successful for greater than 2 gb. After previous discussion here on previous thread, I migrated my application to struts 2.3.24 as the only possible solution in form of jakarta-stream parser for large size uploads (greater than 2gb). But after successfully migrating to struts 2.3.24 from 2.1.8, file upload greater than 2 gb still not supported. I want to use jakarta-streams for this purpose.Following is the code snippet: In struts.xml: In JSP: === Alongwith with configuring server.xml with maxPostSize element and mutipart-config in web.xml But still the file upload request for greater than 2 gb not successful. Thanks Rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: logjam attacks in tomcat 7
Ok Thanks for your quick response.Could you please tell me the size of cipher key mentioned below is it stronger than 1024?ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA" > Subject: Re: logjam attacks in tomcat 7 > To: users@tomcat.apache.org > From: ma...@apache.org > Date: Thu, 1 Oct 2015 08:59:31 +0200 > > On 01/10/2015 07:08, Rahul Singh wrote: > > Yes i know this fix, > > i just want to know, waht is deafult cipher deatil, in my existing > > server.xml no cipher parameter value is mentioned.So please help me to > > understand the same. > > To quote the documentation: > > > By default, the default ciphers for the JVM will be used. Note that this > usually means that the weak export grade ciphers will be included in the > list of available ciphers. > > > If you want to know what that means for the JVM you are using then I > strongly recommend this site: > > https://www.ssllabs.com/ssltest/ > > Mark > > > > > > > > > > > >> Date: Thu, 1 Oct 2015 10:26:43 +0530 > >> Subject: Re: logjam attacks in tomcat 7 > >> From: srikanth.hu...@gmail.com > >> To: users@tomcat.apache.org > >> > >> Configuration like mentioned below should be able to resolve your issue: > >> > >> >> protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true" > >>maxThreads="150" scheme="https" secure="true" > >>keystoreType="JKS" keystoreFile="{{path_to_keystore}}" > >> keystorePass="{{ keystore_password }}" > >>clientAuth="false" sslEnabledProtocols="TLSv1, TLSv1.1, > >> TLSv1.2" > >> > >> ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, > >> > >> TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA, > >> > >> TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256, > >> TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA" /> > >> > >> Srikanth Hugar > >> www.gharki.com > >> > >> > >> > >> On Thu, Oct 1, 2015 at 10:22 AM, Rahul Singh <rksing...@hotmail.com> wrote: > >> > >>> Dear Tomcat Support Team,Thanks for your continuous support. > >>> In our Application Tomcat V 7.0.54 is used. We are facing the problem of > >>> "Server has a weak, ephemeral Diffie-Hellman public key > >>> ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY" > >>> In chrome browser. > >>> Tomcat server .xml have following configuration, which does not contain > >>> chipher, it means it used default cipher. > >>> >>> port="8585" minSpareThreads="5"enableLookups="true" > >>> redirectPort="8282"acceptCount="32" > >>> connectionTimeout="6"/> >>> SSLEnabled="true"enableLookups="true" > >>> acceptCount="32" scheme="https" secure="true" > >>> clientAuth="false" sslEnabledProtocols="TLSv1.2" > >>> > >>> algorithm="SunX509"/> > >>> Underline JAVA is : OpenJDK Runtime Environment (rhel-2.5.5.3.el6-x86_64 > >>> u79-b14) > >>> So could ypu please assist me to understand the following things. > >>> 1- What value of default cipher is using in My application.2- Does it > >>> require to update for working with lates Browser chrome and fixing the > >>> "Diffie-Hellman" security issue. > >>> Regards,Rahul kumar Singh > > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >
logjam attacks in tomcat 7
Dear Tomcat Support Team,Thanks for your continuous support. In our Application Tomcat V 7.0.54 is used. We are facing the problem of "Server has a weak, ephemeral Diffie-Hellman public key ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY" In chrome browser. Tomcat server .xml have following configuration, which does not contain chipher, it means it used default cipher. Underline JAVA is : OpenJDK Runtime Environment (rhel-2.5.5.3.el6-x86_64 u79-b14) So could ypu please assist me to understand the following things. 1- What value of default cipher is using in My application.2- Does it require to update for working with lates Browser chrome and fixing the "Diffie-Hellman" security issue. Regards,Rahul kumar Singh
RE: logjam attacks in tomcat 7
Yes i know this fix, i just want to know, waht is deafult cipher deatil, in my existing server.xml no cipher parameter value is mentioned.So please help me to understand the same. > Date: Thu, 1 Oct 2015 10:26:43 +0530 > Subject: Re: logjam attacks in tomcat 7 > From: srikanth.hu...@gmail.com > To: users@tomcat.apache.org > > Configuration like mentioned below should be able to resolve your issue: > > protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true" >maxThreads="150" scheme="https" secure="true" >keystoreType="JKS" keystoreFile="{{path_to_keystore}}" > keystorePass="{{ keystore_password }}" >clientAuth="false" sslEnabledProtocols="TLSv1, TLSv1.1, > TLSv1.2" > > ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, > > TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA, > > TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256, > TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA" /> > > Srikanth Hugar > www.gharki.com > > > > On Thu, Oct 1, 2015 at 10:22 AM, Rahul Singh <rksing...@hotmail.com> wrote: > > > Dear Tomcat Support Team,Thanks for your continuous support. > > In our Application Tomcat V 7.0.54 is used. We are facing the problem of > > "Server has a weak, ephemeral Diffie-Hellman public key > > ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY" > > In chrome browser. > > Tomcat server .xml have following configuration, which does not contain > > chipher, it means it used default cipher. > > > port="8585" minSpareThreads="5"enableLookups="true" > > redirectPort="8282"acceptCount="32" > > connectionTimeout="6"/> > SSLEnabled="true"enableLookups="true" > > acceptCount="32" scheme="https" secure="true" > > clientAuth="false" sslEnabledProtocols="TLSv1.2" > > > > algorithm="SunX509"/> > > Underline JAVA is : OpenJDK Runtime Environment (rhel-2.5.5.3.el6-x86_64 > > u79-b14) > > So could ypu please assist me to understand the following things. > > 1- What value of default cipher is using in My application.2- Does it > > require to update for working with lates Browser chrome and fixing the > > "Diffie-Hellman" security issue. > > Regards,Rahul kumar Singh
log4j:ERROR setFile(null,true) call failed.
Dear Tomcat team,thanks for your continuous support. please assist us to find the root cause of the below problem. during the start of tomcat server, the below error occurred. Jul 30, 2015 6:57:38 AM org.apache.coyote.AbstractProtocol initINFO: Initializing ProtocolHandler [http-bio-8585]Jul 30, 2015 6:57:38 AM org.apache.coyote.AbstractProtocol initINFO: Initializing ProtocolHandler [http-bio-8282]Jul 30, 2015 6:57:39 AM org.apache.catalina.startup.Catalina loadINFO: Initialization processed in 1601 msJul 30, 2015 6:57:39 AM org.apache.catalina.core.StandardService startInternalINFO: Starting service CatalinaJul 30, 2015 6:57:39 AM org.apache.catalina.core.StandardEngine startInternalINFO: Starting Servlet Engine: Apache Tomcat Serverlog4j:ERROR setFile(null,true) call failed.java.io.FileNotFoundException: /var/log/HYDRAstor/hydragui/hydragui.log (Permission denied)at java.io.FileOutputStream.open(Native Method)at java.io.FileOutputStream.init(FileOutputStream.java:221)at java.io.FileOutputStream.init(FileOutputStream.java:142)at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471) at org.apache.log4j.LogManager.clinit(LogManager.java:125)at org.apache.log4j.Logger.getLogger(Logger.java:105)at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:283) at org.apache.commons.logging.impl.Log4JLogger.init(Log4JLogger.java:108) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040) at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:838) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:664) at org.apache.commons.digester.Digester.init(Digester.java:303)at com.nec.hydragui.model2.biz.framework.menu.MenuFactory.parse(MenuFactory.java:88) at com.nec.hydragui.model2.biz.framework.menu.MenuFactory.init(MenuFactory.java:72) at com.nec.hydragui.utils.HydraServletContextListener.parseMenuConfig(HydraServletContextListener.java:84) at com.nec.hydragui.utils.HydraServletContextListener.contextInitialized(HydraServletContextListener.java:39) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)log4j:ERROR setFile(null,true) call failed.
RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file
Dear Konstantin, Sorry for the inconvenience caused due to the below!! We will take care this in future post. -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Thursday, July 23, 2015 2:09 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file 2015-07-23 8:49 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in: Dear Christopher, The solution is fine, but first thing we need to identify the root cause. If it is the problem of loading a JSP-based class file. Why it is happened in production environment? Any solid reason ? Who knows? It is your environment and your file. It is up to you to perform the diagnostics. (Or hire some 3rd party and to provide them access to your system). For starters, we do not know what file is broken. Also you stacktrace does not show the root cause. Where this class loading error was detected? There shall be stacktrace from java.lang.ClassFormatError that was wrapped by ServletException. You only provided 3 lines of stacktrace of ServletException. It may be compiler's fault -- current version is 7.0.63 and it has a newer version of compiler, or you are hitting some size limit -- quotas, disk partition size, 2Gb limit, etc., or you have broken file / faulty HDD -- Maybe not the class file for a JSP page is broken, but some other class file on your system http://tomcat.apache.org/lists.html#tomcat-users Rules: - 6. no top-posting - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7
Dear Christopher, On further debugging, I found out the difference is seen between 6.0.32 (same behavior as in 6.0.28 reported earlier) and 6.0.33 (same as in 7.0.54 reported earlier ) I could not figure out which change ( as mentioned in link https://tomcat.apache.org/tomcat-6.0-doc/changelog.html ) has caused this difference. Step to reproduce it? 1. Untar tomcat versions(Tomcat V6.0.32 and Tomcat V6.0.33) 2. Enable access log by uncommenting 'AccessLogValve' in conf/server.xml as shown below Valve className=org.apache.catalina.valves.AccessLogValve directory=${catalina.base}/logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ 3. Deploy a simple web application (login.jsp) in Tomcat. // login.jsp in tomcat html body % String str = request.getRequestURI(); System.out.println(str); out.println(str); % /body /html 4. Start tomcat 5. Run client wget to execute the login.jsp 6. View access log file entry -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, July 21, 2015 8:47 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7 -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rahul, On 7/21/15 6:38 AM, Rahul Kumar Singh wrote: “;jsessionid=C1A67FB90E1300DF14EE027A3634A34B” passed in URL localhost:8080/login.jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B is not received in tomcat 6(V6.0.28). It is received in tomcat 7(V7.0.54). What is reason for the different behavior? I'm not sure why the change in behavior, but when a client requests a protected resource, the container has to redirect that client to the login page. Before the redirect, a session is created to hold the saved-request to the originally-requested protected resource. This session id needs to be preserved. If the container can't tell if the client supports cookie-based session tracking, it must encode the session id in the login URL just in case. You'll find that, if you use a browser with cookies enabled, after the login page there will be no jsessionid path parameters in your URLs. Is the presence of the jsessionid path parameter a problem for you? (And at this point, it's really a good idea to start planning your upgrade path to Tomcat 8, which is quite reliable and stable. Tomcat 6 will EOL 2016-12-31: http://tomcat.apache.org/tomcat-60-eol.html) - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVrmJmAAoJEBzwKT+lPKRYhZ4P/0CcVBy4y8S4uXbgc/0ClZ3Z nD5IBoCei2B3Nek1ioK9gTKpvC+ft0XmQ8ZSoqLKKaz8yuBR8S4Ghts6XzTKogSL LKLm/WBoNlVw9WcD22HyiVx614irOWow1Z/kuWOHywxC1D+D9YGgN+I85xdc0ubo gV/7831REdUZdBM0m9D58p/LBZn57cBC79/MPFNOY+jgh2vRuvTjQ2wugH1F4GMi ll3Oj7DivwusVH5NBzR1kdr+8doM8IRTqpPJIXhptTlyZwCvo9BcdgQgapbAG0Ds mn3DKBSfiAbxXt64syerLyZWsU0kHWu9nMFaglprFSN+enGXZIDOsi1VxhUbms+A 9n3mFJn4oXNnQ4dIy6V2ZKmRNiMYspSqeVh0qNb34qZYqfQHTjV2e7MYU+cwBk44 qy77vB2FAiwrAu73bF/E0U+aw6PrvjX/S2/6hfN6rePh7+nwX2cYrEGMHd57rUQA OZWaJZ5YQAuguglkKQy7Kz6i7zpUy8IA0oKd7fEYweMBb8TxpxO9sck1UgRRu/Xl SvUGShSVgOSGqR22mHzIawmCiPacDQBg/c3IdqkegRhMnOuLnkM8s08/oeNRazSC ZLi8Ano7Yy97Mc064yKFn5pwFWSLCYN3p4brHkNrv49rulp5CUSU3jRZTdVCBueh MG41DNmnywwNsl4yaJBG =Ieud -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7
Dear Konstantin, On further debugging, I found out the difference is seen between 6.0.32 (same behavior as in 6.0.28 reported earlier) and 6.0.33 (same as in 7.0.54 reported earlier ) I could not figure out which change ( as mentioned in link https://tomcat.apache.org/tomcat-6.0-doc/changelog.html ) has caused this difference. Step to reproduce it? 1. Untar tomcat versions(Tomcat V6.0.32 and Tomcat V6.0.33) 2. Enable access log by uncommenting 'AccessLogValve' in conf/server.xml as shown below Valve className=org.apache.catalina.valves.AccessLogValve directory=${catalina.base}/logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ 3. Deploy a simple web application (login.jsp) in Tomcat. // login.jsp in tomcat html body % String str = request.getRequestURI(); System.out.println(str); out.println(str); % /body /html 4. Start tomcat 5. Run client wget to execute the login.jsp 6. View access log file entry -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Tuesday, July 21, 2015 5:32 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7 2015-07-21 14:38 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in: Hello Tomcat Team, “;jsessionid=C1A67FB90E1300DF14EE027A3634A34B” passed in URL localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B is not received in tomcat 6(V6.0.28) . It is received in tomcat 7(V7.0.54) . What is reason for the different behavior? I used WGET command to send same request to both version of tomcats. Access logs (logs/localhost_access_log.txt ) of both tomcat versions show the difference WGET REQUEST: wget localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B . Observations: TOMCAT 7.0.54 ACCESS LOGS: 127.0.0.1 - - [21/Jul/2015:08:30:13 +] GET /login.jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B HTTP/1.0 200 1063 -Original Message- From: Rahul Kumar Singh Sent: Tuesday, June 23, 2015 6:17 PM To: 'Tomcat Users List' Subject: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. Hello Tomcat team, In Tomcat7.0.54 We have observe that Login URL is Appended with JSESSIONID parameter in our Web Application Example: /framework/login.action;jsessionid=098D3C84B56FF2A2A25E88E4F059A20B System Configuration (WINDOW7+IE-8) Due to this session authentication get failed. 1. Step by step recipe to reproduce your issue = ? 2. 6.0.28 is old. The current one is 6.0.44 3. http://tomcat.apache.org/security-6.html CVE-2013-2067 ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file
Dear Christopher, The solution is fine, but first thing we need to identify the root cause. If it is the problem of loading a JSP-based class file. Why it is happened in production environment? Any solid reason ? Regads, Rahul Kumar Singh -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Wednesday, July 22, 2015 7:21 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rahul, On 7/21/15 11:02 PM, Rahul Kumar Singh wrote: Dear Christopher, Any quotas on the filesystem? No. Any idea which class it's having trouble loading? I have no idea on this but I have got the below exception: == 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: java.lang.ClassFormatError: Truncated class file at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli cationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:208) Well, it looks like you are having a problem loading a JSP-based class file. You could write a script to try to load each JSP .class file to see which one is broken. Something like this: $ for class in $(find . -name *.class) ; \ do \ echo $class \ javap -classpath [classpath] $(sed -e 's/\.class//' ) \ done For more reference there is some logs from Catalina.out after tomcat startup. Jul 17, 2015 11:58:33 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. This is unrelated to your real problem. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVr5+oAAoJEBzwKT+lPKRY54YQAJWJpc9wtHX5jZQS2eX0EqDD nPvlA9P7w3Oc27w8cTMDdLCXFT60ZqnNFjO3h3UHspJ0B6vBhn1xBUTePRzlnFPn 0qdcTVuTgyAfQzBPh1luqXaEFMi815OV+ptzte8PQtkfcZbwzuAmbt//i4SJdWPt 2ES2FMQlaydv+LpQwUst11eXJtvsLXixKBWlD3BkplZ1tWkHl0xsWHlV7E8qupAG LslCIV8hVLxYH1rOHbvirtmxDVpaqWGVEbFKq5oT/nBwDRmZWhyB+YcjOluY1KBl 1OtbhEAOuBjYMrtiYvc+gT2FcGk73U0V/diL5niq5LhzsoSwvthRTSp/abSZlzhd PF5RjtyS5AygdwqJMkYFeIcl3Di3/eFQhq/FQobdcuOXO+QcL4TMUTjrFc80rlE6 hIaQM0XgJbr7aIzLBDsY0WvksGnROwPt6PAlWBisSN9GAD/P2oqUNSzkQmH7UvPp gF2pGhLZvamNsWqcq+XUfrE2OwGrUsGfHmlxwdXg6ZbWpZ900rVJmLOSfg3xLW8x lYTKNofdofrZBX93ahp4/xK/UjmBH/ORP7JzXIuirhct3DvDnACPt0JC+WrVKWee N6aWxKJIIao5YIcT6h3wKY5Oo8Buakteds0xGmTbhzeAdc3oRxyqYQ/jyiRfjsNL issppLvjG+tCLBboK+3+ =a0Du -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file
Do you have sufficient free space on your hard drive? Maybe your disk is full. No, Disk Space is enough approx. ~ 96 GB Did it happen once only, or this is a repeating error? No it occurs multiple times. -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Tuesday, July 21, 2015 3:50 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file 2015-07-21 11:41 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in: Hello Tomcat team, Thanks for your always support !! Please do the needful on below problem. Web Application credential: - Servlet used :servelet3.0 MVC framework: Struts2.0 Java: Open JDK 1.7 We have observe the below error in production environment. What is the cause of the issue. == == 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: java.lang.ClassFormatError: Truncated class file at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi lterChain.java:208) == == Use case: 1- Http request Start. 2- Struts 2.0 filter executed. 3- FilterChain.dofiletr(httpRequest, httpResponse) [doFilter method] : error occurs here More log reference: == === at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassFormatError: Truncated class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:145) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) ... 83 more == === Your Help would be highly appreciated. Do you have sufficient free space on your hard drive? Maybe your disk is full. Did it happen once only, or this is a repeating error? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional
RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file
Dear Konstantin, Do you have sufficient free space on your hard drive? Maybe your disk is full. Did it happen once only, or this is a repeating error? -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Tuesday, July 21, 2015 3:50 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file 2015-07-21 11:41 GMT+03:00 Rahul Kumar Singh rahul.si...@nectechnologies.in: Hello Tomcat team, Thanks for your always support !! Please do the needful on below problem. Web Application credential: - Servlet used :servelet3.0 MVC framework: Struts2.0 Java: Open JDK 1.7 We have observe the below error in production environment. What is the cause of the issue. == == 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: java.lang.ClassFormatError: Truncated class file at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi lterChain.java:208) == == Use case: 1- Http request Start. 2- Struts 2.0 filter executed. 3- FilterChain.dofiletr(httpRequest, httpResponse) [doFilter method] : error occurs here More log reference: == === at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassFormatError: Truncated class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:145) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) ... 83 more == === Your Help would be highly appreciated. Do you have sufficient free space on your hard drive? Maybe your disk is full. Did it happen once only, or this is a repeating error? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file
Some more reference from catalina.out Jul 17, 2015 10:15:36 AM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.ClassFormatError: Truncated class file at java.lang.ClassLoader.defineClass1(Native Method) -Original Message- From: Rahul Kumar Singh [mailto:rahul.si...@nectechnologies.in] Sent: Wednesday, July 22, 2015 9:33 AM To: Tomcat Users List Subject: RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file Dear Christopher, Any quotas on the filesystem? No. Any idea which class it's having trouble loading? I have no idea on this but I have got the below exception: == 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: java.lang.ClassFormatError: Truncated class file at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) For more reference there is some logs from Catalina.out after tomcat startup. Jul 17, 2015 11:58:33 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Regards, Rahul -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, July 21, 2015 10:49 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rahul, On 7/21/15 10:32 AM, Rahul Kumar Singh wrote: Do you have sufficient free space on your hard drive? Maybe your disk is full. No, Disk Space is enough approx. ~ 96 GB Any quotas on the filesystem? Did it happen once only, or this is a repeating error? No it occurs multiple times. Any idea which class it's having trouble loading? - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVrn7wAAoJEBzwKT+lPKRYprcP/AmH3h58sRRF36LyDEm8ixwI JvbACxfAIcGJcGEi976zjcCQwVDe5jjUcPtMm83ygH1dA5p9u3qAFHXJehRS4T6W Xq1ZlXF1KrxWNY6jIwWoX2Ut1+3OkBWw2AMuzyR6HcKCHm9975JEzg5lXgpQLcMU tC2iRHWNZVYGUzq4mCBSqyn27H3z+8uxn14a2tBetxBdimAwyGThxLhJsQUfjUc7 cpbw2nnv9E+RnjamU6zGIqPPTUiY7PzChCiBhfJVWRRig1nxqAg3VOi0rYkC3EL8 iAntsUfJsYc6thLm8dv2dRsrm6Nxc1P9gLE/3mPJfae84ya2knSRkADGtNs8JNwi rYokc6T8KgPNWNvNO5OjEIZIUR4idaBenw9mjVwGrjH0WRvt7OQ7hoVGPq9kzce5 h0Ob+UL7zWrPXJ+F7AAB4SwfGnToq6WFOtQCt4cOhSIIySxsJsESdKN0G0hudLYp WHrVh9cD6t7e4T1YJCcrrs5YP5XAuT5A2SIxtXexGsJ4D52HuvdiyD9O4RWCXNnm j9/dDiPKmhsRYbg7TcEC6O+ggxFdDSzLosM+sPe41eAmhgAYguWskRwdKpE/MYAx /ZLMsvieGtkoQkbWHBrx9JU6tlKiwh1u5hyGEu4B/IR3JWVL4/5PVozBL2LYq9jT O5gV21MzzkL2lB5Oy5al =wMn+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---B CB [ X ܚX KK[XZ[ \ \ ][ X ܚX P X ] \X K ܙ B ܈Y][ۘ[ [X[ K[XZ[ \ \ Z[ X ] \X K ܙ B DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC
RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file
Dear Christopher, Any quotas on the filesystem? No. Any idea which class it's having trouble loading? I have no idea on this but I have got the below exception: == 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: java.lang.ClassFormatError: Truncated class file at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) For more reference there is some logs from Catalina.out after tomcat startup. Jul 17, 2015 11:58:33 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Regards, Rahul -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, July 21, 2015 10:49 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rahul, On 7/21/15 10:32 AM, Rahul Kumar Singh wrote: Do you have sufficient free space on your hard drive? Maybe your disk is full. No, Disk Space is enough approx. ~ 96 GB Any quotas on the filesystem? Did it happen once only, or this is a repeating error? No it occurs multiple times. Any idea which class it's having trouble loading? - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVrn7wAAoJEBzwKT+lPKRYprcP/AmH3h58sRRF36LyDEm8ixwI JvbACxfAIcGJcGEi976zjcCQwVDe5jjUcPtMm83ygH1dA5p9u3qAFHXJehRS4T6W Xq1ZlXF1KrxWNY6jIwWoX2Ut1+3OkBWw2AMuzyR6HcKCHm9975JEzg5lXgpQLcMU tC2iRHWNZVYGUzq4mCBSqyn27H3z+8uxn14a2tBetxBdimAwyGThxLhJsQUfjUc7 cpbw2nnv9E+RnjamU6zGIqPPTUiY7PzChCiBhfJVWRRig1nxqAg3VOi0rYkC3EL8 iAntsUfJsYc6thLm8dv2dRsrm6Nxc1P9gLE/3mPJfae84ya2knSRkADGtNs8JNwi rYokc6T8KgPNWNvNO5OjEIZIUR4idaBenw9mjVwGrjH0WRvt7OQ7hoVGPq9kzce5 h0Ob+UL7zWrPXJ+F7AAB4SwfGnToq6WFOtQCt4cOhSIIySxsJsESdKN0G0hudLYp WHrVh9cD6t7e4T1YJCcrrs5YP5XAuT5A2SIxtXexGsJ4D52HuvdiyD9O4RWCXNnm j9/dDiPKmhsRYbg7TcEC6O+ggxFdDSzLosM+sPe41eAmhgAYguWskRwdKpE/MYAx /ZLMsvieGtkoQkbWHBrx9JU6tlKiwh1u5hyGEu4B/IR3JWVL4/5PVozBL2LYq9jT O5gV21MzzkL2lB5Oy5al =wMn+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. | why there is different behaviour in Tomcat 6 and Tomcat 7
Hello Tomcat Team, “;jsessionid=C1A67FB90E1300DF14EE027A3634A34B” passed in URL localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B is not received in tomcat 6(V6.0.28) . It is received in tomcat 7(V7.0.54) . What is reason for the different behavior? I used WGET command to send same request to both version of tomcats. Access logs (logs/localhost_access_log.txt ) of both tomcat versions show the difference WGET REQUEST: wget localhost:8080/login. jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B . Observations: TOMCAT 7.0.54 ACCESS LOGS: 127.0.0.1 - - [21/Jul/2015:08:30:13 +] GET /login.jsp;jsessionid=C1A67FB90E1300DF14EE027A3634A34B HTTP/1.0 200 1063 -Original Message- From: Rahul Kumar Singh Sent: Tuesday, June 23, 2015 6:17 PM To: 'Tomcat Users List' Subject: Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID. Hello Tomcat team, In Tomcat7.0.54 We have observe that Login URL is Appended with JSESSIONID parameter in our Web Application Example: /framework/login.action;jsessionid=098D3C84B56FF2A2A25E88E4F059A20B System Configuration (WINDOW7+IE-8) Due to this session authentication get failed. But in Tomcat 6 It is not happening. Could any one help me on this from Apache Tomcat community. Regards, Rahul Kumar Singh DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: Tomcat 7 (7.0.54) java.lang.ClassFormatError: Truncated class file
Hello Tomcat team, Thanks for your always support !! Please do the needful on below problem. Web Application credential: - Servlet used :servelet3.0 MVC framework: Struts2.0 Java: Open JDK 1.7 We have observe the below error in production environment. What is the cause of the issue. 2015-07-17 09:53:50,860 ERROR javax.servlet.ServletException: java.lang.ClassFormatError: Truncated class file at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Use case: 1- Http request Start. 2- Struts 2.0 filter executed. 3- FilterChain.dofiletr(httpRequest, httpResponse) [doFilter method] : error occurs here More log reference: = at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassFormatError: Truncated class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:145) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) ... 83 more = Your Help would be highly appreciated. Regards, Rahul Kumar Singh DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately
Tomcat 7 (7.0.54) Login URL is Passing with JSESSION ID.
Hello Tomcat team, In Tomcat7.0.54 We have observe that Login URL is Appended with JSESSIONID parameter in our Web Application Example: /framework/login.action;jsessionid=098D3C84B56FF2A2A25E88E4F059A20B System Configuration (WINDOW7+IE-8) Due to this session authentication get failed. But in Tomcat 6 It is not happening. Could any one help me on this from Apache Tomcat community. Regards, Rahul Kumar Singh DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
SSL / TLS compression | SPDY service|CVE-2012-4929
Hello Tomcat support team, Thanks for your continuous support. Problem : Security issue | CVE-2012-4929 Overview: The TLS protocol 1.2 and earlier, as used in Mozilla Firefox, Google Chrome, Qt, and other products, can encrypt compressed data without properly obfuscating the length of the unencrypted data, which allows man-in-the-middle attackers to obtain plaintext HTTP headers by observing length differences during a series of guesses in which a string in an HTTP request potentially matches an unknown string in an HTTP header, aka a CRIME attack. The remote service has one of two configurations that are known to be required for the CRIME attack: - SSL / TLS compression is enabled. The attack allows an attacker to reveal sensitive information that is being passed inside an encrypted SSL tunnel. The most straightforward way to leverage this vulnerability is to use it to retrieve cookies being passed by an application and use them to login to the application as the victim The TLS protocol encrypts compressed data without properly obfuscating the length of the unencrypted data. Successful exploitation may result in a remote attacker conducting man-in-the-middle attacks. According to our analysis seems: (No SSL compression in IE, Firefox has disabled it from V15.0 in 2012 and already disbaled in latest version of chrome).- TLS advertises the SPDY protocol earlier than version 4. Solution: Disable compression and / or the SPDY service. So how to disable compression and / or the SPDY service in tomcat6. Regards, Rahul Kumar Singh DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: SSL / TLS compression | SPDY service|CVE-2012-4929
Ok I understand, Is it mentioned somewhere in tomcat spec. That it is not being used in JSSE connector. Based on the above answer my next question: If any browser is affected with this CVE , then what happen, e.g IE-11. If user tries to open the web application from IE-11 , then what happen. From: Ognjen Blagojevic [ognjen.d.blagoje...@gmail.com] Sent: Friday, March 27, 2015 8:34 PM To: Tomcat Users List Subject: Re: SSL / TLS compression | SPDY service|CVE-2012-4929 Rahul, On 27.3.2015 14:42, Rahul Kumar Singh wrote: So how to disable compression and / or the SPDY service in tomcat6. If you are using JSSE connectors (BIO/NIO/NIO2), compression is already disabled because JSSE does not support it, and there is no support for SPDY protocol on those connectors. If you are using APR/Native connector, if you didn't explicitly enabled it, SPDY is disabled by default. You may disable TLS compression using APR/Native connector parameter SSLDisableCompression=true. -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Hello Tomcat support Team, One important observation from the GC logs reported in tomcat 7. GC execution time is increased in tomcat7, which increased the young gen capacity of java heap and resident memory of tomcat process is reported by Linux top , which is bounded by the java virtual memory. That is why resident memory is also increase. Could anyone from apache Group look into this observation/problem. GC Logs are attached in the mail for both tomcat 6 and tomcat 7. = Regards, Rahul Kumar Singh -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Wednesday, March 25, 2015 4:11 AM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rainer Jung wrote: Some numbers from a test here on RHEL 6, using Java 1.7.0_76 and TC 6.0.43, 7.0.59 and 8.0.20. Measurement is taken directly after start (a) plus once after one request to a non-existing page and two full GCs (b). Only manager was deployed, not example webapps or docs. GC was run using jcmd PID GC.run Numbers from ps RSSa RSSb SZaSZbVSZaVSZb tc6 62372 68336 272952 273532 1091808 1094128 tc7 63608 70456 271710 271978 1086840 1087912 tc8 72576 79140 272257 272525 1089028 1090100 Differences between TC6 and 7 marginal, differences between tc7 and 8 only noticable in RSS, around 9MB. Numbers from jstat -gc. First Capacity: Semi Spaces start with 512KB and grow to 768.0KB (TC6), 896.0KB (tc7) and 1024.0 (tc8). Those indicate increasing allocations, but are not relevant for total memory use. Edena EdenbOldaOldb Perma Permb tc6 4288.0 6656.0 10688.0 16320.0 21248.0 21248.0 tc7 4288.0 7168.0 10688.0 17904.0 21248.0 21248.0 tc8 6144.0 8640.0 15316.0 21316.0 21248.0 21248.0 Again this is capacity so including garbage and unused. We see that Perm is unchanged. For all versions Eden grows by 2.4-2.9 MB due to allocation activity. Numbers for tc6 and 7 are again very similar, tc8 numbers are slightly higher already after startup. Old (Tenured) grows by about 6-7MB, again very similar for tc 6 and tc 7 and slightly higher for TC 8. Now for the used numbers after GC, which are more relevant (allocation rates are another topic): Edena EdenbOldaOldb Perma Permb tc6 2910.8 69.3 7231.7 7984.1 13923.0 14429.1 tc7 2326.1 73.8 8504.4 9661.2 13910.1 15340.1 tc8 203.7 60.9 10577.6 12599.7 16183.3 17653.8 So the live objects are Edenb+Oldb: Edenb+Oldb tc6 8053.4 tc7 9735.0 tc8 12660.6 And here we see some increase but the total amount of about 2MB between tc 6 and 7 and about another 3 MB between 7 and 8 seems to be not really problematic. The same holds true for perm, there's an increase of about 1MB between 6 and 7 and 2 MB between 7 and 8. Finally: where does the difference between RSS, Sz and the sum of heap and eden come from? Example for TC 8 case b: RSS: 79140 SZ: 272525 Sum of RSS due to smaps: 79088 so roughly consistent. S0+S1+E+O+P capacity: 53252, but Rss 40872, so a delta of 38MB to RSS. smaps entries that can be identified: TypeSize Rss Perm 21248 17656 Old21316 15040 Eden+S0+S1 10688 8176 libjvm.so 11732 7712 (read-only) Then about 21 thread stack reservations, total Size 21676, total Rss 2804. So the delta goes down to 38 - 7.7 - 2.8 = 28MB. Some more segments, that I can't fully interprete are: Size Rssfrom -to Perm File 8852 7648 7f281800-7f28188a5000 rw-p 8940 6496 7f281400-7f28148bb000 rw-p 51116 4064 7f283527-7f283845b000 rw-p 2496 2048 7f283500-7f283527 rwxp 1788 1732 7f283d443000-7f283d602000 r--s .../lib/rt.jar 3304 1444 7f282c00-7f282c33a000 rw-p 784 784 7f283f1d9000-7f283f29d000 rw-p .../lib/amd64/server/libjvm.so 1564 648 3f6d20-3f6d387000 r-xp /lib64/libc-2.12.so 536 524 7f283000-7f2830086000 rw-p 272 208 7f283f29d000-7f283f2e1000 rw-p and those nearly make up the missing 28MB Rss (whatever they are). I don't know how to describe the above, nor the dedication that went into gathering that (and at this late European hour at that). Brilliant ? In any case, thank you. But now, for the mere humans among us, what does it mean in terms of the OP and his original question : why does Tomcat 7 seem to be using 70 MB more memory at startup than Tomcat 6 ? Is it : - it doesn't matter. The numbers shown are wrong, and if you run 10 instances of Tomcat 7 at the same time, you will see that they are not really using 700 MB more than before. or - it is normal and expected. Tomcat 7 - because of the new Servlet Spec - needs to borogrove the watchamecalits, and this is using 70 MB more heap than before. In return, you get a 25% performance improvement later
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Some of the observations during the GC call monitoring / heap dump from JMAP: Tomcat Version Stages Java Heap Usage Java Heap Capacity Virtual memory (by top) Resident Memory (by top) Tomcat 6 After tomcat startup 17.18 MB 367.8 MB 6712 MB 175 MB After functional operation 18.77 MB 367.8 MB 6745 MB 207 MB After Operation 45.51 MB 331.0 MB 6745 MB 235 MB Tomcat 7 After tomcat startup 57.90 MB 655.8 MB 6795 MB 423 MB After functional operation 97.64 MB 655.8 MB 6828 MB 558 MB After Operation 142.58 MB 1864.0 MB 6828 MB 1000 MB Observation: • Top’s reported virtual memory is approximately same. • Resident memory correlates with Java heap capacity. Refer to next slide for details. -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Tuesday, March 24, 2015 9:00 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Johan Compagner wrote: I understand all that. But the basic view, from a sysadmin's point of view is this : Tomcat 6(6.0.28) Virtual Memory: 6772 MB Resident Memory: 81 MB Tomcat 7(7.0.54) Virtual Memory: 6778 MB Resident Memory: 148 MB what does that Resident exactly mean here? i guess the total heap the java vm has taken after startup? Because that could be quite logical, maybe tomcat 7 needs a lot more data because of that annotation scanning Doesn't it load in way more classes? All that processing and then also maybe loading in up front way more classes then before will mean that the heap (and none heap in this scenario) is already way more loaded. That's the kind of thing that I mean. The OP is asking : assuming the same host, the same JVM, the same startup parameters, the same default ROOT application, why does Tomcat 7 seem to be using 70 MB more RAM at startup than Tomcat 6 ? The answer can be : - it doesn't matter. The numbers shown are wrong, and if you run 10 instances of Tomcat 7 at the same time, you will see that they are not really using 700 MB more than before. or - it is normal and expected. Tomcat 7 - because of the new Servlet Spec - needs to borogrove the watchamecalits, and this is using 70 MB more heap than before. In return, you get a 25% performance improvement later.. or - we have no clue. It does not happen on other machines, so there must be something special on your machine, and to find out what we need heap dumps. or ??? The OP just wants to know which, but instead we are just telling him that he should take heap dumps or examine cryptic memory allocation displays etc.. He may not be adverse to that in the end, but some basic preliminary guidance may be helpful. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.orgmailto:users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.orgmailto:users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : Tomcat7 application user 5597 1 38 02:11 ?00:00:13 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : Tomcat6 application user 2860 1 0 10:34 ?00:01:35 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start Also, which exact example Tomcat application are you deploying in both cases above ? The default application came with apache tomcat 6 and tomcat7 -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 5:27 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Hello André Warnier, Thanks for your response. That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. Yes, we have done the above suggested exercise. And got the below output of top command result. Development environment: === RAM: 25 GB CPU: CPU Intel(R) Xeon(R) CPU X5450 @ 3.00GHz OS: RHEL Linux (5.8) == Tomcat 6(6.0.28) Virtual Memory: 6772 MB Resident Memory: 81 MB Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : Tomcat 7(7.0.54) Virtual Memory: 6778 MB Resident Memory: 148 MB Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : (That is for us to know if, for example, there are any command-line parameters that might explain the difference) Also, which exact example Tomcat application are you deploying in both cases above ? Note: these questions are not asked to annoy you, or to delay a response. You realise that Tomcat is open-source free software, and that the people manning this forum are doing that for free, on their own time. Also simulating your case will require someone to spend some time creating the same setup as yours. So all in all, the more precise information which you provide, the more time you allow these people to save in order to give you an accurate answer, and the faster you will have that answer. And if you want to know about heap dumps, this looks like a good start : http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-java-virtual-machine (searching Google for tomcat heap dump) If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. The initial value is also somewhere double of tomcat6. Regards, Rahul Kumar Singh -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 2:32 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Dear Thomas, Thanks for your quick response, Tomcat doesn't use anything like that much memory on its own. I suspect it is the application although the difference between Tomcat 6 and Tomcat 7 is unexpected. Ok, I understand, But could you please confirm us theoretically that is there any difference in initial memory requirement of tomcat6 and tomcat 7? That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Plz ignore previous mail -Original Message- From: Rahul Kumar Singh Sent: Monday, March 23, 2015 6:05 PM To: Tomcat Users List Subject: RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : application user 2860 1 0 10:34 ?00:01:35 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/hydra-tomcat/temp org.apache.catalina.startup.Bootstrap start Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 5:27 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Hello André Warnier, Thanks for your response. That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. Yes, we have done the above suggested exercise. And got the below output of top command result. Development environment: === RAM: 25 GB CPU: CPU Intel(R) Xeon(R) CPU X5450 @ 3.00GHz OS: RHEL Linux (5.8) == Tomcat 6(6.0.28) Virtual Memory: 6772 MB Resident Memory: 81 MB Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : Tomcat 7(7.0.54) Virtual Memory: 6778 MB Resident Memory: 148 MB Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : (That is for us to know if, for example, there are any command-line parameters that might explain the difference) Also, which exact example Tomcat application are you deploying in both cases above ? Note: these questions are not asked to annoy you, or to delay a response. You realise that Tomcat is open-source free software, and that the people manning this forum are doing that for free, on their own time. Also simulating your case will require someone to spend some time creating the same setup as yours. So all in all, the more precise information which you provide, the more time you allow these people to save in order to give you an accurate answer, and the faster you will have that answer. And if you want to know about heap dumps, this looks like a good start : http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-java-virtual-machine (searching Google for tomcat heap dump) If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. The initial value is also somewhere double of tomcat6. Regards, Rahul Kumar Singh -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 2:32 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Dear Thomas, Thanks for your quick response, Tomcat doesn't use anything like that much memory on its own. I suspect it is the application although the difference between Tomcat 6 and Tomcat 7 is unexpected. Ok, I understand, But could you please confirm us theoretically that is there any difference in initial memory requirement of tomcat6 and tomcat 7? That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : application user 2860 1 0 10:34 ?00:01:35 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/hydra-tomcat/temp org.apache.catalina.startup.Bootstrap start Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 5:27 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Hello André Warnier, Thanks for your response. That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. Yes, we have done the above suggested exercise. And got the below output of top command result. Development environment: === RAM: 25 GB CPU: CPU Intel(R) Xeon(R) CPU X5450 @ 3.00GHz OS: RHEL Linux (5.8) == Tomcat 6(6.0.28) Virtual Memory: 6772 MB Resident Memory: 81 MB Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : Tomcat 7(7.0.54) Virtual Memory: 6778 MB Resident Memory: 148 MB Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : (That is for us to know if, for example, there are any command-line parameters that might explain the difference) Also, which exact example Tomcat application are you deploying in both cases above ? Note: these questions are not asked to annoy you, or to delay a response. You realise that Tomcat is open-source free software, and that the people manning this forum are doing that for free, on their own time. Also simulating your case will require someone to spend some time creating the same setup as yours. So all in all, the more precise information which you provide, the more time you allow these people to save in order to give you an accurate answer, and the faster you will have that answer. And if you want to know about heap dumps, this looks like a good start : http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-java-virtual-machine (searching Google for tomcat heap dump) If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. The initial value is also somewhere double of tomcat6. Regards, Rahul Kumar Singh -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 2:32 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Dear Thomas, Thanks for your quick response, Tomcat doesn't use anything like that much memory on its own. I suspect it is the application although the difference between Tomcat 6 and Tomcat 7 is unexpected. Ok, I understand, But could you please confirm us theoretically that is there any difference in initial memory requirement of tomcat6 and tomcat 7? That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Dear Thomas, Thanks for your quick response, Tomcat doesn't use anything like that much memory on its own. I suspect it is the application although the difference between Tomcat 6 and Tomcat 7 is unexpected. Ok, I understand, But could you please confirm us theoretically that is there any difference in initial memory requirement of tomcat6 and tomcat 7? Above question is because of the below observation. 1-The deployed application is same. Even no difference in deployment scenario and no change in application. 2-The underlining java environment is also same. (java version 1.7.0_09-icedtea OpenJDK Runtime Environment (rhel-2.3.3.el5.1-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)), 3-The initial memory of tomcat is increased by three times. Regards, Rahul Kumar Singh -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, March 23, 2015 1:13 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) On 23/03/2015 07:05, Rahul Kumar Singh wrote: Hi Tomcat support team, While upgrading Tomcat from tomcat 6(6.0.28) to tomcat 7 (7.0.54). the following problem happens. TOMCAT 7 (7.0.54) memory consumption increased about approx. 3 times compare to the existing tomcat 6 (6.0.28) memory consumption. Tomcat 6.0.28 memory consumption MAP. RESIDENT MEMORY:300-400 MB Approx. Tomcat 7.0.54 memory consumption MAP. RESIDENT MEMORY:900-1800 MB Approx. Underline java platform is same(OpenJDK7) in both tomcat 6 and tomcat 7. Now question is that, why the memory consumption increased about 3 times in Tomcat 7. Tomcat doesn't use anything like that much memory on its own. I suspect it is the application although the difference between Tomcat 6 and Tomcat 7 is unexpected. The only way to find out what is going on is to look at what is using that memory. You'll need to take a heap dump and/or use a profiler to find out. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.orgmailto:users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.orgmailto:users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Really? The Tomcat ROOT web application is taking up 3 times as much heap space in Tomcat 6 as Tomcat 7? Yes. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, March 23, 2015 7:52 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rahul, On 3/23/15 8:39 AM, Rahul Kumar Singh wrote: Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : Tomcat7 application user 5597 1 38 02:11 ?00:00:13 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : Tomcat6 application user 2860 1 0 10:34 ?00:01:35 /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start Also, which exact example Tomcat application are you deploying in both cases above ? The default application came with apache tomcat 6 and tomcat7 Really? The Tomcat ROOT web application is taking up 3 times as much heap space in Tomcat 6 as Tomcat 7? - -chris -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 5:27 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Hello André Warnier, Thanks for your response. That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. Yes, we have done the above suggested exercise. And got the below output of top command result. Development environment: === RAM: 25 GB CPU: CPU Intel(R) Xeon(R) CPU X5450 @ 3.00GHz OS: RHEL Linux (5.8) == Tomcat 6(6.0.28) Virtual Memory: 6772 MB Resident Memory: 81 MB Exact command-line that starts Tomcat6 (as given e.g. by ps -ef | grep java) : Tomcat 7(7.0.54) Virtual Memory: 6778 MB Resident Memory: 148 MB Exact command-line that starts Tomcat7 (as given e.g. by ps -ef | grep java) : (That is for us to know if, for example, there are any command-line parameters that might explain the difference) Also, which exact example Tomcat application are you deploying in both cases above ? Note: these questions are not asked to annoy you, or to delay a response. You realise that Tomcat is open-source free software, and that the people manning this forum are doing that for free, on their own time. Also simulating your case will require someone to spend some time creating the same setup as yours. So all in all, the more precise information which you provide, the more time you allow these people to save in order to give you an accurate answer, and the faster you will have that answer. And if you want to know about heap dumps, this looks like a good start : http://www.jahia.com/community/blogs/tips-and-tricks-for-analyzing-jav a-virtual-machine (searching Google for tomcat heap dump) If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. The initial value is also somewhere double of tomcat6. Regards, Rahul Kumar Singh -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 2:32 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Dear Thomas, Thanks for your quick response, Tomcat doesn't use anything like that much memory on its own. I suspect it is the application although the difference between Tomcat 6 and Tomcat 7 is unexpected. Ok, I understand, But could you please confirm us theoretically that is there any difference in initial memory
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Just remember that the numbers out of top are at best approximations, and, as Rainer pointed out, not taking measurements immediately after a GC is a guarantee of an apples versus oranges comparison. The appropriate tools (e.g., VisualVM) must be used for any rational analysis. During the analysis, top is referred for memory report too. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Monday, March 23, 2015 8:03 PM To: Tomcat Users List Subject: RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Really? The Tomcat ROOT web application is taking up 3 times as much heap space in Tomcat 6 as Tomcat 7? Just remember that the numbers out of top are at best approximations, and, as Rainer pointed out, not taking measurements immediately after a GC is a guarantee of an apples versus oranges comparison. The appropriate tools (e.g., VisualVM) must be used for any rational analysis. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Hi Tomcat support team, While upgrading Tomcat from tomcat 6(6.0.28) to tomcat 7 (7.0.54). the following problem happens. TOMCAT 7 (7.0.54) memory consumption increased about approx. 3 times compare to the existing tomcat 6 (6.0.28) memory consumption. Tomcat 6.0.28 memory consumption MAP. RESIDENT MEMORY:300-400 MB Approx. Tomcat 7.0.54 memory consumption MAP. RESIDENT MEMORY:900-1800 MB Approx. Underline java platform is same(OpenJDK7) in both tomcat 6 and tomcat 7. Now question is that, why the memory consumption increased about 3 times in Tomcat 7. Regards, Rahul Kumar Singh DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . ---
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Hello André Warnier, Thanks for your response. That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. Yes, we have done the above suggested exercise. And got the below output of top command result. Development environment: === RAM: 25 GB CPU: CPU Intel(R) Xeon(R) CPU X5450 @ 3.00GHz OS: RHEL Linux (5.8) == Tomcat 6(6.0.28) Virtual Memory: 6772 MB Resident Memory: 81 MB Tomcat 7(7.0.54) Virtual Memory: 6778 MB Resident Memory: 148 MB If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. The initial value is also somewhere double of tomcat6. Regards, Rahul Kumar Singh -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, March 23, 2015 2:32 PM To: Tomcat Users List Subject: Re: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28) Rahul Kumar Singh wrote: Dear Thomas, Thanks for your quick response, Tomcat doesn't use anything like that much memory on its own. I suspect it is the application although the difference between Tomcat 6 and Tomcat 7 is unexpected. Ok, I understand, But could you please confirm us theoretically that is there any difference in initial memory requirement of tomcat6 and tomcat 7? That should be much easier and quicker to check this by yourself, as you obviously already have the 2 Tomcat versions up and running. Remove your own application, deploy one of the standard Tomcat-examples applications, and have a look. If there is still a big difference between v6 and v7, then come back here. At least then there will be a reproducible test case for someone here to have a closer look. And if there is not a big difference, then obviously it must have something to with your application. And then, follow Mark's already-given advice to find out what. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NEC or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NEC or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 (7.0.54) memory consuption is very high(3 times) than Tomcat 6 (6.0.28)
Also interesting is cat /proc/PID/maps but here one would need to calculate sizes per line from the two hex addresses given at the start of each line. Something like: cat /proc/PID/maps | perl -n -e '($a,$b)=split(/[- ]/);print hex($b)-hex($a), , $_;' | sort -n (replace PID by the current Tomcat java process id). Command: cat /proc/19487/maps | perl -n -e '($a,$b)=split(/[- ]/);print hex($b) -hex($a), , $_;' |sort -n abc.txt OUTPUT 0d4b8000-0e736000 rw-p 0d4b8000 00:00 0 [heap] ff60-ffe0 ---p 00:00 0 [vsyscall] 2aaab000-2aab3000 r--s 00061000 09:01 2519920 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/ext/gnome-java-bridge.jar 2aab3000-2aab5000 r--s 6000 09:01 1834753 /opt/tomcat/bin/bootstrap.jar 2aab5000-2aab6000 r--s 5000 09:01 1834758 /opt/tomcat/bin/commons-daemon.jar 2aab6000-2aab8000 r--s 8000 09:01 1834770 /opt/tomcat/bin/tomcat-juli.jar 2aab8000-2aac5000 r-xp 09:01 2519898 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libverify.so 2aac5000-2acc4000 ---p d000 09:01 2519898 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libverify.so 2acc4000-2acc6000 rw-p c000 09:01 2519898 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libverify.so 2acc6000-2acef000 r-xp 09:01 2519877 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libjava.so 2acef000-2aeee000 ---p 00029000 09:01 2519877 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libjava.so 2aeee000-2aef rw-p 00028000 09:01 2519877 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libjava.so 2aef-2aef1000 r--p 2aef 00:00 0 2aef1000-2aef2000 rw-p 2aef1000 00:00 0 2aef2000-2aefa000 rw-s 09:01 2056360 /tmp/hsperfdata_app/19487 2aefe000-2af08000 r-xp 09:01 261147 /lib64/libnss_files-2.5.so 2af08000-2b107000 ---p a000 09:01 261147 /lib64/libnss_files-2.5.so 2b107000-2b108000 r--p 9000 09:01 261147 /lib64/libnss_files-2.5.so 2b108000-2b109000 rw-p a000 09:01 261147 /lib64/libnss_files-2.5.so 2b109000-2b111000 r-xp 09:01 2519899 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libzip.so 2b111000-2b31 ---p 8000 09:01 2519899 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libzip.so 2b31-2b311000 rw-p 7000 09:01 2519899 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libzip.so 2b311000-2b771000 rwxp 2b311000 00:00 0 2b771000-2e311000 rw-p 2b771000 00:00 0 2e311000-2e323000 rw-p 2e311000 00:00 0 2e323000-2e3d1000 rw-p 2e323000 00:00 0 2e3d1000-2e3e rw-p 2e3d1000 00:00 0 2e3e-2e424000 rw-p 2e3e 00:00 0 2e424000-2e51f000 rw-p 2e424000 00:00 0 2e51f000-2f3cd000 rw-p 2e51f000 00:00 0 2f3cd000-2f60c000 rw-p 2f3cd000 00:00 0 2f60c000-2f6ec000 ---p 2f60c000 00:00 0 2f6ec000-2fba2000 rw-p 2f6ec000 00:00 0 2fba2000-2fc9e000 rw-p 2fba2000 00:00 0 2fc9e000-2aaab0b4d000 rw-p 2fc9e000 00:00 0 2aaab0b4d000-2aaab0b5c000 rw-p 2aaab0b4d000 00:00 0 2aaab0b5c000-2aaab0ba rw-p 2aaab0b5c000 00:00 0 2aaab0ba-2aaace81c000 rw-p 2aaab0ba 00:00 0 2aaace81c000-2aaace9d7000 r--s 01c8f000 09:01 2519963 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/rt.jar 2aaace9d7000-2aaad0cd4000 rw-p 2aaace9d7000 00:00 0 2aaad0cd4000-2aaad42a3000 r--p 09:01 2227921 /usr/lib/locale/locale-archive 2aaad42a3000-2aaad42b3000 r-xp 09:01 2519890 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnio.so 2aaad42b3000-2aaad44b3000 ---p 0001 09:01 2519890 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnio.so 2aaad44b3000-2aaad44b4000 rw-p 0001 09:01 2519890 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnio.so 2aaad44b4000-2aaad44c9000 r-xp 09:01 2519889 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnet.so 2aaad44c9000-2aaad46c9000 ---p 00015000 09:01 2519889 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libnet.so 2aaad46c9000-2aaad46ca000 rw-p 00015000 09:01 2519889
CGI script to work on Tomcat
Hi I am trying to migrate something which was working under apache to tomcat. I had an html form which takes user input values and pass those values and executes some cgi scripts. But when I moved html and cgi under tomcat, the html form is loading properly, but when I click submit, its giving 404 error for the cgi execution. I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi Tomcat Version: 7.0.54 And in my html form I have mentioned the cgi location as action='./WEB-INF/cgi/read_toggle.cgi' I followed the steps mentioned in the below url. http://www.wellho.net/solutions/java-running-cgi-scripts-in-apache-tomcat.html I don't see anything in the catalina.out or any other logs. Kindly me help to fix this issue. -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Re: CGI script to work on Tomcat
Thanks Mark for your suggestion. But by privileged, did you mean to add an entry like below on context.xml? Context privileged=true /Context On Fri, Jun 20, 2014 at 5:46 PM, Mark Thomas ma...@apache.org wrote: On 20/06/2014 12:49, Rahul R wrote: Hi I am trying to migrate something which was working under apache to tomcat. I had an html form which takes user input values and pass those values and executes some cgi scripts. But when I moved html and cgi under tomcat, the html form is loading properly, but when I click submit, its giving 404 error for the cgi execution. I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi Tomcat Version: 7.0.54 And in my html form I have mentioned the cgi location as action='./WEB-INF/cgi/read_toggle.cgi' I followed the steps mentioned in the below url. http://www.wellho.net/solutions/java-running-cgi-scripts-in-apache-tomcat.html I don't see anything in the catalina.out or any other logs. Kindly me help to fix this issue. Try using the real Tomcat documentation rather than some random Google result that doesn't even bother to mention which version of Tomcat it was written for (hint: it wasn't written for Tomcat 7). Given how you have configured Tomcat, the behaviour you are seeing is exactly as expected. If you want your script to work with the minimum of changes you need to: - Make your web application privileged - Use action='./read_toggle.cgi' Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Re: CGI script to work on Tomcat
More info: http://localhost:8180/toggle_read.html is html. But after using action='./read_toggle.cgi' in the html the url loading is http://localhost:8180/read_toggle.cgi and again its giving 404 error. :( On Fri, Jun 20, 2014 at 5:59 PM, Rahul R rahul.ra...@gmail.com wrote: Thanks Mark for your suggestion. But by privileged, did you mean to add an entry like below on context.xml? Context privileged=true /Context On Fri, Jun 20, 2014 at 5:46 PM, Mark Thomas ma...@apache.org wrote: On 20/06/2014 12:49, Rahul R wrote: Hi I am trying to migrate something which was working under apache to tomcat. I had an html form which takes user input values and pass those values and executes some cgi scripts. But when I moved html and cgi under tomcat, the html form is loading properly, but when I click submit, its giving 404 error for the cgi execution. I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi Tomcat Version: 7.0.54 And in my html form I have mentioned the cgi location as action='./WEB-INF/cgi/read_toggle.cgi' I followed the steps mentioned in the below url. http://www.wellho.net/solutions/java-running-cgi-scripts-in-apache-tomcat.html I don't see anything in the catalina.out or any other logs. Kindly me help to fix this issue. Try using the real Tomcat documentation rather than some random Google result that doesn't even bother to mention which version of Tomcat it was written for (hint: it wasn't written for Tomcat 7). Given how you have configured Tomcat, the behaviour you are seeing is exactly as expected. If you want your script to work with the minimum of changes you need to: - Make your web application privileged - Use action='./read_toggle.cgi' Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921 -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Re: CGI script to work on Tomcat
This is from my conf/web.xml servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param init-param param-namepassShellEnvironment/param-name param-valuetrue/param-value /init-param init-param param-nameexecutable/param-name param-valueperl/param-value /init-param load-on-startup5/load-on-startup /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping Please let me know what do you mean by privileged usage. On Fri, Jun 20, 2014 at 6:17 PM, André Warnier a...@ice-sa.com wrote: Rahul R wrote: More info: http://localhost:8180/toggle_read.html is html. But after using action='./read_toggle.cgi' in the html the url loading is http://localhost:8180/read_toggle.cgi and again its giving 404 error. :( Are you listening to what you are told ? Did you read https://tomcat.apache.org/tomcat-7.0-doc/cgi-howto.html ? Did you understand it, and did you do all that is mentioned there ? To prove it, copy and paste here the content of your conf/web.xml file : -- start here -- -- end here -- On Fri, Jun 20, 2014 at 5:59 PM, Rahul R rahul.ra...@gmail.com wrote: Thanks Mark for your suggestion. But by privileged, did you mean to add an entry like below on context.xml? Context privileged=true /Context On Fri, Jun 20, 2014 at 5:46 PM, Mark Thomas ma...@apache.org wrote: On 20/06/2014 12:49, Rahul R wrote: Hi I am trying to migrate something which was working under apache to tomcat. I had an html form which takes user input values and pass those values and executes some cgi scripts. But when I moved html and cgi under tomcat, the html form is loading properly, but when I click submit, its giving 404 error for the cgi execution. I have my html files under ROOT and cgi scripts under ROOT/WEB-INF/cgi Tomcat Version: 7.0.54 And in my html form I have mentioned the cgi location as action='./WEB-INF/cgi/read_toggle.cgi' I followed the steps mentioned in the below url. http://www.wellho.net/solutions/java-running-cgi- scripts-in-apache-tomcat.html I don't see anything in the catalina.out or any other logs. Kindly me help to fix this issue. Try using the real Tomcat documentation rather than some random Google result that doesn't even bother to mention which version of Tomcat it was written for (hint: it wasn't written for Tomcat 7). Given how you have configured Tomcat, the behaviour you are seeing is exactly as expected. If you want your script to work with the minimum of changes you need to: - Make your web application privileged - Use action='./read_toggle.cgi' Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Unable to unpack war under webapps
Hi I have put ROOT.war under webapps folder of tomcat. When I start the instance I am getting the below error on catalina.out. INFO: Deploying web application archive /opt/tomcat-proxy/webapps/ROOT.war May 06, 2014 6:28:22 PM org.apache.catalina.startup.ContextConfig beforeStart SEVERE: Exception fixing docBase for context [/ROOT] java.io.IOException: Unable to create the directory [/opt/tomcat-proxy/webapps/ROOT] I am not sure why this is happening. Checked the permissions on webapps folder as well as the war file. Its 755. P.S: I am able to use jar to unpack it manually under webapps. Any help would be much appreciated. -- Thanks, Regards, Rahul R
Re: Unable to unpack war under webapps
Thanks Daniel.. That clue helped... tomcat was running as a different user and I tried to start using root. On Tue, May 6, 2014 at 7:38 PM, Daniel Mikusa dmik...@gopivotal.com wrote: On May 6, 2014, at 9:25 AM, Rahul R rahul.ra...@gmail.com wrote: Hi I have put ROOT.war under webapps folder of tomcat. When I start the instance I am getting the below error on catalina.out. INFO: Deploying web application archive /opt/tomcat-proxy/webapps/ROOT.war May 06, 2014 6:28:22 PM org.apache.catalina.startup.ContextConfig beforeStart SEVERE: Exception fixing docBase for context [/ROOT] java.io.IOException: Unable to create the directory [/opt/tomcat-proxy/webapps/ROOT] I am not sure why this is happening. Checked the permissions on webapps folder as well as the war file. Its 755. P.S: I am able to use jar to unpack it manually under webapps. What about the owner of webapps? Is that the same as the user you’re using to run Tomcat? Can that user extract the files? Dan Any help would be much appreciated. -- Thanks, Regards, Rahul R - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Re: Async Context not timing out
Hi Mark, Thanks for the reply. As I could understand from this bug https://issues.apache.org/bugzilla/show_bug.cgi?id=53061 , and referring to your comment Looking at the NIO source code, there is a test that essentially means that timeouts only get processed after one second of inactivity so under high, constant load, timeouts will never be processed. I find it hard to believe it has always been like that so I'll need to go back and research who changed it (probably me), when it changed (probably the refactoring) and why it changed (probably an error on my part). I should be able to get that done pretty quickly. *This has been fixed in trunk and 7.0.x and will be included in 7.0.28 onwards. *, I assumed that the frequency of the timeout check was reduced. But now that you're saying that it is still there, using async timeout won't serve the purpose for me, because the timeouts for me can be anything from 100 millis to 1 millis. I think I should be using a timer thread or a HashWheeledTimer instead! Thank You! -Rahul PS: The async timeout works just fine with higher timeout and sleep values for e.g. (a timeout of 1000 millis and a sleep of 4000 millis always guarantees a timeout. On Tue, May 14, 2013 at 2:16 AM, Mark Thomas ma...@apache.org wrote: On 13/05/2013 18:01, Rahul Kumar wrote: Hi All, I need some help with the async context timeout in servlet 3.0 running on tomcat 7.0.40. I have set the asynccontext timeout value, but the timeout behaviour is highly inconsistent. Sometimes the timeouts work, but most of the times they don't. I am attaching the source code and the output in plain text format. I have tried this on Tomcat 7.0.20, 7.0.37, 7.0.40. Nothing seems to help. Am i doing something wrong? Yes and no. You are making assumptions about how frequently timeouts are checked. Tomcat only checks them every second for APR/native and BIO. NIO always checks every second by default and may check more frequently when under low load. Mark Please help. Apologize if I am wasting your time! But I need to fix it. Thanks for your help! -Rahul /Meet AdIQuity at:/ *Ad:Tech, Singapore *on 13th-14th June 2013 /The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. This communication may contain confidential or legally privileged information. If you are not the intended recipient, any disclosure, copying, distribution or action taken relying on the contents is prohibited and may be unlawful. If you have received this communication in error, or if you or your employer does not consent to email messages of this kind, please notify to sender immediately by responding to this email and then delete it from your system. No liability is accepted for any harm that may be caused to your systems or data by this message./ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- *Meet AdIQuity at:* *Ad:Tech, Singapore *on 13th-14th June 2013 *The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. This communication may contain confidential or legally privileged information. If you are not the intended recipient, any disclosure, copying, distribution or action taken relying on the contents is prohibited and may be unlawful. If you have received this communication in error, or if you or your employer does not consent to email messages of this kind, please notify to sender immediately by responding to this email and then delete it from your system. No liability is accepted for any harm that may be caused to your systems or data by this message.*
Async Context not timing out
Hi All, I need some help with the async context timeout in servlet 3.0 running on tomcat 7.0.40. I have set the asynccontext timeout value, but the timeout behaviour is highly inconsistent. Sometimes the timeouts work, but most of the times they don't. I am attaching the source code and the output in plain text format. I have tried this on Tomcat 7.0.20, 7.0.37, 7.0.40. Nothing seems to help. Am i doing something wrong? Please help. Apologize if I am wasting your time! But I need to fix it. Thanks for your help! -Rahul -- *Meet AdIQuity at:* *Ad:Tech, Singapore *on 13th-14th June 2013 *The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. This communication may contain confidential or legally privileged information. If you are not the intended recipient, any disclosure, copying, distribution or action taken relying on the contents is prohibited and may be unlawful. If you have received this communication in error, or if you or your employer does not consent to email messages of this kind, please notify to sender immediately by responding to this email and then delete it from your system. No liability is accepted for any harm that may be caused to your systems or data by this message.* @WebServlet(name = TestServlet, urlPatterns = {/test},asyncSupported = true) public class TestServlet extends HttpServlet{ private static final long serialVersionUID = 1L; private static PriorityBlockingQueueRunnable pq = new PriorityBlockingQueueRunnable(1000); private static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1,1,10, TimeUnit.SECONDS,pq); public void service(final ServletRequest servletRequest, final ServletResponse response) throws ServletException, IOException { TestListener listener = new TestListener(); final AsyncContext asyncContext = servletRequest.startAsync(servletRequest, response); asyncContext.addListener(listener); asyncContext.setTimeout(100); Handler handler = new Handler(asyncContext); threadPoolExecutor.execute(handler); } } ### Handler class### public class Handler implements Runnable { private AsyncContext asyncContext; public Handler(AsyncContext asyncContext){ this.asyncContext = asyncContext; } public void run(){ try { long currtime = System.currentTimeMillis(); Thread.sleep(500); System.out.println(slept for + (System.currentTimeMillis() - currtime)); } catch (InterruptedException e) { System.out.println(Error in thread ); } try{ if(asyncContext != null){ System.out.println(Completing async context + timeout is + asyncContext.getTimeout()); asyncContext.complete(); } }catch (Exception e){ System.out.println(Exception in completing async context ); } } } Listener class public class TestListener implements AsyncListener { public void onComplete(AsyncEvent event) throws IOException { System.out.println(Event completed); } public void onError(AsyncEvent event) throws IOException { event.getAsyncContext().complete(); } public void onStartAsync(AsyncEvent event) throws IOException { // TODO Auto-generated method stub } public void onTimeout(AsyncEvent event){ System.out.println(Timeout ); event.getAsyncContext().complete(); } } Execution [ops@root combinedlogs]$ time curl http://localhost:9001/mockresponse/test; real0m0.506s user0m0.001s sys 0m0.003s [ops@root combinedlogs]$ time curl http://localhost:9001/mockresponse/test; real0m0.159s user0m0.001s sys 0m0.003s Catalina logs slept for 500 Completing async context timeout is 100 Event completed Timeout Event completed slept for 500 Exception in completing async context - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat DBCP Logging
Hi, I'm running Tomcat 7.0.23. I've got a question about configuring the logging of DBCP Failures. I've go this in my context xml file. Context docBase=/home/foo/war/ path=/foo reloadable=true Resource name=jdbc/hd/datasource auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@//localhost:1531/PROD username=foouser password=foopass / /Context When the username and password are correct, I have no trouble connecting and my application works as expected. However when this is wrong, I get no indication of why it went wrong. I suppose Tomcat/DBCP is catching the exception and not logging it. When I try from outside of tomcat using jdbc, I see Oracle returning a ORA-01017 error code and jdbc throwing an exception. What must I do in the logging.properties to make tomcat log this? R, rahul smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat DBCP Logging
On Mar 6, 2013, at 11:26 AM, Daniel Mikusa dmik...@vmware.com wrote: On Mar 6, 2013, at 1:49 PM, Rahul Somasunderam wrote: Hi, I'm running Tomcat 7.0.23. This is getting pretty old, you might want to consider upgrading. I will, but I don't think this has to do much with tomcat being old. I think it's with me having to configure the logging correctly. I've got a question about configuring the logging of DBCP Failures. I've go this in my context xml file. Context docBase=/home/foo/war/ path=/foo reloadable=true Resource name=jdbc/hd/datasource auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@//localhost:1531/PROD username=foouser password=foopass / /Context When the username and password are correct, I have no trouble connecting and my application works as expected. However when this is wrong, I get no indication of why it went wrong. When it's wrong what happens? How are you testing for failure? Are you accessing a page in your app that requires the DB? I'm testing this by changing the password in my context to be a wrong password. I'm looking at the startup logs and I see this in catalina.out Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/foo] startup failed due to previous errors And this in localhost.date.log Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1296dee6') Mar 06, 2013 11:56:55 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log I suppose Tomcat/DBCP is catching the exception and not logging it. Hard to say for sure, but it's possible that DBCP may not even be connecting to the Database. The initialSize parameter defaults to 0, so on startup it won't make any connections. Maybe try setting initialSize to 1 and see what happens. https://commons.apache.org/dbcp/configuration.html Dan When I try from outside of tomcat using jdbc, I see Oracle returning a ORA-01017 error code and jdbc throwing an exception. What must I do in the logging.properties to make tomcat log this? R, rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat DBCP Logging
Thanks Dan, The initialSize brought the logs into my catalina.out. R, rahul On Mar 6, 2013, at 2:21 PM, Daniel Mikusa dmik...@vmware.com wrote: On Mar 6, 2013, at 5:07 PM, Rahul Somasunderam wrote: On Mar 6, 2013, at 11:26 AM, Daniel Mikusa dmik...@vmware.com wrote: On Mar 6, 2013, at 1:49 PM, Rahul Somasunderam wrote: Hi, I'm running Tomcat 7.0.23. This is getting pretty old, you might want to consider upgrading. I will, but I don't think this has to do much with tomcat being old. I think it's with me having to configure the logging correctly. You're right, this is not related to the issue at hand. It's just a general reminder :) I've got a question about configuring the logging of DBCP Failures. I've go this in my context xml file. Context docBase=/home/foo/war/ path=/foo reloadable=true Resource name=jdbc/hd/datasource auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@//localhost:1531/PROD username=foouser password=foopass / /Context When the username and password are correct, I have no trouble connecting and my application works as expected. However when this is wrong, I get no indication of why it went wrong. When it's wrong what happens? How are you testing for failure? Are you accessing a page in your app that requires the DB? I'm testing this by changing the password in my context to be a wrong password. I'm looking at the startup logs and I see this in catalina.out Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Mar 06, 2013 11:57:27 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/foo] startup failed due to previous errors Your application failed to start for some reason. It appears that a listener has failed. You should check the other Tomcat log files and your application log files for clues. And this in localhost.date.log Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Mar 06, 2013 10:13:17 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1296dee6') Mar 06, 2013 11:56:55 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Mar 06, 2013 11:58:57 AM org.apache.catalina.core.ApplicationContext log Is this the entire localhost.-MM-DD.log file? Given the SEVERE log in catalina.out, I would have expected an exception here. Dan PS. Have you tried setting the initialSize attribute on your Resource / tag? That should force DBCP to create a connection at startup and, if that connection fails, it should log it. I tested this in my Tomcat setup, with an out-of-the-box logging configuration, and it worked fine. I suppose Tomcat/DBCP is catching the exception and not logging it. Hard to say for sure, but it's possible that DBCP may not even be connecting to the Database. The initialSize parameter defaults to 0, so on startup it won't make any connections. Maybe try setting initialSize to 1 and see what happens. https://commons.apache.org/dbcp/configuration.html Dan When I try from outside of tomcat using jdbc, I see Oracle returning a ORA-01017 error code and jdbc throwing an exception. What must I do in the logging.properties to make tomcat log this? R, rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
server.xml for ldap connection
Hi All, This is the snippet from my server.xml of my tomcat which takes care of ldap connection. Realm className=org.apache.catalina.realm.JNDIRealm debug=99 authentication=simple referrals=follow userSubtree=true roleSubtree=true *connectionName=GLOBAL\UserName* *connectionPassword=Secret* connectionURL=ldap://global.ad.myCompany.com:389; userBase=dc=Global,dc=ad,dc=myCompany,dc=com userSearch=(sAMAccountName={0}) roleBase=OU=Groups,OU=PROD,DC=Global,DC=ad,DC=myCompany,DC=com roleName=cn roleSearch=(amp;(objectClass=group)(member={0})) / But I have different environments like development, qa, staging etc. Hence the functional a/c which connects to the ldap changes accordingly. Is there any way to use some variable which reads the username/password from a file? So that who ever owns that environment can simply change the username/password in that file. There is already a property file in the conf folder of the tomcat which is used for taking some environment specific values by a jsp file, which is under webapps folder. Can I make use of that for having these values? It would be a great help if some one can help me here. Regards, Rahul R
Re: Exclude url from authorized access-web.xml
How can I add an email id to auth instead of adding a whole group? Is that possible? I don't want to give the access to all the members of the groups in the AD. Following is the web.xml of my tomcat. security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint --! These are the groups in AD -- role-nameEngineering/role- name role-nameMigration Expert/role-name role-nameDevelopers/role-name /auth-constraint /security-constraint security-constraint web-resource-collection url-pattern/update/*/url-pattern /web-resource-collection /security-constraint login-config auth-methodBASIC/auth-method realm-nameServices Portal/realm-name /login-config On Thu, Jun 14, 2012 at 8:00 PM, Pid p...@pidster.com wrote: On 14/06/2012 15:06, Rahul R wrote: Hi All, I have an issue with allowing access to a page which is secured using active directory authentication. I want some pages/content to be excluded from this. Following is my web.xml file under conf of tomcat. [code=java] security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint --! These are the groups in AD -- role-nameEngineering/role- name role-nameMigration Expert/role-name role-nameDevelopers/role-name /auth-constraint /security-constraint security-constraint web-resource-collection url-pattern/update/*/url-pattern /web-resource-collection /security-constraint login-config auth-methodBASIC/auth-method realm-nameServices Portal/realm-name /login-config [/code] As per my understanding, this should allow url's with a content update and allow other pages only with AD credentials. But this is not working for me now. Its asking for the credentials even for the url with update. Tomcat Version:7 Env:Linux Url:http://myserver.com:8080/solar/index.jsp. Here its asking the credentials, its fine and as expected. url with update in the address: http://myserver.com:8080/solar/site/update. When I access this url, its still asking for the credentials. This: /solar/site/update does not match this pattern: url-pattern/update/*/url-pattern the pattern would have to be: url-pattern/site/update/*/url-pattern p I am not really sure why this is happening. Could anyone here can help me on this? -- [key:62590808] -- Thanks, Regards, Rahul R .~. /V\ // \\ /( )\ ^`~'^ Mob: 09008030921
Exclude url from authorized access-web.xml
Hi All, I have an issue with allowing access to a page which is secured using active directory authentication. I want some pages/content to be excluded from this. Following is my web.xml file under conf of tomcat. [code=java] security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint --! These are the groups in AD -- role-nameEngineering/role- name role-nameMigration Expert/role-name role-nameDevelopers/role-name /auth-constraint /security-constraint security-constraint web-resource-collection url-pattern/update/*/url-pattern /web-resource-collection /security-constraint login-config auth-methodBASIC/auth-method realm-nameServices Portal/realm-name /login-config [/code] As per my understanding, this should allow url's with a content update and allow other pages only with AD credentials. But this is not working for me now. Its asking for the credentials even for the url with update. Tomcat Version:7 Env:Linux Url:http://myserver.com:8080/solar/index.jsp. Here its asking the credentials, its fine and as expected. url with update in the address: http://myserver.com:8080/solar/site/update. When I access this url, its still asking for the credentials. I am not really sure why this is happening. Could anyone here can help me on this? -- Thanks, Regards, Rahul R
Re: Working of Tomcat with MS Access
Yes On Sat, Apr 16, 2011 at 8:44 PM, Pid p...@pidster.com wrote: On 4/15/11 6:58 PM, RAHUL RAJ wrote: This is like a small assignment that has to be submitted urgently Is this student coursework? p
Working of Tomcat with MS Access
Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: %@ page language=java import=java.sql.* % html body form method=post p Enter your username : input type=text name=username/ /p p Enter your password : input type=text name=password/ /p input type=submit value=Login/ % String usn = request.getParameter(username); String pass = request.getParameter(password); try{ Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); Statement s = con.createStatement(); ResultSet rs = s.executeQuery(select * from customers); while(rs.next()) { String u = rs.getString(1); String p = rs.getString(2); if(usn.equals(u) pass.equals(p)) { out.println(login successfull); } else { out.println(login failed); } } } catch(Exception e) { out.println(Error+e); } % /form /body /html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
I know my code is not perfect. But I just want to resolve this error now. Can u say how to solve this? pls answer to the question.have u read my message completely? On 4/15/11, Mikolaj Rydzewski m...@ceti.pl wrote: On Fri, 15 Apr 2011 15:34:37 +0530, RAHUL RAJ omrahulraj...@gmail.com wrote: I am working on building a jsp website with MS Access as database. I usually do not express my opinions about others code, but your is really the worst code sample I have ever seen... I know that everyone has its time to begin. But please use some good book to start with. 1. use newer tomcat 2. do not mix code and html 3. instantiate jdbc driver once 4. close jdbc connections (within finally block) after use 5. use where sql clause 6. use better database 7. perform usernamepassword check only after form submission 8. use any framework/library to wrap jdbc calls 9. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
The code I gave is just a sample code, it might change afterwards..but before that, I need to resolve this error, sorry for your inconvenience... On 4/15/11, RAHUL RAJ omrahulraj...@gmail.com wrote: I know my code is not perfect. But I just want to resolve this error now. Can u say how to solve this? pls answer to the question.have u read my message completely? On 4/15/11, Mikolaj Rydzewski m...@ceti.pl wrote: On Fri, 15 Apr 2011 15:34:37 +0530, RAHUL RAJ omrahulraj...@gmail.com wrote: I am working on building a jsp website with MS Access as database. I usually do not express my opinions about others code, but your is really the worst code sample I have ever seen... I know that everyone has its time to begin. But please use some good book to start with. 1. use newer tomcat 2. do not mix code and html 3. instantiate jdbc driver once 4. close jdbc connections (within finally block) after use 5. use where sql clause 6. use better database 7. perform usernamepassword check only after form submission 8. use any framework/library to wrap jdbc calls 9. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
I got communications exception when I did this with mysql...and no one knows the reason perfectly...no response from mysql forum too... On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote: Raj; To all reading this response, this is my first response on this list so if I get it a little wrong have patience. You may want to look at the light weight RDBMS mysql. It is free, easily installed and can be utilized with the companion Workbench to make dealing with the db very easy, a lot like the access interface. You will have good driver support from the java end as well and a lot of documentation and tutorials to get you connected in your web app to your persistence layer. mysql.com Just my two cents and an attempt to give back a little to the community. Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: users users@tomcat.apache.org Sent: Fri, Apr 15, 2011 6:05 am Subject: Working of Tomcat with MS Access Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: %@ page language=java import=java.sql.* % html body form method=post p Enter your username : input type=text name=username/ /p p Enter your password : input type=text name=password/ /p input type=submit value=Login/ % String usn = request.getParameter(username); String pass = request.getParameter(password); try{ Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); Statement s = con.createStatement(); ResultSet rs = s.executeQuery(select * from customers); while(rs.next()) { String u = rs.getString(1); String p = rs.getString(2); if(usn.equals(u) pass.equals(p)) { out.println(login successfull); } else { out.println(login failed); } } } catch(Exception e) { out.println(Error+e); } % /form /body /html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
Yes I already did , that you might think I should. Now I am trying with MS ACCESS...and new error came : SQLException: general error I didn't found any error in my sql syntax or jdbc code. jdbc code alone is working perfectly.. On Fri, Apr 15, 2011 at 9:02 PM, Angel Java Lopez ajlopez2...@gmail.comwrote: One question: You should have an ODBC declaration named rahul. It is declared for your user, or as a system odbc name? My guess, your Tomcat is running as a service, or under other user (not your user), and ODBC rahul Data Source name is only for your user. Is it the case? Did you solve the problem? How? Angel Java Lopez http://www.ajlopez.com http://twitter.com/ajlopez On Fri, Apr 15, 2011 at 7:04 AM, RAHUL RAJ omrahulraj...@gmail.com wrote: Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: %@ page language=java import=java.sql.* % html body form method=post p Enter your username : input type=text name=username/ /p p Enter your password : input type=text name=password/ /p input type=submit value=Login/ % String usn = request.getParameter(username); String pass = request.getParameter(password); try{ Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); Statement s = con.createStatement(); ResultSet rs = s.executeQuery(select * from customers); while(rs.next()) { String u = rs.getString(1); String p = rs.getString(2); if(usn.equals(u) pass.equals(p)) { out.println(login successfull); } else { out.println(login failed); } } } catch(Exception e) { out.println(Error+e); } % /form /body /html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
Since I am a beginner, I have to start with some trial projects, right? I know this is nothing! and help me...pls answer to the question.. On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbs jhubbsl...@att.net wrote: You do realize, I hope, that what you're proposing is akin to sourcing parts for your jet engine from Fisher-Price? IMHO MS Access is not and never has been useful as a professional database product. I'm not even sure if what you are proposing even holds up in the looking-through-binoculars-from-the-big-end sense. MS Access is a desktop application that accesses files on disk. Java apps running on Tomcat typically access an RDBMS over a network connection via SQL statements and their responses. AFAIK there is not a server instantiation of MS Access; in fact, part of the whole point of MS Access as an ongoing product is that it acts as a gateway drug to MS' SQL Server product, the transition to which would be triggered by the inherent limitations (and, in my past experience, persistent unaddressed bugs) of Access. I think you need to back up a bit and work toward getting your data liberated from MS Access and ported into a proper RDBMS like PostgreSQL or one of MS SQL Server, Oracle, IBM DB2, etc. if you feel that money must be continually spent on software licenses for such. Then you will be facing Java apps and Tomcat in a far more conventional way. So, to sum up this and earlier responses: 1) Learn to code Java 2) Understand real RDBMSses. - Jeff On 4/15/11 6:04 AM, RAHUL RAJ wrote: Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: %@ page language=java import=java.sql.* % html body form method=post p Enter your username :input type=text name=username/ /p p Enter your password :input type=text name=password/ /p input type=submit value=Login/ % String usn = request.getParameter(username); String pass = request.getParameter(password); try{ Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); Statement s = con.createStatement(); ResultSet rs = s.executeQuery(select * from customers); while(rs.next()) { String u = rs.getString(1); String p = rs.getString(2); if(usn.equals(u) pass.equals(p)) { out.println(login successfull); } else { out.println(login failed); } } } catch(Exception e) { out.println(Error+e); } % /form /body /html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
Yes, it runs as a service. But how to know under what account does that service run? does it mean 'admin' or 'normal user' or 'system'? I made a system DSN for this...not the user DSN(Data Source Name) and I launched tomcat service by right click 'run as admin' On Fri, Apr 15, 2011 at 11:09 PM, Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov wrote: -Original Message- From: RAHUL RAJ [mailto:omrahulraj...@gmail.com] Sent: Friday, April 15, 2011 10:35 AM To: Tomcat Users List Subject: Re: Working of Tomcat with MS Access Since I am a beginner, I have to start with some trial projects, right? I know this is nothing! and help me...pls answer to the question.. Mikolaj gave you a hint already. If your Tomcat runs as a service, under what account does that service run? Does that account have access to your mdb? Did you create a user or system datasource on your computer with the name: rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
ya...I did the same thing you told in mysql...but communications Exception occured.. This is like a small assignment that has to be submitted urgently..so I have to run away from the error! and tried with MS ACCESS. The jdbc program for access works perfect alone.. On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote: Raj, I think everyone is saying to take a look at this syntax: String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); I know that when I make this type of simple jdbc connection in mysql the syntax is: String url = jdbc:mysql://localhost/dbName; Connection conn = DriverManager.getConnection(url, , ); Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Fri, Apr 15, 2011 1:31 pm Subject: Re: Working of Tomcat with MS Access I got communications exception when I did this with mysql...and no one knows the reason perfectly...no response from mysql forum too... On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote: Raj; To all reading this response, this is my first response on this list so if I get it a little wrong have patience. You may want to look at the light weight RDBMS mysql. It is free, easily installed and can be utilized with the companion Workbench to make dealing with the db very easy, a lot like the access interface. You will have good driver support from the java end as well and a lot of documentation and tutorials to get you connected in your web app to your persistence layer. mysql.com Just my two cents and an attempt to give back a little to the community. Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: users users@tomcat.apache.org Sent: Fri, Apr 15, 2011 6:05 am Subject: Working of Tomcat with MS Access Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: %@ page language=java import=java.sql.* % html body form method=post p Enter your username : input type=text name=username/ /p p Enter your password : input type=text name=password/ /p input type=submit value=Login/ % String usn = request.getParameter(username); String pass = request.getParameter(password); try{ Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); Statement s = con.createStatement(); ResultSet rs = s.executeQuery(select * from customers); while(rs.next()) { String u = rs.getString(1); String p = rs.getString(2); if(usn.equals(u) pass.equals(p)) { out.println(login successfull); } else { out.println(login failed); } } } catch(Exception e) { out.println(Error+e); } % /form /body /html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
No I am in Windows mode. On Fri, Apr 15, 2011 at 11:26 PM, Propes, Barry L barry.l.pro...@citi.comwrote: Jeff has some really good points here, Rahul. I'm a guy who spent several years doing ASP development with both MS Access and SQL Server over the web before getting into Java. Even still, I didn't fathom trying to mess with MS Access with Java when I was making that transition. I started with mySQL on my Windows desktop to get started, but when I got access to our Oracle servers, went that route. Like Jeff says, you can do this basically for no cost using both Tomcat and mySQL. Sure, it's command line, unlike MS Access, but you shouldn't have too much trouble with it. Jeff, if he's using MS Access, he's probably not on Linux, is he? -Original Message- From: Jeff Hubbs [mailto:jhubbsl...@att.net] Sent: Friday, April 15, 2011 12:46 PM To: Tomcat Users List Subject: Re: Working of Tomcat with MS Access A beginner needs to at least begin with workable platforms and software. PostgreSQL on Linux has a total software license cost of $0.00; your barrier to entry with inappropriate software is considerably higher. On 4/15/11 1:35 PM, RAHUL RAJ wrote: Since I am a beginner, I have to start with some trial projects, right? I know this is nothing! and help me...pls answer to the question.. On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbsjhubbsl...@att.net wrote: You do realize, I hope, that what you're proposing is akin to sourcing parts for your jet engine from Fisher-Price? IMHO MS Access is not and never has been useful as a professional database product. I'm not even sure if what you are proposing even holds up in the looking-through-binoculars-from-the-big-end sense. MS Access is a desktop application that accesses files on disk. Java apps running on Tomcat typically access an RDBMS over a network connection via SQL statements and their responses. AFAIK there is not a server instantiation of MS Access; in fact, part of the whole point of MS Access as an ongoing product is that it acts as a gateway drug to MS' SQL Server product, the transition to which would be triggered by the inherent limitations (and, in my past experience, persistent unaddressed bugs) of Access. I think you need to back up a bit and work toward getting your data liberated from MS Access and ported into a proper RDBMS like PostgreSQL or one of MS SQL Server, Oracle, IBM DB2, etc. if you feel that money must be continually spent on software licenses for such. Then you will be facing Java apps and Tomcat in a far more conventional way. So, to sum up this and earlier responses: 1) Learn to code Java 2) Understand real RDBMSses. - Jeff On 4/15/11 6:04 AM, RAHUL RAJ wrote: Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: %@ page language=java import=java.sql.* % html body form method=post p Enter your username :input type=text name=username/ /p p Enter your password :input type=text name=password/ /p input type=submit value=Login/ % String usn = request.getParameter(username); String pass = request.getParameter(password); try{ Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); Statement s = con.createStatement(); ResultSet rs = s.executeQuery(select * from customers); while(rs.next()) { String u = rs.getString(1); String p = rs.getString(2); if(usn.equals(u) pass.equals(p)) { out.println(login successfull); } else { out.println(login failed); } } } catch(Exception e) { out.println(Error+e); } % /form /body /html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
running 'tomcat as standalone java program'? can u explain for me sir? 2011/4/15 Mikolaj Rydzewski m...@ceti.pl RAHUL RAJ wrote: This is like a small assignment that has to be submitted urgently..so I have to run away from the error! and tried with MS ACCESS. The jdbc program for access works perfect alone.. So run tomcat as a 'standalone' java program - that means not as a service. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
Thank you very much for your help! When I did with mysql, the corresponding jdbc driver is stored in /webapps/ROOT/lib directory in tomcat. On Fri, Apr 15, 2011 at 11:56 PM, Troy troylparr...@aol.com wrote: I wrote a quick little jsp to access one of my db (a mysql) %@page contentType=text/html pageEncoding=UTF-8% %@page import=java.sql.* % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleTest Connection/title /head body % String name = ; Class.forName(com.mysql.jdbc.Driver); Connection conn = DriverManager.getConnection(jdbc:mysql://localhost/dbName, , XX); Statement stmt = conn.createStatement(); String query = select * from friends where id='1'; ResultSet rs = stmt.executeQuery(query); while(rs.next()){ name = rs.getString(3); } % %= name % /body /html Worked like expected. I know this is not a java thread . . . but still trying to help since it is a time sensitive matter. Silly question, but are your jdbc drivers added to your library for the web app? I make this mistake ALL the time. Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Fri, Apr 15, 2011 1:59 pm Subject: Re: Working of Tomcat with MS Access ya...I did the same thing you told in mysql...but communications Exception occured.. This is like a small assignment that has to be submitted urgently..so I have to run away from the error! and tried with MS ACCESS. The jdbc program for access works perfect alone.. On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote: Raj, I think everyone is saying to take a look at this syntax: String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); I know that when I make this type of simple jdbc connection in mysql the syntax is: String url = jdbc:mysql://localhost/dbName; Connection conn = DriverManager.getConnection(url, , ); Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Fri, Apr 15, 2011 1:31 pm Subject: Re: Working of Tomcat with MS Access I got communications exception when I did this with mysql...and no one knows the reason perfectly...no response from mysql forum too... On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote: Raj; To all reading this response, this is my first response on this list so if I get it a little wrong have patience. You may want to look at the light weight RDBMS mysql. It is free, easily installed and can be utilized with the companion Workbench to make dealing with the db very easy, a lot like the access interface. You will have good driver support from the java end as well and a lot of documentation and tutorials to get you connected in your web app to your persistence layer. mysql.com Just my two cents and an attempt to give back a little to the community. Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: users users@tomcat.apache.org Sent: Fri, Apr 15, 2011 6:05 am Subject: Working of Tomcat with MS Access Hello, I am working on building a jsp website with MS Access as database. When my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the following error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The jdbc program alone is working perfectly, So There might not be problems due to Driver, Data source name, Database Tables or any other software version compatibilities. OS: Windows Vista Home Basic Tomcat Version: 5.5.x jdk version: 1.6 MS Access 2010 code is given below: %@ page language=java import=java.sql.* % html body form method=post p Enter your username : input type=text name=username/ /p p Enter your password : input type=text name=password/ /p input type=submit value=Login/ % String usn = request.getParameter(username); String pass
Re: Working of Tomcat with MS Access
Yes of course...I did the same...then what to do with this error? Remember that Now I am working in ACCESS. code is not much different... On Sat, Apr 16, 2011 at 12:10 AM, Troy troylparr...@aol.com wrote: I believe the drivers should be located in: YourApp/WEB-INF/lib/ Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Fri, Apr 15, 2011 2:35 pm Subject: Re: Working of Tomcat with MS Access Thank you very much for your help! When I did with mysql, the corresponding jdbc driver is stored in /webapps/ROOT/lib directory in tomcat. On Fri, Apr 15, 2011 at 11:56 PM, Troy troylparr...@aol.com wrote: I wrote a quick little jsp to access one of my db (a mysql) %@page contentType=text/html pageEncoding=UTF-8% %@page import=java.sql.* % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleTest Connection/title /head body % String name = ; Class.forName(com.mysql.jdbc.Driver); Connection conn = DriverManager.getConnection(jdbc:mysql://localhost/dbName, , XX); Statement stmt = conn.createStatement(); String query = select * from friends where id='1'; ResultSet rs = stmt.executeQuery(query); while(rs.next()){ name = rs.getString(3); } % %= name % /body /html Worked like expected. I know this is not a java thread . . . but still trying to help since it is a time sensitive matter. Silly question, but are your jdbc drivers added to your library for the web app? I make this mistake ALL the time. Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Fri, Apr 15, 2011 1:59 pm Subject: Re: Working of Tomcat with MS Access ya...I did the same thing you told in mysql...but communications Exception occured.. This is like a small assignment that has to be submitted urgently..so I have to run away from the error! and tried with MS ACCESS. The jdbc program for access works perfect alone.. On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote: Raj, I think everyone is saying to take a look at this syntax: String url = jdbc:odbc:rahul; Connection con = DriverManager.getConnection(url, , ); I know that when I make this type of simple jdbc connection in mysql the syntax is: String url = jdbc:mysql://localhost/dbName; Connection conn = DriverManager.getConnection(url, , ); Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Fri, Apr 15, 2011 1:31 pm Subject: Re: Working of Tomcat with MS Access I got communications exception when I did this with mysql...and no one knows the reason perfectly...no response from mysql forum too... On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote: Raj; To all reading this response, this is my first response on this list so if I get it a little wrong have patience. You may want to look at the light weight RDBMS mysql. It is free, easily installed and can be utilized with the companion Workbench to make dealing with the db very easy, a lot like the access interface. You will have good driver support from the java end as well and a lot of documentation and tutorials to get you connected in your web app to your persistence layer. mysql.com Just my two cents and an attempt to give back a little to the community. Troy -Original Message- From: RAHUL RAJ omrahulraj...@gmail.com To: users users@tomcat.apache.org Sent: Fri, Apr 15, 2011 6:05 am Subject: Working of Tomcat with MS Access Hello, I am working on building a jsp website with MS Access as database. When my login page
Re: Working of Tomcat with MS Access
There is no startup.bat file in the directory u specified. In my system the directory path is C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin On Sat, Apr 16, 2011 at 12:14 AM, Angel Java Lopez ajlopez2...@gmail.comwrote: Rahul: Stop tomcat as a service. Go to /tomcatdir/bin Run startup.bat Try your app again. Only to discard user account/access problems. On Fri, Apr 15, 2011 at 3:13 PM, RAHUL RAJ omrahulraj...@gmail.com wrote: running 'tomcat as standalone java program'? can u explain for me sir? 2011/4/15 Mikolaj Rydzewski m...@ceti.pl RAHUL RAJ wrote: This is like a small assignment that has to be submitted urgently..so I have to run away from the error! and tried with MS ACCESS. The jdbc program for access works perfect alone.. So run tomcat as a 'standalone' java program - that means not as a service. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
you said: You need to change that account to one that has access to your mdb. You can do that through the Services console. Or try starting Tomcat via the startup.bat file, that should launch Tomcat with the same account you've logged into your system with, which hopefully is the same account you need to for Access. I don't know how to do these...Can you explain for me? Also startup.bat is not there in the specified directory. On Sat, Apr 16, 2011 at 1:48 AM, Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov wrote: -Original Message- From: RAHUL RAJ [mailto:omrahulraj...@gmail.com] Subject: Re: Working of Tomcat with MS Access Yes, it runs as a service. But how to know under what account does that service run? does it mean 'admin' or 'normal user' or 'system'? I made a system DSN for this...not the user DSN(Data Source Name) and I launched tomcat service by right click 'run as admin' I'm really surprised you have had as many responses to this thread as you've had. Assuming you have Tomcat installed as a Windows service, usually the default account that runs Tomcat as a Windows service is Local System Account. You need to change that account to one that has access to your mdb. You can do that through the Services console. Or try starting Tomcat via the startup.bat file, that should launch Tomcat with the same account you've logged into your system with, which hopefully is the same account you need to for Access. The code you posted should work, although I can't understand what the purpose of your assignment is. Don't get in the habit of using this code for anything related to logging in, or anything else. If you must stay in the MS world, use SQL Express. try { Class.forName( sun.jdbc.odbc.JdbcOdbcDriver); Connection con = DriverManager.getConnection(jdbc:odbc:rahul,,); Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY); String query = Select whatever; ResultSet rs = stmt.executeQuery(query); while(rs.next()){ // do stuff } rs.close(); stmt.close(); con.close(); } catch(SQLException ex) { } catch(java.lang.ClassNotFoundException jdbce) { }
Re: Working of Tomcat with MS Access
I am working on windows platform. I downloaded tomcat setup, md5(.exe) and installed it. On Sat, Apr 16, 2011 at 3:18 AM, André Warnier a...@ice-sa.com wrote: Also startup.bat is not there in the specified directory. It is not there because you have downloaded and installed the Tomcat installer version, and that one does not have a startup.bat file. Stop your existing Tomcat service. Go back to the Tomcat website, and download the appropriate zip version (32-bit or 64-bit, depending on what your Java version is. (you can see that by typing java -version in a command window) Create a new directory on your PC (maybe call it tomcat-zip) and unzip the zip-file there. Then go to the /bin sub-directory, and type startup.bat. This will run this new Tomcat in the command window, under your own login user-id. Verify that it runs, with a browser, by accessing http://localhost:8080;. Type CTRL-C in the tomcat command window to stop it. Then start modifying the configuration of this new Tomcat, to add what is necessary to run you application. Do it one little bit at a time, and try restarting Tomcat each time you modify something, so that if there is a problem you know what you did wrong. When that all runs, then we'll tell you how to setup this new Tomcat as a Windows Service. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
vista home basic. No, I can restart tomcat each time, by clicking the start/stop button. On Sat, Apr 16, 2011 at 2:49 AM, Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov wrote: -Original Message- From: RAHUL RAJ [mailto:omrahulraj...@gmail.com] Subject: Re: Working of Tomcat with MS Access you said: You need to change that account to one that has access to your mdb. You can do that through the Services console. Or try starting Tomcat via the startup.bat file, that should launch Tomcat with the same account you've logged into your system with, which hopefully is the same account you need to for Access. I don't know how to do these...Can you explain for me? On Vista Home Basic... ? Uh... Start/Control Panel Switch to Classic View Find Administrative Tools/Services You're on your own after this, but in a nutshell.. you need to check the properties of the Tomcat Service and see if you can change the way the service Logs On What happens when you reboot your computer? Do you have to restart Tomcat each time or is it still running after you reboot? Also startup.bat is not there in the specified directory. Fine. By the way, I never specified a directory because no one here knows how you've installed Tomcat 5.5.x I'm very fond of version x myself. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Working of Tomcat with MS Access
I think I have to have tomcat (.zip) rather than md5 package..just a moment...i will get back to you... On Sat, Apr 16, 2011 at 8:50 AM, Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov wrote: From: RAHUL RAJ [omrahulraj...@gmail.com] Subject: Re: Working of Tomcat with MS Access vista home basic. No, I can restart tomcat each time, by clicking the start/stop button. Did you try any of the suggestions André or I offered? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Connection Pool
Hi, Can anyone help me regarding issue with connection pool for Tomcat? Tomcat version: 6.0 OS: Linux Database: Oracle 10g . Problem Statement: When server is idle for long period of time thread hangs for waiting the DBMS to return with response. I have tried all the possible combination configuration for connection pool but could succeed in removing that problem. Connection pool Configuration: maxActive=8 maxIdle=8 maxWait=3 minIdle=1 initialSize=1 validationQuery=select * from dual testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=180 minEvictableIdleTimeMillis=180 numTestsPerEvictionRun=3 username=PESALES password=X driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@10.156.33.42:1521:ORADEV2/ Excerpt of thread Dump: at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at oracle.net.ns.Packet.receive(Unknown Source) at oracle.net.ns.DataPacket.receive(Unknown Source) at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1104) at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1075) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:480) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:801) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039) at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:841) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1274) - locked 0x2aab9a2b0ae8 (a oracle.jdbc.driver.T4CStatement) - locked 0x2aab9ba7d688 (a oracle.jdbc.driver.T4CConnection) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:855) - locked 0x2aab9ba7d498 (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326) at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:558) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:262) at
tomcat6 status results into dead state
Hi, When i start tomcat6 two times without a stop in between, rctomcat6 status results into dead state. I checked the rctomcat6 start script, in this case when the tomcat6 is already running and a rctomcat6 start is done, it display a msg that process already running, but it continues in the start function further down executes the TOMCAT_SCRIPT(dtomcat6) script with the start argument. And after that pid in the tomcat6.pid file gets changed but the process keeps running with the old pid, and hence when we do a rctomcat6 status, it results into dead state(bcoz it doesn't find any process running with that pid). I think it shouldn't execute the TOMCAT_SCRIPT in this case, so in case when checkpid is success(in start function), i put an exit after the echo msg process already running, this solves the problem, but is this the correct solution ? If you think its not the right solution, plz suggest me something appropriate. function start() { echo -n Starting Tomcat ($CATALINA_BASE) if [ -f /var/lock/subsys/${NAME} ] ; then if [ -f /var/run/${NAME}.pid ]; then read kpid /var/run/${NAME}.pid if checkpid $kpid 21; then echo $NAME process already running rc_failed 0 #The below exit i have added exit else echo -n lock file found but no process running for pid $kpid, continuing rc_failed 7 fi fi fi . . regards rahul
Connect the same Database from two different web application
Hello Everyone, I am using Hibernate to connect to my MySql Database using C3p0 connection pooling mechanism from my web application which is deployed in Tomcat. Eventually, now I need to develop a child application, using the same Database instance. So I have two application now : say Application A and Application B, and both will be deployed in a Tomcat Server and both has to use the same Database, let say my DB name is EmployeeDB. I defined Resource parameters separately for both of the application and have done all the settings that are required for the connectivity. Now when I deploy the applications, and try to run them, the first application ( it may be Application A or Application B) loads up properly, but the second application shows error as it could not connect to the Database. Whatever application I load first, it successfully connect to the Database, but second application fails to connect. I am guessing there must be some locking mechanism, provided by either Hibernate or the Tomcat, which is preventing me to do so. Please help me to overcome this issue as that is my fundamental requirement now. Thanks is advance. I am posting the stack trace hereby: [code]com.mchange.v2.cfg.BasicMultiPropertiesConfig: Properties object found at resource path [system properties] contains a value that is not a String: 25 Skipping... com.mchange.v2.cfg.BasicMultiPropertiesConfig: Properties object found at resource path [system properties] contains a value that is not a String: 25 Skipping... 921 [http-8990-4] ERROR org.hibernate.connection.C3P0ConnectionProvider - could not instantiate C3P0 connection pool java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at com.mchange.v2.c3p0.DataSources.pooledDataSource(DataSources.java:314) at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:181) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325) at com.duke.zaloni.studentdb.server.hibernate.HibernateUtil.clinit(HibernateUtil.java:17) at com.duke.zaloni.studentdb.server.LoginServletImpl.doPost(LoginServletImpl.java:33) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Hibernate Error:Initial SessionFactory creation failed.org.hibernate.HibernateException: Could not instantiate C3P0 connection pool org.hibernate.HibernateException: Could not instantiate C3P0 connection pool at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:185) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325) at com.duke.zaloni.studentdb.server.hibernate.HibernateUtil.clinit(HibernateUtil.java:17) at com.duke.zaloni.studentdb.server.LoginServletImpl.doPost(LoginServletImpl.java:33) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Hello Friends A very strange findings for today! Found it only because I skipped the first Launch page that used to launch a new window through Java Script. Now, the finding is - 1. After the Launch, this would open a Home Page with the request URL - http://localhost:5080/URL 2. Clicking on Search Work Order menu, it will request the URL: http://localhost:5080/SearchListURL 3. Now, interesting bit - On providing search crietria and clicking search, the request is sent to - http://localhost:8080/SearchListURL Now, why the third step is posting this to default 8080 port when clearly the server.xml is configured to listen to HTTP requests on 5080 port. I tested this in Windows with 5080 listener port and it failed there too. Any hints? - Regards Rahul --- On Mon, 7/5/10, Pid p...@pidster.com wrote: From: Pid p...@pidster.com Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Monday, July 5, 2010, 12:05 PM On 4 Jul 2010, at 23:02, rahul iamrahu...@yahoo.com wrote: I guess there are jsp:include page / and %@ include file % directives in you webapp. Check them for case sensitivity There are only couple of directives - %@ taglib uri=/taglib.tld prefix=salmon% and %@ page errorPage=ErrorPage.jsp extends=com.salmonllc.jsp.JspServlet% ErrorPage.jsp is perfectly correct case-wise. There is an ErrorPage.jsp in each directory? p --- On Fri, 7/2/10, Mikolaj Rydzewski m...@ceti.pl wrote: From: Mikolaj Rydzewski m...@ceti.pl Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Friday, July 2, 2010, 1:14 PM On 07/02/2010 01:23 AM, rahul wrote: 1. I tried building the war in Windows and worked fine. I transferred the war to UNIX, it mis-behaves as described earlier. 2. I tried building the war in UNIX, it mis-behaves as described earlier. I transferred the war to Windows and it worked fine. I guess there are jsp:include page / and %@ include file % directives in you webapp. Check them for case sensitivity. -- Mikolaj Rydzewskim...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Thanks to all of your comments and help!! The problem is resolved. I was very fortunate that I was testing with FireFox otherwise I would never have come to know about the actual problem (That is Redirecting to port 8080). The Internet Explorer was not at all showing that the request is going to the incorrect port, wonder why??. Now, on clicking search button, data gets posted to the correct place and data gets fetched from the database correctlty. As this webapp uses the Salmon SOFIA framework, in order to display the data, it internally uses its own URLGenerator class: URLGenerator and gets the PORT from System.properties file! And this is where the port was specified as 8080. I changed that to the one in Server.xml and VOILA!! --- On Mon, 7/5/10, André Warnier a...@ice-sa.com wrote: From: André Warnier a...@ice-sa.com Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Monday, July 5, 2010, 1:41 PM rahul wrote: Hello Friends A very strange findings for today! Found it only because I skipped the first Launch page that used to launch a new window through Java Script. Now, the finding is - 1. After the Launch, this would open a Home Page with the request URL - http://localhost:5080/URL 2. Clicking on Search Work Order menu, it will request the URL: http://localhost:5080/SearchListURL 3. Now, interesting bit - On providing search crietria and clicking search, the request is sent to - http://localhost:8080/SearchListURL Now, why the third step is posting this to default 8080 port when clearly the server.xml is configured to listen to HTTP requests on 5080 port. I tested this in Windows with 5080 listener port and it failed there too. Any hints? Rahul, I don't know about the rest of your problem, but if you click on a link /in the browser/, and the browser sends a request to localhost:8080 as a result, then it means that /the html page which the browser has/ contains a link that points to port 8080. So in your example above, it is the page returned by http://localhost:5080/SearchListURL which contains a link to port 8080. It has nothing to do with what server.xml says about the ports the server is listening on. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
I guess there are jsp:include page / and %@ include file % directives in you webapp. Check them for case sensitivity There are only couple of directives - %@ taglib uri=/taglib.tld prefix=salmon% and %@ page errorPage=ErrorPage.jsp extends=com.salmonllc.jsp.JspServlet% ErrorPage.jsp is perfectly correct case-wise. --- On Fri, 7/2/10, Mikolaj Rydzewski m...@ceti.pl wrote: From: Mikolaj Rydzewski m...@ceti.pl Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Friday, July 2, 2010, 1:14 PM On 07/02/2010 01:23 AM, rahul wrote: 1. I tried building the war in Windows and worked fine. I transferred the war to UNIX, it mis-behaves as described earlier. 2. I tried building the war in UNIX, it mis-behaves as described earlier. I transferred the war to Windows and it worked fine. I guess there are jsp:include page / and %@ include file % directives in you webapp. Check them for case sensitivity. -- Mikolaj Rydzewskim...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Hello Miki Thanks for your inputs. UNIX war means the war file deployed in UNIX environment and Windows war means the war file deployed in Windows. So, as I said that when I just transfer the war file from Windows to UNIX, it mis-bheaves the way I specified. On the other hand, if I transfer the war file from UNIX to Windows, it works perfectly. So, I guess that refutes the conception that the build process is platform dependent. I can agree with the Tomcat Setup part. But what? I have been unable to figure that out for this is the third day now. Thanks and Regards, Rahul --- On Thu, 7/1/10, Mikolaj Rydzewski m...@ceti.pl wrote: From: Mikolaj Rydzewski m...@ceti.pl Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Thursday, July 1, 2010, 4:05 PM rahul wrote: 1. Replacing the Windows war file with the one in UNIX, works fine. 2. Replacing the UNIX war file with that in Windows mis-behaves. Please clarify what windows-war and unix-war mean. So, in other words does it mean: If you take old war file, that runs on Tomcat 4.x, from Solaris box and deploy it on new Tomcat on Windows box it runs fine. If you build new war file on Windows box, deploy it on new Tomcat on Windows box it runs fine. But if deploy the same war file on new Tomcat on Solaris box it misbehaves. Is that correct? If so, I guess that either your build process is platform dependant, or there are differences between Tomcat setups (Windows vs Solaris). -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed. If this email is from an unknown source, please simply delete this email. If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments. + Instruct the sender to enclose the file(s) in a .zip compressed file, and rename the .zip compressed file with a different extension, such as, .rtnzip. Password protecting the renamed .zip compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension .zip. Additional instructions and options on how to receive these attachments can be found at: http://security.it.ray.com/antivirus/extensions.html http://security.it.ray.com/news/2007/zipfiles.html Should you have any questions or difficulty with these instructions, please contact the Help Desk at 877.844.4712 --- Hi What are you doing to build the .war, running an Ant script perhaps? Does your build process include OS specific configuration? Where are the OS specific configuration files you mentioned placed on the filing system? What is different about the server.xml, in the two different Tomcat installations? What do the logs says during startup in each Tomcat? (You might clear the logs and start a fresh one for each server) Yes, we do run an ANT script to build the war. The ANT script uses the build.properties file that has couple of file system references. The build.xml, however does NOT have any such EXPLICIT references. So, when I build the war it takes the jars and sources from the provided locations and build at the provided target location. Now, I will re-iterate - 1. I tried building the war in Windows and worked fine. I transferred the war to UNIX, it mis-behaves as described earlier. 2. I tried building the war in UNIX, it mis-behaves as described earlier. I transferred the war to Windows and it worked fine. The config files are located in a directory structure, that directory location is provided in the catalina.bat startup script. If they are not provided correctly, it will throw errors while starting up the app. Windows and UNIX startup logs are attached herewith. I do not see any much difference in between the logs except for the file systems. Another additional comment - Its not only the back button that tends to display the Search Result, a refresh of the page also displays the page properly. So, in short, click on search, 404-Page Not Found turns up. Refresh it, or Back Button of browser, Search result turns up. This is the mis-behaviour in UNIX I have been mentioning. Thanks and Regards, Rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fw: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
In support of my email below, I am attaching the logs. As they are not in zip format, I hop they will not be removed. Else, I need to copy and paste each one of them :) --- On Fri, 7/2/10, rahul iamrahu...@yahoo.com wrote: From: rahul iamrahu...@yahoo.com Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org, p...@pidster.com Date: Friday, July 2, 2010, 4:53 AM Hi What are you doing to build the .war, running an Ant script perhaps? Does your build process include OS specific configuration? Where are the OS specific configuration files you mentioned placed on the filing system? What is different about the server.xml, in the two different Tomcat installations? What do the logs says during startup in each Tomcat? (You might clear the logs and start a fresh one for each server) Yes, we do run an ANT script to build the war. The ANT script uses the build.properties file that has couple of file system references. The build.xml, however does NOT have any such EXPLICIT references. So, when I build the war it takes the jars and sources from the provided locations and build at the provided target location. Now, I will re-iterate - 1. I tried building the war in Windows and worked fine. I transferred the war to UNIX, it mis-behaves as described earlier. 2. I tried building the war in UNIX, it mis-behaves as described earlier. I transferred the war to Windows and it worked fine. The config files are located in a directory structure, that directory location is provided in the catalina.bat startup script. If they are not provided correctly, it will throw errors while starting up the app. Windows and UNIX startup logs are attached herewith. I do not see any much difference in between the logs except for the file systems. Another additional comment - Its not only the back button that tends to display the Search Result, a refresh of the page also displays the page properly. So, in short, click on search, 404-Page Not Found turns up. Refresh it, or Back Button of browser, Search result turns up. This is the mis-behaviour in UNIX I have been mentioning. Thanks and Regards, Rahul - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Dear Users, We are trying to upgrade the Tomcat version from existing 4.1.31 to the latest available release 6.0.26. In the process, I did the following changes – 1. Downloaded the Tomcat 6.0.26 basic distribution file - apache-tomcat-6.0.26.zip from the website. 2. Unbundled it and deployed the web application on my workstation – Windows XP SP2 - first. 3. Ran the Tomcat and the application worked without any trouble. 4. Now, tried to test the same in UNIX (As the productive environment is UNIX) – the version and details of the system is as given in the subject line - , by copying the distribution and the source code with ANT build. 5. Built and deployed the application in the UNIX itself. 6. Ran the application and observed that it did not work properly. The details are as explained below- First Page - The index page comes fine where some menu items are displayed. Second Page - After clicking on Work List Details it loads the second page that displays all the search criteria - perfectly. Third Page - After selecting the criteria, the user click on Search button and there is a page opens with 404 - Page is unavailable. However, on clicking the back button of the IE, the search result appears. Attached are the log files extracts. For Windows log - windowsLog.log and for UNIX it is UnixLog.log. Apparently, this particular information goes missing from the log on pressing Search button while running in UNIX. Its only after clicking browser's back button that the following appears in the log and the page gets displayed as well. There is absolutely no error/exception that is visible in any of the logs. **NOTE - these logs extracts are from Catalina.bat/Catalina.sh output. Also attached is the screen short for page cannot be displayed message. { Information Message | 2010-06-30 11:46:49.479 | Thread[http-8080-1,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() start - URI=/workbench/Jsp/WorkOrderList.jsp { SQL Statement | 2010-06-30 11:46:49.479 | Thread[http-8080-1,5,main] | com.salmonllc.sql.DBStatement} executeQuery() SELECT WEB_USER.USER_ID,WEB_USER.DISABLED,WEB_USER_ROLE.ROLE_ID,WEB_ROLE_COMP_ACS_LVLS.APPLICATION_ID,WEB_ROLE_COMP_ACS_LVLS.SCREEN_ID,WEB_ROLE_COMP_ACS_LVLS.COMPONENT_ID,WEB_ROLE_COMP_ACS_LVLS.ROLE_ID FROM WEB_USER,WEB_USER_ROLE,WEB_ROLE_COMP_ACS_LVLS WHERE (WEB_USER.USER_ID=WEB_USER_ROLE.USER_ID AND WEB_USER_ROLE.ROLE_ID=WEB_ROLE_COMP_ACS_LVLS.ROLE_ID) AND (WEB_USER.USER_ID='MSDOMAIN\rrahul' AND WEB_USER.DISABLED='N' AND WEB_ROLE_COMP_ACS_LVLS.SCREEN_ID='work_order_list') { Debug | 2010-06-30 11:46:49.494 | Thread[http-8080-1,5,main] | com.salmonllc.jsp.tags.DataSourceTag} Returning SKIP_BODY { Information Message | 2010-06-30 11:46:49.557 | Thread[http-8080-1,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() end - URI=/workbench/Jsp/WorkOrderList.jsp Time=78 Init=false Please assist me in figuring out what is going on or what am I doing wrong. Please reply me on: iamrahu...@yahoo.com or/and rahul.ra...@eb-services.com.au Thanks and Regards, Rahul EB-Services (SP-Ausnet) EAI Team Mobile: +61 413650106 Phone: +61 3 96068387 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Hello Charles Thanks for extremely prompt reply :). First answers to your question: 1. Replacing the Windows war file with the one in UNIX, works fine. 2. Replacing the UNIX war file with that in Windows mis-behaves. Some more clarification - When I started the upgrade test after testing successfully in the workstation, I copied the entire war from Windows to UNIX. The application uses certain properties files where the file system references are provided. Those references were changed to map to the UNIX file systems in the properties files. The server.xml ports were chamnged. I am attaching the same here with as requested. Also, tomcat-users.xml was changed to add the admin user for manager role. It did not work that is mis-behaved the same way as explained in my first email. Then I tried copying the whole source code to UNIX with ANT utility. Built there and deployed there itself, ending up with the same result. Please let me know whether I am able to get you a bit clearer picture. Is there any way I can give you a call, if you have any contact number? Where are you located? May be this way we can clarify the things more quickly. I have become a bit desperate now, trying to get some hint on this issue for around 2 days now.:) Your help is appreciated. Best Regards, Rahul --- On Thu, 7/1/10, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Thursday, July 1, 2010, 3:49 AM From: rahul [mailto:iamrahu...@yahoo.com] Subject: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly 5. Built and deployed the application in the UNIX itself. If the application is pure Java, that step was unnecessary. What happens if you take the .war file (or .class files) from the Solaris box and run them on Windows? Does the app misbehave there as well? Likewise, what happens if you take what's running on Windows and deploy it on Solaris? Does it run properly? Also, post your server.xml for Tomcat 6.0.26; lots of things changed between 4.1 and 6.0, and if any config items were copied over verbatim, that might create problems. Third Page - After selecting the criteria, the user click on Search button and there is a page opens with 404 - Page is unavailable. However, on clicking the back button of the IE, the search result appears. Turn on Tomcat's access logging and see what's coming in. Attached are the log files extracts. Nope; the mailing list strips almost all attachments. Post them inline, or put them in some public location on the web. Please assist me in figuring out what is going on or what am I doing wrong. Case problems? Windows is not case-sensitive, Solaris is. Please reply me on: iamrahu...@yahoo.com or/and rahul.ra...@eb-services.com.au No, replies should go only to the mailing list, not to individuals. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=5005 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener / !-- Prevent memory leaks due to use of particular java/javax APIs-- Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Listener
Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Thanks Pid. Your points noted. Any pointers to the issues will be appreciated. Kind Regards, Rahul --- On Thu, 7/1/10, Pid p...@pidster.com wrote: From: Pid p...@pidster.com Subject: Re: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Thursday, July 1, 2010, 4:51 AM On 30/06/2010 23:58, rahul wrote: Is there any way I can give you a call, if you have any contact number? See below. No, replies should go only to the mailing list, not to individuals. We keep all discussions on the list, that way other people can learn from them too. You can think of it as the 'price' of free help. p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fw: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
A further information - I installed Mozilla Firefox and on clicking search it printed out an error message that The requested URL /workbench/Jsp/WorkOrderList.jsp was not found on this server.. Ran the same application parallaly on Windows and that works fine with Firefox as well. Best Regards, Rahul --- On Thu, 7/1/10, rahul iamrahu...@yahoo.com wrote: From: rahul iamrahu...@yahoo.com Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Thursday, July 1, 2010, 4:28 AM Hello Charles Thanks for extremely prompt reply :). First answers to your question: 1. Replacing the Windows war file with the one in UNIX, works fine. 2. Replacing the UNIX war file with that in Windows mis-behaves. Some more clarification - When I started the upgrade test after testing successfully in the workstation, I copied the entire war from Windows to UNIX. The application uses certain properties files where the file system references are provided. Those references were changed to map to the UNIX file systems in the properties files. The server.xml ports were chamnged. I am attaching the same here with as requested. Also, tomcat-users.xml was changed to add the admin user for manager role. It did not work that is mis-behaved the same way as explained in my first email. Then I tried copying the whole source code to UNIX with ANT utility. Built there and deployed there itself, ending up with the same result. Please let me know whether I am able to get you a bit clearer picture. Is there any way I can give you a call, if you have any contact number? Where are you located? May be this way we can clarify the things more quickly. I have become a bit desperate now, trying to get some hint on this issue for around 2 days now.:) Your help is appreciated. Best Regards, Rahul --- On Thu, 7/1/10, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Thursday, July 1, 2010, 3:49 AM From: rahul [mailto:iamrahu...@yahoo.com] Subject: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly 5. Built and deployed the application in the UNIX itself. If the application is pure Java, that step was unnecessary. What happens if you take the .war file (or .class files) from the Solaris box and run them on Windows? Does the app misbehave there as well? Likewise, what happens if you take what's running on Windows and deploy it on Solaris? Does it run properly? Also, post your server.xml for Tomcat 6.0.26; lots of things changed between 4.1 and 6.0, and if any config items were copied over verbatim, that might create problems. Third Page - After selecting the criteria, the user click on Search button and there is a page opens with 404 - Page is unavailable. However, on clicking the back button of the IE, the search result appears. Turn on Tomcat's access logging and see what's coming in. Attached are the log files extracts. Nope; the mailing list strips almost all attachments. Post them inline, or put them in some public location on the web. Please assist me in figuring out what is going on or what am I doing wrong. Case problems? Windows is not case-sensitive, Solaris is. Please reply me on: iamrahu...@yahoo.com or/and rahul.ra...@eb-services.com.au No, replies should go only to the mailing list, not to individuals. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server
RE: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly
Charles The web.xml does not have much mapping as the application uses the SOFIA Salmon LLC framework. Actually, as I said, the page is entered and executed first to print the search criteria with URL - http://host:5080/app/Jsp/WorkOrderList.jsp?work_order_type=activeNavBarId=work_order_list Now, after selecting search criteria, the Search button is hit, and apparantly the same page get executed, as the log file goes: { Information Message | 2010-06-30 11:46:49.197 | Thread[http-8080-2,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() start - URI=/workbench/Jsp/WorkOrderList.jsp Then it gets data from the data source succecssfully. Then, it prints: { Information Message | 2010-06-30 11:46:49.479 | Thread[http-8080-2,5,main] | org.apache.jsp.Jsp.WorkOrderList_jsp} JspServlet.service() end - URI=/workbench/Jsp/WorkOrderList.jsp Time=282 Init=false Then the front end page says: Page Not Found. In Windows, however, right after this line JspServlet.service() start - URI=/workbench/Jsp/WorkOrderList.jsp is printed AGAIN in the logs to execute all the other HTML related component for the frontend. And in the last it prints the end - URI bit again. You may refer to the attachments posted earlier. Please let me know whether I have clarified your query. Kind Regards, Rahul --- On Thu, 7/1/10, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly To: Tomcat Users List users@tomcat.apache.org Date: Thursday, July 1, 2010, 8:23 AM From: rahul [mailto:iamrahu...@yahoo.com] Subject: Fw: RE: Tomcat 6.0.26 with Java 6 update 20 on Sun Solaris 5.8 Sparc - Web application unable to execute properly I installed Mozilla Firefox and on clicking search it printed out an error message that The requested URL /workbench/Jsp/WorkOrderList.jsp was not found on this server.. Ran the same application parallaly on Windows and that works fine with Firefox as well. I suspect it's what I told you to look for earlier - case sensitivity. In Windows, case matters very little, but on Solaris, it's critical. Is the directory the URL maps to spelled exactly the same way the URL is formed (eg, Jsp, not jsp)? Is there a URL-pattern in your WEB-INF/web.xml that might have the wrong casing? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk compatibilities between versions.
| rahul wrote: | I am trying to integrate mod_jk with the apache 2.2 package | distribution in solaris. | I would like to know what would be the versions that can have | incompatibilities with the previous versions (both API and configuration) | Check the change log: | http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html thanks I will check it. | It contains all changes between each version. If you need to know what | changed between 1.2.14 and 1.2.25, then you need read all of the changes | for intervening versions. | | Is JK-1.2.25 going to be completely compatible with JK-1.2.26 | | All of the 1.2.x versions are compatible with each other. | | How about JK-1.2.25 and JK-1.3.xx and | | I don't believe there are any 1.3.x versions. I had meant it for the future versions. ie. at what version level change can I expect the compatibility to get broken (If there is a reason for breaking it). To ask in a different way, If you find that you need to break the compatibility between releases, which version number will you increment?. | JK-1.2.25 and JK-2.xx.yy | | Same here: there are no 2.x versions. (As above. I meant the future versions) | which is the version change where I can expect the compatibility to be | guaranteed? | | Do you mean feature compatibility? Each version of mod_jk includes | improvements and features that were not included in previous versions. | So, in a sense, all versions are incompatible (with each other). No, I meant the newer versions to not break any thing if dropped in place of older ones. | On the other hand, they all implement the AJP12 and AJP13 protocols. So, | in a sense, they are all entirely compatible (with each other). See above. If there is a chance that you want to break drop-in compatibility for some reason, which is the version number that will change. (Not that it has happened yet. But _in case_ ) | All versions along the 1.2.x line are expected to be drop-in replaceable | for other versions in the same line. You should always read the release | notes between versions so that some fixed bug doesn't end up breaking | your setup. The reason I had asked is that if we know for sure that a version would be drop-in replacement, we can push it as an inplace upgrade. While a version that may break compatibility should be placed in a separate location or given a separate name when upgrading so that nothing gets broken. rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xx
rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk compatibilities between versions.
Hi, I am trying to integrate mod_jk with the apache 2.2 package distribution in solaris. I would like to know what would be the versions that can have incompatibilities with the previous versions (both API and configuration) ie Is JK-1.2.25 going to be completely compatible with JK-1.2.26 How about JK-1.2.25 and JK-1.3.xx and JK-1.2.25 and JK-2.xx.yy which is the version change where I can expect the compatibility to be guaranteed? rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache connectors for tomcat
Hi, Which is the recommended connector for Apache now? mod_jk or mod_proxy_ajp (with balancer) ? rahul -- 1. e4 _ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need info on IPv6 support for Tomcat in RHEL and SLES distros
Hi All, I need information on whether IPv6 is supported on Tomcat for the following distros: Redhat Enterprise Edition Linux 4 (base version) (Tomcat 4.1) Redhat Enterprise Edition Linux 5 (base version) (Tomcat 5.5) SuSE Enterprise Linux Server 9 (base version) - SuSE Enterprise Linux Server 10 (base version) (Tomcat 5.0) I am mailing this after searching through the Tomcat apache archives, Red Hat docs, to no avail. I would be glad if you could help me on this. Thanks in advance. Rahul Prasad B Hewlett Packard Bangalore The ability to simplify means to eliminate the unnecessary so that the necessary may speak. - Hans Hoffman
Re: NullPointerException with Parameters.getParameterValues(String)
Hi Chris, Rahul Thakur wrote: Looks like it was the 'username'. The username is being initialised in the taglib handler implementation but the behaviour differs between JRun and Tomcat. That should not be the case. The servlet spec is quite clear about the order of execution of the various init/begin/body/end taglib calls. Are you sure you haven't changed anything? Now this can also accept other attributes (if the expected request param names were different). I updated it for Tomcat like this: users:login loginpage=login.jsp logout=logout username=username password=password / Why would it have to change for Tomcat? This particular web app was coded up 5+ years ago and deployed on JRun. I am not sure if the Servlet spec then was clear on taglib lifecycle or not (I admit I haven't read the spec!) While 'username', 'password' and 'logout' are initialised to the default values in the taglib handler implementation, the setter method for these attributes still gets called when they are not specified in the JSP, and NULL values are assumed for them. That's the only explanation I can think of :-) Sounds like it might happen that way. If you have a default value for username (and friends), why not set those defaults in the setUsername(String) method and use the default when NULL is passed? Also, why is a setter being called on the tag handler when there is no attribute value specified? Something sounds fishy. Does adding 'username=username' fix the problem when running under Tomcat? Yes, adding those attributes to the taglib works on Tomcat. Another difference that Robert pointed out in an earlier email on this thread was about the Request 'Parameter' objects not being created/assimilated by Tomcat container when another Servlet or Filter makes a call to Request.getInputStream() or getReader(). I did not hit any issues on JRun w.r.t this. Rahul - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NullPointerException with Parameters.getParameterValues(String)
Looks like it was the 'username'. The username is being initialised in the taglib handler implementation but the behaviour differs between JRun and Tomcat. In the layout template jsp for the admin console, we use a taglib that checks if a user is logged in or not. The following snippet works on JRun. users:login loginpage=login.jsp / Now this can also accept other attributes (if the expected request param names were different). I updated it for Tomcat like this: users:login loginpage=login.jsp logout=logout username=username password=password / While 'username', 'password' and 'logout' are initialised to the default values in the taglib handler implementation, the setter method for these attributes still gets called when they are not specified in the JSP, and NULL values are assumed for them. That's the only explanation I can think of :-) What is the correct behaviour? Any ideas. Cheers, Rahul On 4/11/07, Robert Harper [EMAIL PROTECTED] wrote: Try username. I'm surprised the compiler doesn't complain that username is being used without being initialized. If it didn't, the compiler probably set username to be null. You need to pass a valid string to the method getParameter(); Try something more like: String username = null; Username = pageContext().getRequest().getParameter( username ); Robert S. Harper Senior Engineer Information Access Technology, Inc. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]