We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
public class User implements Serializable { private static final long serialVersionUID = -467269449632818122L; private int age; private String name; public User(int age, String name) { this.age = age; this.name = name; } }
public interface DemoService { String sayHello(User user); }
invoke sayHello({"age":1,"name":"String","class":"User"})
can invoke successfully
throw exception java.lang.IllegalArgumentException
If there is an exception, please attach the exception trace:
java.lang.IllegalArgumentException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.alibaba.dubbo.common.utils.PojoUtils.newInstance(PojoUtils.java:527) at com.alibaba.dubbo.common.utils.PojoUtils.realize0(PojoUtils.java:436) at com.alibaba.dubbo.common.utils.PojoUtils.realize(PojoUtils.java:196) at com.alibaba.dubbo.common.utils.PojoUtils.realize(PojoUtils.java:86) at com.alibaba.dubbo.rpc.protocol.dubbo.telnet.InvokeTelnetHandler.telnet(InvokeTelnetHandler.java:138) at com.alibaba.dubbo.remoting.telnet.support.TelnetHandlerAdapter.telnet(TelnetHandlerAdapter.java:52) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:181) at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:50) at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:79) 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)
The text was updated successfully, but these errors were encountered:
should init primitive before new instance com.alibaba.dubbo.common.utils.PojoUtils#newInstance:L527 pseudo code like this
Class<?>[] parameterTypes = constructor.getParameterTypes(); Object[] parameters = new Object[parameterTypes.length]; for (int i = 0; i < parameterTypes.length; i++) { if (parameterTypes[i].isPrimitive()) { // init primitive type parameters[i] = getPrimitiveDefaultValue(parameterTypes[i]); } } return constructor.newInstance(parameters);
Sorry, something went wrong.
Fix telnet not work in some scene(#4007) (#4026)
7de8abb
Successfully merging a pull request may close this issue.
Environment
Steps to reproduce this issue
Expected Result
can invoke successfully
Actual Result
throw exception java.lang.IllegalArgumentException
If there is an exception, please attach the exception trace:
The text was updated successfully, but these errors were encountered: