lemonzone2010 / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Javamelody swallows response if Spring WebAsyncTask/Callable is used #338

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. unzip test.zip
2. build maven test project
3. run without javamelody, http://localhost:8080/test/test -> all working
4. uncomment javamelody in pom.xml and rebuild
5. run with javamelody, http://localhost:8080/test/test -> async tests failing 
with empty response except @ResponseBody or redirect:/ is used

What is the expected output? What do you see instead?
All should work

What version of the product are you using? On what application server, JDK,
operating system?
   Java 6 or 7
   Tomcat 7.0.42

Please provide any additional information below.

Original issue reported on code.google.com by mfrey0@gmail.com on 10 Sep 2013 at 1:24

Attachments:

GoogleCodeExporter commented 9 years ago
I have reproduced the issue (using tomcat7-maven-plugin).

It seems to be caused by CounterServletResponseWrapper in doFilter at:
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/mai
n/java/net/bull/javamelody/MonitoringFilter.java#184

I do not know at the moment what needs to be changed in MonitoringFilter, 
CounterServletResponseWrapper or FilterServletResponseWrapper

Original comment by evernat@free.fr on 14 Sep 2013 at 12:54

GoogleCodeExporter commented 9 years ago
I have added the javamelody dependency in pom.xml and I have added the 
following plugins in pom.xml:
            <plugin>
                <!-- Use "mvn tomcat7:run" -->
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <port>8080</port>
                    <path>/</path>
                </configuration>
            </plugin>

            <plugin>
                <!-- Use "mvn jetty:run" -->
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.1.0.RC1</version>
                <configuration>
                    <contextPath>/</contextPath>
                </configuration>
            </plugin>

And I have tested all (11) tests in http://localhost:8080/test.html

When using "mvn tomcat7:run" (tomcat v7.0.37), 4 tests do not working and 7 
tests do work (4 results become blank after a click).
Tomcat 8.0 RC5 seems to give the same as tomcat 7.0.37.
When using "mvn jetty:run" (jetty 9.1.0.RC1), all 11 tests do work.

So I think that this may be an issue in tomcat 7 and 8.

What do you think?

Original comment by evernat@free.fr on 11 Nov 2013 at 12:14

GoogleCodeExporter commented 9 years ago
Here is attached a simplified version (test-V2.zip) of the sources of the 
project to make easier the reproduction of the issue.
I will post a message in the users' group about this issue:
https://groups.google.com/forum/#!forum/javamelody

Do you know if this is a Tomcat issue, or a javamelody issue, or a Spring issue?

Original comment by evernat@free.fr on 1 Dec 2013 at 7:09

Attachments:

GoogleCodeExporter commented 9 years ago
I'm not sure if I need to report a new bug, or attach to this one, but I'm 
having async issues in Tomcat 8. I put JavaMelody in web.xml file on Tomcat, so 
it monitored every webapp. I then ran the async examples that came with Tomcat 
(http://localhost:8080/examples/async/async1). With JavaMelody in place, the 
examples never return. If I remove JavaMelody, then the async returns 
immediately. I don't really care about the examples, my app which is a Vaadin 
app that depends on the Atmosphere frame work, also doesn't work with the same 
symptoms.

Original comment by andrew.s...@ipacc.com on 14 Feb 2014 at 3:16

GoogleCodeExporter commented 9 years ago
@andrew
Here was good.

Original comment by evernat@free.fr on 1 Mar 2014 at 10:02