-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
fix #210 JavaDeserializer._constructor.newInstance([null, null]) NPE #1608
Conversation
bd3d0e5
to
d1890d5
Compare
@lovepoem @zonghaishang |
Please provide the full jar package that has this exception:
thanks. |
@zonghaishang 但是用 #1232 提交之前的代码,是工作很好的。既然AbstracthessianInput增加了方法,为什么heassian2能兼容和heassian1就不支持?这本身会导致所有的hessian1协议在#1232之后不再得到支持。 当然我也可以如你所说,去掉hessian1的junit以保证测试用例ok。 HessianInput.inistant()方法本意是构造一个对象而已。但是类创建者不知道会传入一个null。 “Please provide the full jar package that has this exception:
|
既然AbstracthessianInput增加了方法,为什么heassian2能兼容和heassian1就不支持?
|
既然AbstracthessianInput增加了方法,为什么heassian2能兼容和heassian1就不支持?
|
9cf2384
to
cf00db5
Compare
Example: org.springframework.jdbc.UncategorizedSQLException org.springframework.beans.MethodInvocationException com.alibaba.com.caucho.hessian.io.HessianProtocolException: 'com.alibaba.com.caucho.hessian.io.beans.ConstructNPE' could not be instantiated at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:313) Caused by: java.lang.reflect.InvocationTargetException at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:309) Caused by: java.lang.NullPointerException at com.alibaba.com.caucho.hessian.io.beans.ConstructNPE.<init>(ConstructNPE.java:15)
Hi, please check the CI failure. |
@takeseem After discussing with @zonghaishang For this question, you can implement custom Deserializer, and then register it to SerializerFactory, such as: Deserializer des = new XXXDeserializer();
ExtSerializerFactory ext = new ExtSerializerFactory();
ext.addDeserializer(UncategorizedSQLException.class, des);
serializerFactory.addFactory(ext); You can try it with this way. |
@takeseem, hessian-lite is moved out into github/dubbo, pls. feel free to resubmit PR there, if you don't agree with @diecui1202's suggestion. |
this is an old issue #210
I think if use
constructor(null...)
throwNPE
then try use constructor(new Arg1(), new Arg2()) again to instance a bean, is a good idea.JavaDeserializer NPF for org.springframework.jdbc.UncategorizedSQLException