lemonzone2010 / javamelody

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

centralized server not compatible with ehcache 2.7.2 #335

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.embedded ehcache 2.7.2 and javamelody 1.44 in your webapp
2.run a centralized javamelody server 
3.try to add your web app to the centralized server

What is the expected output?

The standard javamelody page

What do you see instead?

a modal box with "java.io.EOFException"

in the web app log:
JBWEB000236: Servlet.service() for servlet default threw exception: 
java.lang.ClassNotFoundException: net.sf.ehcache.Statistics from [Module 
"deployment.xxxxxxx.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
    at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.7.0_25]
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source) [rt.jar:1.7.0_25]
    at java.lang.Class.getDeclaredMethod(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass.getPrivateMethod(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass.access$1700(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass$2.run(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass$2.run(Unknown Source) [rt.jar:1.7.0_25]
    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass.<init>(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass.lookup(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeObject0(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeObject(Unknown Source) [rt.jar:1.7.0_25]
    at java.util.ArrayList.writeObject(Unknown Source) [rt.jar:1.7.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_25]
    at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeObject0(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeObject0(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeObject(Unknown Source) [rt.jar:1.7.0_25]
    at java.util.ArrayList.writeObject(Unknown Source) [rt.jar:1.7.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_25]
    at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeObject0(Unknown Source) [rt.jar:1.7.0_25]
    at java.io.ObjectOutputStream.writeObject(Unknown Source) [rt.jar:1.7.0_25]
    at net.bull.javamelody.TransportFormat.writeSerializableTo(TransportFormat.java:213)
    at net.bull.javamelody.SerializableController.doSerializable(SerializableController.java:90)
    at net.bull.javamelody.MonitoringController.doCompressedSerializable(MonitoringController.java:295)
    at net.bull.javamelody.MonitoringController.doCompressedSerializable(MonitoringController.java:275)
    at net.bull.javamelody.MonitoringController.doReportCore(MonitoringController.java:200)
    at net.bull.javamelody.MonitoringController.doReport(MonitoringController.java:183)
    at net.bull.javamelody.MonitoringController.doActionIfNeededAndReport(MonitoringController.java:141)
    at net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:340)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:170)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)

in the centralized server standard output:
11:10:22,615 WARN  [javamelody] java.io.EOFException
java.io.EOFException
        at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Sourc
e)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.util.ArrayList.readObject(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.util.ArrayList.readObject(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at net.bull.javamelody.TransportFormat.readSerializableFrom(TransportFor
mat.java:238)
        at net.bull.javamelody.LabradorRetriever.read(LabradorRetriever.java:295
)
        at net.bull.javamelody.LabradorRetriever.call(LabradorRetriever.java:161
)
        at net.bull.javamelody.RemoteCollector.collectForUrl(RemoteCollector.jav
a:391)
        at net.bull.javamelody.RemoteCollector.collectDataWithUrls(RemoteCollect
or.java:96)
        at net.bull.javamelody.RemoteCollector.collectData(RemoteCollector.java:
78)
        at net.bull.javamelody.CollectorServer.collectForApplication(CollectorSe
rver.java:165)
        at net.bull.javamelody.CollectorServer.collectForApplication(CollectorSe
rver.java:139)
        at net.bull.javamelody.CollectorServer.addCollectorApplication(Collector
Server.java:247)
        at net.bull.javamelody.CollectorController.addCollectorApplication(Colle
ctorController.java:93)
        at net.bull.javamelody.CollectorServlet.doPost(CollectorServlet.java:135
)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:121)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.jav
a:244)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
        at java.lang.Thread.run(Unknown Source)

What version of the product are you using? On what application server, JDK,
operating system?

javamelody 1.44
ehcache 2.7.2 
jboss eap 6.1

Please provide any additional information below.

Notices that javamelody in standard mode (not with a centralized server) work 
as expected. The ehcache data are collected without any error.

Original issue reported on code.google.com by pmint.vi...@gmail.com on 20 Aug 2013 at 9:21

GoogleCodeExporter commented 9 years ago
Hi all,
Is there a chance to see this bug fixed ? Is it hard to fix ?
Now, we have to remove our webapps from our centralized server. This one is now 
useless.

Thanks for any comment  

Original comment by pmint.vi...@gmail.com on 27 Aug 2013 at 2:57

GoogleCodeExporter commented 9 years ago
Hi,
What is sure is that if the bug is real, it will be fixed. Here bugs are fixed 
before new features.
I have not had a chance to look at that. Sometimes, we all wish to be able to 
take some holidays.
Do you know what will fix that?

Original comment by evernat@free.fr on 27 Aug 2013 at 10:23

GoogleCodeExporter commented 9 years ago
I have reproduced the issue, when using ehache 2.7 and the centralized collect 
server.
The revision 3499 seems to fix this. This is committed in trunk and ready for 
the next release (1.47).
It was caused by a a new change in ehcache: the net.sf.ehcache.Statistics has 
been removed from the classes.

I have made a new build from the trunk including the fix and it is available at:
https://javamelody.googlecode.com/files/javamelody-20130831.jar
You can replace the javamelody jar file in the monitored webapp by the new jar 
file.

Thanks for the issue.

Original comment by evernat@free.fr on 31 Aug 2013 at 8:17

GoogleCodeExporter commented 9 years ago
Yes it's fixed. 
I checked it with the given build.

Thanks a lot for your celerity. We will wait for the 1.47 release.

Keep up the good work !

Original comment by pmint.vi...@gmail.com on 4 Sep 2013 at 12:53

GoogleCodeExporter commented 9 years ago
Ok, thanks

Original comment by evernat@free.fr on 4 Sep 2013 at 1:04