JSP client in RMI system - java.rmi.UnmarshalException: error unmarshalling

Hi,
Im developing a login part for a distributed airline reservation system using JSP as the client but while executing the jsp, the error that is being catched is :
java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: AirlineImpl_Stub (no security manager: RMI class loader disabled)
Here are my codes:
//Interface - Airline.java
package Air;
import java.rmi.*;
public interface Airline extends Remote
     public int CheckUname(String username) throws RemoteException;
}//implementation - AirlineImpl.java
import java.net.*;
import java.io.*;
import java.sql.*;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class AirlineImpl extends UnicastRemoteObject implements Airline
     public AirlineImpl() throws RemoteException
          super();
     public int CheckUname(String username) throws RemoteException
          try
               int UnameCount = 0;
               String xxx = "eaglebeta";
               if(username.equals(xxx)
                    UnameCount++;
               return UnameCount;
          catch (Exception e3)
               System.out.println("Error: " + e3);
               return 0;
}//Server - AirlineServer.java
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class AirlineServer
     public static void main(String arg[])
          try
               Airline myAirline = new AirlineImpl();
               Naming.rebind("Airline", myAirline);
               System.out.println();
               System.out.println("************************************");
               System.out.println(" >>> Airline Reservation System <<< ");
               System.out.println("    >>> Server is Listening! <<<    ");
               System.out.println("************************************");
               System.out.println();
          catch (RemoteException e)
               //System.out.println("Error: " + e);
               System.out.println("RMI Registry is not active!");
               System.out.println("Activate RMI Registry and retry!");
               System.out.println("Bye bye, exiting...");
          catch (java.net.MalformedURLException e)
               //System.out.println("URL Error: "+ e);
               System.out.println("URL Malformed!");
               System.out.println("Bye bye, exiting...");
}//JSP client - newuser.jsp
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.rmi.*, javax.servlet.*" %>
<%@ page import="java.util.*, java.lang.*, java.io.*, Air.Airline" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#99CCFF">
<%
Object Airline = null;
try
Airline Air = (Airline)Naming.lookup("rmi://localhost/Airline");
String Name = "eaglebeta";
if(Air.CheckUname(Name)>0)
     %>
          Username already exists, choose another name
     <%
else
     %>
     <%=Name%>
     <%
catch (Exception e1)
%>
<%=e1%>
<%
%>
</body>
</html>The server, implementation, interface and stub are in a folder named "Airline Server" located on my desktop.
The interface and stub again are in another folder named "Air" located in the "classes\Air" directory which is located in the tomcat 5.5 installation directory!
The JSP client is located in the "Root" folder in the tomcat 5.5 installation derectory!
1. I start the registry in the "Airline Server" folder by typing rmiregistry
2. Load the Airline Server - java AirlineServer
3. Call the jsp - http://localhost/newuser.jsp
And i get the following error:
java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: AirlineImpl_Stub (no security manager: RMI class loader disabled)
Please help me to solve this problem!

When I am including security manager in my JSP code, the browser just get blank without any display
if(System.getSecurityManager() == null)
     System.setProperty("java.security.policy", "java.policy");
    System.setSecurityManager(new RMISecurityManager());
}Please, someone solve my problem! Im realy stuck and I don't know how to proceed! Provide me with a solution or any tutorial that would help me...

Similar Messages

  • "java.rmi.UnmarshalException: error unmarshalling" at Applet with RMI comm.

    Hello,
    I am trying to make an Applet work with an RMI server, but i keep getting the same exception again and again whatever i do.
    More specifically, i get the following :
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.net.MalformedURLException: unknown protocol: c
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at server.ClientDemo.initGUI(ClientDemo.java:100)
         at server.ClientDemo.<init>(ClientDemo.java:85)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.MalformedURLException: unknown protocol: c
         at java.net.URL.<init>(Unknown Source)
         at java.net.URL.<init>(Unknown Source)
         at java.net.URL.<init>(Unknown Source)
         at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
         at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
         at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
         at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
         at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
         at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
         at java.io.ObjectInputStream.readClassDesc(Unknown Source)
         at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         ... 13 more
    The exeption is thrown at the following line :
                   remoteReference = (RMIServer) registry.lookup(RMIServer.REGISTRY_NAME);
    This is the code of the server which seems to be running ok:
    if(System.getSecurityManager()==null)
                   System.setSecurityManager(new SecurityManager());
              registry = LocateRegistry.createRegistry(1099);
              RMIServer sr=(RMIServer) UnicastRemoteObject.exportObject(new ServerDemo(),1099);
              registry.rebind(RMIServer.REGISTRY_NAME, sr);
    and the client:
    registry = LocateRegistry.getRegistry("localhost");
    remoteReference = (RMIServer) registry.lookup(RMIServer.REGISTRY_NAME);
    Thank you in advance
    Alex
    Forgot to mention that i am setting the security policy and codebase programmatically:
    System.setProperty("java.security.policy","C:\\Users\\Alex\\workspace\\Demo\\grantall.policy");
              System.setProperty("java.rmi.server.codebase","C:\\Users\\Alex\\workspace\\Demo\\bin");
    Edited by: Alkon on May 15, 2008 4:31 PM

    I edited the code that sets the security and i am now getting the following error, again at the lookup:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.io.EOFException
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at server.ClientDemo.initGUI(ClientDemo.java:101)
         at server.ClientDemo.<init>(ClientDemo.java:91)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.DataInputStream.readByte(Unknown Source)
         ... 15 more

  • New @ RMI need help with  java.rmi.UnmarshalException: error unmarshalling

    Hi @ all out there,
    I'm new with Java RMI and have to write a EventSystem for an college project where clients can subscribe to a topic and get notified when someone publishes a message to the subscribed topic.
    At server-side I have a class called EventSystem that provides methods for subscribing and unsubscribing from topics, and also for posting messages (for publishers).
    To subscribe i thought that the client must specify the topic and also itself ( means that a client calls in this way: obj.subscribe("mytopic", this).
    The EventSystem handles a list of all clients, and whenever a new message is posted it goes trough all clients and invokes the handleMessage(String msg) method that all Clients have to provide.
    On my local machine without RMi this concept works just great.
    I now tried to get it working using RMI , but I get the following Exception when starting the client (the server starts fine) :
    Looking up for rmiregistry at 138.232.248.22:1099
    Subscriber exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.io.InvalidClassException: SubscriberImpl; SubscriberImpl; class invalid for deserialization
            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 java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
            at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
            at $Proxy0.subscribe(Unknown Source)
            at SubscriberImpl.main(SubscriberImpl.java:48)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.io.InvalidClassException: SubscriberImpl; SubscriberImpl; class invalid for deserialization
            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.io.InvalidClassException: SubscriberImpl; SubscriberImpl; class invalid for deserialization
            at java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:713)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1733)
            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
    Caused by: java.io.InvalidClassException: SubscriberImpl; class invalid for deserialization
            at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:587)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
            ... 13 moreI googled now for 2 hours but can't resolve the problem alone. As far as I can understand I have to serialize Objects that I want to send to the server, right?
    So how can i do this? I've never used serialization till now.
    any ideas how to solve this problem?
    greets from italy and sorry for my very weak english
    bd_italy

    A class has been modified after deployment. Stop the Registry, clean, recompile, and redeploy.

  • Java.rmi.UnmarshalException: error unmarshalling arguments;

    Hi!
    I'm a newbe with rmi, and I try to use a test program, from Thinking in Java:
    ITiempoPerfecto.java
    package c15.rmi;
    import java.rmi.*;
    interface ITiempoPerfecto extends Remote {
         long obtenerTiempoPerfecto() throws RemoteException;
    TiempoPerfecto.java
    package c15.rmi;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.registry.*;
    import java.net.*;
    public class TiempoPerfecto extends UnicastRemoteObject implements ITiempoPerfecto {
         public long obtenerTiempoPerfecto () throws RemoteException {
              return System.currentTimeMillis();
         public TiempoPerfecto() throws RemoteException {
               super();
         public static void main(String[] args) throws Exception {
              System.setSecurityManager(new RMISecurityManager());
              TiempoPerfecto tp=new TiempoPerfecto();
              Naming.bind("//localhost/TiempoPerfecto",tp);
              System.out.println("Preparado para dar la hora");
    }and
    MostrarTiempoPerfecto.java
    package c15.rmi;
    import java.rmi.*;
    import java.rmi.registry.*;
    public class MostrarTiempoPerfecto {
         public static void main(String[] args) throws Exception {
              System.setSecurityManager( new RMISecurityManager());
              ITiempoPerfecto t=(ITiempoPerfecto)Naming.lookup("//localhost/TiempoPerfecto");
              for (int i=0;i<10;i++)
                   System.out.println("Tiempo perfecto: "+t.obtenerTiempoPerfecto());
    }I compile all the files normally.
    Later I do:
    rmiregistry &
    rmic c15.rmi.TiempoPerfecto(This only generate the file TiempoPerfecto_Stub.class, it's ok?)
    Without warnings or errors. But when I try to create a server object
    java c15/rmi/TiempoPerfectoI obtain this:
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.lang.ClassNotFoundException: c15.rmi.TiempoPerfecto_Stub
            at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
            at sun.rmi.transport.Transport$1.run(Transport.java:153)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:595)
    .......What is the mistake? What may I do to run this programs?
    Thank you!

    You must change your current directory to your class path (EX: java c15/rmi/TiempoPerfecto) then execute command remiregistry.

  • UnmarshalException: error unmarshalling return, java.io.StreamCorruptedExce

    I am developing an application with Jonas and my environment is as follows:
    -Jonas 4.0.0
    -Tomcat 5.0.19 standalone (my web app uses the remote interfaces).
    -I have amongst others those three jars in my web-inf/lib directory:
         *test_guide.jar(my ejb jar)
         *ejb-2_1-api.jar(from jonas)
         *client.jar(from jonas)
    I come across the following error:
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested e
    xception is:
            java.io.StreamCorruptedException]
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:92)
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:98)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at com.softwareag.test_guide.web.util.PGServiceLocator.getRemoteHome(PGServiceLocator.java:82)
            at com.softwareag.test_guide.web.temp.PGSearch.executeNewSearch(PGSearch.java:25)
            at com.softwareag.test_guide.web.temp.PGSearchManagedBean.newSearchAction(PGSearchManagedBean.java:29)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at net.sourceforge.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:113)
            at net.sourceforge.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:65)
            at javax.faces.component.UICommand.broadcast(UICommand.java:109)
            at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:84)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:142)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:254)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:85)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:97)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
            at java.lang.Thread.run(Thread.java:534)
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
            java.io.StreamCorruptedException
            at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:88)
            ... 41 more
    Caused by: java.io.StreamCorruptedException
            at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2347)
            at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2380)
            at java.io.ObjectInputStream$BlockDataInputStream.skipBlockData(ObjectInputStream.java:2285)
            at java.io.ObjectInputStream.skipCustomData(ObjectInputStream.java:1795)
            at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1772)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
            ... 43 more
    com.softwareag.test_guide.web.util.PGServiceLocatorException
            at com.softwareag.test_guide.web.util.PGServiceLocator.getRemoteHome(PGServiceLocator.java:92)
            at com.softwareag.test_guide.web.temp.PGSearch.executeNewSearch(PGSearch.java:25)
            at com.softwareag.test_guide.web.temp.PGSearchManagedBean.newSearchAction(PGSearchManagedBean.java:29)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at net.sourceforge.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:113)
            at net.sourceforge.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:65)
            at javax.faces.component.UICommand.broadcast(UICommand.java:109)
            at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:84)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:142)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:254)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:85)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:97)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
            at java.lang.Thread.run(Thread.java:534)
    package com.softwareag.test_guide.web.temp;
    import java.rmi.RemoteException;
    import java.util.List;
    import com.softwareag.test_guide.TransferObjects.PGQueryTO;
    import com.softwareag.test_guide.web.util.PGFactory;
    * @author Julien Martin
    public class PGSearchManagedBean {
         private String category;
         private List postcodes;
         private String name;
         private boolean commentsExist;
         private String sortOrderCriterion;
         private int minimumNote;
              public String newSearchAction() throws RemoteException { //TODO: Remove that
                   System.out.println("----------within new search action--------------");
                   PGQueryTO query = PGFactory.getQueryInstance(this);
                   PGSearch search = PGFactory.getSearchInstance();
                   String results = search.executeNewSearch(query);
                   return results;
         public String nextAction() throws RemoteException { //TODO: Remove that
              PGSearch search = PGFactory.getSearchInstance();
              String issue = search.next();
              return issue;
         public String previousAction() throws RemoteException { //TODO: Remove that
              PGSearch search = PGFactory.getSearchInstance();
              String issue = search.previous();
              return issue;
         public String getCategory() {
              return category;
         public boolean getCommentsExist() {
              return commentsExist;
         public int getMinimumNote() {
              return minimumNote;
         public String getName() {
              return name;
         public List getPostcodes() {
              return postcodes;
         public String getSortOrderCriterion() {
              return sortOrderCriterion;
         public void setCategory(String string) {
              category = string;
         public void setCommentsExist(boolean bool) {
              commentsExist = bool;
         public void setMinimumNote(int i) {
              minimumNote = i;
         public void setName(String string) {
              name = string;
         public void setPostcodes(List list) {
              postcodes = list;
         public void setSortOrderCriterion(String string) {
              sortOrderCriterion = string;
    package com.softwareag.test_guide.web.util;
    import java.util.Collections;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Properties;
    import javax.ejb.EJBHome;
    import javax.ejb.EJBLocalHome;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    * @author Julien Martin
    public class PGServiceLocator {
         private InitialContext initialContext;
         private Map cache;
         private Properties props;
         private static PGServiceLocator _instance;
         static {
              try {
                   _instance = new PGServiceLocator();
              } catch (PGServiceLocatorException se) {
                   System.err.println(se);
                   se.printStackTrace(System.err);
         private PGServiceLocator() throws PGServiceLocatorException {
              try {
                   props = new Properties();
                   props.put(Context.INITIAL_CONTEXT_FACTORY,PGConstants.INITIAL_CONTEXT_FACTORY);
                   props.put(Context.PROVIDER_URL,PGConstants.PROVIDER_URL);
                   props.put(Context.SECURITY_PRINCIPAL,PGConstants.SECURITY_PRINCIPAL);
                   props.put(Context.SECURITY_CREDENTIALS,PGConstants.SECURITY_CREDENTIALS);
                   initialContext = new InitialContext(props);
                   cache = Collections.synchronizedMap(new HashMap());
              } catch (NamingException ne) {
                   //throw new PGServiceLocatorException(ne);
                   throw new PGServiceLocatorException();
              } catch (Exception e) {
                   //throw new PGServiceLocatorException(e);
                   throw new PGServiceLocatorException();
         static public PGServiceLocator getInstance() {
              return _instance;
         public EJBLocalHome getLocalHome(String jndiHomeName) throws PGServiceLocatorException {
              EJBLocalHome localHome = null;
              try {
                   if (cache.containsKey(jndiHomeName)) {
                        localHome = (EJBLocalHome) cache.get(jndiHomeName);
                   } else {
                        localHome = (EJBLocalHome) initialContext.lookup(jndiHomeName);
                        cache.put(jndiHomeName, localHome);
              } catch (NamingException nex) {
                   //throw new PGServiceLocatorException(nex);
                   throw new PGServiceLocatorException();
              } catch (Exception ex) {
                   //throw new PGServiceLocatorException(ex);
                   throw new PGServiceLocatorException();
              return localHome;
         public EJBHome getRemoteHome(String jndiHomeName, Class homeClassName) throws PGServiceLocatorException {
              EJBHome remoteHome = null;
              try {
                   if (cache.containsKey(jndiHomeName)) {
                        remoteHome = (EJBHome) cache.get(jndiHomeName);
                   } else {
                        Object objref = initialContext.lookup(jndiHomeName);
                        Object obj = PortableRemoteObject.narrow(objref, homeClassName);
                        remoteHome = (EJBHome) obj;
                        cache.put(jndiHomeName, remoteHome);
              } catch (NamingException nex) {
                   //throw new PGServiceLocatorException(nex);
                   System.out.println("-----------------");
                   nex.printStackTrace();
                   System.out.println("-----------------");
                   throw new PGServiceLocatorException();
              } catch (Exception ex) {
                   //throw new PGServiceLocatorException(ex);
                   throw new PGServiceLocatorException();
              return remoteHome;
    package com.softwareag.test_guide.web.temp;
    import java.rmi.RemoteException;
    import java.util.List;
    import javax.ejb.CreateException;
    import com.softwareag.test_guide.TransferObjects.PGQueryTO;
    import com.softwareag.test_guide.searchEngineEJB.PGSearchEngineListHandlerException;
    import com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandler;
    import com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerHome;
    import com.softwareag.test_guide.web.util.PGServiceLocator;
    import com.softwareag.test_guide.web.util.PGServiceLocatorException;
    import com.softwareag.test_guide.web.util.PGSessionUtil;
    * @author Julien Martin
    public class PGSearch {
         public String executeNewSearch(PGQueryTO query) throws RemoteException { //TODO: remove that exception
              try {
                   //We retrieve the local home object
                   //keep/PGSearchEngineValueListHandlerLocalHome pGSearchEngineHome = (PGSearchEngineValueListHandlerLocalHome) PGServiceLocator.getInstance().getLocalHome("PGSearchEngineValueListHandlerEJBHome_L");
                   PGSearchEngineValueListHandlerHome pGSearchEngineHome = (PGSearchEngineValueListHandlerHome) PGServiceLocator.getInstance().getRemoteHome("PGSearchEngineValueListHandlerEJBHome", PGSearchEngineValueListHandlerHome.class);
                   //We obtain a local interface object from the local home object
                   //keep/PGSearchEngineValueListHandlerLocal pGSearchEngine = pGSearchEngineHome.create();
                   PGSearchEngineValueListHandler pGSearchEngine = pGSearchEngineHome.create();
                   //We put the local interface into the session for later use
                   PGSessionUtil.putSearchEngineEJBIntoSession(pGSearchEngine);
                   //We execute the search
                   boolean containsResults = pGSearchEngine.executeSearch(query);
                   System.out.println("------containsResults------->" + containsResults);
                   //If the search does return results,
                   //1. We fetch the first n elements
                   //2. We put the results into the session
                   //3. We return the following String
                   if (containsResults) {
                        List firstResults = pGSearchEngine.getNextElements(0, 15);
                        PGSessionUtil.putResultsListIntoSession(firstResults);
                        return "displayResults";
                   //If the search does not return results, we return the following String
                   else {
                        return "noResults";
              } catch (CreateException e) {
                   e.printStackTrace();
                   return null;
              } catch (PGServiceLocatorException e) {
                   e.printStackTrace();
                   return null;
              } catch (PGSearchEngineListHandlerException e) {
                   e.printStackTrace();
                   return null;
         public String next() {
              try {
                   //PGSearchEngineValueListHandlerLocal pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   PGSearchEngineValueListHandler pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   List list = pGSearchEngine.getNextElements(15, 20);
                   if (!list.isEmpty()) {
                        return "displayResults";
                   } else {
                        return "endOfResults";
              } catch (RemoteException e) {
                   // TODO Remove that
                   e.printStackTrace();
                   return null;
         public String previous() {
              try {
                   //PGSearchEngineValueListHandlerLocal pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   PGSearchEngineValueListHandler pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   List list = pGSearchEngine.getPreviousElements(15, 20);
                   if (!list.isEmpty()) {
                        return "displayResults";
                   } else {
                        return "endOfResults";
              } catch (RemoteException e) {
                   // TODO Remove that
                   e.printStackTrace();
                   return null;
    }Can anybody help please?
    Thanks in advance,
    Julien Martin.

    Do you use the same version of JDK in EJB container and EJB client ?

  • UnmarshalException:error unmarshalling return;nested exception ClassNotFoun

    Hi,
    I have written a client for an enterprise application. The client communicates with the application using APIs provided by the application that internally make RMI calls to the application server.
    I am getting the following error when the client invokes a remote method.
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
        java.lang.ClassNotFoundException: <a.b.c.MyClass>
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)The class 'a.b.c.MyClass' is included in the client JAR as well as in the server installation directory. The classes in this directory will be added by server into its classpath automatically. The client and server are running on the same machine but have different classpaths.
    The remote method uses class 'a.b.c.MyClass' in both input parameter and return type.
    This method returns a list of objects found as specified by the input parameters. The input parameter and the result both use the 'a.b.c.MyClass'.
    The code is able to make the call, the server processes the call, but it is failing wihle returning the result. I am not able to understand why it is failing for Unmarshalling the class that it has already (marshalled) used while sending the input parameters.
    The code was working fine previously. I am not able to find out what has made it not working.
    Waiting for your valuable help.
    Providing the complete stack trace for reference
        java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
        java.lang.ClassNotFoundException: <package.class>
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
        at wt.method.MethodServerImpl_Stub.invoke(Unknown Source)
        at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:616)
        at wt.fc.PersistenceManagerFwd.find(PersistenceManagerFwd.java:215)
        at ... Client call stack
        at AppSide_Connector.BusObjJavaInterface.poll(BusObjJavaInterface.java:584)
        at AppSide_Connector.AppCalls.poll(AppCalls.java:192)
        at AppSide_Connector.AgentBusinessObjectManager.poll(AgentBusinessObjectManager.java:717)
        at AppSide_Connector.AppPolling.poll(AppPolling.java:310)
        at AppSide_Connector.AppPolling.doPollingContinuousWait(AppPolling.java:574)
        at AppSide_Connector.AppPolling.run(AppPolling.java:137)
        at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassNotFoundException: <package.class>
        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:558)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at wt.fc.QueryResult$ChunkedExternalization.readObject(QueryResult.java:449)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at wt.fc.QueryResult.readExternal(QueryResult.java:156)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at wt.method.MethodResult.readExternal(MethodResult.java:144)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
        ... 15 moreRegards,
    jsk1

    did you get the answer, can you share that, am stuck with similar problem
    My remote call returns an object of some pojo which is generated from the class in a jar file. I get this exception
    Client exception: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: com.xx.fir.xxxx.entity.Crdxx (no security manager: RMI class loader disabled)
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: com.xx.fir.xxxx.entity.Crdxx (no security manager: RMI class loader disabled)
    Also my ant traget:
    <java classname="com.xxx.cache.CacheServiceEndPoint" fork="yes">
    <jvmarg value="-Djava.rmi.server.codebase=file:/${build}/classes/ file:/${lib}/{color:#ff0000}hibernate-credit.jar{color}" />{color:#ff0000} jar file where the pojo resides
    {color}<jvmarg value="-Djava.security.policy=C:/workspace/Cache/policy.all" />
    thx in advance

  • RMI Problem --   java.rmi.UnmarshalException:

    I am having a client and a server.... when i am trying to bring the client into server. but when i am doing it... i am getting an exception as below as...
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.io.EOFException
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at hsmsgui.rmtmgmt.RmtMgmtHandler.contactClient(RmtMgmtHandler.java:176)
         at hsmsgui.display.AddClientWzd.onFinishBtnClicked(AddClientWzd.java:488)
         at hsmsgui.display.AddClientWzd.actionPerformed(AddClientWzd.java:346)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Unknown Source)
         at hsmsgui.display.AddClientAction.actionPerformed(AddClientAction.java:38)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.DataInputStream.readByte(Unknown Source)
         ... 60 more
    can any one help me out to solve this problem.......

    Thanks for ur reply...Now i' m getting the access denied problem..
    I am able to create the rmi registry successfully on the server, Then Binding is also done successfully. but when i try to connect the client to the server the exception is thrown Please help me..
    TEST - client PC name.
    java.security.AccessControlException: access denied (java.net.SocketPermission TEST resolve)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkConnect(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getByName(Unknown Source)
         at java.net.InetSocketAddress.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
         at sun.rmi.server.UnicastRef.newCall(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at hsmsgui.rmtmgmt.RmtMgmtHandler.contactClient(RmtMgmtHandler.java:176)
         at hsmsgui.display.AddClientWzd.onFinishBtnClicked(AddClientWzd.java:488)
         at hsmsgui.display.AddClientWzd.actionPerformed(AddClientWzd.java:346)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Unknown Source)
         at hsmsgui.display.AddClientAction.actionPerformed(AddClientAction.java:38)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

  • Weblogic.rmi and java.rmi

    Hi,
    I would like to use weblogic to access a java object on another machine that
    is using java.rmi. I am using the java "rmiregistry" on the non weblogic box.>
    How can I write a java program that maintains state to that object at weblogic
    startup and call it with a weblogic client?
    Thanks
    Desmond Anderson

    "Pyung Yoon" <[email protected]> writes:
    MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);This implies JRMP which the server does not support. You need to use t3 or iiop.
    andy

  • Java.rmi.UnmarshalException: skeleton class not found but required for clie

    Hello everyone,
    I am new to RMI and getting a strange exception. I am using Java 1.5.0_07 both on client and server. They are running on the same machine, the rmi registry is started inside the server application.
    I am wondering why java complains about skeletons, I thought they are automatically created when using java 5.0?
    Please have a look at the stacktrace below.
    Thank you for your help.
    Best Regards
    Patric
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
         java.rmi.UnmarshalException: skeleton class not found but required for client version
         sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
         sun.rmi.transport.Transport$1.run(Transport.java:153)
         java.security.AccessController.doPrivileged(Native Method)
         sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
         sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
         java.lang.Thread.run(Thread.java:595)
         sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
         sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         java.rmi.Naming.lookup(Naming.java:84)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:58)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    The full class path information that I can gather is as follows (some of the library path locations could be suspect...):
    Class path: /edge/node3/hotfix::/edge/node3/current/lib/JMdsApi.jar:/edge/node3/current/lib/MemoryProfilingAgent.jar:/edge/node3/current/lib/T2common-2.6.0-SNAPSHOT.3200.jar:/edge/node3/current/lib/T2scripting-jython.jar:/edge/node3/current/lib/activation.jar:/edge/node3/current/lib/alib.jar:/edge/node3/current/lib/alibom.jar:/edge/node3/current/lib/ant.jar:/edge/node3/current/lib/authapi.jar:/edge/node3/current/lib/bbdlapi.jar:/edge/node3/current/lib/bcpg-jdk15-136.jar:/edge/node3/current/lib/bcprov-jdk15-136.jar:/edge/node3/current/lib/c3p0-0.9.1.2.jar:/edge/node3/current/lib/castor-1.1-codegen-anttask.jar:/edge/node3/current/lib/castor-1.1-codegen.jar:/edge/node3/current/lib/castor-1.1-xml.jar:/edge/node3/current/lib/castor-1.1.jar:/edge/node3/current/lib/colt-1.2.0.jar:/edge/node3/current/lib/common-annotations.jar:/edge/node3/current/lib/commons-beanutils.jar:/edge/node3/current/lib/commons-codec-1.3.jar:/edge/node3/current/lib/commons-collections-3.2.1.jar:/edge/node3/current/lib/commons-jexl-1.1.jar:/edge/node3/current/lib/commons-lang-2.3.jar:/edge/node3/current/lib/commons-logging-1.1.1.jar:/edge/node3/current/lib/commons-net-1.4.1.jar:/edge/node3/current/lib/dsn.jar:/edge/node3/current/lib/eagleapi.jar:/edge/node3/current/lib/ezmorph-1.0.3.jar:/edge/node3/current/lib/f2-loader-1.8.jar:/edge/node3/current/lib/fasttrade-boviewer-1.0.1.jar:/edge/node3/current/lib/hsqldb.jar:/edge/node3/current/lib/icu4j-3.4.4.jar:/edge/node3/current/lib/ivy.jar:/edge/node3/current/lib/janino.jar:/edge/node3/current/lib/janus-sdk-1.7.0.0.jar:/edge/node3/current/lib/jasypt-1.4.1.jar:/edge/node3/current/lib/javolution.jar:/edge/node3/current/lib/jcalendar-1.3.2.jar:/edge/node3/current/lib/jcl-over-slf4j-1.5.6.jar:/edge/node3/current/lib/jcommon-1.0.9.jar:/edge/node3/current/lib/jconn2.jar:/edge/node3/current/lib/jconn3-6.05-b26214.jar:/edge/node3/current/lib/jdom.jar:/edge/node3/current/lib/jfreechart-1.0.5.jar:/edge/node3/current/lib/jgroups-all.jar:/edge/node3/current/lib/jline.jar:/edge/node3/current/lib/jmkv123p1.jar:/edge/node3/current/lib/jna.jar:/edge/node3/current/lib/joda-time-1.5.2.jar:/edge/node3/current/lib/jscience.jar:/edge/node3/current/lib/json-lib-2.2.1-jdk15.jar:/edge/node3/current/lib/jul-to-slf4j-1.5.6.jar:/edge/node3/current/lib/junit.jar:/edge/node3/current/lib/jython.jar:/edge/node3/current/lib/log4j-1.2.15.jar:/edge/node3/current/lib/log4j-over-slf4j-1.5.6.jar:/edge/node3/current/lib/loggablePreparedStatement-1.6.jar:/edge/node3/current/lib/looks-2.1.4.jar:/edge/node3/current/lib/mailapi.jar:/edge/node3/current/lib/model-12021.jar:/edge/node3/current/lib/mysql-connector-java-5.1.7-bin.jar:/edge/node3/current/lib/opencsv-1.8.jar:/edge/node3/current/lib/rfa.jar:/edge/node3/current/lib/rspcore.jar:/edge/node3/current/lib/slf4j-api-1.5.6.jar:/edge/node3/current/lib/slf4j-log4j12-1.5.6.jar:/edge/node3/current/lib/smtp.jar:/edge/node3/current/lib/smtphandler-0.6.jar:/edge/node3/current/lib/spring-2.5.2.jar:/edge/node3/current/lib/statsvn.jar:/edge/node3/current/lib/swingx-0.9.3.jar:/edge/node3/current/lib/t2-12021.jar:/edge/node3/current/lib/testng-5.9-jdk15.jar:/edge/node3/current/lib/tibmsg.jar:/edge/node3/current/lib/tibrvj.jar:/edge/node3/current/lib/trove.jar:/edge/node3/current/lib/velocity-tools.jar:/edge/node3/current/lib/velocity.jar:/edge/node3/current/lib/xalan.jar:/edge/node3/current/lib/xerces.jar:/edge/node3/current/lib/patng/activeio-core-3.0.0-incubator.jar:/edge/node3/current/lib/patng/activemq-core-4.1.1.jar:/edge/node3/current/lib/patng/avalon-framework-4.1.3.jar:/edge/node3/current/lib/patng/backport-util-concurrent-2.2.jar:/edge/node3/current/lib/patng/binding-1.4.0.jar:/edge/node3/current/lib/patng/cglib-nodep-2.1_3.jar:/edge/node3/current/lib/patng/common-1.30.jar:/edge/node3/current/lib/patng/commons-cli-1.0.jar:/edge/node3/current/lib/patng/commons-configuration-1.2.jar:/edge/node3/current/lib/patng/commons-discovery-0.2.jar:/edge/node3/current/lib/patng/commons-math-1.1.jar:/edge/node3/current/lib/patng/concurrent-1.3.4.jar:/edge/node3/current/lib/patng/geronimo-j2ee-management_1.0_spec-1.0.jar:/edge/node3/current/lib/patng/geronimo-jms_1.1_spec-1.0.jar:/edge/node3/current/lib/patng/logkit-1.0.1.jar:/edge/node3/current/lib/patng/mina-core-1.0.1.jar:/edge/node3/current/lib/patng/mina-filter-ssl-1.0.1.jar:/edge/node3/current/lib/patng/mina-java5-1.0.1.jar:/edge/node3/current/lib/patng/mx4j-remote-3.0.1.jar:/edge/node3/current/lib/patng/mx4j-tools-3.0.1.jar:/edge/node3/current/lib/patng/org.apache.felix.framework-1.0.0.jar:/edge/node3/current/lib/patng/org.osgi.core-1.0.0.jar:/edge/node3/current/lib/patng/pat-dt-common-1.18.jar:/edge/node3/current/lib/patng/pat-sdt-1.18.jar:/edge/node3/current/lib/patng/patNg-api-1.27.1.jar:/edge/node3/current/lib/patng/patNg-server-aoc-1.21.jar:/edge/node3/current/lib/patng/patNg-server-common-1.21.jar:/edge/node3/current/lib/patng/patNg-server-session-manager-1.21.jar:/edge/node3/current/lib/patng/patNg-utils-1.27.1.jar:/edge/node3/current/lib/patng/qpid-broker-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-client-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-common-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-mina-core-2.2.2.0.jar:/edge/node3/current/lib/patng/rsee-2.11.jar:/edge/node3/current/lib/patng/servlet-api-2.3.jar:/edge/node3/current/lib/patng/silk-1.3.jar:/edge/node3/current/lib/patng/slf4j-api-1.4.0.jar:/edge/node3/current/lib/patng/slf4j-log4j12-1.4.0.jar:/edge/node3/current/lib/patng/validation-1.2.0.jar
    Boot class path: /apps/jdk/1.6.0_13/linux/jre/lib/resources.jar:/apps/jdk/1.6.0_13/linux/jre/lib/rt.jar:/apps/jdk/1.6.0_13/linux/jre/lib/sunrsasign.jar:/apps/jdk/1.6.0_13/linux/jre/lib/jsse.jar:/apps/jdk/1.6.0_13/linux/jre/lib/jce.jar:/apps/jdk/1.6.0_13/linux/jre/lib/charsets.jar:/apps/jdk/1.6.0_13/linux/jre/classes:/tmp/yjp200811122006.jar
    Library path: /apps/jdk/1.6.0_13/linux/jre/lib/i386/server:/apps/jdk/1.6.0_13/linux/jre/lib/i386:/apps/jdk/1.6.0_13/linux/jre/../lib/i386::/edge/node3/current/lib:/home/eqdev/eqedgeuat/yourkit_7_5_11/yjp-7.5.11/bin/linux-x86-32:/edge/node3/current/lib:/home/eqdev/eqedgeuat/yourkit_7_5_11/yjp-7.5.11/bin/linux-x86-32:/usr/java/packages/lib/i386:/lib:/usr/lib

  • UnmarshalException while using prop  java.rmi.server.ignoreStubClasses=true

    I have created a test program to check the behaviour of setting the java.rmi.server.ignoreStubClasses property to true on the server side and not setting this flag on the client side.
    This requirement is due to updation of an already running system, with stubs to a new version without stubs, without shutting down the system.
    The files used by me are given below.
    File Hello.java
    package example.hello;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface Hello extends Remote {
    String sayHello() throws RemoteException;
    File Server.java
    package example.hello;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    import java.rmi.server.UnicastRemoteObject;
    public class Server implements Hello {
    public Server() {}
    public String sayHello() {
    return "Hello, world!";
    public static void main(String args[]) {
    try {
    LocateRegistry.createRegistry(1099);
    Server obj = new Server();
    Hello stub = (Hello) UnicastRemoteObject.exportObject(obj, 0);
    // Bind the remote object's stub in the registry
    Registry registry = LocateRegistry.getRegistry();
    registry.bind("Hello", stub);
    System.err.println("Server ready");
    catch (Exception e)
    System.err.println("Server exception: " + e.toString());
    e.printStackTrace();
    File Client.java
    package example.hello;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    public class Client {
    private Client() {}
    public static void main(String[] args) {
    String host = (args.length < 1) ? null : args[0];
    try {
    Registry registry = LocateRegistry.getRegistry(host);
    Hello stub = (Hello) registry.lookup("Hello");
    String response = stub.sayHello();
    System.out.println("response: " + response);
    } catch (Exception e) {
    System.err.println("Client exception: " + e.toString());
    e.printStackTrace();
    First I run file Server.java using the following script (server.bat)
    java -Djava.rmi.server.ignoreStubClasses=true -classpath .; example.hello.Server
    pause
    Then the client is run using the following script (client.bat)
    java -classpath .; example.hello.Client 132.186.96.210
    pause
    While running the client, the following exception is obtained.
    Client exception: java.rmi.ServerException: RemoteException occurred in server thread; nested except
    java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
    java.rmi.UnmarshalException: skeleton class not found but required for client version
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
    java.rmi.UnmarshalException: skeleton class not found but required for client version
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    at java.lang.Thread.run(Thread.java:595)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at example.hello.Client.main(Client.java:52)
    Caused by: java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
    java.rmi.UnmarshalException: skeleton class not found but required for client version
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.rmi.UnmarshalException: skeleton class not found but required for client version
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:243)
    ... 6 more
    I am not able to figure out why this thing is happening, If i also set the property java.rmi.server.ignoreStubClasses=true on the client side everything goes fine. But this I can't do. I can't set the property on the client side as the system is up and already running.
    I am using JDK version 1.5.0_06. Same exception comes under JDK 6.0
    Any help will be highly appreciated.

    I think this is a bug. When you exported the Registry from your server JVM it was also exported with java.rmi.server.ignoreStubClasses=true, but the Registry bootstrap at the client requires the 1.1 stub protocol for compatiblity reasons so you got this error. I would report this on the Bug Parade.
    You could get around it by setting java.rmi.server.ignoreStubClasses after exporting the Registry.
    BTW java.rmi.server.ignoreStubClasses isn't supposed to do anything at the client whether true or false so you can cut your testing space in half.

  • RemoteException: java.rmi.UnmarshalException in jdk 1.4.2

    i'm implementing an RMI over the jdk 1.4.2 (can't do it in the 1.5 or 1.6) i've seen this topic [http://forum.java.sun.com/thread.jspa?threadID=370196&messageID=1808449] but it didn't help me, or i'm doing something wrong...
    i know the RMI code is ok because it runs on java 1.6 (with the automatic generation of stubs and skeletons) but when i change the platform to 1.4 it throws the exception:
    RemoteException: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: servidor.MensageiroImpl_Stub
    the VM is configured to use the -Djava.security.policy=C:\Projecto\Policy\permissions.policy both in the client and server
    please help me :S i've been burning my head with this for 3 days
    i leave my code here:
    The interface:
    package rmiinterface;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface Mensageiro extends Remote {
        public void sendMsg(String msg) throws RemoteException;
        public String readMsg() throws RemoteException;
    }the implementation:
    package servidor;
    import rmiinterface.Mensageiro;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    public class MensageiroImpl extends UnicastRemoteObject implements Mensageiro {
        public MensageiroImpl() throws RemoteException {
            super();
        public void sendMsg(String msg) throws RemoteException {
            System.out.println(msg);
        public String readMsg() throws RemoteException {
            return "This is not a Hello World! message";
    }the server:
    package servidor;
    import rmiinterface.Mensageiro;
    import java.rmi.Naming;
    import java.rmi.RMISecurityManager;
    public class MensageiroServer {
        public MensageiroServer() {
            System.setSecurityManager(new RMISecurityManager());
            try {
                Mensageiro m = new MensageiroImpl();
                java.rmi.registry.LocateRegistry.createRegistry(1099);
                System.out.println("RMI registry successfully initiated");
                Naming.rebind("MensageiroService", m);
                System.out.println("Servidor Online");
            } catch (Exception e) {
                System.out.println("Trouble: " + e.getMessage());
        public static void main(String[] args) {
            new MensageiroServer();
    }and the client:
    package cliente;
    import rmiinterface.Mensageiro;
    import java.rmi.RMISecurityManager;
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import java.rmi.NotBoundException;
    import java.net.MalformedURLException;
    public class MensageiroClient {
        public MensageiroClient() {
        public static void main(String args[]) {
            System.setSecurityManager(new RMISecurityManager());
            try {
                Mensageiro m = (Mensageiro) Naming.lookup("//localhost/MensageiroService");
                System.out.println(m.readMsg());
                m.sendMsg("Hello World!");
            } catch (MalformedURLException e) {
                System.out.println();
                System.out.println("MalformedURLException: " + e.toString());
            } catch (RemoteException e) {
                System.out.println();
                System.out.println("RemoteException: " + e.toString());
            } catch (NotBoundException e) {
                System.out.println();
                System.out.println("NotBoundException: " + e.toString());
            } catch (Exception e) {
                System.out.println();
                System.out.println("Exception: " + e.toString());
    }NOTE: my IDE is Netbeans 6.1. and the client and server are in diffrent projects
    thanks in advance
    Best Regards,
    Carlos Daniel Ribeiro

    the stub and the skeleton are being generated, and they are there, in the server project! i don't know why the class defs for the stub filearen't downloded by the client project...I don't know why you think they will be downloaded. They won't be, unless you're using the codebase feature. The client needs the remote interface and the stub on its classpath, and all classes that the remote interface depends on, and so on recursively until closure. You have to do something about that.
    It works under 1.6 because it doesn't need the stub at all.

  • Please help, I am having java.rmi.UnmarshalException.

    First I would like to show you the interface code i want to implement, following is the code.
    package bis.opencontrol.opcconnector;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import javax.swing.tree.*;
    public interface ReceiveNodeInterface extends Remote
    DefaultMutableTreeNode getRootNode(String x) throws RemoteException;
    The server class which implements this interface is as follows...
    package bis.opencontrol.opcconnector;
    public class RMIServiceToSendNodesHierarchy extends java.rmi.server.UnicastRemoteObject implements ReceiveNodeInterface
    public DefaultMutableTreeNode getRootNode(String x) throws RemoteException
    System.out.println(x);
    return(TimerToGetNodesHierarchy.getRootNode());
    public RMIServiceToSendNodesHierarchy() throws RemoteException
    try
    thisAddress= (InetAddress.getLocalHost()).toString();
    catch(Exception e)
    throw new RemoteException("can't get inet address.");
    thisPort = 1099;
    System.out.println("Starting RMI service at address = "+thisAddress+" and PortNo = "+thisPort);
    System.getProperties().setProperty("java.security.policy", "wideopen.policy");
    if(System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    try
    registry = LocateRegistry.createRegistry(thisPort);
    registry.rebind("RMIServiceToSendNodesHierarchy", this);
    The client class which will send request to server is as follows...
    package tagbrowser;
    public class TagBrowser extends javax.swing.JFrame
    ReceiveNodeInterface rmiServer;
    public TagBrowser() throws MalformedURLException
    getRootNodeIntoTree();
    void getRootNodeIntoTree() throws MalformedURLException
    String text = "Please, send us the root node.";
    try
    registry = LocateRegistry.getRegistry(serverAddress, 1099);
    String[] list = registry.list();
                   if( list == null )
                        throw new RemoteException( "list == null" );
    else
    for (int k=0; k < list.length; k++)
    System.out.println("registry" + k + ": " + list[k].toString());
    System.getProperties().setProperty("java.security.policy", "wideopen.policy");
    if(System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    rmiServer = (ReceiveNodeInterface)(registry.lookup("RMIServiceToSendNodesHierarchy"));
    rootNode = rmiServer.getRootNode(text);
    catch(RemoteException e){
    e.printStackTrace();
    catch(NotBoundException e){
    e.printStackTrace();
    Well, when I run this rmi client application I get this following error...
    registry0: RMIServiceToSendNodesHierarchy
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: bis.opencontrol.opcconnector.ReceiveNodeInterface
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at tagbrowser.TagBrowser.getRootNodeIntoTree(TagBrowser.java:126)
    at tagbrowser.TagBrowser.<init>(TagBrowser.java:39)
    at tagbrowser.Main.main(Main.java:19)
    Caused by: java.lang.ClassNotFoundException: bis.opencontrol.opcconnector.ReceiveNodeInterface
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    ... 4 more
    BUILD SUCCESSFUL (total time: 1 second)

    System.out.println("Starting RMI service at address = "+thisAddress+" and PortNo = "+thisPort);That's not true unless you call super(1099) inside this constructor. So at this point you are printing misleading information.
    System.getProperties().setProperty("java.security.policy", "wideopen.policy");
    if(System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    }You normally don't need a security manager in an RMI server. You can delete all this.
    package tagbrowser;I would expect to see either import bis.opencontrol.opcconnector.* or import bis.opencontrol.opcconnector.ReceiveNodeInterface here. So there is clearly something wrong with your project structure. I suspect you have copied ReceiveNodeInterface from the server package to the client. That isn't valid. The remote interface is the same at both client and server.
    I am having java.rmi.UnmarshalExceptionWell, actually you are having java.lang.ClassNotFoundException: bis.opencontrol.opcconnector.ReceiveNodeInterface
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    due to the error described above. This also implies that bis.opencontrol.opcconnector.ReceiveNodeInterface needs to be available to the client via its classpath, i.e. usually via the same JAR that the client classes are in.

  • Java.rmi.UnmarshalException after some time without a process restart.

    Hello,
    I am having a problem when I use RMI connection. I run a process which creates its own RMI registry and binds to it in the following way:
        private void registerRmi() throws Exception {
            // Register an instance of RunServices with the
            // RMI Naming service
            // Install a security manager that can handle remote stubs
            System.setSecurityManager(new RMISecurityManager());
            String serviceName = IScannerRmiCommands.RMI_NAME;
            log.infoF("General.Info.RegisteringRMIService", serviceName);
            try {
                if (s_registry == null) {
                    s_registry = LocateRegistry.createRegistry(IScannerRmiCommands.RMI_PORT);
                s_registry.rebind(serviceName, this);
                s_registredRmi = true;
                log.infoF("General.Info.RMIServiceRegistered");
            } catch (RemoteException e) {
                log.fatalF(e, "General.Fatal.RMIServiceRegistrationFailed");
        }The client applications are able to connect to this process, but after some time clients start to receive the following exceptions:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.EOFException
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at com.x1.util.RMIHelper.doLookup(RMIHelper.java:23)
         at com.x1.util.RMIHelper.lookup(RMIHelper.java:83)
         at com.x1.setup.admin.Administration.lookupRemoteScanner(Administration.java:123)
         at com.x1.infrastructure.statistics.StatisticResponseHandler.createMPResponse(StatisticsProvider.java:1337)
         at com.x1.infrastructure.statistics.StatisticResponseHandler.run(StatisticsProvider.java:157)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         ... 8 moreI can't reproduce this on my dev environment but a customer experiences this quite often. They don't have any firewall running or antivirus software on these machines.
    Any help will be highly appreciated.
    Thanks in advance.
    Edited by: rossenv on Oct 2, 2009 2:18 PM

    No, I don't see any errors at server's site and this is the most strange thing. It seems that server operates normally except it stopped execute RMI commands until it is restarted. After that it responds properly and after some time stops again with the same client exception.

  • Java.rmi.UnmarshalException:error

    hi,
    A rmi program does not work on my pc but it worked on others pc there are three programs ie RMIServer.java which is the server application ,RMIClient.java which is the client application and RMIInterface.java which has two methods which are remote all these programs gets compiled but while running it from the dos prompt it gives these errors:
    RemoteException occured in serverthread;nested exception is:java.rmi.UnmarshalException:error unmarshalling arguments;nested exception is:java.lang.ClassNotFoundException:RMIServer_stub
    what is the problem how does it work on others pc and not on mine how should i handle these exception what are the reasons for its occurrance please help

    It might help to start the rmiregistry from the directory where your class files are stored.
    In this case the rmiregistry adds its working directory to its codebase.
    Just keep in mind that the rmiregistry works in a similar fashion to the javac compiler & needs to be able to find the _Stub & _Skel class files.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • FR error java.rmi.UnmarshalException using grid

    Hello,
    I started using Hyperion Financial Reporting on remote machine and now i installed it on my machine.
    Everything was ok during the installation process. Then i tryed to create a new report with a new grid. When i click on button, FR gives me the following error:
    ; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      java.io.InvalidClassException: com.hyperion.reporting.graphics.GridObject; local class incompatible: stream classdesc serialVersionUID = -1288366423950156093, local class serialVersionUID = -5245705824007679661
    Can someone explains to me what can i do you to resolve this error?
    During my experiences, it gives me this error only when a report have a grid or when i try to create one.

    I have seen this before where there was a mismatch of versions of FR between server and client, what version/patch are you running?
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • Save dynamic PDF as flattened or read only

    I finished filling a form, which is a dynamic PDF. Now that I'm done filling it out, I want to save it as a regular PDF, where the fields cannot be edited, and anyone can open it without needing a special version of adobe (basically just a regular PD

  • InDesign CS6 exporting to Adobe PDF (Interactive)

    Created an interactive form in InDesign CS6, but when I export to a PDF file, using Adobe PDF (Interactive), the purple bar "Please fill out the following form-" is not visible in my PDF file. PLEASE NOTE: My Adobe Acrobat Pro preferences do not have

  • Battery not detected after windows install. Batteries tab missing in device manager too

    My eM250 still charges fine but I have no way to see how much juice I have left. no after market meters or anything like that has helped. How can I fix such an odd problem?

  • CRM opportunity status value in BW

    I am extracting CRM Opportunities using standard extractor - 0CRM_OPPT_H. Opportunity status gets pulled in to BW in the same extractor. There are two values to it - User status and Internal Status. At CRM side we have configured it to User status va

  • Trying to find a shortcut to OCP

    Could anybody tell me how? Thx and best regards. PS: I have 4 years experience in Oracle Dev & Admin (Dev Server), but never admin any production DB.