Am 05.11.2014 um 00:12 schrieb Brandon Darbro:
Looking for configuration help.

Using tomcat7 7.0.34 from rpm package tomcat7-7.0.34-3.jpp6.noarch.

Followed the instructions for using log4j for catalina.out found here:
http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j

Took the example log4j.properties file from the instructions above,
corrected the logging paths for /var/log/tomcat7, and put it through a
properties to xml converter.  Replaced log4j.properties with log4j.xml,
and logging is working.

Now we want to try and filter out an Exception we are willing to live
with, but can't have overflowing our log.

Added the following filter:
     <filter class="org.apache.log4j.filter.ExpressionFilter">
         <param name="expression" value="EXCEPTION ~=
java.io.NotSerializableException" />
         <param name="acceptOnMatch" value="false"/>
     </filter>

Yet we continue to get the exception in the log:

Nov 4, 2014 1:52:45 PM
net.sf.ehcache.distribution.RMISynchronousCacheReplicator
replicatePutNotification
SEVERE: Exception on replication of putNotification. error marshalling
arguments; nested exception is:
         java.io.NotSerializableException:
com.fakename.services.cache.ehcache.EHCacheServiceImpl. Continuing...
java.rmi.MarshalException: error marshalling arguments; nested exception
is:
         java.io.NotSerializableException:
com.fakename.services.cache.ehcache.EHCacheServiceImpl
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138)
...snip...
Caused by: java.io.NotSerializableException:
com.fakename.services.cache.ehcache.EHCacheServiceImpl
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
         at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
...snip...

What am I doing wrong?  Full xml and/or log of error available if requested.

The formatting of this message looks like it is *not* written using Log4J, but instead using java.util.logging. To rule out mail reformatting: If the Date and timestamp is on one line, and the text starting with "SEVERE" on the second line, then my guess is correct.

As others are indicating: these messages are not written by Tomcat, but instead by your application, which seems to use java.util.logging, which by default loggs to console = STDOUT which is redirected by Tomcat catalina.sh script to catalina.out.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to