Closed GoogleCodeExporter closed 9 years ago
Are you able to give a simple zip of project's sources or a simple war of
webapp to reproduce the issue?
Original comment by evernat@free.fr
on 9 Aug 2013 at 12:23
It won't be possible to share the source code or the war file :(
Original comment by priyank....@gmail.com
on 9 Aug 2013 at 12:48
OK, but can you write a simple hello world project to reproduce the problem and
to give the zip file of the project?
Original comment by evernat@free.fr
on 10 Aug 2013 at 4:27
As i was not able to attach the file here, I have sent the source code
replicating this issue in a mail. Kindly confirm once you receive it. Thanks.
Original comment by priyank....@gmail.com
on 12 Aug 2013 at 10:56
PFA the sample code replicating this issue.
Original comment by priyank....@gmail.com
on 12 Aug 2013 at 12:22
Attachments:
Here is the same project's code using maven, and using the same javamelody,
tomcat and libraries versions than yours code.
The webapp can be started in tomcat with the command "mvn tomcat6:run".
For a test case, I prefer it that way, because it is smaller (7 KB vs 5.5 MB)
and because I know where the jar files come from.
Original comment by evernat@free.fr
on 12 Aug 2013 at 10:21
Attachments:
Yes i am running the project using maven now. Were you able to replicate the
issue? I can see that the spring statistics section is not populated in the
report.
Original comment by priyank....@gmail.com
on 13 Aug 2013 at 8:19
Have you read the Spring's documentation?
http://static.springsource.org/spring-webflow/docs/2.0.x/reference/html/ch12s03.
html
When you use org.springframework.web.servlet.DispatcherServlet, it creates its
own spring application context, which is not the same as
org.springframework.web.context.ContextLoaderListener.
So you have to declare the monitoring spring beans in your DispatcherServlet,
by adding contextConfigLocation in the servlet in web.xml, and you can remove
the ContextLoaderListener from web.xml.
For example :
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:net/bull/javamelody/monitoring-spring.xml
/WEB-INF/spring-servlet.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
bad and good web.xml examples are attached.
Original comment by evernat@free.fr
on 13 Aug 2013 at 1:00
Attachments:
[deleted comment]
Original comment by evernat@free.fr
on 13 Aug 2013 at 1:01
evernat:
I can start my application with your good_web.xml example, but every time the
rest-service gets called, my application throws an exception like this: "No
WebApplicationContext found: no ContextLoaderListener registered?".
So my question is: are you entirely sure you can live without the
ContextLoaderListener? And in that case, is there any further steps?
http://stackoverflow.com/questions/8924761/no-webapplicationcontext-found-no-con
textloaderlistener-registered
Original comment by jahes...@gmail.com
on 11 Dec 2013 at 3:05
Original issue reported on code.google.com by
priyank....@gmail.com
on 9 Aug 2013 at 11:52