users@glassfish.java.net

load balance, cluster, ajp13, coyote: USE_CUSTOM_STATUS_MSG_IN_HEADER

From: <glassfish_at_javadesktop.org>
Date: Tue, 30 Sep 2008 03:13:41 PDT

Hi,

I've successfully fronted my glassfish as with apache and mod_jk. But now, when apache delegates the request to glasshfish on its jk port, a really strange error occurs:

I'm using:
Apache 2.2 with corresponding mod_jk
Glassfish v2ur2-b04
tomcat-ajp-5.5.23.jar

ajp is successfully installed during startup at port 1112:
INFO|sun-appserver9.1|org.apache.jk.common.ChannelSocket|_ThreadID=10;_ThreadName=main;|JK: ajp13 listening on /0.0.0.0:1112|#]

And when the ajp13 request comes in, at this port, glassfish throws following exception:

[code]

[#|2008-09-30T04:48:20.425-0500|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=20;_ThreadName=TP-Processor2;_RequestID=5714c84a-d360-4e40-ad4b-5968d3c5429f;|
java.lang.NoSuchFieldError: USE_CUSTOM_STATUS_MSG_IN_HEADER
        at org.apache.jk.common.JkInputStream.appendHead(JkInputStream.java:283)
        at org.apache.jk.core.MsgContext.action(MsgContext.java:267)
        at org.apache.coyote.Response.action(Response.java:221)
        at org.apache.coyote.Response.sendHeaders(Response.java:416)
        at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:355)
        at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:321)
        at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java:578)
        at org.apache.coyote.tomcat5.CoyoteAdapter.afterService(CoyoteAdapter.java:318)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:301)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
        at java.lang.Thread.run(Thread.java:619)
|#]

[#|2008-09-30T04:48:20.426-0500|SEVERE|sun-appserver9.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=20;_ThreadName=TP-Processor2;_RequestID=5714c84a-d360-4e40-ad4b-5968d3c5429f;|PWC5752: Caught exception (java.lang.NoSuchFieldError: USE_CUSTOM_STATUS_MSG_IN_HEADER) executing org.apache.jk.common.ChannelSocket$SocketConnection_at_1847db1, terminating thread|#]
[/code]

this error comes from following sections:

[code]
org/apache/jk/common/JkInputStream.java

          if (org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER) {
              message = res.getMessage();
[/code]

and in class org.apache.coyote.Constants:

[code]
public static final boolean USE_CUSTOM_STATUS_MSG_IN_HEADER =
        Boolean.valueOf(System.getProperty(
                "org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER",
                "false")).booleanValue();
[/code]


but when setting the system property in domain.xml, nothing changes:

[code]
        <jvm-options>-Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=false</jvm-options>
[/code]

same error.

But, this failure shouldn't happen anyway...

thanks in advance for any help,
callisto79
[Message sent by forum member 'callisto79' (callisto79)]

http://forums.java.net/jive/thread.jspa?messageID=302506