Serialization exception in RMI

I have a GameServerImp remote class:
HashMap clients;
HashMap versus;
public GameServerImp() throws RemoteException
clients =new HashMap();
versus =new HashMap();
public void register(String name,GameClientInt c) throws RemoteException
clients.put(name,c);
these are its functions.
I have a client :
public class BI implements GameClientInt{
public BI()
I have following code invoking the register method.
1 mainServer = (GameServerInt)Naming.lookup("rmi://localhost:1099/gameservice");
2 mainServer.register(name,new BI());
when 2 line executes it gives exception:
java.rmi.MarshalException: error marshalling arguments; nested exception is:
java.io.NotSerializableException: BI
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
at $Proxy0.register(Unknown Source)
There is nothing related to io :(. I cant figure out why it is happening.

Hi,
Please user for posting sample code
Does this interface  GameClientInt extends Serializable? if not can you do that and try again
Regards,
Alan Mehio
London,UK                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Java.lang.Exception,java.rmi.RemoteException

    Hi ,
    Whem I'm deploying my appliucation on WLS 10.3 I'm getting the following exception.
    ####<Nov 13, 2008 1:32:21 PM IST> <Warning> <EJB> <swetha> <AdminServer> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1226563341175> <BEA-012035> <The Remote interface method: 'public abstract java.util.Collection com.bt.resmgt.aam.model.absence.book.AttendanceManager.findAbsences(com.bt.fieldpeople.security.models.Subject,com.bt.resmgt.aam.model.employee.Employee,java.util.List,java.lang.String,java.lang.String,java.util.List,java.util.Date,java.util.Date,java.util.Date,boolean,boolean,boolean,boolean,boolean,boolean,boolean,java.lang.String[]) throws java.lang.Exception,java.rmi.RemoteException' in EJB 'AttendanceManager' contains a parameter of type: 'java.util.List' which is not Serializable. Though the EJB 'AttendanceManager' has call-by-reference set to false, this parameter is not Serializable and hence will be passed by reference. A parameter can be passed using call-by-value only if the parameter type is Serializable.>
    could anybody please help me out?
    any type of jelp will be greatly appreciated.
    Thanks,
    Neeraj

    Your problem is here:
    «'java.util.List' which is not Serializable»
    You're trying to deploy a remote bean. Local beans can work with a parameter that isn't serializable, because their access is made by reference (pointers). But for remote beans, the whole object must be serialized and send over the network to be received by the client. Thus, the java.util.List can't be serialised, so WL complains.
    You must choose a container that can be serialized like java.util.ArrayList, a LinkedList or a vector in case of lists, or use local beans. Anyway, I think serialised objects should always be used with bean functions parameters.

  • Raising new Exception within RMI server

    hi all,
    i implemented an RMI server which, in one of his method, throws my custom exception.
    Since my RMI server is loading classes dynamically, i grabbed all those exceptions that comes when a class cannot be loaded in an MyClassNotLoadedException
    in my code i write the following lined
    try {
    MyClass example = (MyClass)class.forName("MyClass").newInstance();
    } catch(Exception e) {
    throws new MyClassNotLoadedException(e);
    when i am running my test client, i always got the following exception:
    java.rmi.activation.ActivateFailedException: failed to activate object; nested e
    xception is:
    java.rmi.activation.ActivationException: group creation failed after 2 t
    ries; nested exception is:
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception
    is:
    java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedExcep
    tion
    java.rmi.activation.ActivationException: group creation failed after 2 tries; ne
    sted exception is:
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception
    is:
    java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedExcep
    tion
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedExcep
    tion
    java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedException
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
    RemoteCall.java:245)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
    220)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
    at sun.rmi.server.Activation$ActivatorImpl_Stub.activate(Unknown Source)
    at java.rmi.activation.ActivationID.activate(ActivationID.java:89)
    at sun.rmi.server.ActivatableRef.activate(ActivatableRef.java:250)
    at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:110)
    at com.nokia.jiacc.IACCPlugInImpl_Stub.callMeRemotely(Unknown Source)
    at com.nokia.jiacc.examples.Client.main(Client.java:52)
    If instead, in the catch statement i don't raise any exception, everything works fine.
    can anyone help me?? is it so that every exception that i raise in my RMI server must
    extends RemoteException??
    hope that someone can help me
    thanx in advance and regards
    marco

    Don't need to extends RemoteException. But have you defined your
    Exception that is implements Serializable?
    public class YourException extends Exception
                                 implements Serializable
    {...}Regards,
    Geri

  • SevletContextImpl not serializable exception when one cluster is restarted.

    Hello,
              I am using WLS 5.1 SP8 with apache plug-in and in-memory session
              replication. There is one proxy server and two cluster: A and B. I started
              cluster A and B together and each cluster would "see" each other. I shut
              down cluster A and my session will continue working fine on cluster B.
              However, when I restart cluster A, I get the the following stack trace from
              cluster B:
              Mon Apr 02 12:04:56 PDT 2001:<I> <Cluster> Adding server
              6345049800752707933S172
              .17.17.77:[80,80,443,443,80,-1] to cluster view
              Mon Apr 02 12:04:57 PDT 2001:<E> <Kernel> ExecuteRequest failed.
              java.io.NotSerializableException:
              weblogic.servlet.internal.ServletContextImpl
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at
              java.io.ObjectStreamException.<init>(ObjectStreamException.java:29)
              at
              java.io.NotSerializableException.<init>(NotSerializableException.java
              :31)
              at java.io.ObjectOutputStream.outputObject(Compiled Code)
              at java.io.ObjectOutputStream.writeObject(Compiled Code)
              at java.io.ObjectOutputStream.outputClassFields(Compiled Code)
              at java.io.ObjectOutputStream.defaultWriteObject(Compiled Code)
              at java.io.ObjectOutputStream.outputObject(Compiled Code)
              at java.io.ObjectOutputStream.writeObject(Compiled Code)
              at java.util.Hashtable.writeObject(Compiled Code)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Compiled Code)
              at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
              at java.io.ObjectOutputStream.outputObject(Compiled Code)
              at java.io.ObjectOutputStream.writeObject(Compiled Code)
              at
              weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled Code)
              at
              weblogic.servlet.internal.session.ReplicatedSession.writeExternal(Replicated
              Session.java:74)
              at
              weblogic.common.internal.WLObjectOutputStreamBase.writePublicSerializable(Co
              mpiled Code)
              at
              weblogic.common.internal.WLObjectOutputStreamBase.writeObjectBody(Compiled
              Code)
              at
              weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled Code)
              at
              weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(Compi
              at
              weblogic.rmi.extensions.AbstractOutputStream2.writeObject(Compiled Code)
              at weblogic.rmi.extensions.AbstractOutputStream.writeObject(Compiled
              Code)
              at
              weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationMan
              ager_WLStub.java:86)
              at
              weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
              Code)
              at
              weblogic.cluster.replication.ReplicationManager.checkHosts(Compiled Code)
              at
              weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(Replic
              ationManager.java:582)
              at
              weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberSta
              sh.java:207)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              --------------- nested within: ------------------
              weblogic.rmi.MarshalException: error marshalling arguments
              - with nested exception:
              [java.io.NotSerializableException:
              weblogic.servlet.internal.ServletContextImpl]
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at weblogic.common.T3Exception.<init>(T3Exception.java:47)
              at weblogic.rmi.RemoteException.<init>(RemoteException.java:41)
              at weblogic.rmi.MarshalException.<init>(MarshalException.java:31)
              at
              weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationMan
              ager_WLStub.java:90)
              at
              weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
              Code)
              at
              weblogic.cluster.replication.ReplicationManager.checkHosts(Compiled Code)
              at
              weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(Replic
              ationManager.java:582)
              at
              weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberSta
              sh.java:207)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              --------------- nested within: ------------------
              weblogic.rmi.extensions.RemoteRuntimeException: Undeclared checked
              exception - w
              ith nested exception:
              [weblogic.rmi.MarshalException: error marshalling arguments
               - with nested exception:
              [java.io.NotSerializableException:
              weblogic.servlet.internal.ServletContextImpl]
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.lang.RuntimeException.<init>(RuntimeException.java:47)
              at
              weblogic.utils.NestedRuntimeException.<init>(NestedRuntimeException.java:23)
              at
              weblogic.rmi.extensions.RemoteRuntimeException.<init>(RemoteRuntimeException
              .java:22)
              at
              weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationMan
              ager_WLStub.java:108)
              at
              weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
              Code)
              at
              weblogic.cluster.replication.ReplicationManager.checkHosts(Compiled Code)
              at
              weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(Replic
              ationManager.java:582)
              at
              weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberSta
              sh.java:207)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              I looked everywhere in our code and we don't store ServletContext object
              anywhere in the session level..Can someone give me some hints as to what the
              problem is?
              Thanks for your help in advance.
              Vincent
              

    You probably have a non serializable object in your session.
              You can have only serializable data in the session.
              Cheers,
              -- Prasad
              Vincent Shek wrote:
              > Hello,
              >
              > I am using WLS 5.1 SP8 with apache plug-in and in-memory session
              > replication. There is one proxy server and two cluster: A and B. I started
              > cluster A and B together and each cluster would "see" each other. I shut
              > down cluster A and my session will continue working fine on cluster B.
              > However, when I restart cluster A, I get the the following stack trace from
              > cluster B:
              >
              > Mon Apr 02 12:04:56 PDT 2001:<I> <Cluster> Adding server
              > 6345049800752707933S172
              > .17.17.77:[80,80,443,443,80,-1] to cluster view
              > Mon Apr 02 12:04:57 PDT 2001:<E> <Kernel> ExecuteRequest failed.
              > java.io.NotSerializableException:
              > weblogic.servlet.internal.ServletContextImpl
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at
              > java.io.ObjectStreamException.<init>(ObjectStreamException.java:29)
              > at
              > java.io.NotSerializableException.<init>(NotSerializableException.java
              > :31)
              > at java.io.ObjectOutputStream.outputObject(Compiled Code)
              > at java.io.ObjectOutputStream.writeObject(Compiled Code)
              > at java.io.ObjectOutputStream.outputClassFields(Compiled Code)
              > at java.io.ObjectOutputStream.defaultWriteObject(Compiled Code)
              > at java.io.ObjectOutputStream.outputObject(Compiled Code)
              > at java.io.ObjectOutputStream.writeObject(Compiled Code)
              > at java.util.Hashtable.writeObject(Compiled Code)
              > at java.lang.reflect.Method.invoke(Native Method)
              > at java.lang.reflect.Method.invoke(Compiled Code)
              > at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
              > at java.io.ObjectOutputStream.outputObject(Compiled Code)
              > at java.io.ObjectOutputStream.writeObject(Compiled Code)
              > at
              > weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled Code)
              > at
              > weblogic.servlet.internal.session.ReplicatedSession.writeExternal(Replicated
              > Session.java:74)
              > at
              > weblogic.common.internal.WLObjectOutputStreamBase.writePublicSerializable(Co
              > mpiled Code)
              > at
              > weblogic.common.internal.WLObjectOutputStreamBase.writeObjectBody(Compiled
              > Code)
              > at
              > weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled Code)
              > at
              > weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(Compi
              > at
              > weblogic.rmi.extensions.AbstractOutputStream2.writeObject(Compiled Code)
              > at weblogic.rmi.extensions.AbstractOutputStream.writeObject(Compiled
              > Code)
              > at
              > weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationMan
              > ager_WLStub.java:86)
              > at
              > weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
              > Code)
              > at
              > weblogic.cluster.replication.ReplicationManager.checkHosts(Compiled Code)
              > at
              > weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(Replic
              > ationManager.java:582)
              > at
              > weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberSta
              > sh.java:207)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              >
              > --------------- nested within: ------------------
              > weblogic.rmi.MarshalException: error marshalling arguments
              > - with nested exception:
              > [java.io.NotSerializableException:
              > weblogic.servlet.internal.ServletContextImpl]
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at weblogic.common.T3Exception.<init>(T3Exception.java:47)
              > at weblogic.rmi.RemoteException.<init>(RemoteException.java:41)
              > at weblogic.rmi.MarshalException.<init>(MarshalException.java:31)
              > at
              > weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationMan
              > ager_WLStub.java:90)
              > at
              > weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
              > Code)
              > at
              > weblogic.cluster.replication.ReplicationManager.checkHosts(Compiled Code)
              > at
              > weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(Replic
              > ationManager.java:582)
              > at
              > weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberSta
              > sh.java:207)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              > --------------- nested within: ------------------
              > weblogic.rmi.extensions.RemoteRuntimeException: Undeclared checked
              > exception - w
              > ith nested exception:
              > [weblogic.rmi.MarshalException: error marshalling arguments
              >  - with nested exception:
              > [java.io.NotSerializableException:
              > weblogic.servlet.internal.ServletContextImpl]
              > ]
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.lang.RuntimeException.<init>(RuntimeException.java:47)
              > at
              > weblogic.utils.NestedRuntimeException.<init>(NestedRuntimeException.java:23)
              > at
              > weblogic.rmi.extensions.RemoteRuntimeException.<init>(RemoteRuntimeException
              > .java:22)
              > at
              > weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationMan
              > ager_WLStub.java:108)
              > at
              > weblogic.cluster.replication.ReplicationManager.createSecondary(Compiled
              > Code)
              > at
              > weblogic.cluster.replication.ReplicationManager.checkHosts(Compiled Code)
              > at
              > weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(Replic
              > ationManager.java:582)
              > at
              > weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberSta
              > sh.java:207)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              >
              > I looked everywhere in our code and we don't store ServletContext object
              > anywhere in the session level..Can someone give me some hints as to what the
              > problem is?
              >
              > Thanks for your help in advance.
              >
              > Vincent
              

  • Unreported exception java.rmi.RemoteException; must be caught or declared t

    I am receiving an:
    unreported exception java.rmi.RemoteException; must be caught or declared to be thrown
    error when I attempt to compile the Client.java file.
    The Client.java file implements the ATMListener.java interface.
    As you will see below, I've stripped them down by taking out all of the code, yet I still receive this error.
    Any ideas...
    ATMListener.java
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    * @author Eddie Brodie
    * @version %I%, %G%
    public interface ATMListener extends java.rmi.Remote
    Client.java
    import java.net.MalformedURLException;
    import java.rmi.Naming;
    import java.rmi.NotBoundException;
    import java.rmi.RemoteException;
    import java.rmi.UnknownHostException;
    public class Client extends java.rmi.server.UnicastRemoteObject implements ATMListener

    Well first off unless I am missing something in the API java.rmi.Remote is an interface not a class so implements not inherits, but I do not really know these classes so I cannot be sure I am not missing something.
    As for the unreported exception. What could be causing something like this would be an exception thrown by the constructor of the parent class. Even if you have no constructor written for your class it still has a default constructor which will by default call the super constrcutpor meaning an exception could be thrown from the super constrcutor down to your default constructor where you would not know what to do with it.

  • How RMI handle exception in RMI kernel ?

    hi everyone.
    How RMI handle exception in RMI kernel ?
    That is , when RMI catch an exception ,
    what RMI should do to handle the exception?
    best regards.

    it throws an exception (some derived class of RemoteException) which is transmitted to, rethrown at, and must be caught at, the client.

  • JDK6 And ClassNotFound Exception during RMI server start

    Hello,
    I have been write a simple Hello World RMI, but I'm unable to start the server always get this exeception:
    Server exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: rmi.Hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: rmi.Hello
         at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
         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:359)
         at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
         at rmi.HelloMain.main(HelloMain.java:21)
         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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)The sources are these:
    package rmi;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface Hello extends Remote {
        public void sayHello() throws RemoteException;
    package rmi;
    import java.rmi.RemoteException;
    public class HelloServer implements Hello{
        public HelloServer() {
            super();
        public void sayHello() throws RemoteException {
            System.out.println("Ciau!");
    package rmi;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    import java.rmi.server.UnicastRemoteObject;
    public class HelloMain {
        public static void main(String[] args) {
         try {
             Hello obj = new HelloServer();
             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();
    }May be I'm wrong with start command, but I tried differents syntax without result.
    Can you help me?
    Thanks to all.
    PS:Sorry for my spaghetti-english :D

    I had similar issue and i got rid of it by doing the following:
    i. Start rmiregistry from the server code (so that the JVM remains the same) like this
    // Server.java
    Process pro = Runtime.getRuntime().exec("rmiregistry 1099 &");
    // ... ii. Use java.rmi.server.codebase property while starting the server
    D:\rmiEx\bin>java -Djava.rmi.server.codebase=file:/D:\rmiEx\bin example.hello.Server

  • Serialization Exception for : CachedRowSet

    Hi ..
    I have populated my CachedRowSet with as follows
    // lRst is a SCROLLABLE ResultSet
    javax.sql.rowset.CachedRowSet lCachedRowSet = new com.sun.rowset.CachedRowSetImpl();
    lCachedRowSet.setPageSize(mPageSize);
    lCachedRowSet.populate(lRst,10);While i try to serialize CachedRowSet , I get a Serialization Exception.
    for 'weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_ScrollableResultSet'
    However if i try to populate the same as follows It works fine:
    javax.sql.rowset.CachedRowSet lCachedRowSet = new com.sun.rowset.CachedRowSetImpl();
    lCachedRowSet.setPageSize(mPageSize);
    lCachedRowSet.populate(lRst);I am using Oracle 8i and Weblogic 8.1.
    I have to take the first approach. Please let me know if there is any solution for the first approach.

    Hi ..
    I have populated my CachedRowSet with as follows
    // lRst is a SCROLLABLE ResultSet
    javax.sql.rowset.CachedRowSet lCachedRowSet = new com.sun.rowset.CachedRowSetImpl();
    lCachedRowSet.setPageSize(mPageSize);
    lCachedRowSet.populate(lRst,10);While i try to serialize CachedRowSet , I get a Serialization Exception.
    for 'weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_ScrollableResultSet'
    However if i try to populate the same as follows It works fine:
    javax.sql.rowset.CachedRowSet lCachedRowSet = new com.sun.rowset.CachedRowSetImpl();
    lCachedRowSet.setPageSize(mPageSize);
    lCachedRowSet.populate(lRst);I am using Oracle 8i and Weblogic 8.1.
    I have to take the first approach. Please let me know if there is any solution for the first approach.

  • Serialization Exception

    Hi All,
    I am developing webservice application using Dynamic Proxy client. I am using Weblogic8.1 as my application server. All my services are generated using servicegen and clientgen task of Ant.
    While using Dynamic Proxy client to invoke webservice, i am passing array of my POJO class. I am generating types using generateTypes option of the service task so that it generates serialized class automatically. But while passing this array object as an input parameter while invoking webservice, i am getting below error -
    [java] General exception thrown
    [java] java.lang.reflect.UndeclaredThrowableException
    [java] at $Proxy0.lookup(Unknown Source)
    [java] at cititru.scan.transScan.createGiService(transScan.java:47)
    [java] at cititru.scan.transScan.main(transScan.java:22)
    [java] Caused by: java.rmi.RemoteException: Failed to invoke; nested exception is:
    [java] javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException: failed to serialize class [Lcititru.api.interdict.gi.ScannedTextData;weblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class Lcititru.api.interdict.gi.ScannedTextData; class context=TypedClassContext{schemaType=['java:cititru.api.interdict.gi']:ArrayOfScannedTextData}
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    [java] at weblogic.webservice.core.rpc.StubImpl.throwRemoteException(StubImpl.java:266)
    [java] at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:251)
    [java] ... 3 more
    [java] Caused by: javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException: failed to serialize class [Lcititru.api.interdic
    t.gi.ScannedTextData;weblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class [Lcititru.api.interdict.gi.ScannedTextData; class context=TypedClassContext{schemaType=['java:cititru.api.interdict.gi']:ArrayOfScannedTextData}
    [java] at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:331)
    [java] at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:247)
    [java] ... 3 more
    In the above error message ScannedTextData is my POJO class which i am passing as an input parameter to webservice. Please suggest me what needs to be done to resolve the above issue.

    We'd need some more info to help you. Can you show us the code for your
    sfsb? Are you sure you aren't doing something in ejbActivate to replace
    the Serializable instance with a new class?
    -- Rob
    Kiran Raj wrote:
    Hi All,
    I have a problem while using a serialized class from within a stateful session
    bean.
    I am setting values to the serialized bean class by using one of the set methods
    but at the very next statement when i am printing the values that is set is giving
    null.
    class myClass implements serializable {
    private int counter=0;
    public void setValues(){
    counter++;
    System.out.println(counter);
    public int getValues(){
    System.out.println(counter);
    return counter;
    class caller{
    public void callingmethod(){
    myClass x=new myClass();
    x.setValues();
    x.getValues();
    when i call callingmethod, the output is
    1
    0
    it is getting incremented and then getting reset to 0
    I have 2 deployments, a development environment and a production environment.
    It works fine in the development environment but fails in the production environment.
    The xml files used are the same in both cases, so there is no configuration difference.
    I am using welogic 6.1 wih service pack 3 and jdk 1.3.1
    I suspect that this is related to serialization in weblogic but dont know exactly
    how weblogic implements serialization.
    if anybody has encountered this or knows the reasons it would be helpful to me.
    Thanks,
    Kiran.

  • Serialization Exception Again

    I was able to get my HTTPS web service to communicate with my clients, but now
    when I try to connect to the web service (type=document), I get this error:
    [java] 3) testQuoteStubs(com.arrow.arrowsoap.client.QuoteServiceClientTest)
    junit.framework.AssertionFailedError: failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException:
    type mapping lookup failure on class=class weblogic.apache.xerces.dom.DeferredDocumentImpl
    TypeMapping=TYPE
    MAPPING SIZE=3
    [java] ENTRY 1:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:ProcessResponse
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    b957ea
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    3aff84
    [java] ENTRY 2:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:Process
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    15d4de6
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    a53de4
    [java] ENTRY 3:
    [java] class: java.lang.Object
    [java] xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    827968
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    1f0b7d3
    [java] at com.arrow.arrowsoap.client.QuoteServiceClientTest.testQuoteSt
    ubs(QuoteServiceClientTest.java:98)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
    sorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
    hodAccessorImpl.java:25)
    Attached is the WSDL for the service.
    The type-mapping file looks like:
    <wsdd:type-mapping xmlns:wsdd="http://www.bea.com/servers/wls70"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:ProcessResponse"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:Process"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry class-name="java.lang.Object"
    type="xsd:anyType"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    </wsdd:type-mapping>
    Any ideas?? Am I missing something from my classpath?? I am running the tests
    using the WL 8.1 ANT installation and using this as my WL classpath (my own jars
    are added first in the path and are omitted here):
              <pathelement path="${weblogic.home}/lib/webserviceclient.jar"/>
              <pathelement path="${weblogic.home}/lib/weblogic_sp.jar"/>
              <pathelement path="${weblogic.home}/lib/weblogic.jar"/>
    Thanks
    -- jake
    [QuoteService.wsdl]

    Hi Karen,
    My suggestion is to separate the issues (serialization failures and
    SSL). Make sure your app works OK using http trasport. For SSL, RU
    using the WLSSLAdapter for the client as described in the docs [1]? One
    or 2way SSL? What version of WLS?
    Thanks,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/security.html#1053203
    Karen Yuan wrote:
    >
    Hi Bruce,
    I was also getting the SerializationException when I tried to connect from my
    weblogic web
    service client to my HTTPS webMethods web service (SOAP-RPC protocol). Then I
    included
    webserviceclient+ssl.jar client runtime JAR file on both of my client and server
    sides and re-ran
    my test. I still got the same error:
    Exception in thread "main" java.rmi.RemoteException: web service invoke failed:
    javax.xml.soap.SOAPException: failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException:
    type mapping lookup
    failure on class=class java.io.StringReader TypeMapping=TYPEMAPPING SIZE=2
    ENTRY 1:
    class: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletInput
    xsd_type: ['http://com/freddiemac/ImportLoan/FileUploadHttpsStreamClient/WS_1/i
    mportLoanSubmitStream']:lcl0:__callServletInput
    ser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletInputCodec@7eb366
    deser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletInputCodec@33f0de
    ENTRY 2:
    class: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletOutput
    xsd_type: ['http://com/freddiemac/ImportLoan/FileUploadHttpsStreamClient/WS_1/i
    mportLoanSubmitStream']:lcl0:__CallServletOutput
    ser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletOutputCodec@ab444
    deser: com.freddiemac.ImportLoan.FileUploadHttpsStreamClient.WS_1.importLoan
    SubmitStream.CallServletOutputCodec@c0f1ec; nested exception is:
    .... more
    Any suggestions?
    Thanks,
    Karen
    Bruce Stephens <[email protected]> wrote:
    Hi Jacob,
    From your post it was not clear was working and what was changed. Could
    you clarify. Note, for the standalone client app using SSL, you will
    need to include webserviceclient+ssl.jar client runtime JAR file,
    described in the docs [1].
    Thanks,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/security.html#1053203
    Jacob Anderson wrote:
    I was able to get my HTTPS web service to communicate with my clients,but now
    when I try to connect to the web service (type=document), I get thiserror:
    [java] 3) testQuoteStubs(com.arrow.arrowsoap.client.QuoteServiceClientTest)
    junit.framework.AssertionFailedError: failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException:
    type mapping lookup failure on class=class weblogic.apache.xerces.dom.DeferredDocumentImpl
    TypeMapping=TYPE
    MAPPING SIZE=3
    [java] ENTRY 1:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:ProcessResponse
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    b957ea
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    3aff84
    [java] ENTRY 2:
    [java] class: java.lang.Object
    [java] xsd_type: ['https://www.xxx.com/QuoteService/']:lcl0:Process
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    15d4de6
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    a53de4
    [java] ENTRY 3:
    [java] class: java.lang.Object
    [java] xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
    [java] ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    827968
    [java] deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@
    1f0b7d3
    [java] at com.arrow.arrowsoap.client.QuoteServiceClientTest.testQuoteSt
    ubs(QuoteServiceClientTest.java:98)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
    sorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
    hodAccessorImpl.java:25)
    Attached is the WSDL for the service.
    The type-mapping file looks like:
    <wsdd:type-mapping xmlns:wsdd="http://www.bea.com/servers/wls70"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:ProcessResponse"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry xmlns:lcl0="https://www.xxx.com/QuoteService/"
    class-name="java.lang.Object"
    type="lcl0:Process"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    <wsdd:type-mapping-entry class-name="java.lang.Object"
    type="xsd:anyType"
    serializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec"
    deserializer="weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec">
    </wsdd:type-mapping-entry>
    </wsdd:type-mapping>
    Any ideas?? Am I missing something from my classpath?? I am runningthe tests
    using the WL 8.1 ANT installation and using this as my WL classpath(my own jars
    are added first in the path and are omitted here):
    <pathelement path="${weblogic.home}/lib/webserviceclient.jar"/>
    <pathelement path="${weblogic.home}/lib/weblogic_sp.jar"/>
    <pathelement path="${weblogic.home}/lib/weblogic.jar"/>
    Thanks
    -- jake
    Name: QuoteService.wsdl
    QuoteService.wsdl Type: ACT Project (text/xml)
    Encoding: base64

  • RuntimePermission exception on RMI lookup on a signed Applet

    Hi everybody,
    Here is my problem : I want to call an ejb from my applet, using RMI.
    But, as it is an applet, I get a security exception when I make the naming lookup :
    java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.rmi.server)
    I have been wandering for two days in the Java Sun sites and forums to find out how to pass through this problem.
    Too many information is no information : I am not sure to have the correct answer; but here is what I have found :
    All I have to do is to make a self-signed Applet (for testing purpose, before having a real certificate), using keytool and jarsigner, and use it with Java Plugin. Doing that will give AllPermission to the signed code, if the user agrees through a Java Plugin dialog.
    (see http://java.sun.com/products/plugin/1.2/docs/nsobjsigning.html)
    But... that doesn't work (who said 'of course' ?) :
    I get the granting dialog, and even if I agree, I always get the same java.lang.RuntimePermission accessClassInPackage exception.
    The strange think is that I tried to write a file on the client machine for testing the permission, and that works fine with this same signed applet.
    I think that AllPermission implies FilePermission and also RuntimePermission, doesn't ?
    Is this behaviour related to my self-signed certificate ? (in this case, why can i write a file ?)
    What am I missing ?
    Any help will be welcome,
    many thanks
    bernard
    PS. : Of course, i don't want the user to modify its java policy or security configuration as it is often "mission impossible".

    Sorry, i forgot : i am using Java Plugin v 1.3.1_02
    B

  • Raising Custom Exceptions in RMI

    hi all,
    i have a problem. i have an RMI server that makes use of some classes. in those classes, i am raising exceptions.
    problem is that the first time that those classes are called, the correct custom exception is raised.
    all the following times, i receive a java.util.EmptyStackException, and looking at the log file that i write, it seems that the call never reaches the inteded class.
    All the custom exceptions that i use extends the java.lang.Exception class
    can anyone explain me why i got this weird behaviour??
    thanx in advance and regards
    marco

    What was the resolution to this. I am getting an EmptyStackException running a application with 50 threads. I get this exception in one thread and recover OK. I get the exception in another thread and the whole process hangs! Any thoughts?

  • Getting xml serializer exception

    dont know what this mean, did anybody got this exception before.
    Searched on google but got few results only which were not helpful.
    Frustrated posting this here . if anybody has seen this and resolved this , give me tips on how to get this working or atleast what could be cause of this problem.
    java.lang.NullPointerException
    at org.apache.xml.serialize.OutputFormat.whichMethod(Unknown Source)
    at org.apache.xml.serialize.OutputFormat.<init>(Unknown Source)
    at com.tibco.portalservices.administrator.AbstractDOMDeploymentDescriptorEditor.update(AbstractDOMDeploymentDesc
    riptorEditor.java:125)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.administrator.consoles.deploymentconfiguration.ServiceDetailPane.update(ServiceDetailPane.java:94)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractFrame.update(AbstractFrame.java:101)
    at com.tibco.wfc.FramesetComponent.update(FramesetComponent.java:186)
    at com.tibco.wfc.AbstractContainer.update(AbstractContainer.java:32)
    at com.tibco.wfc.AbstractFrame.update(AbstractFrame.java:101)
    at com.tibco.wfc.FrameManager.a(FrameManager.java:235)
    at com.tibco.wfc.FrameManager.service(FrameManager.java:142)
    at com.tibco.administrator.AdministratorServlet.service(AdministratorServlet.java:843)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
    at java.lang.Thread.run(Thread.java:595)

    There is no HashMap in your ArrayList. Take a look at this line:
    selectedDataList.add(searchList);I think a object f type SearchBean is added to the list here. This is no HashMap I presume.
    Please use code tags when posting code. This looks lke this:
    public String getSelectedItems() {
    // Get selected items.
    HashMap map = new HashMap();
    DeleteContentDialog deleteContentDialog = new DeleteContentDialog();
    selectedDataList = new ArrayList();
    for (SearchBean searchList : searchResultdetails) {
    System.out.println("Inside getSelectedItems.........Inside for"+searchList);
    if (searchList.isSelected()) {
    System.out.println("Inside getSelectedItems........searchList."+searchList);
    selectedDataList.add(searchList);
    searchList.setSelected(false); // Reset.
    try {
    for(int i=0;i<selectedDataList.size();i++){
    System.out.println("Inside the delete Method");
    System.out.println("selectedDataList is "+selectedDataList.get(i));
    if (selectedDataList.size() != 0)
    System.out.println("Array List is having = "selectedDataList.size()" records");
    //printValuesTest(medianList);
    System.out.println("**************THESE ARE THE VALUES OF THE HASHMAP AT THE INDEX = "+i);
    map = (HashMap)selectedDataList.get(i);
    if (map.size() != 0)
    Iterator iterator = map.keySet().iterator();
    while (iterator.hasNext())
    String key = (String) iterator.next();
    String value = (String) map.get(key);
    System.out.println("Key = "key " and Value = "+value);
    deleteContentDialog.init(map);
    else
    System.out.println("Hashmap is empty");
    catch(Exception e){
    e.printStackTrace();
    return "deletedFile"; // Navigation case.
    }

  • Invocation time Exception (java.rmi.ConnectException: Connection refused to

    Hi folks,
    SERVER = LINUX
    CLIENT = WINDOWS 200
    JAVA VERSION : 1.4.2
    Object obj = Naming.lookup("rmi://x.x.x.x:5578/MyServer");
    System.out.println("Object ="+obj); // Works fine and return stub as shown in o/p
    MyServer_Stub server = (MyServer_Stub)obj;
    server.validate(); // throws following Connection refused exception
    -----OUTPUT-----
    Object =com.MyServer_Stub[RemoteStub [ref: [endpoint:[x.x.x.x:42360](remote),objID:[a981ca:10722cb9411:-8000, 0]]]]
    java.rmi.ConnectException: Connection refused to host: x.x.x.x.x; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)[
         at com.MyServer_Stub.validate(Unknown Source)/b]
         at tescasees.testbyexample.rmi.MyServerChangesTestApplication.main
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
         at java.net.Socket.connect(Socket.java:452)
         at java.net.Socket.connect(Socket.java:402)
         at java.net.Socket.<init>(Socket.java:309)
         at java.net.Socket.<init>(Socket.java:124)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
         ... 5 more
    Exception in thread "main"
    [b] Why does java system throws exception at invoke time not connection time at lookup time</b]
    Any suggestion...
    Regards,
    Manoj

    > Are you getting this from a lookup()? If so it means the Registry you are looking for at rmi://x.x.x.x:5578 is not present.
    I am getting it at the time when I invoke the method validate on the object returned from lookup.
    --Manoj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • CORBA System Exception to RMI mapping for Weblogic

    Hi,
    I am in the process of porting some older code that was hosted in an Inprise AppServer
    4.1 environment to Weblogic 8.1. The existing code is catching several CORBA system
    exceptions that include the following :
    org.omg.CORBA.NO_RESPONSE
    org.omg.CORBA.UNKNOWN
    org.omg.CORBA.NO_MEMORY
    org.omg.CORBA.NO_RESOURCES
    org.omg.CORBA.OBJECT_NOT_EXIST
    As far as i understand, these exceptions will never be thrown by the Weblogic
    8.1 Server. I wanted to see if someone can guide me as to which RMI exceptions
    will be thrown by Weblogic server instead of the above mentioned CORBA exceptions
    Thanks in advance
    Muhammad

    "Muhammad Choonara" <[email protected]> writes:
    I am in the process of porting some older code that was hosted in an Inprise AppServer
    4.1 environment to Weblogic 8.1. The existing code is catching several CORBA system
    exceptions that include the following :
    org.omg.CORBA.NO_RESPONSEUnmarshallException (probably)
    org.omg.CORBA.UNKNOWNNo idea
    org.omg.CORBA.NO_MEMORYOutOfMemoryException
    org.omg.CORBA.NO_RESOURCESNo idea
    org.omg.CORBA.OBJECT_NOT_EXISTNoSuchObjectException
    >
    As far as i understand, these exceptions will never be thrown by the Weblogic
    8.1 Server. I wanted to see if someone can guide me as to which RMI exceptions
    will be thrown by Weblogic server instead of the above mentioned CORBA exceptions
    ? andy

Maybe you are looking for

  • Can't add mp3 to library

    I just got itunes 6, and just updated to 6.01, and since then, I haven't been able to add a audio book mp3 I downloaded from another source (not iTunes Music Store). This hadn't been a problem with iTunes 5. Is upgrading to 6 the problem? The icon fo

  • Event Categories in iCal

    Does iCal support the concept of event categories? For example, I would like to be able to "color-code" events in the calendar (i.e., calls would be Red, meetings Blue, travel Green, etc.). The only option I see for doing something like this is to cr

  • FCP UB iMAC Dropping Frames, playing stops!

    It's fine (new here with this program so be easy on me) also a recent swither, after beta testing Vista, I said, that's it. Even though I have thousands invested in software for PC... Anyway, FCP 5.1 If I use the arrow tool, and move across timeline,

  • Fault management - ora-human-intervention - help

    Folks, I am playing with Fault management framework and everything went fine so far. However when I changed action to 'ora-huma-intervention' I am not seeing the desired output. My version - 10.1.3.3 Here is my audit : [2009/05/07 15:13:58] [FAULT RE

  • Can anyone help translate this kernel report please?

    Interval Since Last Panic Report:  3533 sec Panics Since Last Report:          1 Anonymous UUID:                    0F2236B5-C9D9-7554-3B83-77B2CFB11475 Sun Sep  8 14:41:12 2013 panic(cpu 0 caller 0xffffff80190b8655): Kernel trap at 0xffffff7f99ac0d5