Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

RMI load class exception

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Scenario: when writing data to solr, the application calls the method in the encapsulated jar. The connection is normal, but an exception is thrown when writing json data.

Errors are as follows: Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

Java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

Java.lang.ClassNotFoundException: net.sf.json.JSONObject (no security manager: RMI class loader disabled)

At sun.rmi.server.UnicastServerRef.dispatch (UnicastServerRef.java:377)

At sun.rmi.transport.Transport$1.run (Transport.java:200)

At sun.rmi.transport.Transport$1.run (Transport.java:197)

At java.security.AccessController.doPrivileged (Native Method)

At sun.rmi.transport.Transport.serviceCall (Transport.java:196)

At sun.rmi.transport.tcp.TCPTransport.handleMessages (TCPTransport.java:568)

At sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0 (TCPTransport.java:826)

At sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0 (TCPTransport.java:683)

At java.security.AccessController.doPrivileged (Native Method)

At sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run (TCPTransport.java:682)

At java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)

At java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)

At java.lang.Thread.run (Thread.java:745)

At sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer (Unknown Source)

At sun.rmi.transport.StreamRemoteCall.executeCall (Unknown Source)

At sun.rmi.server.UnicastRef.invoke (Unknown Source)

At java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod (Unknown Source)

At java.rmi.server.RemoteObjectInvocationHandler.invoke (Unknown Source)

At com.sun.proxy.$Proxy5.invoke (Unknown Source)

At org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke (RmiClientInterceptor.java:398)

At org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke (RmiClientInterceptor.java:344)

... 6 more

Net.sf.json.JSONObject this jar I introduced, but read the error is for security, not loaded, and finally changed to fastjson will be no problem, the use of classes need to be consistent with the classes used in it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report