DO NOT REPLY [Bug 38047] New: - Request.getReader() broken for tomcat + Apache2.2.0/mod jk_1.2.15

2005-12-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38047

   Summary: Request.getReader() broken for tomcat + Apache2.2.0/mod
jk_1.2.15
   Product: Tomcat 5
   Version: 5.5.14
  Platform: All
   URL: http://localhost/hello.jsp
OS/Version: All
Status: NEW
  Severity: major
  Priority: P2
 Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Tomcat 5.5.14 running with the latest mod_jk (1.2.15) + Apache 2.2.0 causes 
bizarre 
and buggy behavior with request.getReader().

This does NOT happen if the same jsp is accessed directly via localhost:8080

Consider the following JSP (called hello.jsp):

---start ---
hello world
<% 
out.println("2+2=" + (2+2)); 
out.print(request.getMethod());
out.print(" ");
out.print(request.getRequestURI());
String s = request.getQueryString();
if (s != null) {
out.print("?");
out.println(s);
}
out.print("PATH_INFO=" + request.getPathInfo());
out.print("PATH_TRANSLATED=" + request.getPathInfo());
out.print("SERVLET_PATH=" + request.getServletPath());
out.print("QUERY_STRING=" + request.getQueryString());
%>

POST PARAMS
<%
java.io.Reader in = request.getReader();
int c = -1;
while ( (c = in.read()) != -1) {
out.print((char)c);
System.out.print((char)c);
}
%>

 end --

This results in the following time out and stack trace. This is because the 
reader returned
by request.getReader() DOES NOT return -1

-- start 
-
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from 
fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /hello.jsp:22

19: <%
20: java.io.Reader in = request.getReader();
21: int c = -1;
22: while ( (c = in.read()) != -1) {
23: out.print((char)c);
24: System.out.print((char)c);
25: }


Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:381)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause

java.net.SocketTimeoutException: Read timed out
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
java.io.BufferedInputStream.read(BufferedInputStream.java:313)
org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:607)
org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:545)
org.apache.jk.common.JkInputStream.receive(JkInputStream.java:184)
org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:163)
org.apache.coyote.Request.doRead(Request.java:423)

org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:283)

org.apache.catalina.connector.InputBuffer.realReadChars(InputBuffer.java:329)
org.apache.tomcat.util.buf.CharChunk.substract(CharChunk.java:382)
org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:351)
org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:92)
org.apache.jsp.hello_jsp._jspService(org.apache.jsp.hello_jsp:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
-- end -

Here is the mod_jk.conf file:

LoadModule jk_module modules/mod_jk.so
JkWorkersFile   /usr/local/tomcat/conf/worker.properties
JkLogFile   /usr/local/tomcat/logs/mod_jk.log
JkLogLevel  info
JkLogStampFormat"[%a %b %d %H:%M:%S %Y] "
JkRequestLogFormat  "%s %w %V %T %s"
JkOptions +ForwardURICompat
JkOptions +ForwardDirec

DO NOT REPLY [Bug 38047] - Request.getReader() broken for tomcat + Apache2.2.0/mod jk_1.2.15

2005-12-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38047





--- Additional Comments From [EMAIL PROTECTED]  2005-12-27 10:17 ---
getInputStream() has the same problem, so this is not just Reader related. 

With either request.getInputStream() or request.getReader(), the read() method 
times out. It should 
return -1 immediately if there is no data. This is a serious bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38048] New: - Classloader leak caused by EL evaluation

2005-12-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38048

   Summary: Classloader leak caused by EL evaluation
   Product: Tomcat 5
   Version: 5.5.9
  Platform: Other
OS/Version: other
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The evaluation of JSP 2.0 EL (expression language) in JSP pages can cause 
BeanInfo metadata of the referenced objects to be cached.

This happens in the class [org.apache.commons.el.BeanInfoManager].

Since the commons-el.jar where this class resides is loaded by the "Common" 
ClassLoader, this causes a reference leak to the Webapp classloader when the 
BeanInfo refences an object from the Webapp classloader.

On webapp shutdown, the container should clear the BeanInfoManager cache, or 
delete all entries pointing to code loaded from the webapp.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38048] - Classloader leak caused by EL evaluation

2005-12-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38048





--- Additional Comments From [EMAIL PROTECTED]  2005-12-27 11:03 ---
This can be observed by running Tomcat 5.5.9/5.5.14 with a JVMTI profiler 
attached. Make sure to use a JRE that has 
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5093520) fixed, Mustang >= 
b53 or a prerelease of 1.5 update 7.

The observed reference list is:
-
  com.foo.MyEnumClass
   MY_ENUM_MEMBER of com.foo.MyEnumClass
key of  java.util.HashMap$Entry 
 next of  java.util.HashMap$Entry 
  [28] of  java.util.HashMap$Entry[33] 
   table of  java.util.HashMap 
mBeanInfoManagerByClass of  org.apache.commons.el.BeanInfoManager 
 [547] of  java.lang.Object[641] 
  elementData of  java.util.Vector 
   classes of  org.apache.catalina.loader.StandardClassLoader 
commonLoader of  org.apache.catalina.startup.Bootstrap [Stack 
Local]  
-



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38047] - Request.getReader() broken for tomcat + Apache2.2.0/mod jk_1.2.15

2005-12-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38047





--- Additional Comments From [EMAIL PROTECTED]  2005-12-27 11:53 ---
After a lot of testing, this is what I've found:

1)
This bug exists with both apache 2.0.55 and 2.2.0 running against tomcat 
5.5.14/5.512

2)
However, this bug does NOT exist with tomcat 5.0.30 (with either version of 
apache). 

The same version (mod jk 1.2.15) was used for all tests.

Therefore, this is a serious bug with 5.5.14 (and also 5.5.12) + mod jk 1.2.15 
+ apache 2.x


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38052] New: - JDBCAccessLogValve uses reserved word "user" as column name

2005-12-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38052

   Summary: JDBCAccessLogValve uses reserved word "user" as column
name
   Product: Tomcat 5
   Version: 5.5.14
  Platform: All
OS/Version: All
Status: NEW
  Severity: trivial
  Priority: P5
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


org.apache.catalina.valves.JDBCAccessLogValve  

It is more a documentation problem than a bug

For the table access the column name "user" is used. This is a reserved word in
SQL92, and causes problems with Postgres 8.0.3

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: about Tomcat Connector

2005-12-27 Thread Mark Thomas
This is a users question not a dev question. Please read
http://tomcat.apache.org/lists.html and then repost your message
correctly.

Mark
[EMAIL PROTECTED]


pzy peng wrote:
>   Hello: 
>I use Tomcat Connector to forward servlet requests from IIs6 to tomcat5, 
> my config like this: 
>   file workers.properties.minimal 
>   worker.list=wlb 
> worker.wlb.host=localhost 
> worker.wlb.port=8009 
> worker.wlb.type=ajp13 
> worker.wlb.socket_keepalive=1 
> worker.wlb.socket_timeout=36000 
>   
> file uriworkermap.properties 
> /jsp-examples/*=wlb 
> /servlets-examples/*=wlb 
>   It works fine; 
>   Now I want a persistence connection to servlet,the servlet like this: 
>   public class connServlet extends HttpServlet 
> { 
> bool doconnect=false; 
>   private void connect(HttpServletRequest req, HttpServletResponse res)throws 
> IOException, ServletException 
>  { 
> try { 
>.. 
> while (doconnect==true ) 
> { try { Thread.sleep(1L); } 
>   catch (InterruptedException i) { break; } 
>  }   
>   } 
> catch (Exception e){   System.out.println( e.toString());  } 
>   } 
>  
>public void doPost(HttpServletRequest req, HttpServletResponse res) throws 
> ServletException, IOException { 
>  String actionType =req.getHeader("ActionType"); 
>  if (actionType.equalsIgnoreCase("connect") &&  doconnect==false ) 
> {  doconnect=true; connect(req,res);return;   } 
>  if (actionType.equalsIgnoreCase("disconnect")  ) 
> {  doconnect=false; return;  } 
> . 
>
>} 
>   } 
>   
> It can work in tomcat5,but It can not work with Tomcat Connector in IIs6, 
> if Tomcat Connector can do this ? 
>   thanks! 
>   peng 
> 
> 
> __
> 赶快注册雅虎超大容量免费邮箱?
> http://cn.mail.yahoo.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38038] - Data source error in Tomcat

2005-12-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38038


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-12-27 23:55 ---
Bugzilla is not a support forum.

Your question belongs on the users mailing list. See
http://tomcat.apache.org/lists.html for subscription instructions. If you still
can't subscribe, send a message to the list owner whose address is also on
http://tomcat.apache.org/lists.html.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EL and JSP 2.1

2005-12-27 Thread Mark Thomas
Jacob Hookom wrote:
> I'd like to get the ball rolling on a branch for JSP 2.1.  I also have a
> new EL implementation that I would like to roll in as a replacement to
> the Commons-EL implementation.  There's also the API modifications for
> JSP and the EL-API.
> 
> Along the lines of project/folder naming and code placement-- are there
> 'rules' the group is expecting?  Also, would you like to keep the EL
> separate and instead guide EL implementation into Commons-EL?
> 
> If anyone has any clarifications, questions, or recommendations, just
> let me know--
> 

I can get the SVN stuff set up over the next few days. There has been
some debate about how we arrange things so we need to get agreement on
the way forward.

The key questions are:
 - does 6.0.x become the main development branch?
 - do we merge jasper and container?
 - do we merge build and container
 - do we maintain servletapi for 6.0?

I am assuming we use the latest connectors for all versions as currently.

Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EL and JSP 2.1

2005-12-27 Thread Mark Thomas
My own views in line.

Mark

Mark Thomas wrote:
> Jacob Hookom wrote:
> 
>>I'd like to get the ball rolling on a branch for JSP 2.1.
> 
> I can get the SVN stuff set up over the next few days. There has been
> some debate about how we arrange things so we need to get agreement on
> the way forward.
> 
> The key questions are:
>  - does 6.0.x become the main development branch?
Yes. We did this for 5.5.x and it worked.

>  - do we merge jasper and container?
No. Good to keep them independent.

>  - do we merge build and container
Maybe. If someone wants to take the time to do this and update the
build scripts great. Personally, not an itch I feel the need to scratch.

>  - do we maintain servletapi for 6.0?
No for the api stuff proper. We don't host it, can't change it and our
own implementation would be more trouble than it is worth.

Maybe for the examples. It is useful to be able to fix problems with
them. The examples could always be merged in with the container module.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]