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

Similar Messages

  • 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 ?

  • Unmarshalling return; nested exception is: java.lang.ClassNotFoundException

    I think what I'm trying to achieve is probably very simple (or at least should be) but I've been trying for at least 5 hrs now:
    I'm using RMI for a distributed app I'm building for my degree.
    Up until today I got around the need for using a SecurityManager by including all shared classes (those I pass between client and server) in a class library .jar file referenced by both client and server projects.
    This has worked fine, but now I've coded a method that returns an object of a class that I do NOT want to include in the shared library (because I don't want the client to be able to construct these objects); therefore, I've decided to try and get the dynamic class loading working.
    I'm using netbeans and testing on a single computer.
    Here's what I'm trying:
    My main() method has the standard code I've seen: if (System.getSecurityManager() == null) System.setSecurityManager(new RMISecurityManager());
    In the server project's Run properties, I'm specifying VM Options: -Djava.security.policy=c:\security.policy -Djava.rmi.server.codebase="file://C:/"
    I've copied the ellusive class's .java file into C:\ to keep the URL simple, but I've also tried directing it to the netbean project's bin\ folder using '%20' for spaces, both with the same results - about a five second pause (so it's finding something I think) and then the error message from the client's output:
    error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: mypackage.myClass
    My policy file's contents are:
    grant {
    permission java.security.AllPermission;
    I've tried about 20 different ways of formatting the codebase argument's URL.. can anyone help?
    David
    p.s. my OS is Windows 7

    Thanks EJP,
    Yes, after posting I guessed it might want the .class file instead, so I directed it their instead - still no joy, unfortunately!
    I'm carrying out all testing on one computer, so (+if+ I could get it to work) a local codebase address would not be a problem.
    Noted about the server-side security manager. I might want to use callbacks, but the server still won't need to download class files from the client, so I'll still try and set the codebase, but will try without loading a security manager on the server-side.
    For the time being I've put the class in the shared library but have defined it within the same package as the server code. By doing this I've been able to set the class's accessibility back to default, but the client can still access it as Object (from the shared library).
    This solution is good enough, but I still wonder why the client refuses to accept the class file from the C:\ codebase.

  • 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...

  • "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

  • 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.

  • 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.

  • "error unmarshalling return" when opening report

    Hello,
    I am a new user of Hyperion Financial Reporting Studio. If I sign onto our development server, every report I attempt to open gives me the following error message:
    HARSnapin Initialize() Error -2147467259 - error unmarshalling return; nested exception is:
         java.io.EOFException
    If I sign onto our production server, everything is good.
    Can someone tell me what this error means, and how it can be fixed?
    Thank you,

    I posted this problem on Metalink, and got the following response.
    When this error appears for connections against one FR server but not for another, the most likely cause is a file version mismatch. On your FR Studio machine and on both machines running the FR server (the development and the production machines), open Windows Explorer and navigate to Hyperion\BIPlus\lib. Locate the files called foundation.jar and HReports.jar. The Size and the Date Modified timestamp for foundation.jar should be identical on all three machines. Same case for HReports.jar. If there are differences on the development machine, stop the FR services there, replace the existing copies of those two files with copies from the production server, then start the services and test again.

  • Java.rmi.UnmarshalException: Error unmarshaling return header

    Hi,
    We are running an RMI server instance to serve data ( from memory) to clients. It works fine if fewer number of inquiries goes in. But when the number of inquiries are larger, I am getting some exceptions at the client side. The server crashes without throwing any exceptions. Following are the exceptions received at client side:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.net.SocketException: Connection reset
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
         at com.emf1.dataserver.KeyFrequencyKeeper_Stub.getDUNSCounts(Unknown Source)
         at com..match.KeyFrequencyKeeperProxy.getKeyKQSs(KeyFrequencyKeeperProxy.java:307)
         at com.emf1.match.KeyGenerator.generateKeys(KeyGenerator.java:453)
         at com.emf1.match.InquiryProcessor.run(InquiryProcessor.java:870)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(SocketInputStream.java:168)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
         at java.io.DataInputStream.readByte(DataInputStream.java:331)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
         ... 6 more
    The period of time, the server keeps on running (before it crashes) is also not the same. Sometimes it works fine without any problem. But most of the time the server crashes after processing some records.
    I don't know why this is happening.
    Please help...
    Thanks in advance..

    I have this error too when I running my rmi server site program.
    I am running it in Linux Environment.
    Anyone got any idea about this?

  • Getting unmarshaling return; nested exception when running application.

    I am getting the following error after login to my EJB based web application which has been deployed in weblogic 8.1 server.
    cannot unmarshaling return; nested exception is:
         java.io.InvalidClassException: local class incompatible: stream classdesc serialVersionUID = 1576396055896079162, local class serialVersionUID = 3218807580895902362
    Can anyone please help me to findout the solution for this problem.

    Usually, when you get NoSuchMethod exceptions, there are two possible causes:
    1. You are using reflection to try to find a method that doesn't exist -- perhaps there's a typo, or you don't have the correct version of the class
    2. You compiled your class against a different version of the dependency class than your virtual machine has loaded, and the method doesn't exist in the loaded version.
    Chances are, you haven't told the servlet engine you are using about the newer version of some library or other that you are using, so it's still loading up an older one.
    - Adam

  • Please, help in RMI UnmarshalException: nested exception is: EOFException

    Good day,
    I have a problem in sample program, similar like an Oracle oriinal in "Getting Started Usin Java RMI", identically on server and client sides. It correctly works in NetBeans IDE, but never alone, as JAR archive or java class, if I used java -jar or java -classpath command-line form. Fragment of the server code includes final check on correct read from remote object, it corrrectly works within NetBeans but cause UnmarshalException in same server side in independent launch form (WeatherBean - sample object, contains points to information about city name, weather description, temperathure an small "weather" icon, WeatherService - interface with one getWeatherInformation() function):
                   String serverObjectName = "WeatherService";
                   final int remotePort = 1099;
                   final String remoteHost = "localhost";
                   Registry registry = LocateRegistry.getRegistry(remoteHost);
                   WeatherService remoteObject = (WeatherService)
                           UnicastRemoteObject.exportObject(service, 0);
                   registry.rebind(serverObjectName, remoteObject);
                   //control export output
                   java.util.List<WeatherBean> list =
                           service.getWeatherInformation();
                   for (int i = 0; i < list.size(); i++) {
                       WeatherBean wb = list.get(i);
                       service.addTextWeatherString(wb.getCityName() + " " +
                               wb.getDescription() + " " + wb.getTemperature());
                   //back read exported object (cause error)
                   String[] regArr = registry.list();
                   java.util.List<String> regList = Arrays.asList(regArr);
                   if (regList.contains(serverObjectName)) {
                        Remote remote = registry.lookup(serverObjectName);
                        if (Proxy.isProxyClass(remote.getClass())) {
                            Proxy proxy = (Proxy) remote;
                            InvocationHandler invocationHandler =
                                    Proxy.getInvocationHandler(proxy);
                            WeatherService weatherService = (WeatherService)
                                    Proxy.newProxyInstance(
                                    WeatherService.class.getClassLoader(),
                                    new Class[] { WeatherService.class },
                                                  invocationHandler);
                            list = weatherService.getWeatherInformation();
                            for (int i = 0; i < list.size(); i++) {
                            WeatherBean wb = list.get(i);
                            service.addTextWeatherString(wb.getCityName() + " " +
                                    wb.getDescription() + " " + wb.getTemperature());
                   }Starts with form java -jar WeatherServiceProj.jar (my project name) cause this error:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.EOFException
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
         at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
         at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
         at $Proxy0.getWeatherInformation(Unknown Source)
         at deitel.rmi.weather.server.WeatherServiceImpl.main(WeatherServiceImpl.java:381)
    Caused by: java.io.EOFException
         at java.io.DataInputStream.readInt(DataInputStream.java:375)
         at java.io.ObjectInputStream$BlockDataInputStream.readInt(ObjectInputStream.java:2775)
         at java.io.ObjectInputStream.readInt(ObjectInputStream.java:949)
         at javax.swing.ImageIcon.readObject(ImageIcon.java:441)
         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:597)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
         at java.util.ArrayList.readObject(ArrayList.java:593)
         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:597)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
         ... 4 moreI try to use many forms of java -Dxxxx keys, such as -Djava.rmi.server.codebase or -Djava.rmi.security.policy, but it does not help. Maybe i don't know something else? Key or sustem property, e. g.?
    Great thanks for some little help,
    Jaroslav
    Edited by: EJP on 5/10/2011 20:21: added {noformat}{noformat} tags: please use them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Sweta,
    Is this a java mapping or Graphical, If Java, you should not run into this issue as you dont load the nested XSD`s.
    Also the error message indicates outofMemory in mercator side when posting your Large message.
    java.lang.OutOfMemoryError at com.philips.xi.mercator.MercatorCall.execute(MercatorCall.java:90) at
    Regards
    Ravi Raman
    Edited by: Ravi Raman on Jun 30, 2010 4:26 PM

  • Nested exception, unmarshalling arguments, ClassNotFountException:AImp_stub

    java.rmi.ServerException: Server RemoteException; nested exception:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException:AddServerImpl_Stub
    Kindly look at my face......full of burden kindly eradicate the erorrs
    looking for ur help

    hi sam,
    all the files including stub, skeleton and others are in the same directory(in jdk1.1.8/bin). and i've given set classpath=c:\jdk1.1.8\bin\
    once after giving the codebase....it's not telling the errors. it just displays the option what r all v can do with java -options.
    i've given the codebase as follows:
    java -Djava.rmi.server.codebase=file///c:/jdk1.1.8/bin/AddServer.class
    i've trying to run the server for past 4 days....but i don't get the correct response

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error unmarshalling arguments

    I have written an RMI application I have completed all the steps but I am stuck when I start the server. By issuing the following command on the prompt:
    C:> java �Djava.security.policy=java.policy FileServer
    I get the following error message:
    File Server: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: FileImplement_Stub
    I tried my best to solve it but failed� Sir, how can I solve this problem?

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=ClassNotFoundException&qp_name=null&subCat=siteforumid%3Ajava58&site=dev&dftab=siteforumid%3Ajava58&chooseCat=javaall&col=developer-forums

  • Java.rmi.MarshalException: error marshalling return;

    Hi All,
    I'm getting the above error whilst performing a query. My set up is,
    Kodo 3.1.5
    Weblogic 8.1
    I have created some classes using the reverse mapping from Sybase,
    enhanced them and uploaded them to my server. I have then attempted to
    retrieve the data via an EJB. However I get NotSerializableExceptions
    whilst doing so.
    I am attempting to return a Collection of enhanced objects, but even a
    single enhanced object throws that error
    I think it may be something to do with my package.jdo or something else.
    Can anyone help?
    My package.jdo looks like this,
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="com.lehman.clientseg.data">
    <class name="AuditRecord" objectid-class="AuditRecordId"/>
    <class name="Btb" objectid-class="BtbId"/>
    <class name="CashActivity" objectid-class="CashActivityId"/>
    <class name="CashBulk" objectid-class="CashBulkId"/>
    <class name="CcyTypeIndicator" objectid-class="CcyTypeIndicatorId">
    <field name="descn">
    <extension vendor-name="kodo" key="jdbc-size" value="-1"/>
    </field>
    </class>
    <class name="Counterparty" objectid-class="CounterpartyId"/>
    <class name="Currency" objectid-class="CurrencyId"/>
    <class name="DealType" objectid-class="DealTypeId"/>
    <class name="DeliveryInstruction"
    objectid-class="DeliveryInstructionId"/>
    <class name="Entity" objectid-class="EntityId"/>
    <class name="MonitoredEvent" objectid-class="MonitoredEventId"/>
    <class name="PaymentType" objectid-class="PaymentTypeId"/>
    <class name="Sequence" objectid-class="SequenceId"/>
    <class name="SettlementMode" objectid-class="SettlementModeId"/>
    </package>
    </jdo>
    and here is the stack trace,
    java.rmi.MarshalException: error marshalling return; nested exception is:
    java.io.NotSerializableException: com.lehman.clientseg.data.Entity
    at
    weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
    at
    com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_812_WLStub.getAllEntities(Unknown
    Source)
    at com.lehman.clientseg.BeanTest.<init>(BeanTest.java:49)
    at com.lehman.clientseg.BeanTest.main(BeanTest.java:62)
    Caused by: java.io.NotSerializableException:
    com.lehman.clientseg.data.Entity
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at java.util.LinkedList.writeObject(LinkedList.java:681)
    at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:795)
    at
    java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294)
    at
    java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at
    weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:116)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:93)
    at
    com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    Abe White wrote:
    Looks like you're trying to serialize a class that's not serializable,
    probably by returning it (or a class that has a relation to it) from an EJB.Very strange. My classes where autogenerated using the reverse mapping
    tool and weren't serializable. I'm sure I once did make them serializable
    and I got more error messages. I just tried again and everything was fine.
    Hmmm... Must be going mad.
    Cheers,
    Stevie :)

Maybe you are looking for

  • Oracle database 10 2..0.3 issue

    Hi I am getting some warning in alert.log file WARNING:Oracle instance running on a system with low open file descriptor limit. Tune your system to increase this limit to avoid severe performance degradation please what causes for this above warning

  • Unable to install itunes 11.1 Windows Vista

    Downloads then when tries to install.....ERROR. I have tried downloading directly from web but it has been sitting gathering required information performing installation tasks window for over an hour. I have disabled Norton....rebooted....nothing all

  • Materials with stock in a month

    Hi Experts, I have to create a report plant wise and month wise for the no. of materials with stock without physical inventory, materials with phy. inventory.for each month in the selection screen. Main problem i am facing is, user want to freeze the

  • How to find communication channels in the database

    Hello, how can I find communication channels in the database? Exists here a webservice or a template to read them out automatically? Has anyone here an idea or experience with it? Thanks in advance, kind regards, Peter Mueller

  • "Settings unavailable" in iOS app. And cannot uncheck "Disable all notifications" on web.

    I guess this problem started a few months back, when there was two "disable all notifications" checkbox in the settings. I happened to check both of them, and later, Spotify found out that they have put 2 boxes of the same function and removed one of