Solaris/Tomcat 7.0.32 + SPNEGO, Browser Header Problem
Hi, I'm running Tomcat 7.0.32 on jdk1.6.0_06 and am having problems with client browser (IE8) SPNEGO authentication. I referred to this page when checking the browser configuration, which runs on Windows XP. http://www.oracle.com/technetwork/articles/idm/weblogic-sso-kerberos-161 9890.html With debug switched on in com.sun.security.auth.module.Krb5LoginModule I see this: 25-Sep-2013 14:53:44 org.apache.catalina.authenticator.AuthenticatorBase invoke FINE: Security checking request GET /myapp/ 25-Sep-2013 14:53:44 org.apache.catalina.realm.RealmBase findSecurityConstraints FINE: Checking constraint 'SecurityConstraint[BasicAuthSimpleTestServlet, MY Application]' against GET / -- true 25-Sep-2013 14:53:44 org.apache.catalina.authenticator.AuthenticatorBase invoke FINE: Calling hasUserDataPermission() 25-Sep-2013 14:53:44 org.apache.catalina.realm.RealmBase hasUserDataPermission FINE: User data constraint has no restrictions 25-Sep-2013 14:53:44 org.apache.catalina.authenticator.AuthenticatorBase invoke FINE: Calling authenticate() 25-Sep-2013 14:53:44 org.apache.catalina.authenticator.SpnegoAuthenticator authenticate FINE: No authorization header sent by client 25-Sep-2013 14:53:44 org.apache.catalina.authenticator.AuthenticatorBase invoke FINE: Failed authenticate() test Here is the sequence of HTTP exchanges giving the above: GET /myapp/ HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, a pplication/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.m s-powerpoint, application/msword, */* Accept-Language: en-gb User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; .NET CLR 1.1.4322; .NET CLR 2.0.507 27; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; .NET4.0C; .NET4.0E) Accept-Encoding: gzip, deflate Host: sold6:8030 Connection: Keep-Alive HTTP/1.1 401 Unauthorized Server: Apache-Coyote/1.1 Cache-Control: private Expires: Thu, 01 Jan 1970 01:00:00 GMT WWW-Authenticate: Negotiate Content-Type: text/html;charset=utf-8 Content-Length: 951 Date: Wed, 25 Sep 2013 11:26:31 GMT htmlheadtitleApache Tomcat/7.0.32 GET /myapp/ HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, a pplication/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.m s-powerpoint, application/msword, */* Accept-Language: en-gb User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; .NET CLR 1.1.4322; .NET CLR 2.0.507 27; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; .NET4.0C; .NET4.0E) Accept-Encoding: gzip, deflate Host: sold6:8030 Connection: Keep-Alive Authorization: Negotiate YIJJiQ...[lots of data]... HTTP/1.1 400 Bad Request Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Wed, 25 Sep 2013 11:26:33 GMT Connection: close It looks like SpnegoAuthenticator is rejecting the request because the authorization header is malformed or missing in the repeated GET, although it does appear to provided by the client browser. The same error also occurs with the Firefox v23.0.1 browser. Any suggestions or guidance will be gratefully received. Kind regards, Geoff Mitsubishi UFJ Securities International plc (MUSI) is registered in England, company number 1698498, registered office at Ropemaker Place, 25 Ropemaker Street, London, EC2Y 9AJ, and is part of the Mitsubishi UFJ Financial Group. MUSI is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority (FCA) and Prudential Regulation Authority (PRA) in the UK. This email and any attachments may be confidential. If it was sent to you in error, you must not copy, duplicate, distribute or take any action in reliance on it. Please contact the sender if you believe you have received this email in error and delete it and any attachments. Unless expressly indicated, information sent to you is not to be construed as an offer or solicitation to buy or sell any security, instrument, investment, financial product or an official confirmation of any transaction. The information in or attached to this email may not be accurate or complete. This email or information is not to be viewed as a 'personal recommendation' within the meaning of the FCA rules. MUSI or any affiliated company may have an interest, position, or effect transactions, in any investment mentioned. Any opinions expressed are solely those of the author and are subject to change without notice. Neither MUSI nor any of its affiliates accept any liability whatsoever for any direct or consequential loss arising from any use of information or material contained in any electronic communication.
RE: Binding Tomcat Apps to Specific CPUs in Windows
That is helpful. Thanks Chris. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, April 20, 2010 1:10 PM To: Tomcat Users List Subject: Re: Binding Tomcat Apps to Specific CPUs in Windows -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Geoff, On 4/19/2010 5:42 PM, Marsh, Geoffrey (NIH/CIT) [E] wrote: Good evening. I would like to bind a specific application within Tomcat to a specific CPU or pair of CPUs on a Windows Server. To follow-up on Andre's reply: you cannot control this from within Java/your webapp itself: you'll have to do this externally. There are several reasons for this. First, I don't believe there's a CPU-oriented API available to Java, so you can't give threads hints about which CPU to use (affinity is the term with which I am most familiar). Second, thread pools are shared across all webapps in a single Service, so you really can't segregate a single webapp. If you really want a particular webapp to have a certain CPU affinity, you'll need to: 1. Create a separate Tomcat environment (see the Advanced section in RUNNING.txt that came with your TC package). 2. Deploy only that single webapp onto that Tomcat instance. 3. When launching that Tomcat instance, set the processor affinity for the JVM that you use with Tomcat. 4. (optional) Use a web server or load balancer to front Tomcat to direct requests from (say) port 80 to port xyz where your webapp is really being hosted. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvN3/MACgkQ9CaO5/Lv0PCcCACePp6WnNajT3/KPQ4Uj44GuTvs HRoAnjpDfKcZfpe74k7hXRwYYZDTuuag =qvzm -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Binding Tomcat Apps to Specific CPUs in Windows
Good evening. I would like to bind a specific application within Tomcat to a specific CPU or pair of CPUs on a Windows Server. I'm having no luck finding documentation or list threads about this. Anybody done this? Any guidance or pointers would be greatly appreciated. If it helps, software and hardware specs for the box in question are below. Thank you in advance for your help. Specs: OS: Windows Server 2003 R2 SP2 64-bit Processor: Quad-core with 8 virtual processors Tomcat 5.5.27 Sun JVM 1.5.0_20-b02 Geoff
RE: Binding Tomcat Apps to Specific CPUs in Windows
Thanks Andre. That makes sense. I appreciate the quick reply. -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, April 19, 2010 5:48 PM To: Tomcat Users List Subject: Re: Binding Tomcat Apps to Specific CPUs in Windows Marsh, Geoffrey (NIH/CIT) [E] wrote: Good evening. I would like to bind a specific application within Tomcat to a specific CPU or pair of CPUs on a Windows Server. I don't think you can. An application within Tomcat is not a separate process. Even Tomcat is not a process, from the OS's point of view. The JVM (Java Virtual Machine) running Tomcat is the process. So you would have to run a separate JVM, with a separate Tomcat, running that webapp only, to do what you want to do. - 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: ArrayIndexOutOfBoundsException
Hi everyone. Sorry it took some time but here it is. It actually looks like changing the variables to method variables fixed the problem. It has been running for 3 days now without any problems. Thanks everyone. Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 25 Nov 2009, at 15:39, Pid wrote: On 25/11/2009 14:05, geoff...@fileflow.com wrote: On 25 Nov 2009, at 14:34, Felix Schumacher wrote: Am Dienstag, den 24.11.2009, 17:57 +0100 schrieb geoff...@fileflow.com: Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: ... Are in and out instance variables? They should be method variables, like public void doGet(...) { ServletOutputStream out; InputStream in; ... in = new FileInputStream(tmp); ... } else concurrent calls to your servlet will mixup your out and in variables. They are actually instance variable. I'll check if moving them solves the problem. Mmm. Yes... p Hth Felix Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf)) 0) { out.write(buf, 0, bytesRead); } The updated code didn't change anything in that Servlet so I really have no clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11. Thanks for any help. Best Regards Geoffrey - 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
Re: ArrayIndexOutOfBoundsException
I changed the size to 4K, 50K and 1 byte without any luck. Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 25 Nov 2009, at 00:28, Pid wrote: On 24/11/2009 20:03, Konstantin Kolinko wrote: 2009/11/24geoff...@fileflow.com: There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. So it is random... I wonder what can trigger it. What connectors are you using? Is it HTTP, or AJP? What is your configuration as a whole? There was the following bugreport recently: https://issues.apache.org/bugzilla/show_bug.cgi?id=48105 The reporter of issue 48105 wrote that he saw exceptions in 6.0.18, .20 as well, but no stack traces were provided, so it is unconfirmed. I don't think we got to the bottom of why that was happening. I was hoping the problem would be in the same method, but it's not in exactly the same location for both. The append(byte[], int, int) method is implicated in both, and in both cases an 8k byte buffer was in use in the app code. @Geoffrey - can you try using a smaller (say 4k) byte buffer instead, and adding some code to count how many bytes have been sent when the error occurs? p - 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
Re: ArrayIndexOutOfBoundsException
On 25 Nov 2009, at 04:14, Konstantin Kolinko wrote: 2009/11/24 geoff...@fileflow.com: HTTP connector. I'll attach the conf folder from tomcat. Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 21:03, Konstantin Kolinko wrote: 2009/11/24 geoff...@fileflow.com: There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. So it is random... I wonder what can trigger it. What connectors are you using? Is it HTTP, or AJP? What is your configuration as a whole? There was the following bugreport recently: https://issues.apache.org/bugzilla/show_bug.cgi?id=48105 The reporter of issue 48105 wrote that he saw exceptions in 6.0.18, .20 as well, but no stack traces were provided, so it is unconfirmed. Thank you. Could it be that there are several threads that have access to the same Response object? (That is illegal). You can try setting the ...RECYCLE_FACADES property to true, see the full name of it and description in http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html You can add it to the end of the catalina.properties file. I do not see what else can cause randomness in writing out a response. Different length of headers? I see that you have maxHttpHeaderSize=5 The maxHttpHeaderSize=5 was added to try to solve the problem (I saw it somewhere when googling) but did nothing to help Are you using Tomcat-Native (tcnative-1.dll, libtcnative-1.so)? I do not use native library (not that I'm aware of) and I can't find .so file when searching. I see that you have an AprLifecycleListener in your server.xml. Does it print a warning that tomcat-native is not present when Tomcat is started? There are no errors on startup. You can comment it out to disable Tomcat-Native and to disable that warning message if you are not going to use it. See http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html Best regards, Konstantin Kolinko - 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: ArrayIndexOutOfBoundsException
On 25 Nov 2009, at 11:10, Pid wrote: On 25/11/2009 08:17, geoff...@fileflow.com wrote: I changed the size to 4K, 50K and 1 byte without any luck. What about adding a byte counter to catch when the exception occurs? It happens totally at random. Sometimes after 200KB sometimes after 250MB On 25 Nov 2009, at 00:28, Pid wrote: On 24/11/2009 20:03, Konstantin Kolinko wrote: 2009/11/24geoff...@fileflow.com: There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. So it is random... I wonder what can trigger it. What connectors are you using? Is it HTTP, or AJP? What is your configuration as a whole? There was the following bugreport recently: https://issues.apache.org/bugzilla/show_bug.cgi?id=48105 The reporter of issue 48105 wrote that he saw exceptions in 6.0.18, .20 as well, but no stack traces were provided, so it is unconfirmed. I don't think we got to the bottom of why that was happening. I was hoping the problem would be in the same method, but it's not in exactly the same location for both. The append(byte[], int, int) method is implicated in both, and in both cases an 8k byte buffer was in use in the app code. @Geoffrey - can you try using a smaller (say 4k) byte buffer instead, and adding some code to count how many bytes have been sent when the error occurs? p - 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 smime.p7s Description: S/MIME cryptographic signature
Re: ArrayIndexOutOfBoundsException
On 25 Nov 2009, at 12:53, Pid wrote: On 25/11/2009 11:30, geoff...@fileflow.com wrote: On 25 Nov 2009, at 11:10, Pid wrote: On 25/11/2009 08:17, geoff...@fileflow.com mailto:geoff...@fileflow.com wrote: I changed the size to 4K, 50K and 1 byte without any luck. What about adding a byte counter to catch when the exception occurs? It happens totally at random. Sometimes after 200KB sometimes after 250MB Were you able to compare that amount to the size of the file being sent? E.g. is it at occuring at unpredictable percentage of file sent. It is totally random. Even on the same file. Sometimes just 1% and other time almost 95%. I tried with files between 5MB and 285MB. I cannot see any patterns. On 25 Nov 2009, at 00:28, Pid wrote: On 24/11/2009 20:03, Konstantin Kolinko wrote: 2009/11/24geoff...@fileflow.com mailto:geoff...@fileflow.com: There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. So it is random... I wonder what can trigger it. What connectors are you using? Is it HTTP, or AJP? What is your configuration as a whole? There was the following bugreport recently: https://issues.apache.org/bugzilla/show_bug.cgi?id=48105 The reporter of issue 48105 wrote that he saw exceptions in 6.0.18, .20 as well, but no stack traces were provided, so it is unconfirmed. I don't think we got to the bottom of why that was happening. I was hoping the problem would be in the same method, but it's not in exactly the same location for both. The append(byte[], int, int) method is implicated in both, and in both cases an 8k byte buffer was in use in the app code. @Geoffrey - can you try using a smaller (say 4k) byte buffer instead, and adding some code to count how many bytes have been sent when the error occurs? p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org mailto:users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org mailto:users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org mailto:users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org mailto:users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org mailto:users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org mailto: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
Re: ArrayIndexOutOfBoundsException
On 25 Nov 2009, at 13:26, Pid wrote: On 25/11/2009 12:13, geoff...@fileflow.com wrote: On 25 Nov 2009, at 12:53, Pid wrote: On 25/11/2009 11:30, geoff...@fileflow.com wrote: On 25 Nov 2009, at 11:10, Pid wrote: On 25/11/2009 08:17, geoff...@fileflow.com mailto:geoff...@fileflow.com wrote: I changed the size to 4K, 50K and 1 byte without any luck. What about adding a byte counter to catch when the exception occurs? It happens totally at random. Sometimes after 200KB sometimes after 250MB Were you able to compare that amount to the size of the file being sent? E.g. is it at occuring at unpredictable percentage of file sent. It is totally random. Even on the same file. Sometimes just 1% and other time almost 95%. I tried with files between 5MB and 285MB. I cannot see any patterns. Is there anything in your application that could cause another thread to access the response object or it's output stream? Given that we don't see problems like this with any frequency, I'd have to lean towards there being something in your application code that is causing this. I don't see anything that could do it. I didn't even know it was possible. It is servlets that responds to doGet and, as I understand it, they all have their own response. I don't create any threads in the code nor do I use synchronized (maybe I could try?). Do you have any examples of how to do this? I also need to mention that it works fine on another server. On 25 Nov 2009, at 00:28, Pid wrote: On 24/11/2009 20:03, Konstantin Kolinko wrote: 2009/11/24geoff...@fileflow.commailto:geoff...@fileflow.com: There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. So it is random... I wonder what can trigger it. What connectors are you using? Is it HTTP, or AJP? What is your configuration as a whole? There was the following bugreport recently: https://issues.apache.org/bugzilla/show_bug.cgi?id=48105 The reporter of issue 48105 wrote that he saw exceptions in 6.0.18, .20 as well, but no stack traces were provided, so it is unconfirmed. I don't think we got to the bottom of why that was happening. I was hoping the problem would be in the same method, but it's not in exactly the same location for both. The append(byte[], int, int) method is implicated in both, and in both cases an 8k byte buffer was in use in the app code. @Geoffrey - can you try using a smaller (say 4k) byte buffer instead, and adding some code to count how many bytes have been sent when the error occurs? smime.p7s Description: S/MIME cryptographic signature
Re: ArrayIndexOutOfBoundsException
On 25 Nov 2009, at 14:08, Pid wrote: On 25/11/2009 13:03, geoff...@fileflow.com wrote: On 25 Nov 2009, at 13:26, Pid wrote: On 25/11/2009 12:13, geoff...@fileflow.com wrote: On 25 Nov 2009, at 12:53, Pid wrote: On 25/11/2009 11:30, geoff...@fileflow.com wrote: On 25 Nov 2009, at 11:10, Pid wrote: On 25/11/2009 08:17, geoff...@fileflow.com mailto:geoff...@fileflow.com wrote: I changed the size to 4K, 50K and 1 byte without any luck. What about adding a byte counter to catch when the exception occurs? It happens totally at random. Sometimes after 200KB sometimes after 250MB Were you able to compare that amount to the size of the file being sent? E.g. is it at occuring at unpredictable percentage of file sent. It is totally random. Even on the same file. Sometimes just 1% and other time almost 95%. I tried with files between 5MB and 285MB. I cannot see any patterns. Is there anything in your application that could cause another thread to access the response object or it's output stream? Given that we don't see problems like this with any frequency, I'd have to lean towards there being something in your application code that is causing this. I don't see anything that could do it. I didn't even know it was possible. It is servlets that responds to doGet and, as I understand it, they all have their own response. I don't create any threads in the code nor do I use synchronized (maybe I could try?). Do you have any examples of how to do this? I also need to mention that it works fine on another server. Synchronisation won't help. If it's working fine on a different server that could give us an angle to look at. What's different about that server, is it identical? Hardware is different. The one working is a much older machine we use as development server (less memory, older CPU, less disk, etc). OS is the same and apache is 6.0.18 on dev and 6.0.20 on the problem server (but it doesn't work with 6.0.18 here either). On 25 Nov 2009, at 00:28, Pid wrote: On 24/11/2009 20:03, Konstantin Kolinko wrote: 2009/11/24geoff...@fileflow.commailto:geoff...@fileflow.com: There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. So it is random... I wonder what can trigger it. What connectors are you using? Is it HTTP, or AJP? What is your configuration as a whole? There was the following bugreport recently: https://issues.apache.org/bugzilla/show_bug.cgi?id=48105 The reporter of issue 48105 wrote that he saw exceptions in 6.0.18, .20 as well, but no stack traces were provided, so it is unconfirmed. I don't think we got to the bottom of why that was happening. I was hoping the problem would be in the same method, but it's not in exactly the same location for both. The append(byte[], int, int) method is implicated in both, and in both cases an 8k byte buffer was in use in the app code. @Geoffrey - can you try using a smaller (say 4k) byte buffer instead, and adding some code to count how many bytes have been sent when the error occurs? - 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: ArrayIndexOutOfBoundsException
On 25 Nov 2009, at 14:34, Felix Schumacher wrote: Am Dienstag, den 24.11.2009, 17:57 +0100 schrieb geoff...@fileflow.com: Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: ... Are in and out instance variables? They should be method variables, like public void doGet(...) { ServletOutputStream out; InputStream in; ... in = new FileInputStream(tmp); ... } else concurrent calls to your servlet will mixup your out and in variables. They are actually instance variable. I'll check if moving them solves the problem. Hth Felix Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf)) 0) { out.write(buf, 0, bytesRead); } The updated code didn't change anything in that Servlet so I really have no clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11. Thanks for any help. Best Regards Geoffrey - 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: ArrayIndexOutOfBoundsException
Java is the same and no APR. On 25 Nov 2009, at 15:10, Pid wrote: On 25/11/2009 14:04, geoff...@fileflow.com wrote: Hardware is different. The one working is a much older machine we use as development server (less memory, older CPU, less disk, etc). OS is the same and apache is 6.0.18 on dev and 6.0.20 on the problem server (but it doesn't work with 6.0.18 here either). Is the JVM version identical too? Are you using APR? p - 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
ArrayIndexOutOfBoundsException
Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: java.lang.ArrayIndexOutOfBoundsException at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:346) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at com.fileflow.downloader.Downloader.doGet(Downloader.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) 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:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf)) 0) { out.write(buf, 0, bytesRead); } The updated code didn't change anything in that Servlet so I really have no clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11. Thanks for any help. Best Regards Geoffrey smime.p7s Description: S/MIME cryptographic signature
Re: ArrayIndexOutOfBoundsException
The bytesRead returns the size of the buffer (8KB) every time. I also debug and I can't find anything wrong. Input and OutputStream are not null, bytesRead is the correct size and the buffer is also filled. Any other ideas? Best Regards Geoffrey On 24 Nov 2009, at 18:13, Ronald Klop wrote: Try insert some debug statements just before the out.write. System.out.println(bytesRead: + bytesRead) would be interesting. In fact this is kind of my-first-debugging and you don't even mention you did try it. Ronald. Op dinsdag, 24 november 2009 17:57 schreef geoff...@fileflow.com: Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: java.lang.ArrayIndexOutOfBoundsException at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:346) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at com.fileflow.downloader.Downloader.doGet(Downloader.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) 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:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf)) 0) { out.write(buf, 0, bytesRead); } The updated code didn't change anything in that Servlet so I really have no clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11. Thanks for any help. Best Regards Geoffrey smime.p7s Description: S/MIME cryptographic signature
Re: ArrayIndexOutOfBoundsException
The files are up to 30GB so it is not a solution. When I try without the buffer it doesn't seem to work at all. What I mean is that the servlet sends some data before the error occurs when sending with the buffer but I get 0KB without. Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 18:22, Pid wrote: On 24/11/2009 17:17, geoff...@fileflow.com wrote: The bytesRead returns the size of the buffer (8KB) every time. I also debug and I can't find anything wrong. Input and OutputStream are not null, bytesRead is the correct size and the buffer is also filled. Any other ideas? How big is the file you're sending? Is there any particular reason to use a buffer? What happens if you try without it? p On 24 Nov 2009, at 18:13, Ronald Klop wrote: Try insert some debug statements just before the out.write. System.out.println(bytesRead: + bytesRead) would be interesting. In fact this is kind of my-first-debugging and you don't even mention you did try it. Ronald. Op dinsdag, 24 november 2009 17:57 schreef geoff...@fileflow.com: Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: java.lang.ArrayIndexOutOfBoundsException at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:346) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at com.fileflow.downloader.Downloader.doGet(Downloader.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) 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:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf)) 0) { out.write(buf, 0, bytesRead); } The updated code didn't change anything in that Servlet so I really have no clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11. Thanks for any help. Best Regards Geoffrey - 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: ArrayIndexOutOfBoundsException
There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 18:30, Pid wrote: On 24/11/2009 17:27, geoff...@fileflow.com wrote: The files are up to 30GB so it is not a solution. When I try without the buffer it doesn't seem to work at all. What I mean is that the servlet sends some data before the error occurs when sending with the buffer but I get 0KB without. At what point is the error occuring, same place each time? If not known, try adding some debug logging to count bytes or some such. What happens if you write byte-by-byte? p Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 18:22, Pid wrote: On 24/11/2009 17:17, geoff...@fileflow.com wrote: The bytesRead returns the size of the buffer (8KB) every time. I also debug and I can't find anything wrong. Input and OutputStream are not null, bytesRead is the correct size and the buffer is also filled. Any other ideas? How big is the file you're sending? Is there any particular reason to use a buffer? What happens if you try without it? p On 24 Nov 2009, at 18:13, Ronald Klop wrote: Try insert some debug statements just before the out.write. System.out.println(bytesRead: + bytesRead) would be interesting. In fact this is kind of my-first-debugging and you don't even mention you did try it. Ronald. Op dinsdag, 24 november 2009 17:57 schreef geoff...@fileflow.com: Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: java.lang.ArrayIndexOutOfBoundsException at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:346) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at com.fileflow.downloader.Downloader.doGet(Downloader.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) 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:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf)) 0) { out.write(buf, 0, bytesRead); } The updated code didn't change anything in that Servlet so I really have no clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11. Thanks for any help. Best Regards Geoffrey - 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
Re: ArrayIndexOutOfBoundsException
Same problem. I'm getting lost. Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 18:38, g f wrote: Perhaps change your code from while((bytesRead = in.read(buf)) 0) { while((bytesRead = in.read(buf)) != -1) { From api: Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown. HTH. On Tue, Nov 24, 2009 at 10:57 AM, geoff...@fileflow.com wrote: Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: java.lang.ArrayIndexOutOfBoundsException at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:346) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at com.fileflow.downloader.Downloader.doGet(Downloader.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) 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:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf)) 0) { out.write(buf, 0, bytesRead); } The updated code didn't change anything in that Servlet so I really have no clue what happened. It happens on tomcat 6.0.18 and 6.0.20. Java is 1.6.0_11. Thanks for any help. Best Regards Geoffrey - 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: ArrayIndexOutOfBoundsException
I can't find anything in the list archive. You're sure it's not another list? Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 19:18, Pid wrote: On 24/11/2009 17:37, geoff...@fileflow.com wrote: There is a different amount of data sent each time before it crashes. I also tried byte by byte and gets the same error but it seems that it is less often. Something is ringing a bell. Search the list archives see if you can find anything similar, I have a feeling that someone had a similar problem recently. I'll look myself when I get a chance later. p Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 18:30, Pid wrote: On 24/11/2009 17:27, geoff...@fileflow.com wrote: The files are up to 30GB so it is not a solution. When I try without the buffer it doesn't seem to work at all. What I mean is that the servlet sends some data before the error occurs when sending with the buffer but I get 0KB without. At what point is the error occuring, same place each time? If not known, try adding some debug logging to count bytes or some such. What happens if you write byte-by-byte? p Best Regards Geoffrey Phone Norway: +47 45 86 53 83 Fileflow Technologies AS Ole Deviks vei 35, 0668 Oslo, Norway - On 24 Nov 2009, at 18:22, Pid wrote: On 24/11/2009 17:17, geoff...@fileflow.com wrote: The bytesRead returns the size of the buffer (8KB) every time. I also debug and I can't find anything wrong. Input and OutputStream are not null, bytesRead is the correct size and the buffer is also filled. Any other ideas? How big is the file you're sending? Is there any particular reason to use a buffer? What happens if you try without it? p On 24 Nov 2009, at 18:13, Ronald Klop wrote: Try insert some debug statements just before the out.write. System.out.println(bytesRead: + bytesRead) would be interesting. In fact this is kind of my-first-debugging and you don't even mention you did try it. Ronald. Op dinsdag, 24 november 2009 17:57 schreef geoff...@fileflow.com: Hi everyone. I'm stuck with a problem I don't understand. We have a tomcat server and after redeploying our war file, we get this error: java.lang.ArrayIndexOutOfBoundsException at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:346) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at com.fileflow.downloader.Downloader.doGet(Downloader.java:123) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 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:191) 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:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Notice that there are no number on the first line and it is usually the case. The code that is responsible is: private ServletOutputStream out; private InputStream in; ... in = new FileInputStream(tmp); ... out = response.getOutputStream(); byte[] buf = new byte[8 * 1024]; // 8K buffer int bytesRead; while((bytesRead = in.read(buf))0) { out.write(buf, 0
CHKJ4014W Warning
I'm getting a warning that I can't seem to find an answer for. The Eclipse console is stating: Severity and Description: CHKJ4014W: Empty Entry of Type Parameter Name. Path: emtk-air/src/main/webapp/WEB-INF Resource: web.xml Location: [EMAIL PROTECTED] e (paramName: null, paramValue: null, description: null) Creation Time: 1218033789740 Id: 125270 I've checked against the DTD, but nothing is jumping out at me. I appologize if this isn't the correct forum for this question. If someone knows of a better place, please let me know. Thank you, Geoff
RE: CHKJ4014W Warning
Sure, here it is: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameemtk-air/display-name descriptionLiveCycle Data Services Application/description context-param param-nameflex.class.path/param-name param-value/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars/param-value /context-param !-- used by Spring 2.0, it will load this into the web context -- context-param param-namecontextConfigLocation/param-name param-value classpath:/security-context.xml /param-value /context-param !-- Spring Security Filter -- filter filter-nameAcegi Filter Chain Proxy/filter-name filter-class org.acegisecurity.util.FilterToBeanProxy /filter-class init-param param-nametargetClass/param-name param-value org.acegisecurity.util.FilterChainProxy /param-value /init-param /filter filter-mapping filter-nameAcegi Filter Chain Proxy/filter-name url-pattern/*/url-pattern /filter-mapping !-- Http Flex Session attribute and binding listener support -- listener listener-classflex.messaging.HttpFlexSession/listener-class /listener !-- Spring 2.0 Web Listener -- listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener !-- MessageBroker Servlet -- servlet servlet-nameMessageBrokerServlet/servlet-name display-nameMessageBrokerServlet/display-name servlet-classflex.messaging.MessageBrokerServlet/servlet-class init-param param-nameservices.configuration.file/param-name param-value/WEB-INF/flex/services-config.xml/param-value /init-param init-param param-nameflex.write.path/param-name param-value/WEB-INF/flex/param-value /init-param load-on-startup2/load-on-startup /servlet servlet servlet-nameStartupServlet/servlet-name display-nameStartupServlet/display-name servlet-class com.comp.proj.startup.StartupServlet /servlet-class init-param param-nameserviceNames/param-name param-value -- removed list -- /param-value /init-param init-param param-nameserviceClassNames/param-name param-value -- removed list -- /param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMessageBrokerServlet/servlet-name url-pattern/messagebroker/*/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file /welcome-file-list resource-ref res-ref-namejdbc/myDataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth res-sharing-scopeShareable/res-sharing-scope /resource-ref resource-ref res-ref-namejms/TopicConnectionFactory/res-ref-name res-typejavax.jms.TopicConnectionFactory/res-type res-authContainer/res-auth res-sharing-scopeShareable/res-sharing-scope /resource-ref /web-app ~ Geoff ~ -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 9:23 AM To: Tomcat Users List Subject: RE: CHKJ4014W Warning Hi Geoff- masking out the propietary vits can you supply your web.xml ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: CHKJ4014W Warning Date: Wed, 6 Aug 2008 09:01:52 -0700 From: [EMAIL PROTECTED] To: users@tomcat.apache.org I'm getting a warning that I can't seem to find an answer for. The Eclipse console is stating: Severity and Description: CHKJ4014W: Empty Entry of Type Parameter Name. Path: emtk-air/src/main/webapp/WEB-INF Resource: web.xml Location: [EMAIL PROTECTED] c0 e (paramName: null, paramValue: null, description: null) Creation Time: 1218033789740 Id: 125270 I've checked against the DTD, but nothing is jumping out at me. I appologize if this isn't the correct forum for this question. If someone knows of a better place, please let me know. Thank you, Geoff
RE: CHKJ4014W Warning
Yes, it appears to be valid XML. I checked it with 3 validation services online. ~ Geoff ~ -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 10:22 AM To: Tomcat Users List Subject: Re: CHKJ4014W Warning Does your web.xml pass a xml validation check? It looks like it's complaining you might have a context-param ... /context-param element that's empty. --David Bell, Geoffrey T. wrote: I'm getting a warning that I can't seem to find an answer for. The Eclipse console is stating: Severity and Description: CHKJ4014W: Empty Entry of Type Parameter Name. Path: emtk-air/src/main/webapp/WEB-INF Resource: web.xml Location: [EMAIL PROTECTED] c0 e (paramName: null, paramValue: null, description: null) Creation Time: 1218033789740 Id: 125270 I've checked against the DTD, but nothing is jumping out at me. I appologize if this isn't the correct forum for this question. If someone knows of a better place, please let me know. Thank you, Geoff - 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]
RE: CHKJ4014W Warning
Wierd. I checked all of your points and they seemed fine. I 'cleaned' my project, and the warning went away. I know I did that before Thanks for the help. ~ Geoff ~ -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 10:38 AM To: Tomcat Users List Subject: RE: CHKJ4014W Warning Geoff- did you verify security-context.xml contains the required context attributes and is located on classpath e.g.? security login-command class=com.gdais.security.AcegiLoginCommand server=Tomcat/ security-constraint id=basic-read-access auth-methodBasic/auth-method roles roleROLE_MANAGERS/role roleROLE_USERS/role /roles /security-constraint /security also i see null value entries for your supplied init params serviceNames AND serviceClassNames also I did'nt see your servlet-mapping e.g. servlet servlet-namecoverc/servlet-name servlet-classorg.springframework.web.servlet.DispatcherServlet/servle t-class /servlet servlet-mapping servlet-namecoverc/servlet-name url-pattern*.htm/url-pattern /servlet-mapping but assuming you have valid entries for each of these I would comment out all filters and servlets and config in each filter and servlet one a time until you can locate the entry which is causing this exception Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: RE: CHKJ4014W Warning Date: Wed, 6 Aug 2008 09:31:11 -0700 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Sure, here it is: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameemtk-air/display-name descriptionLiveCycle Data Services Application/description context-param param-nameflex.class.path/param-name param-value/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars/param-value /context-param !-- used by Spring 2.0, it will load this into the web context -- context-param param-namecontextConfigLocation/param-name param-value classpath:/security-context.xml /param-value /context-param !-- Spring Security Filter -- filter filter-nameAcegi Filter Chain Proxy/filter-name filter-class org.acegisecurity.util.FilterToBeanProxy /filter-class init-param param-nametargetClass/param-name param-value org.acegisecurity.util.FilterChainProxy /param-value /init-param /filter filter-mapping filter-nameAcegi Filter Chain Proxy/filter-name url-pattern/*/url-pattern /filter-mapping !-- Http Flex Session attribute and binding listener support -- listener listener-classflex.messaging.HttpFlexSession/listener-class /listener !-- Spring 2.0 Web Listener -- listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener !-- MessageBroker Servlet -- servlet servlet-nameMessageBrokerServlet/servlet-name display-nameMessageBrokerServlet/display-name servlet-classflex.messaging.MessageBrokerServlet/servlet-class init-param param-nameservices.configuration.file/param-name param-value/WEB-INF/flex/services-config.xml/param-value /init-param init-param param-nameflex.write.path/param-name param-value/WEB-INF/flex/param-value /init-param load-on-startup2/load-on-startup /servlet servlet servlet-nameStartupServlet/servlet-name display-nameStartupServlet/display-name servlet-class com.comp.proj.startup.StartupServlet /servlet-class init-param param-nameserviceNames/param-name param-value -- removed list -- /param-value /init-param init-param param-nameserviceClassNames/param-name param-value -- removed list -- /param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMessageBrokerServlet/servlet-name url-pattern/messagebroker/*/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file /welcome-file-list