users@glassfish.java.net

The error occurs when connecting Apache and GlassFish

From: 真嶌 晋 <susumu.majima_at_mail.rakuten.co.jp>
Date: Mon, 17 Mar 2008 18:29:24 +0900

Hello,

I'm new to GlassFish. I tried to connect Apache 2.0.59 and GlassFish V2 UR1 on Windows/XP.

What I did is

1) downloaded mod_jk-1.2.26-httpd-2.0.59.so
2) put it in Apache modules directory and rename mod_jk.so
3) added the below in httpd.conf

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JKMount /* worker1

4) wrote workers.properties

worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

5) copy tomcat_ajp.jar,commons-logging-1.1.1.jar and commons-modeler-2.0.1.jar
    to lib directory under the GlassFish installed directory

6) created jvm options
   asadmin>create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK=8009
   asadmin>create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK.propertyFile=${com.sun.aas.instanceRoot}/config/glassfish-jk.properties

7) wrote glassfish-jk.properties

  tomcatAuthentication=false

After preparing the above I run Glassfish and Apache

I specified http://localhost/hello/

In the GlassFish log file

[#|2008-03-17T16:39:29.038+0900|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=14;_ThreadName=TP-Processor3;_RequestID=3798cfa1-1a2d-4842-acfc-cca37e91bf50;|java.lang.NoSuchMethodError: org.apache.coyote.Response.getContentLengthLong()J
        at org.apache.jk.common.JkInputStream.appendHead(JkInputStream.java:303)
        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-03-17T16:39:29.054+0900|SEVERE|sun-appserver9.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=14;_ThreadName=TP-Processor3;_RequestID=3798cfa1-1a2d-4842-acfc-cca37e91bf50;|PWC5752: org.apache.jk.common.ChannelSocket$SocketConnection_at_1a65a18 (java.lang.NoSuchMethodError: org.apache.coyote.Response.getContentLengthLong()J) Exception detected so terminate thread|#]

"Exception detected so terminate thread" is actually in Japanese.
 

In the Apache mod_jk.log

[Mon Mar 17 16:38:59.937 2008] [5852:4440] [info] mod_jk.c (2825): mod_jk/1.2.26 initialized
[Mon Mar 17 16:39:29.054 2008] [5852:3516] [error] jk_ajp_common.c (1004): (worker1) can't receive the response message from tomcat, tomcat (127.0.0.1:8009) has forced a connection close for socket 840
[Mon Mar 17 16:39:29.054 2008] [5852:3516] [error] jk_ajp_common.c (1766): (worker1) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Mar 17 16:39:29.054 2008] [5852:3516] [info] jk_ajp_common.c (2186): (worker1) sending request to tomcat failed (recoverable), (attempt=1)


Does anyone let me know what is wrong with this problem?

Thank you in advance,


Susumu Majima