Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.InvalidClassException: filter status: REJECTED with Java 17 #142

Open
Sidhardha95 opened this issue Dec 1, 2023 · 0 comments
Open

Comments

@Sidhardha95
Copy link

Hi Team ,

We have using this jar within our project which was using Java 11 and recently we tried to migrate to Java 17.

While the whole build is successful , we observed that we are not able to get data from memcached and it fails with below exception

2023-12-01 14:10:39.008+0530 | POST | :PostmanRuntime/7.35.0:dx-prod:FAB-8b5fdf20-1508-4405-a64d-2100d7d5ffd9 | nioEventLoopGroup-3- |  | ERROR | net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder | Caught IOException decoding 102 bytes of data
java.io.InvalidClassException: filter status: REJECTED
	at java.base/java.io.ObjectInputStream.filterCheck(ObjectInputStream.java:1414)
	at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:2055)
	at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1909)
	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2235)
	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1744)
	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:514)
	at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:472)
	at net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.deserialize(BaseSerializingTranscoder.java:109)
	at net.rubyeye.xmemcached.transcoders.SerializingTranscoder.decode0(SerializingTranscoder.java:97)
	at net.rubyeye.xmemcached.transcoders.SerializingTranscoder.decode(SerializingTranscoder.java:89)
	at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:624)
	at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:1030)
	at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:988)
	at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:999)
	at com.oracle.cx.communications.dx4c.fabric.utils.core.cache.CacheUtil.get(CacheUtil.java:240)
	at com.oracle.cx.industries.framework.routing.utils.InteractionContextEnrichmentUtil.getValueFromCacheAsMap(InteractionContextEnrichmentUtil.java:75)

We are storing Java Map to memcached and the set operation doing that is giving true. And retrieval is failing with above error.

In case if the data stored is in String format , we see both set and get works as expected. We see issue only when we have non Primitive Object is being tried to be retirved.

Current version of memcached: 2.4.7 Tried with 2.4.8 and saw same issue.

Can you please provide with any pointers on what could be the reason and how I could resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant