• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Servlet problem in CF7->CF8 move

New Here ,
Nov 12, 2007 Nov 12, 2007

Copy link to clipboard

Copied

When trying to connect to an RMI Service from within a Java Servlet running on a Cold Fusion 8 server, our application is throwing an exception. The code is unchanged from what ran successfully on Cold Fusion 7. The interface that defines the RMI Service is:

public interface Request extends Remote, FsbConstants {
public Response handle(Datatable data) throws RemoteException;
}


the method where the RMI Call is being made and the problem is occuring is:

private Response getRequest(String service, Datatable data) {
try { return ((Request)Naming.lookup(service)).handle(data); }
catch (Exception excp) {
excp.printStackTrace();
return (new Response(Response.PAGE_NO_RMI_ERROR, data));
}
}


and the RMI method that is being called is:

public Response handle(Datatable data) throws RemoteException {
Processor processor = null;
Response result = null;
String action = null;
String page = null;
String sid = null;
Date fini, strt;
try {
sid = (String)data.get(SESSION_ID);
getSessionFromDb(sid, data);
action = getProcessorCode(INIData.get(((String)data.get(Processor.PROCESSOR)).trim()));
processor = getProcessor(action, data);
result = (Response)processor.process();
saveSessionToDb(sid, result);
}
catch(SQLException sqle) {
page = getPage(INIData.get(((String)data.get(PROCESSOR)).trim()));
sqle.printStackTrace();
return new Response(PAGE_SQL_ERROR, page, data);
}
catch(FsbException fsbe) {
page = getPage(INIData.get(((String)data.get(PROCESSOR)).trim()));
fsbe.printStackTrace();
return new Response(PAGE_RMI_ERROR, page, data);
}
return result;
}




Note that serveice is the name of the RMI service being connected to and data is an extension
of the standard Java Hash table. The exception that is thrown and its stack trace is as follows:

Exception: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: of
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: of
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:336)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at fsb.lib.request.RequestHandler_Stub.handle(Unknown Source)
at SingleSignOn.getRequest(SingleSignOn.java:320)
at SingleSignOn.doPost(SingleSignOn.java:569)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: of
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:293)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.MalformedURLException: no protocol: of
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:751)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:290)
... 9 more


We've tried setting the ports we're using as reserved so Windows doesn't assign them from the random pool, doesn't seem to have any effect on the issue.

Is there a setting or property we need to change to allow for an RMI connection from within cold fusion? Or any other suggestions? Any help is much appreciated. Thanks!
TOPICS
Advanced techniques

Views

228

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2007 Nov 16, 2007

Copy link to clipboard

Copied

LATEST
Anyone out there have any ideas at all? 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation