Re: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

2012-08-21 Thread Pid *
On 20 Aug 2012, at 23:28, Dale Ogilvie dale_ogil...@trimble.com wrote:

 So, I ran with JVM option -verbose:class
 Then I requested a jsp from app1 and the console printed:

 ...
 [Loaded javax.el.ExpressionFactory from 
 file:/C:/apache-tomcat-7.0.27/lib/el-api.jar]
 [Loaded org.apache.jasper.runtime.JspApplicationContextImpl from 
 file:/C:/sandpit-28/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/app2/WEB-INF/lib/jsp-2.1-6.1.14.jar]
 [Loaded javax.el.ELContext from file:/C:/apache-tomcat-7.0.27/lib/el-api.jar]
 [Loaded org.apache.jasper.runtime.ELContextImpl from 
 file:/C:/sandpit-28/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/app2/WEB-INF/lib/jsp-2.1-6.1.14.jar]
 ...

 This seems to indicate that the class is being loaded by app1 from 
 app2/WEB-INF/lib/jsp-2.1-6.1.14.jar. No?

Where is that dependency JSP jar from?
It should not be in WEB-INF/lib if it's providing JSP functionality.


p




 Dale

 Т�ХF�V�7V'67�R�R���âW6W'2�V�7V'67�TF��6B�6�R��pФf�FF�F����6����G2�R���âW6W'2ֆV�F��6B�6�R��pР

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat asyncTimeout and APR connector on Windows

2012-08-21 Thread Nikos Viorres
Hi all,

The value that i set to Tomcat's asyncTimeout connector property is
ignored when using the APR connector on Windows no matter what
(default 10 seconds is used instead). That value is always respected
when using the default Http11Protocol connector or the
Http11NioProtocol one. However in the relevant Tomcat docs, it's
clearly stated that this property applies to alla the connectors. Here
is the relevant part of server.conf:

Connector asyncTimeout=25000
protocol=org.apache.coyote.http11.Http11AprProtocol port=8080
maxThreads=200 URIEncoding=UTF-8 connectionTimeout=25000
compression=on compressionMinSize=2048
compressableMimeType=text/html,text/plain,text/xml,text/css,text/javascript,application/json,application/javascript,application/xml,application/css
/

Thanks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat asyncTimeout and APR connector on Windows

2012-08-21 Thread Konstantin Kolinko
2012/8/21 Nikos Viorres nvior...@gmail.com:
 Hi all,

 The value that i set to Tomcat's asyncTimeout connector property is
 ignored when using the APR connector on Windows no matter what
 (default 10 seconds is used instead). That value is always respected
 when using the default Http11Protocol connector or the
 Http11NioProtocol one. However in the relevant Tomcat docs, it's
 clearly stated that this property applies to alla the connectors. Here
 is the relevant part of server.conf:

 Connector asyncTimeout=25000
 protocol=org.apache.coyote.http11.Http11AprProtocol port=8080
 maxThreads=200 URIEncoding=UTF-8 connectionTimeout=25000
 compression=on compressionMinSize=2048
 compressableMimeType=text/html,text/plain,text/xml,text/css,text/javascript,application/json,application/javascript,application/xml,application/css
 /

1. Tomcat version =?
2. tcnative-1.dll version =?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: %{xxx}t not working

2012-08-21 Thread Konstantin Kolinko
7.0.8 is out of question.

In 7.0.29 the pattern works.
server.xml:
[[[
Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
   prefix=localhost_access_log. suffix=.txt
   pattern=%h %l %u %t quot;%rquot; %s %b
%{-MM-dd'T'HH:mm:ss,SSSZ}t /
]]]

localhost_access_log.2012-08-21.txt:
[[[
127.0.0.1 - - [21/Aug/2012:12:08:35 +0400] GET / HTTP/1.1 200 11444
2012-08-21T12:08:35,375+0400
127.0.0.1 - - [21/Aug/2012:12:08:36 +0400] GET /tomcat.css HTTP/1.1
200 5926 2012-08-21T12:08:36,187+0400
127.0.0.1 - - [21/Aug/2012:12:08:36 +0400] GET /tomcat.png HTTP/1.1
200 5103 2012-08-21T12:08:36,218+0400
]]]

2012/8/20 John Byrne john_by...@apple.com:
 I've tried both 7.0.29 and 7.0.8.

 Thank you for the help.

 John Byrne


 John Byrne
 System Administrator, IST
 john_by...@apple.com




 On Aug 20, 2012, at 12:43 PM, Konstantin Kolinko wrote:

 2012/8/20 John Byrne john_by...@apple.com:


 I was wondering if you could help me with a server.xml log question.  I'm 
 trying to format the times that go into the logs but not having any 
 success.  The output always ends up as : ???.  I've read that any time 
 format accepted by Java's SimpleDateFormat will work but this one doesn't 
 seem to be working.

 The time/date format is: %{-MM-dd'T'HH:mm:ss,SSSZ}t

 The whole log format line is:
 Valve className=org.apache.catalina.valves.AccessLogValve 
 directory=${splunk.accesslogs} 
 prefix=${serviceName}_${port.http.nonssl}_access_ suffix=.log 
 pattern=%{-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a 
 url=quot;%rquot; query=%q status=%s time=%D size=%B 
 agent=quot;%{User-Agent}iquot; resolveHosts=false /

 Everything works except the %{xxx}t variable.
 i.e. the output log line is:
 ??? thread=http-bio-26258-exec-10 client=17.169.48.254 url=GET 
 /iTranslate/index HTTP/1.1 query= status=200 time=449 size=8205 
 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 
 (KHTML, like Gecko) Version/6.0 Safari/536.25

 (notice the ??? -- that's where the time/date formatted output should go.


 Can any one help me with this?

 Your Tomcat version = ?

 IIRC, support for %{xxx}t was added less than a year ago.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



problems with mod_jk 1.2.32 and Jetty 6.1.26

2012-08-21 Thread Veit Guna
Hi.

I'm using Atlassian Fisheye 2.7.15 (uses Jetty 6.1.26) under Ubuntu 12.04
with mod_jk 1:1.2.32-1 and Apache 2.2.22-1ubuntu1.

After I upgraded mod_jk from 1.2.31 to 1.2.32 Jetty isn't working anymore 
throwing the exception below.

Any ideas why that is happening? What changed through that version?

Atlassian recommends to downgrade to 1.2.31 (of course). But that's not an 
option because of missing security
updates through Ubuntu. The Jetty guys say, Atlassian should upgrade to a more 
recent Jetty version - in the hope that
it is fixed there :).

Now I would like to hear your opinion/options to solve my problem :).

Thanks!



 2012-08-02 18:03:37,644 ERROR - handle failed
java.lang.NullPointerException
at
org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.parsedRequestAttribute(Ajp13Connection.java:216)
at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:410)
at
org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:151)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
2012-08-02 18:03:37,644 ERROR - handle failed
java.lang.NullPointerException
at
org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.parsedRequestAttribute(Ajp13Connection.java:216)
at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:410)
at
org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:151)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
2012-08-02 18:03:37,746 ERROR - handle failed
java.lang.NullPointerException
at
org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.parsedRequestAttribute(Ajp13Connection.java:216)
at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:410)
at
org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:151)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
2012-08-02 18:03:37,746 ERROR - handle failed
java.lang.NullPointerException
at
org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.parsedRequestAttribute(Ajp13Connection.java:216)
at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:410)
at
org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:151)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: tomcat and DB oracle problem - only in higher versions

2012-08-21 Thread Busfy,Peter
Hello,

you are absolutely right.

From Tomcat 6.0.27 (also tomcat 7) was changed implementation of DBCP 
(database connection pool) in tomcat (see 
http://tomcat.apache.org/tomcat-6.0-doc/changelog.html).

We use in database connection SimpleNativeJdbcExtractor, which doesn't work 
with higher implementation of DBCP. It's necessary to use 
CommonsDbcpNativeJdbcExtractor instead.

See:
 
http://static.springsource.org/spring/docs/1.2.9/api/org/springframework/jdbc/support/nativejdbc/SimpleNativeJdbcExtractor.html
 
http://static.springsource.org/spring/docs/1.2.9/api/org/springframework/jdbc/support/nativejdbc/CommonsDbcpNativeJdbcExtractor.html

And now it is working also with higher versions.

Thank you all very much for your effort.

Peter Busfy




-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: Friday, August 17, 2012 1:44 PM
To: Tomcat Users List
Subject: Re: tomcat and DB oracle problem - only in higher versions

2012/8/17 Busfy,Peter peter.bu...@drei.com:
 Hi again,

 so I try ojdbc6.jar (version 11.2.0.3.0) with tomcat 6.0.35 and the same 
 problem.
 With version 6.0.26 is everything fine.


6.0.26 and 6.0.35 include different versions of Apache Commons DBCP library 
(http://commons.apache.org/dbcp/).  You may look into the changelog or into 
build.properties in the source distributive to see the version number.

Later DBCP versions implement wrapping of the underlying JDBC connection object 
differently.

On this mailing list such issue has been discussed at least 3 times during the 
last 2 years.
(I do not remember what the exact recipe was. I think that you have to do the 
following two operations:
1. set a property on the pool to allow unwrapping, 2. call a method to get the 
wrapped connection.
 See the archives and see the DBCP site).

From that Spring message -- I guess you have to look for NativeJdbcExtractor 
implementations and find one that works with DBCP.

See OracleLobHandler.etNativeJdbcExtractor(..)

http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/jdbc/support/lob/OracleLobHandler.html#setNativeJdbcExtractor%28org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor%29

There exists CommonsDbcpNativeJdbcExtractor class. Maybe it will work for you.

If not, you may try debugging Tomcat (see Developing chapter in the Tomcat 
FAQ for tips).

Best regards,
Konstantin Kolinko

-
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: BUILD FAILED apache-tomcat-7.0.22-src build.xml (lines 2211, 2313) ...

2012-08-21 Thread Roi

Caldarale, Charles R Chuck.Caldarale at unisys.com writes:
  Subject: BUILD FAILED apache-tomcat-7.0.22-src build.xml (lines 2211, 2313) 
  I am getting build errors I don't quite understand.
 
 As I recall, 
 due to Sun/Oracle-created incompatibilities in various interface 
 classes, you can't build Tomcat with JDK 7; you'll need to use JDK 6.
 You can happily run such a Tomcat on JDK 7 once it's built.
 


Worked for me :)
compiled latest tomcat with JDK6 instead of JDK7.
(tomcat 7.0.29)


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: %{xxx}t not working

2012-08-21 Thread Rainer Jung

On 20.08.2012 21:46, John Byrne wrote:

I've tried both 7.0.29 and 7.0.8.


The feature wans introduced in 7.0.17. I tried your format string with 
current 7.0 head which should be identical to 7.0.29 w.r.t. access log 
and it did work for me. There were no changes in the (self-contained) 
access log valve code since March.


Make sure the versions didn't get mixed up. Check the version given in 
the log file during startup: Starting Servlet Engine: 



2012/8/20 John Byrne john_by...@apple.com:




I was wondering if you could help me with a server.xml log question.  I'm 
trying to format the times that go into the logs but not having any success.  
The output always ends up as : ???.  I've read that any time format accepted by 
Java's SimpleDateFormat will work but this one doesn't seem to be working.

The time/date format is: %{-MM-dd'T'HH:mm:ss,SSSZ}t

The whole log format line is:
Valve className=org.apache.catalina.valves.AccessLogValve directory=${splunk.accesslogs} 
prefix=${serviceName}_${port.http.nonssl}_access_ suffix=.log pattern=%{-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a 
url=quot;%rquot; query=%q status=%s time=%D size=%B agent=quot;%{User-Agent}iquot; resolveHosts=false /

Everything works except the %{xxx}t variable.
i.e. the output log line is:
??? thread=http-bio-26258-exec-10 client=17.169.48.254 url=GET /iTranslate/index 
HTTP/1.1 query= status=200 time=449 size=8205 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 
10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25

(notice the ??? -- that's where the time/date formatted output should go.


Regards,

Rainer


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with uploading large files

2012-08-21 Thread Sahana Voleti
I have tried all the techniques that we have discussed and yet I get the
following error:

org.apache.commons.fileupload.FileUploadBase$IOFileUploadException:
Processing o
f multipart/form-data request failed. Stream ended unexpectedly
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException:
Processing of multipart/form-data request failed. Stream ended unexpectedly

Is there any other solution for this?

-Sahana

On Mon, Aug 20, 2012 at 5:53 PM, Sahana Voleti
sahanasithmas...@gmail.comwrote:

 can you give me a sample code using content length?


 On Mon, Aug 20, 2012 at 5:38 PM, Konstantin Kolinko 
 knst.koli...@gmail.com wrote:

 2012/8/20 Sahana Voleti sahanasithmas...@gmail.com:
  The documentation is fine but how do you use content length there?
 

 I am logging the value of the content-length header.

 What that header means is defined in the HTTP protocol specification.


  On Mon, Aug 20, 2012 at 5:10 PM, Sahana Voleti
  sahanasithmas...@gmail.comwrote:
 
  Is there any size limitations fr this apache commons upload? Also is
 there
  any standalone application I can use?
  I think there is some problem in parsing because of which I am getting
  multipart/formdata request failed.
 
 
  On Mon, Aug 20, 2012 at 5:03 PM, Konstantin Kolinko 
  knst.koli...@gmail.com wrote:
 
  2012/8/20 Sahana Voleti sahanasithmas...@gmail.com:
   Konstantin Kolinko,
   U mentioned these steps in your mail:
   1. Read documentation for AccessLogValve.
   2. Use a text editor to edit server.xml file (for the global access
   log) or the META-INF/context.xml file of your web application (for
   your webapp's access log).
   3. Restart Tomcat.
   4. Read access log file and compare the value mentioned there with
 the
   size of your uploaded file.  The value of content-length header
 should
   be slightly more than the size of your file (because of delimiters
   being added). Alternatively a browser can use
   content-encoding:chunked header.
  
   Can you please send me an example of how I can make these changes.
  
 
  For which step of the above?
 
  Documentation for AccessLogValve is
Tomcat 7 docs home - Configuration reference - Valve - Access Log
  Valve.
 
  And read the previous thread that I mentioned before (with a link to
  archives).
  The thread name is Problems uploading huge files 2GB to Tomcat app.
  I mentioned my configuration there.
 

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





Re: problems with mod_jk 1.2.32 and Jetty 6.1.26

2012-08-21 Thread Rainer Jung

On 21.08.2012 10:34, Veit Guna wrote:

Hi.

I'm using Atlassian Fisheye 2.7.15 (uses Jetty 6.1.26) under Ubuntu 12.04
with mod_jk 1:1.2.32-1 and Apache 2.2.22-1ubuntu1.

After I upgraded mod_jk from 1.2.31 to 1.2.32 Jetty isn't working anymore 
throwing the exception below.

Any ideas why that is happening? What changed through that version?

Atlassian recommends to downgrade to 1.2.31 (of course). But that's not an 
option because of missing security
updates through Ubuntu. The Jetty guys say, Atlassian should upgrade to a more 
recent Jetty version - in the hope that
it is fixed there :).

Now I would like to hear your opinion/options to solve my problem :).



  2012-08-02 18:03:37,644 ERROR - handle failed
java.lang.NullPointerException
 at
org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.parsedRequestAttribute(Ajp13Connection.java:216)
 at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:410)
 at
org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:151)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
 at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
 at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)


I think it is this Jetty-Bugfix which is missing:

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/commit/jetty-ajp/src/main/java/org/eclipse/jetty/ajp/Ajp13Connection.java?id=9fb6e9b43a4803fff58f3d5d65a526b9c6078be8

i.e. you ran into this problem:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=363943

It seems there's no Jetty 6 release with this patch (the patch is not 
even in the Jetty 6 head sources), you would need to use at least Jetty 
7.6.0 or above.


There's no known vulnerability in mod_jk 1.2.31 but being restricted to 
it without being able to do a quick update if needed doesn't sound like 
a good idea. In case you do the update think about switching directly to 
1.2.37.


Possible workaround (untested): If you haven't already done so, 
configure an additional load balancing worker above your ajp13 worker, 
even if you do not really do load balancing because only one Tomcat is 
involved. It might fix the problem by setting the attribute that 
triggers the NPE to some non empty value. If it works, please report back.


Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 7.x and Internet Explorer Adobe Reader plugin

2012-08-21 Thread Miguel Gonzalez
Dear all,

  Our webapp worked fine under Tomcat 5.5. We decided to migrate to Tomcat 7 to 
get better performance and get support from the community in case something 
goes wrong as suggested in this mailing list.

  I installed tomcat 7.0.29 from the Apache website. I had issues downloading 
PDFs from IE, but not from Firefox or Chrome.

  I googled a little bit and some people suggested to downgrade to 7.0.26. But 
still having issues with it under IE while it works under Firefox and Chrome.

  Any ideas?

  Regards,

  Miguel

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: redirecting people to maintenance mode

2012-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Miguel,

On 8/21/12 6:25 AM, Miguel González Castaños wrote:
 Dear all,
 
 I have a Tomcat web server. From time to time, I need to do some 
 maintenance and want people not to interact with the Tomcat server
 while I'm doing it. The key thing here is that the Tomcat server is
 up and running. This is what I want to achieve:
 
 - I want all people to be redirected from 80/443 port at server1 to
 a different URL http://server2/maintenance.html except my IP
 address (so I can check Tomcat myself).
 
 - If possible, I want this to be transparent to the user, so they
 get a http redirect showing the server1 in the client's browser,
 not server2 (but this is not that important).
 
 I assume I can use iptables to redirect people to a different web 
 server, but how can I know that I need to redirect them to the 
 maintenance.html if that server is serving other web pages too?

I don't know if you want to add this kind of complication to your
environment, but this is pretty much what mod_jk was built for:
distributing requests to one or more back-end Tomcat servers.

With mod_jk's management interface, you can take (load-balanced)
workers out of a pool, upgrade them, then add them back to the pool.
Before you add them back, you can always access them directly if you
have set up an HTTP Connector and you can feel free to use any
technique (iptables, bind to 127.0.0.1, etc.) to prevent direct access
to the HTTP port from normal users.

The use of Apache httpd out in front of your app server(s) also means
that you can detect error conditions in the Tomcat instance (like it's
crashed or whatever) and give a semi-nice error message instead of a
connection failure.

This is one of those situations where using Apache httpd out in front
of Tomcat makes some sense: not for performance, but for availability.
See Mladen's article with explains some of the why, what and how of
setting up a mod_jk-based cluster:
http://people.apache.org/~mturk/docs/article/ftwai.html

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAzoosACgkQ9CaO5/Lv0PCWaQCfXysurxElwe1NfGTJ51AHsFZk
744AoIVJG8eWspK9ArSIpg7dD5INIqqz
=QtxN
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with uploading large files

2012-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sahana,

On 8/21/12 9:49 AM, Sahana Voleti wrote:
 I have tried all the techniques that we have discussed and yet I
 get the following error:
 
 org.apache.commons.fileupload.FileUploadBase$IOFileUploadException:

 
Processing o
 f multipart/form-data request failed. Stream ended unexpectedly 
 org.apache.commons.fileupload.FileUploadBase$IOFileUploadException:

 
Processing of multipart/form-data request failed. Stream ended unexpectedly
 
 Is there any other solution for this?

The problem is that you aren't helping us figure out what the original
problem is. This problem could occur due to a number of reasons, among
them:

1. Client is sending the wrong content-length. You can verify this by
   checking the content-length HTTP header in the request using
   AccessLogValve (which has already been described) or other
   techniques (like writing your own Filter and fetching the value
   yourself).

2. Client is crashing before all bytes can be uploaded. You will have
   to observe the client during the connection to see if it is acting
   strangely.

3. There is a problem with network hardware -- some hiccup occurs and
   kills the connection. Does the error happen every time you try? If
   so, this is unlikely to be the problem. If it happens randomly,
   network problems may be the source of the issue.

4. A bug in commons-upload (which is very unlikely).

I suspect you will simply respond saying yes, but how do I fix it?
so I won't waste any more of my time asking questions you will never
answer.

- -=chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAzo74ACgkQ9CaO5/Lv0PB2PwCePd+tdOhDbrzZwRYyawgRB3yc
FKMAn0wpuYDyo4V509Q4/3WLhKAgnfth
=gFWW
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: %{xxx}t not working

2012-08-21 Thread John Byrne
Thank you Rainer,

It turns out I was still using 7.0.8 even though I switched the soft link to 
the new version.  Now I just need to find out how the switch mechanism works.

John


John Byrne
System Administrator, IST
john_by...@apple.com




On Aug 21, 2012, at 1:10 AM, Konstantin Kolinko wrote:

 7.0.8 is out of question.
 
 In 7.0.29 the pattern works.
 server.xml:
 [[[
Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
   prefix=localhost_access_log. suffix=.txt
   pattern=%h %l %u %t quot;%rquot; %s %b
 %{-MM-dd'T'HH:mm:ss,SSSZ}t /
 ]]]
 
 localhost_access_log.2012-08-21.txt:
 [[[
 127.0.0.1 - - [21/Aug/2012:12:08:35 +0400] GET / HTTP/1.1 200 11444
 2012-08-21T12:08:35,375+0400
 127.0.0.1 - - [21/Aug/2012:12:08:36 +0400] GET /tomcat.css HTTP/1.1
 200 5926 2012-08-21T12:08:36,187+0400
 127.0.0.1 - - [21/Aug/2012:12:08:36 +0400] GET /tomcat.png HTTP/1.1
 200 5103 2012-08-21T12:08:36,218+0400
 ]]]
 
 2012/8/20 John Byrne john_by...@apple.com:
 I've tried both 7.0.29 and 7.0.8.
 
 Thank you for the help.
 
 John Byrne
 
 
 John Byrne
 System Administrator, IST
 john_by...@apple.com
 
 
 
 
 On Aug 20, 2012, at 12:43 PM, Konstantin Kolinko wrote:
 
 2012/8/20 John Byrne john_by...@apple.com:
 
 
 I was wondering if you could help me with a server.xml log question.  I'm 
 trying to format the times that go into the logs but not having any 
 success.  The output always ends up as : ???.  I've read that any time 
 format accepted by Java's SimpleDateFormat will work but this one doesn't 
 seem to be working.
 
 The time/date format is: %{-MM-dd'T'HH:mm:ss,SSSZ}t
 
 The whole log format line is:
 Valve className=org.apache.catalina.valves.AccessLogValve 
 directory=${splunk.accesslogs} 
 prefix=${serviceName}_${port.http.nonssl}_access_ suffix=.log 
 pattern=%{-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a 
 url=quot;%rquot; query=%q status=%s time=%D size=%B 
 agent=quot;%{User-Agent}iquot; resolveHosts=false /
 
 Everything works except the %{xxx}t variable.
 i.e. the output log line is:
 ??? thread=http-bio-26258-exec-10 client=17.169.48.254 url=GET 
 /iTranslate/index HTTP/1.1 query= status=200 time=449 size=8205 
 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 
 (KHTML, like Gecko) Version/6.0 Safari/536.25
 
 (notice the ??? -- that's where the time/date formatted output should go.
 
 
 Can any one help me with this?
 
 Your Tomcat version = ?
 
 IIRC, support for %{xxx}t was added less than a year ago.
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 



Re: %{xxx}t not working

2012-08-21 Thread John Byrne
Even though I've downloaded 7.0.29 the Servlet Engine is still 7.0.8.  Is this 
a configuration problem or is the latest version not being distributed by 
Apache?  I can't find anything that points to the old version in shell scripts.

Please help.

Thanks,

John


John Byrne
System Administrator, IST
john_by...@apple.com




On Aug 21, 2012, at 10:05 AM, John Byrne wrote:

 Thank you Rainer,
 
 It turns out I was still using 7.0.8 even though I switched the soft link to 
 the new version.  Now I just need to find out how the switch mechanism works.
 
 John
 
 
 John Byrne
 System Administrator, IST
 john_by...@apple.com
 
 
 
 
 On Aug 21, 2012, at 1:10 AM, Konstantin Kolinko wrote:
 
 7.0.8 is out of question.
 
 In 7.0.29 the pattern works.
 server.xml:
 [[[
   Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
  prefix=localhost_access_log. suffix=.txt
  pattern=%h %l %u %t quot;%rquot; %s %b
 %{-MM-dd'T'HH:mm:ss,SSSZ}t /
 ]]]
 
 localhost_access_log.2012-08-21.txt:
 [[[
 127.0.0.1 - - [21/Aug/2012:12:08:35 +0400] GET / HTTP/1.1 200 11444
 2012-08-21T12:08:35,375+0400
 127.0.0.1 - - [21/Aug/2012:12:08:36 +0400] GET /tomcat.css HTTP/1.1
 200 5926 2012-08-21T12:08:36,187+0400
 127.0.0.1 - - [21/Aug/2012:12:08:36 +0400] GET /tomcat.png HTTP/1.1
 200 5103 2012-08-21T12:08:36,218+0400
 ]]]
 
 2012/8/20 John Byrne john_by...@apple.com:
 I've tried both 7.0.29 and 7.0.8.
 
 Thank you for the help.
 
 John Byrne
 
 
 John Byrne
 System Administrator, IST
 john_by...@apple.com
 
 
 
 
 On Aug 20, 2012, at 12:43 PM, Konstantin Kolinko wrote:
 
 2012/8/20 John Byrne john_by...@apple.com:
 
 
 I was wondering if you could help me with a server.xml log question.  
 I'm trying to format the times that go into the logs but not having any 
 success.  The output always ends up as : ???.  I've read that any time 
 format accepted by Java's SimpleDateFormat will work but this one 
 doesn't seem to be working.
 
 The time/date format is: %{-MM-dd'T'HH:mm:ss,SSSZ}t
 
 The whole log format line is:
 Valve className=org.apache.catalina.valves.AccessLogValve 
 directory=${splunk.accesslogs} 
 prefix=${serviceName}_${port.http.nonssl}_access_ suffix=.log 
 pattern=%{-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a 
 url=quot;%rquot; query=%q status=%s time=%D size=%B 
 agent=quot;%{User-Agent}iquot; resolveHosts=false /
 
 Everything works except the %{xxx}t variable.
 i.e. the output log line is:
 ??? thread=http-bio-26258-exec-10 client=17.169.48.254 url=GET 
 /iTranslate/index HTTP/1.1 query= status=200 time=449 size=8205 
 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 
 (KHTML, like Gecko) Version/6.0 Safari/536.25
 
 (notice the ??? -- that's where the time/date formatted output should go.
 
 
 Can any one help me with this?
 
 Your Tomcat version = ?
 
 IIRC, support for %{xxx}t was added less than a year ago.
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 



RE: %{xxx}t not working

2012-08-21 Thread Caldarale, Charles R
 From: John Byrne [mailto:john_by...@apple.com] 
 Subject: Re: %{xxx}t not working

 Even though I've downloaded 7.0.29

From where?  Exactly what did you download?  What did you do after 
downloading?  Be precise in your responses.

 - 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



Re: %{xxx}t not working

2012-08-21 Thread John Byrne
Greetings.  It  must be a configuration issue because I setup the 7.0.29 Tomcat 
version on my system and it is giving me the right version.  Sorry to take up 
your time.
So half of a false alarm on my last email.  I just need to find out how they're 
configuring it here.

Thanks,

John Byrne


John Byrne
System Administrator, IST
john_by...@apple.com




On Aug 21, 2012, at 10:51 AM, Caldarale, Charles R wrote:

 From: John Byrne [mailto:john_by...@apple.com] 
 Subject: Re: %{xxx}t not working
 
 Even though I've downloaded 7.0.29
 
 From where?  Exactly what did you download?  What did you do after 
 downloading?  Be precise in your responses.
 
 - 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
 



Re: Tomcat asyncTimeout and APR connector on Windows

2012-08-21 Thread Nikos Viorres
2012/8/21 Nikos Viorres nvior...@gmail.com:
 Hi all,

 The value that i set to Tomcat's asyncTimeout connector property is
 ignored when using the APR connector on Windows no matter what
 (default 10 seconds is used instead). That value is always respected
 when using the default Http11Protocol connector or the
 Http11NioProtocol one. However in the relevant Tomcat docs, it's
 clearly stated that this property applies to alla the connectors. Here
 is the relevant part of server.conf:

 Connector asyncTimeout=25000
 protocol=org.apache.coyote.http11.Http11AprProtocol port=8080
 maxThreads=200 URIEncoding=UTF-8 connectionTimeout=25000
 compression=on compressionMinSize=2048
 compressableMimeType=text/html,text/plain,text/xml,text/css,text/javascript,application/json,application/javascript,application/xml,application/css
 /

1. Tomcat version =?
2. tcnative-1.dll version =?


I have tested on Tomcat 7.0.28 and 7.0.29 installations using Windows
Service Installer on two different machines, Windows 7 Pro 64 bit and
Windows 2008 Server R2 (64 bit). Tomcat 7.0.29 installation has
tcnative.dll version=1.1.24, in order to check 7.0.28 i need to be on
works network (tomorrow).

Thanks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problems with mod_jk 1.2.32 and Jetty 6.1.26

2012-08-21 Thread Veit Guna
Well, what can I say - thank you :)!

Your tip worked like a charm.


Am 21.08.2012 16:22, schrieb Rainer Jung:
 On 21.08.2012 10:34, Veit Guna wrote:
 Hi.

 I'm using Atlassian Fisheye 2.7.15 (uses Jetty 6.1.26) under Ubuntu
 12.04
 with mod_jk 1:1.2.32-1 and Apache 2.2.22-1ubuntu1.

 After I upgraded mod_jk from 1.2.31 to 1.2.32 Jetty isn't working
 anymore throwing the exception below.

 Any ideas why that is happening? What changed through that version?

 Atlassian recommends to downgrade to 1.2.31 (of course). But that's
 not an option because of missing security
 updates through Ubuntu. The Jetty guys say, Atlassian should upgrade
 to a more recent Jetty version - in the hope that
 it is fixed there :).

 Now I would like to hear your opinion/options to solve my problem :).

   2012-08-02 18:03:37,644 ERROR - handle failed
 java.lang.NullPointerException
  at
 org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.parsedRequestAttribute(Ajp13Connection.java:216)

  at
 org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:410)
  at
 org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:151)
  at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
  at
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)

  at
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)


 I think it is this Jetty-Bugfix which is missing:

 http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/commit/jetty-ajp/src/main/java/org/eclipse/jetty/ajp/Ajp13Connection.java?id=9fb6e9b43a4803fff58f3d5d65a526b9c6078be8


 i.e. you ran into this problem:

 https://bugs.eclipse.org/bugs/show_bug.cgi?id=363943

 It seems there's no Jetty 6 release with this patch (the patch is not
 even in the Jetty 6 head sources), you would need to use at least
 Jetty 7.6.0 or above.

 There's no known vulnerability in mod_jk 1.2.31 but being restricted
 to it without being able to do a quick update if needed doesn't sound
 like a good idea. In case you do the update think about switching
 directly to 1.2.37.

 Possible workaround (untested): If you haven't already done so,
 configure an additional load balancing worker above your ajp13 worker,
 even if you do not really do load balancing because only one Tomcat is
 involved. It might fix the problem by setting the attribute that
 triggers the NPE to some non empty value. If it works, please report
 back.

 Regards,

 Rainer

 -
 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: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

2012-08-21 Thread Dale Ogilvie
-Original Message-
From: Pid * [mailto:p...@pidster.com] 

Where is that dependency JSP jar from?
It should not be in WEB-INF/lib if it's providing JSP functionality.


p

The manifest for the jar says JSP 2.1 Jasper implementation from Glassfish, 
and yeah it was bad practice for maven to include that in our app2 for us.

Regardless of where the jar is coming from, it still seems bad to me that 
Tomcat will respond to my request of app1 by loading a class from 
app2/WEB-INF/lib/jsp-2.1-6.1.14.jar.

I think Mark Thomas was saying that Tomcat was preventing loading of classes 
outside of Tomcat and app1, the vm classloading output seems to suggest 
otherwise.

Dale


RE: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

2012-08-21 Thread Martin Gainty

If you implement a VM Profiler such as 
http://visualvm.java.net/eclipse-launcher.html#installation

and send the profiler output to app1.output 
then stop app1 and stop tomcat
restart tomcat then reference app2 and send the profiler output to app2.output

then diff the 2..

can you confirm from the output that app1 is pulling classes from 
app2/WEB-INF/classes
can you confirm from the output that app2 is pulling classes from 
app1/WEB-INF/classes
?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


 Subject: RE: ClassCastException org.apache.jasper.runtime.ELContextImpl 
 cannot be cast to org.apache.jasper.el.ELContextImpl
 Date: Wed, 22 Aug 2012 10:35:10 +1200
 From: dale_ogil...@trimble.com
 To: users@tomcat.apache.org
 
 -Original Message-
 From: Pid * [mailto:p...@pidster.com] 
 
 Where is that dependency JSP jar from?
 It should not be in WEB-INF/lib if it's providing JSP functionality.
 
 
 p
 
 The manifest for the jar says JSP 2.1 Jasper implementation from Glassfish, 
 and yeah it was bad practice for maven to include that in our app2 for us.
 
 Regardless of where the jar is coming from, it still seems bad to me that 
 Tomcat will respond to my request of app1 by loading a class from 
 app2/WEB-INF/lib/jsp-2.1-6.1.14.jar.
 
 I think Mark Thomas was saying that Tomcat was preventing loading of classes 
 outside of Tomcat and app1, the vm classloading output seems to suggest 
 otherwise.
 
 Dale
 B�CB��[��X��ܚX�KK[XZ[�\�\��][��X��ܚX�P�X�]�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[�\�\��Z[�X�]�\X�K�ܙ�B�