Exception trace output from BaseSerializingTranscoder if Objects no more compatible
See original GitHub issueIf a retrieved object from cache is no more “compatible” with the current class in the running application, memcachedClient.get(…) does correctly return null but also prints an exeption trace like:
10:19:48,504 ERROR [net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder] (default task-110) Caught IOException decoding 8002 bytes of data: java.io.InvalidClassException: com.my.package.my.class; local class incompatible: stream classdesc serialVersionUID = 7737855311941045290, local class serialVersionUID = -351616861165941259
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:616)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1630)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at java.util.ArrayList.readObject(ArrayList.java:791)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.deserialize(BaseSerializingTranscoder.java:112)
at net.rubyeye.xmemcached.transcoders.SerializingTranscoder.decode0(SerializingTranscoder.java:98)
at net.rubyeye.xmemcached.transcoders.SerializingTranscoder.decode(SerializingTranscoder.java:90)
at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:669)
at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:1072)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1030)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1041)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1063)
at xx.xx.CacheService.cacheGet(CacheService.java:1052)
There is no exception thrown to my code so that I could catch it around memcachedClient.get(…). This output comes from the client itself. How can I disable this?
I already have the following in my log4j.xml
Configuration:
<Configuration >
<Properties>
<Property name="log4j.logger.net.rubyeye.xmemcached">false</Property>
<Property name="log4j.logger.com.google.code.yanf4j">false</Property>
</Properties>
...
</Configuration>
Edit: fixed styling.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to print full stack trace in exception?
I was looking for a simple way to do it and here it is. Some little concern is it is not as much...
Read more >traceback — Print or retrieve a stack traceback — Python 3.11 ...
Print exception information and stack trace entries from traceback object tb to file. This differs from print_tb() in the following ways: if tb...
Read more >Stack trace not included in re-thrown exception
When re-throwing an exception, make sure to include the stack trace. Otherwise pertinent debug information is lost. Detector ID.
Read more >Exception.StackTrace Property (System) - Microsoft Learn
Gets a string representation of the immediate frames on the call stack. ... Use StackTrace to get stack trace information when no exception...
Read more >Understanding the Python Traceback
Python prints a traceback when an exception is raised in your code. The traceback output can be a bit overwhelming if you're seeing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With the help of Stackoverflow [https://stackoverflow.com/q/46365134/4106030] I was able to get a solution. The problem was that Wildfly includes implizitely log4j -> so over slf4J, this log4j with its config was taken; therefore, the own config has been ignored.
Of course i can ,but i think disabling log4j package level logging is a better choice.
2017-09-22 21:57 GMT+08:00 adrianbader notifications@github.com:
– 庄晓丹 Email: killme2008@gmail.com Site: http://fnil.net
不学习,毋宁死