JAVA RPCServer

I am trying to write a standalone JAVA RPC server (not using xmlrpcserver) but I cannot make it work. I’m using designer 9.12. I tried the tester class and the idl tester. I keep getting “class not found” on the server stub.
1001 0016: Callee not found. Library: DelawareVoterRegistrationService, Program: InitiateVoterRegistration, RPC Server: java.lang.ClassNotFoundException: DelawarevoterregistrationserviceStub
The class is clearly present. Any idea why I would get this message please?

Are you using the jrpcserver? Is Java calling a Natural service or are other clients (such as Natural) calling a Java service?

If using jrpcserver, have you specified your classpath in the entirex.javarpcserver.properties file?

What does your PATH environment variable contain?

You have to tell the Java RPC Server where to find your server classes so they can be loaded dynamically.

You have two options:

  • add the directory to the -classpath parameter in the jrpcserver script
  • set the entirex.rpcserver.classpath entry in the properties file; note that you have to use the Java URL syntax here

Hi and thank you both very much. I don’t know why, but I was having trouble pointing the server to the bin directory where all the classes are.
So yes, I am using jrpcserver. I’m running a standalone java rpc server with the intention of calling from natural. I’m not sure of the syntax of the JAVA url for the path, but I worked around it by wrapping everything into a .jar file and referencing that instead. I have another question though (I am very unfamiliar with this). The generated code says" // insert your application specific code here". OK, I did, but it is not apparent how to populate the response. I can get information out of the request so how do I set the response please.
Thanks again… James.

Hi James,
the server implementation extends an abstract class which provides the access to the IN OUT and OUT parameters.
The names are .

Thank you. And one final question. XMLRPCSERVER creates rolling logs, exx.sdk.xml.runtime, etc. My JAVA rpcserver is not doing that, even though the runtime configuration is quite similar. How do I get it to write the logs?
James.

In the properties file you have to set e.g.
entirex.server.logfile=jserver.log
entirex.trace=1
These properties are also used by the XML RPC Server.

Thank you. I’m already doing that and I have it writing to serverlog.log, which unfortunately gets overwritten every time the server is re-started.
I was looking for a logging option similar to the exx.sdk.xml.runtime.log that comes from XMLRPCSERVER, but I’m guessing now that those logs are specific only to XMLRPCSERVER and that there is no equivalent built into JAVARPCSERVER. Is that correct? So I would have to create my own custom logs using something like log4j?

Yes, the logging of the XML RPC Server is different.