rmi

java.rmi.NoSuchObjectException on Linux

微笑、不失礼 提交于 2019-12-12 02:06:06
问题 i'm developing two via RMI connected apps. Communication is bidirectional and everything works just fine, until i'm running on windows. when i take jar files to Debian, connection fails with java.rmi.NoSuchObjectException . Any idea what difference linux makes or why isn't it working ? EDIT: my code: Server side: static Registrator clientRegistrator = null; // static field, interface extending java.rmi.Remote ... Registry rmiRegistry = LocateRegistry.createRegistry(RmiConstants.RMI_REGISTRY

java.rmi.ConnectException: Connection refused to host: 10.0.0.57 [duplicate]

隐身守侯 提交于 2019-12-12 01:25:42
问题 This question already has answers here : Java RMI : connection refused (2 answers) Closed last year . Why I continue to receive following error? I tried to fix a problem by following posts on similar issue, however nothing seems to work. java.rmi.ConnectException: Connection refused to host: 10.0.0.57; nested exception is: java.net.ConnectException: Operation timed out at ..... javax.rmi.ssl.SslRMIClientSocketFactory.createSocket(SslRMIClientSocketFactory.java:120) at sun.rmi.transport.tcp

RMI marshal and serialization

和自甴很熟 提交于 2019-12-11 21:20:24
问题 In java using RMI to marshal an object that you are returning from the remote class do you just need to implement Serializable on that object? I have a class node with variables inside that i want to be returned. Do i just implement serializable? If so what about the class that is receiving the object? does its class need to implement serializable too? example: public class node implements Serializable{ //variables //variables public node(//arguments to constructor here){ } } 回答1: The class

Read log file while it is updated

牧云@^-^@ 提交于 2019-12-11 19:18:34
问题 I have server class that have remote object and clients using that remote object for some methods. This object holds log information of the client. However even the text file that holds information of the client is updated by client actions, I cannot read this updated version of the text when client request log until I close the server. Basically when client rquest statictic it should be written to log file. So I create log file if it does not exist (createLogFile) and then write log

Hibernate OneToMany relation is PersistentBag instead of List

╄→尐↘猪︶ㄣ 提交于 2019-12-11 16:55:44
问题 I am developing an application in javafx that connects via RMI with an EAR. This EAR connects to a SQLServer DB and maps POJOS using hibernate. These POJOS contain bidirectional OneToMany and ManyToOne relationships. As a consequence these relationships are mapped as List . Company.java @Entity @Table(name = "Company") public class Company implements Serializable{ /** * */ private static final long serialVersionUID = 1L; @Id @Column(name="id_company",nullable = false) @GeneratedValue(strategy

spring hessian client socket connection reset

╄→гoц情女王★ 提交于 2019-12-11 15:04:45
问题 I am using spring 3.1.0, com.springsource.com.caucho-3.2.1.jar and tomcat-6.0.33 both sides (client/server). All the remote service calls are working fine without any issues except long time taking services(more then 9/10 minutes). I am using Spring-Security to protect remote calls. I have created a new remote service that takes approx 30 minutes to make a response to client in real schenerio. The service works perfectly if time taken of execution is less then 9.xx/10 minutes but after

java.rmi.ConnectException: Connection refused to host when RMI server is child process of RMI client

坚强是说给别人听的谎言 提交于 2019-12-11 14:48:49
问题 I have two Java programs - RMIServer and RMIClient. Everything just works as expected, if I launch them as two separate Java invocations. That is $ java -cp someclasspath server.mainserverclass & $ java -cp someclasspath client.mainclientclass But in my project, it so happens that I need the client java program to spawn the server and then connect to it. I used both the runtime.exec() method and ProcessBuilder to spawn a server instance, but when I do that I get the following: .Exception in

Java Serialization with RMI

邮差的信 提交于 2019-12-11 13:59:21
问题 I'm working on a project using Java RMI. This is the class causing problem: public class FSFile implements Serializable { public static final int READ = 0; public static final int WRITE = 1; private int flag; private String filename; private transient BufferedWriter writer; private transient BufferedReader reader; ... private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeObject(writer); stream.writeObject(reader); } private void

Java RMI NoSuchObjectException

旧街凉风 提交于 2019-12-11 12:58:33
问题 I have a server and client using Java RMI. If I use one client all is fine with the code below. But if I connect with a client and then a second one, it throws port already in use exception. That's fine, so I disconnect the connected client and then try to connect with the second client again. It gives me this: java.rmi.NoSuchObjectException: no such object in table Why is this? //CONNECT Registry registry = LocateRegistry.getRegistry( Options.getRegistryIp(), Options.getRegistryPort());

Java custom classloading and RMI

本秂侑毒 提交于 2019-12-11 11:04:48
问题 EDIT : I've decided to properly setup/handle the serialUID's in the classes that are being returned from my RMI interface. This will avoid having to do any custom class loading/managing, solves my issue in a few lines and avoids a lot of headaches. Thanks for everyone's suggestions and help! I'm currently faced with the issue of having to communicate via Java RMI to devices which may be using 2 different versions of the same JAR. I have a client side copy of each JAR (trimmed down to the