Hi again, <br><br>I´m still experiencing the same error. This is the code, where 'log' is of org.slf4j.Logger type:<br><br> log.debug("annotation {}: {}", j, annotations[j]);<br><br>When 'annotations[j]' is my own annotation, the Logback plugin stops to log the rest of messages and the Error Log in Eclipse shows this stack trace:
<br><br>java.lang.ClassNotFoundException: org.app.util.annotation.Operation<br> at java.lang.ClassLoader.findClass(ClassLoader.java:358)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)<br> at java.lang.ClassLoader.loadClass
(ClassLoader.java:251)<br> at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)<br> at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
<br> at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)<br> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)<br> at java.lang.ClassLoader.loadClass
(ClassLoader.java:251)<br> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:247)<br> at java.io.ObjectInputStream.resolveProxyClass
(ObjectInputStream.java:676)<br> at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)<br> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)<br> at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1732)<br> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)<br> at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)<br> at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1323)<br> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)<br> at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)<br> at ch.qos.logback.classic.spi.LoggingEvent.readObject
(LoggingEvent.java:282)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)<br> at java.lang.reflect.Method.invoke(Method.java:597)<br> at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)<br> at java.io.ObjectInputStream.readSerialData
(ObjectInputStream.java:1846)<br> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)<br> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)<br> at java.io.ObjectInputStream.readObject
(ObjectInputStream.java:351)<br> at ch.qos.logback.eclipse.reciever.SocketNode.run(SocketNode.java:54)<br> at java.lang.Thread.run(Thread.java:619)<br><br>If I use the toString() method of the annotation, the eclipse Logback plugin works fine. The sample code of that is:
<br><br> log.debug("annotation {}: {}", j, annotations[j].toString());<br><br>Do you think this is a bug? It seems 'ch.qos.logback.classic.spi.LoggingEvent.readObject' can´t reach the class 'org.app.util.annotation.Operation
' in my Eclipse´s classpath. <br><br>How can I solve this problem?<br><br>Thanks a lot.<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Vicente Ferrer</b> <
<a href="mailto:vteferrer@gmail.com">vteferrer@gmail.com</a>><br>Date: 14-sep-2007 21:56<br>Subject: Unexpected problem with logback<br>To: <a href="mailto:logback-dev@qos.ch">logback-dev@qos.ch</a><br><br></span>Hi, <br>
<br>I´m an habitual user of log4j and I´m trying to port my
application to logback. The first impression of this new tool was very
good; the pluggin for Eclipse IDE has a good apparience. But I´m
experiencing a little worrisomely problem: some logging lines cause the
Eclipse plugin stops to write the rest of logging lines. If I activate
a ConsoleAppender, I can view the rest of the logging lines at the
standard console, but the Eclipse plugins don´t show that lines. <br><br>The line causing the Eclipse plugin stops to work is: <br><br> Method[] methods = clazz.getDeclaredMethods();<br> log.debug("method: {}", methods[i]);
<br><br>I´ve seen an error on the Error Log eclipse´s view saying that
java.lang.reflect.Method is not Serializable, and the plugin do not show the rest of the logging lines. <br><br>I´ve
experimented similar error when I try to log a message line that
contains an own object such as a bean. In this case, the error is a
ClassNotFoundException because of the logback eclipse plugin can´t find the
bean class. The bean class is in my proyect classpath and in the application server, logback goes fine because it can reach the bean class. How can I make accesible my classes to the logback plugin.<br><br>Could be these two bugs of the plugin?
<br><br>If you need it, I can post the stacktrace of the error that appears at Eclipse Error Log View.<br><br>Thanks a lot. <br><br>P.D.: I´ve sent this message to the logback user´s list, but later I´ve thought the most appropiate list for this problem should be the dev list.
<br>