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

mybaits-plus插件反序列化失败 #74

Open
betagooo opened this issue Apr 3, 2024 · 5 comments
Open

mybaits-plus插件反序列化失败 #74

betagooo opened this issue Apr 3, 2024 · 5 comments

Comments

@betagooo
Copy link

betagooo commented Apr 3, 2024

反序列化失败类:com.baomidou.mybatisplus.core.conditions.segments.MergeSegments
异常栈:

com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.SerializeException: [Error-1002]-hessian-deserialize-error
	at com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.HessianSerializer.deserialize(HessianSerializer.java:67)
	at com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.AbstractSerializerAdapter.deserialize(AbstractSerializerAdapter.java:56)
	at com.alibaba.jvm.sandbox.repeater.plugin.core.wrapper.SerializerWrapper.inTimeDeserialize(SerializerWrapper.java:169)
	at com.vivo.jvm.sandbox.moonbox.module.MoonboxRepeaterTask.convertWrapperAndMeta(MoonboxRepeaterTask.java:198)
	at com.vivo.jvm.sandbox.moonbox.module.MoonboxRepeaterTask.lambda$pullAndDispatch$1(MoonboxRepeaterTask.java:124)
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.caucho.hessian.io.HessianFieldException: com.baomidou.mybatisplus.core.conditions.segments.MergeSegments.groupBy: expected list at java.lang.Boolean (true)
	at com.caucho.hessian.io.UnsafeDeserializer.logDeserializeError(UnsafeDeserializer.java:782)
	at com.caucho.hessian.io.UnsafeDeserializer$ObjectFieldDeserializer.deserialize(UnsafeDeserializer.java:419)
	at com.caucho.hessian.io.UnsafeDeserializer.readObject(UnsafeDeserializer.java:235)
	at com.caucho.hessian.io.UnsafeDeserializer.readObject(UnsafeDeserializer.java:146)
	at com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2227)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1739)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1723)
	at com.caucho.hessian.io.UnsafeDeserializer$ObjectFieldDeserializer.deserialize(UnsafeDeserializer.java:415)
	at com.caucho.hessian.io.UnsafeDeserializer.readObject(UnsafeDeserializer.java:235)
	at com.caucho.hessian.io.UnsafeDeserializer.readObject(UnsafeDeserializer.java:146)
	at com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2227)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2148)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2132)
	at com.caucho.hessian.io.BasicDeserializer.readLengthList(BasicDeserializer.java:599)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2100)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1685)
	at com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.HessianSerializer.deserialize(HessianSerializer.java:64)
	... 8 common frames omitted
Caused by: com.caucho.hessian.io.HessianProtocolException: expected list at java.lang.Boolean (true)
	at com.caucho.hessian.io.AbstractDeserializer.error(AbstractDeserializer.java:151)
	at com.caucho.hessian.io.AbstractListDeserializer.readObject(AbstractListDeserializer.java:63)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1843)
	at com.caucho.hessian.io.UnsafeDeserializer$ObjectFieldDeserializer.deserialize(UnsafeDeserializer.java:415)
	... 23 common frames omitted

序列化时
image-20240401195318066

image-20240401183238663

反序列化时
image

image-20240401160145981

序列化时_offset=610,反序列化时:_offset=605

//先实例化
Collection list = createList();

反序列化时创建NormalSegmentList对象时,没能还原NormalSegmentList类,只是父类ArrayList,导致属性缺失,反序列化时字节流offset对应不上。

image
MergeSegments类的normal、groupBy、having、orderBy属性,都是复杂的集合类。反序列化都会面临这个问题。

有大佬遇到过这个问题吗?

@mxian
Copy link

mxian commented Apr 18, 2024

遇到了,现在有解决办法吗?

@betagooo
Copy link
Author

遇到了,现在有解决办法吗?

弃坑了,jvm-sandbox-repeator处处遇坑。转研究arex了。

@mxian
Copy link

mxian commented Apr 23, 2024

遇到了,现在有解决办法吗?

弃坑了,jvm-sandbox-repeator处处遇坑。转研究arex了。

我倒是解决这个问题了。。。现在回放成功了

@betagooo
Copy link
Author

遇到了,现在有解决办法吗?

弃坑了,jvm-sandbox-repeator处处遇坑。转研究arex了。

我倒是解决这个问题了。。。现在回放成功了

恭喜~~不过我没记错的话在序列化时候其实也有丢失ISqlSegement属性。

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

3 participants
@mxian @betagooo and others