Remote exceptions

I'm trying to stop exceptions being thrown in a server, but I have no idea what the exceptions mean. This is getting thrown once every 5/10 seconds.
FATAL 28.Jul.2010 16:59:03 [ pool-1-thread-38017  ]: monitor.AppStarter$1           uncaughtException    Uncaught exception on thread Thread[pool-1-thread-38017,5,main]
org.springframework.remoting.RemoteAccessException: Could not access remote service [rmi://10.1.12.1:1296/ServerToClientCallback:1279539649652:2878]; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
     java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
     java.io.OptionalDataException
Caused by:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
     java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
     java.io.OptionalDataException
     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:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     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 org.springframework.remoting.rmi.RmiInvocationWrapper_Stub.invoke(Unknown Source)
     at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:391)
     at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:337)
     at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:257)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
     at $Proxy15.handleCallback(Unknown Source)
     at com.company.monitor.service.CallbackRegistrationServiceImpl$CallerThread.run(CallbackRegistrationServiceImpl.java:83)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:619)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
     java.io.OptionalDataException
     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)
     ... 3 more
Caused by: java.io.OptionalDataException
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1349)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at java.util.LinkedList.readObject(LinkedList.java:964)
     at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
     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:1849)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     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 moreThe code in "callback registration impl" is just
     public void run() {
               try {
                    logger.debug("Start sending a callback " + callback.getType() + " to " + client);
                    serverToClientCallback.handleCallback(callback);
               } catch (RemoteConnectFailureException e) {
                    logger.warn("A gui is disconnected from the server: " + client);
               }Line 83 is the "handleCallback" method call. "handleCallback" simply .adds the callback object to a LinkedBlockingQueue. I can't step through this because conditions that cause the exception to be thrown aren't recreatable on developer machines. I just need to get a vague idea of what the exception means so I can go about fixing it.
Edited by: Boyotbh on Sep 3, 2010 7:14 AM

It's not a remote exception it's a [java.io.OptionalDataException|http://download.oracle.com/javase/1.4.2/docs/api/java/io/OptionalDataException.html]. There's not all that much I can help you with. There's one other thread here. My guess is that you are not using RMI or serialization properly on both ends of the socket, but without seeing what you are doing, it's hard to tell. It's definitely an esoteric error (at least from my experience).
- Saish

Similar Messages

  • Remote exception while fetching information from ALI collaboration 4.5

    We have seen a remote exception recurring from IDK api while accessing collaboration service.
    It says :
    “java.rmi.RemoteException: Unexpected fault was returned by the server (faultcode: Server.userException, faultstring: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.).
    at com.plumtree.remote.prc.collaboration.project.ProjectManagerWrapper.queryProjects(ProjectManagerWrapper.java:177)”
    we are using idk api 6.0 to fetch information from ali collaboration 4.5 concurrently.
    Please guide us

    First and foremost question....do you think is this THE ONLY & BEST possible way to implement your business logic ? To me it seems this can be achieved using much less code...more the code, more the chances of errors, difficult to debug and difficult to maintain...
    Anyways, it is quite difficult to pinpoint the error without the knowledge of underlying table structure and data. Here are some observations...
    In your outermost loop, you are doing this:
    FETCH cur_accdetail BULK COLLECT INTO vl_t_LogDate; If this step yields data, you are populating vl_t_ModStEnDate collection.
    However, if FETCH results into an exception (maybe NO_DATA_FOUND), you are writing the error to a file and program CONTINUES.
    In next logic, you are directly refereing to vl_t_ModStEnDate collection, without verifying whether it is populated. THAT MAY BE THE CULPRIT. NO CLAIMS...JUST GUESSES....
    BUT, I sincerely request you to revisit your requirement and see if you really need to have this much code to address the same.
    p.s. If you feel you don't have that much time (close deadlines etc...), take my word, it will be worth doing it now.

  • Stateful Session deleted on Remote Exception ?

    Hi,
    Our statefull session bean gets deleted, whenever it throws Remote exception.
    Actually the internal exception is caught and the method throws' Remote Exception.
    After the exception the bean cannot be accessed from it's remote interface. All we
    get is the error saying the bean is removed or deleted. Is this a known behavior.
    All help appreciated
    Thanks,
    Venki
    Exception :
         = ===================================
         = ======= Reason ===================
         = ===================================
         java.rmi.NoSuchObjectException: Bean has been deleted.
         Start server side stack trace:
         java.rmi.NoSuchObjectException: Bean has been deleted.
         at weblogic.ejb20.swap.DiskSwap.read(DiskSwap.java:155)
         at weblogic.ejb20.manager.StatefulSessionManager.getBean(StatefulSession
         Manager.java:242)
         at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessi
         onManager.java:313)
         at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:11
         7)
         at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject
         .java:170)

    Thanks,
    V
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Yup, this is exactly what is supposed to happen. RemoteException isA system
    exception
    and it is container's responsibility to, among other things, discard the
    bean instance.
    If you want different behaviour then throw a checked application exception
    (one which
    subclasses java.lang.Exception and not RuntimeException or RemoteException).
    Venki <[email protected]> wrote:
    Hi,
    Our statefull session bean gets deleted, whenever it throws Remoteexception.
    Actually the internal exception is caught and the method throws' RemoteException.
    After the exception the bean cannot be accessed from it's remote interface.All we
    get is the error saying the bean is removed or deleted. Is this a knownbehavior.
    All help appreciated
    Thanks,
    Venki
    Exception :
         = ===================================
         = ======= Reason ===================
         = ===================================
         java.rmi.NoSuchObjectException: Bean has been deleted.
         Start server side stack trace:
         java.rmi.NoSuchObjectException: Bean has been deleted.
         at weblogic.ejb20.swap.DiskSwap.read(DiskSwap.java:155)
         at weblogic.ejb20.manager.StatefulSessionManager.getBean(StatefulSession
         Manager.java:242)
         at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessi
         onManager.java:313)
         at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:11
         7)
         at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject
         .java:170)--
    Dimitri

  • Remote exception

    hi,
    Can someone please tell me specifically what may cause a remote exception to be thrown?
    many thanks

    http://java.sun.com/j2se/1.4.1/docs/guide/rmi/spec/rmi-
    xceptions.htmlhi,
    thanks for the link, however it doesnt state the cause of a 'remote exception' being thrown. It tells me about all the other exceptions

  • Office 365 Sandbox Solution EventReceiver throwing Remote Exception in ItemAdding

    Hi,
    I created a sandbox webpart for O365 with EventReceivers with ItemAdding for Document Library and while i upload a document to library in O365  sharepoint site application throws below exception:-
    System.Runtime.Remoting.RemotingException: Server encountered an internal error. For more information, turn off customErrors in the server's .config file.
    Server stack trace: 
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type us
    Same code works perfectly on my Development machine, Please help. Below is the Code
    base.EventFiringEnabled = false;
    bool isFile = (properties.AfterProperties["vti_filesize"] != null);
    if (isFile == true)                   
    SPWeb currentWeb = properties.OpenWeb();
    // Get foldername from url like Document/EC10001/filename.txt                       
    string folderName = properties.AfterUrl.Split(new char[] { '/' })[1];
    SPList spList = currentWeb.Lists[properties.List.ID];                       
    SPQuery spQuery = new SPQuery();                       
    spQuery.Query = "<OrderBy><FieldRef Name='Modified' Ascending='FALSE'/></OrderBy>";
    //Getting the folder object from the list                       
    SPFolder folder = spList.RootFolder.SubFolders[folderName];
    //Set the Folder property                       
    spQuery.Folder = folder;
    int fileSequenceId = 0;                      
    SPListItemCollection items = spList.GetItems(spQuery);
    if (items.Count > 0)                       
    string documentID = items[0]["DocumentID"] != null ? items[0]["DocumentID"].ToString() : string.Empty;
    if (!string.IsNullOrEmpty(documentID))                           
    string splitNumber = documentID.Split(new char[] { '-' })[1];                               
    fileSequenceId = Convert.ToInt32(splitNumber) + 1;                           
    else                           
    properties.ErrorMessage = "Unable to generate Document Id";                               
    properties.Cancel = true;                           
    else                       
    fileSequenceId = 1;                       
    // Set DocumentID like EC10001-001                       
    properties.AfterProperties["DocumentID"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));      
    // Retrive "EEC000" string from Constant List               
    properties.AfterProperties["vti_title"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));   
    // Retrive "EEC000" string from Constant List                
    base.EventFiringEnabled = true;
    Thanks,
    Pranay Chandra Sapa

    Hi,
    According to your description, my understanding is that when you upload document in Office 365 site, the event receiver in sandbox solution throws error.
    Per my knowledge, if you want to use event receiver in Office 365 environment, you need to use remote event receiver instead the normal event receiver in an app.
    Here are some detailed articles for your reference:
    Create a remote event receiver in apps for SharePoint
    Handle events in apps for SharePoint
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Why constructor of rmi server throws remote exception

    why is it that the constructor of the class extending UnicastRemoteObject i.e rmi server has to throw RemoteException?

    Writing an RMI server is a matter of defining a class, exporting it when constructed and implementing one or more remote interfaces. How to export?
    auto export happens when u call super() in the constructor. It is then registered with the rmi system and made to listen to a TCP port. The various constructors for UnicatRemoteObject allow the derived classes to export at the default port.
    Because this automatic export step occurs at construction the constructors throw this exception.

  • SQLException(original cause) in throw new EJBException(SQLException) is being lost, when the remote exception is being thrown by the container (ejbStore()) in IPlanet. Works in WL and WS

    (IPlanet 6 - SP4)
    we have something like this in the EntityBean :
    ejbstore()
    try {
    myDAO.Update();
    catch(SQLException se)
    throw new EJBException(se);
    But in the SessionBean, where we set the detail (which
    causes ejbStore() to fire), I'm seeing a TransactionRolledBack exception with no trace of the
    original exception within it (The "detail" attribute
    too is null ). The same thing works in WL and WS.
    Any suggestions appreciated.

    Turn your checked exceptions into unchecked exceptions and retrieve the cause later:
    RuntimeException unchecked = new RuntimeException(checked);
    Throwable t = unchecked.getCause();Stephen

  • Server Remote Exception

    m trying to run Server application of RMI. I've made CountRMI that has the Interface. CountRMIImpl to implement CountRMI interface. CountRMIServer and CountRMIClient. m compiling all the files and started registry. also genreated stub and skeleton using rmic CountRMIImpl. but when i try to run my server its giving me error;
    Exception: Server RemoteException; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    *java.lang.ClassNotFoundException: CountRMIImpl_Stub
    java.rmi.ServerException: Server RemoteException; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: CountRMIImpl_Stub
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
    n Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Unknown Source)
    at CountRMIImpl.<init>(CountRMIImpl.java:16)
    at CountRMIServer.main(CountRMIServer.java:18)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
    ception is:
    java.lang.ClassNotFoundException: CountRMIImpl_Stub
    Caused by: java.lang.ClassNotFoundException: CountRMIImpl_Stub
    CountRMI Server ready.*
    all my files are locally in a single folder.
    Can anuone help me getting rid of this problem?

    @ejp:
    Thank you very much for your good advice in this thread! You finished my suffering for this issue. The idea with the "createRegistry(1099)" method, instead of "getRegistry()" solved my problem.

  • Remote Exception: ConnectException Time Out

    Dear All:
    My RMI Client Application Code is a Java Servlet, placed under NT, Tomcat and IIS.
    Each time I run my Client App I get a Connect Exception: Operation Time Out.
    This is the code fragment of my Client Application:
    public void service( HttpServletRequest peticion,
    HttpServletResponse respuesta )
    throws ServletException, IOException
    String NumTelefono = peticion.getParameter("num");
    String Email = peticion.getParameter("email");
    String Mensaje = peticion.getParameter("mensaje");
    String Longitud = peticion.getParameter("conta");
    respuesta.setContentType("text/html");
    PrintWriter out = respuesta.getWriter();
    SMS wsms;
    try {
    wsms=(SMS)Naming.lookup("rmi://gocc2:1099/SMSService");
    System.out.println( "Connection Successful" );
    wsms.servicio(NumTelefono, Email, Mensaje, Longitud, out);//The program stops in this line
    catch ( RemoteException re )
    re.printStackTrace(); //and throws this exception
    When I'm trying to pass parameters from my RMI Client Servlet to a class implementation which is host in the RMI Server, I get the next Exception (as I explained before):
    java.rmi.ConnectException: Connection refused to host: 10.1.38.112; nested exception is:
    java.net.ConnectException: Operation timed out: connect
    java.net.ConnectException: Operation timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
    at java.net.Socket.<init>(Socket.java:273)
    at java.net.Socket.<init>(Socket.java:100)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:25)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:120)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:83)
    at SMS_Impl_Stub.servicio(Unknown Source)
    at RMISMSCli.service(RMISMSCli.java:43)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
    at org.apache.tomcat.core.Handler.service(Handler.java:286)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
    at java.lang.Thread.run(Thread.java:484)
    Could you help me please to figure out what it means.
    Thans
    Malena

    Hi
    I 'm also facing the same error here Any one has any explanaition????
    Thanks in advance

  • Collaborate WLPI 1.2C Remote Exception Security violation

    Hi all,We are having Collborate and WLPI 1.2c on weblogic 5.1. When we try to start workflow from using 'business message event' its giving following error. Can anybody know the settings required to eliminate the error. ThanksKiran "Fri Jul 13 15:29:39 EDT 2001:<I> <WLC> <Hub> INFO: Created conversation 056_add_po_006:1.0:ThrdPty-add-po_http://172.17.128.48:7001/ThrdPtyERPEnabler_0_995064026872Fri Jul 13 15:29:39 EDT 2001:<I> <WLC> <Hub> INFO: Enlisted trading partner ThrdPty-ERP in conversation 056_add_po_006:1.0:ThrdPty-add-po_http://172.17.128.48:7001/ThrdPtyERPEnabler_0_995064026872Fri Jul 13 15:29:42 EDT 2001:<I> <WLC> <Hub> INFO: Enlisted trading partner DM-ERP in conversation 056_add_po_006:1.0:ThrdPty-add-po_http://172.17.128.48:7001/ThrdPtyERPEnabler_0_995064026872Fri Jul 13 15:29:44 EDT 2001:<E> <WLC> <WLPI> ERROR: Cannot start WLPI instanceof template demo_po in organization DM: java.rmi.RemoteException: Security violation: insufficient permission to access method "

    How did you configure the security for the EJB, findAllUsers method. Did you use an annotation like @RolesAllowed.
    In this case you have to make sure the role(s) the user has, is also defined in the RolesAllowed annotation.
    technical session - http://middlewaremagic.com/weblogic/?p=7831

  • Not able to start the remote server - class not found exception

    All,
    I am quite new to RMI programming, although i am an experienced java programmer. I am facing a problem in starting the remote server program which i wrote for RMI. I am getting class not found exception for "stub" class eventhough the class is in the classpath.
    Following is the error console:
    cmd> java -classpath "D:\Eclipse_WorkSpaces\WS2\RMITests\classes" MyServerImplementation
    GetNames error: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: MyServerImplementation_Stub
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: MyServerImplementation_Stub
    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.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:160)
    at MyServerImplementation.main(MyServerImplementation.java:21)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: MyServerImplementation_Stub
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
    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)
    Caused by: java.lang.ClassNotFoundException: MyServerImplementation_Stub
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:434)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
    at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
    at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
    at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    ... 12 morePLEASE ADVISE HOW TO RESOLVE THIS...
    Following are my classes:
    MyRemoteInterface.java
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface MyRemoteInterface extends Remote {
    public String[] getNames() throws RemoteException;
    public class MyServerImplementation extends UnicastRemoteObject implements
    MyRemoteInterface {
    public MyServerImplementation()throws RemoteException{
    super();
    public String[] getNames() throws RemoteException{
    return new String[]{"Name1","Name2","Name3","Name4"};
    public static void main(String args[]) {
    try {
    // Create an object of the HelloWorldServer class.
    MyRemoteInterface obj = new MyServerImplementation();
    // Bind this object instance to the name "HelloServer".
    Naming.rebind("rmi://localhost:1985/GetNames", obj);
    System.out.println("GetNames bound in registry");
    catch (Exception e) {
    System.out.println("GetNames error: " + e.getMessage());
    e.printStackTrace();
    public class MyRMIClient {
    *@param args*
    public static void main(String[] args) {
    try {
    MyRemoteInterface remObj = (MyRemoteInterface) Naming.lookup("rmi://localhost:1985/GetNames");
    System.out.println("Names are "+remObj.getNames());
    catch(Exception e) {
    System.out.println("Problem encountered accessing remote object "+e);
    }

    That's a remote exception coming from the registry. You need to learn to recognize remote exceptions and their source, it's a mjaor source of confusion in RMI.
    In this case it's the registry that can't find the stub class.
    The stub class needs to be in the CLASSPATH of (i) the Registry and (ii) the client as well. Ditto the remote interface; ditto any application classes it refers to, and so on until closure.
    The easiest way to achieve (i) is to start it in the server's JVM, with LocateRegistry.createRegistry().

  • DirectPropertyManagerBean remote fatal exception from user management um tags.

    Hi
    I am wondering if any one has experienced the same problems as us or if you have
    some advice. Recently we put our web lgoic commerce server 3.5 running on weblogic
    server 6.0 and MS SQL server 7 sp 3 into production.
    Now we receive remote exceptions from the DirectPropertyManagerBean from our login
    jsp pages and <um> tags intermittently which forces us to reboot the application
    server a few times a week. This prevents any of our customers from logging into
    our site once these exceptions start being thrown.
    Our exception stack is Servlet failed with Exception> java.lang.NullPointerException:
    at java.lang.String.<init>(String.java:193) at jsp_compiled._commerce._user._mydm._jspService(_mydm.java:282)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<2002/03/08 06:07:29> <Info> <EJB> <***> <wlcsServer> <ExecuteThread: '9'
    for queue: 'default'> <angusg> <2269:e645911858eef116> <010051> <EJB Exception
    during invocation from home: com.beasys.commerce.foundation.property.DirectPropertyManagerBeanHomeImpl@9f4365
    threw exception: java.rmi.RemoteException: EJB Exception:; nested exception is:
    java.rmi.RemoteException: Error checking for explicit property in profileType:
    Customer Profile> java.rmi.RemoteException: EJB Exception:; nested exception is:
    java.rmi.RemoteException: Error checking for explicit property in profileType:
    Customer Profile java.rmi.RemoteException: Error checking for explicit property
    in profileType: Customer Profile at com.beasys.commerce.foundation.property.DirectPropertyManagerBean.getExplicitProperty(DirectPropertyManagerBean.java:610)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanImpl.getExplicitProperty(DirectPropertyManagerBeanImpl.java:190)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBean.getProperty(DirectPropertyManagerBean.java:700)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBean.getProperty(DirectPropertyManagerBean.java:429)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanImpl.getProperty(DirectPropertyManagerBeanImpl.java:210)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanEOImpl.getProperty(DirectPropertyManagerBeanEOImpl.java:206)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanEOImpl_WLSkel.invoke(DirectPropertyManagerBeanEOImpl_WLSkel.java:160)
    at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:373)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:128)
    at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:237)
    at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.java:118)
    at weblogic.rmi.internal.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:115)
    at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:88) at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:108) at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanEOImpl_WLStub.getProperty(DirectPropertyManagerBeanEOImpl_WLStub.java:219)
    at com.beasys.commerce.user.jsp.beans.CachedProfileBean.getProperty(CachedProfileBean.java:128)
    at com.beasys.commerce.user.jsp.beans.CachedProfileBean.getProperty(CachedProfileBean.java:165)
    at com.beasys.commerce.user.jsp.tags.GetPropertyTag.getProperty(GetPropertyTag.java:161)
    at com.beasys.commerce.user.jsp.tags.GetPropertyTag.doStartTag(GetPropertyTag.java:107)
    at jsp_compiled._commerce._user._mydm._jspService(_mydm.java:268) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120).
    Where should I be looking to address this issue? In the database or application
    server?
    Thanx João

    Hi
    I am wondering if any one has experienced the same problems as us or if you have
    some advice. Recently we put our web lgoic commerce server 3.5 running on weblogic
    server 6.0 and MS SQL server 7 sp 3 into production.
    Now we receive remote exceptions from the DirectPropertyManagerBean from our login
    jsp pages and <um> tags intermittently which forces us to reboot the application
    server a few times a week. This prevents any of our customers from logging into
    our site once these exceptions start being thrown.
    Our exception stack is Servlet failed with Exception> java.lang.NullPointerException:
    at java.lang.String.<init>(String.java:193) at jsp_compiled._commerce._user._mydm._jspService(_mydm.java:282)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<2002/03/08 06:07:29> <Info> <EJB> <***> <wlcsServer> <ExecuteThread: '9'
    for queue: 'default'> <angusg> <2269:e645911858eef116> <010051> <EJB Exception
    during invocation from home: com.beasys.commerce.foundation.property.DirectPropertyManagerBeanHomeImpl@9f4365
    threw exception: java.rmi.RemoteException: EJB Exception:; nested exception is:
    java.rmi.RemoteException: Error checking for explicit property in profileType:
    Customer Profile> java.rmi.RemoteException: EJB Exception:; nested exception is:
    java.rmi.RemoteException: Error checking for explicit property in profileType:
    Customer Profile java.rmi.RemoteException: Error checking for explicit property
    in profileType: Customer Profile at com.beasys.commerce.foundation.property.DirectPropertyManagerBean.getExplicitProperty(DirectPropertyManagerBean.java:610)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanImpl.getExplicitProperty(DirectPropertyManagerBeanImpl.java:190)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBean.getProperty(DirectPropertyManagerBean.java:700)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBean.getProperty(DirectPropertyManagerBean.java:429)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanImpl.getProperty(DirectPropertyManagerBeanImpl.java:210)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanEOImpl.getProperty(DirectPropertyManagerBeanEOImpl.java:206)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanEOImpl_WLSkel.invoke(DirectPropertyManagerBeanEOImpl_WLSkel.java:160)
    at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:373)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:128)
    at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:237)
    at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.java:118)
    at weblogic.rmi.internal.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:115)
    at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:88) at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:108) at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
    at com.beasys.commerce.foundation.property.DirectPropertyManagerBeanEOImpl_WLStub.getProperty(DirectPropertyManagerBeanEOImpl_WLStub.java:219)
    at com.beasys.commerce.user.jsp.beans.CachedProfileBean.getProperty(CachedProfileBean.java:128)
    at com.beasys.commerce.user.jsp.beans.CachedProfileBean.getProperty(CachedProfileBean.java:165)
    at com.beasys.commerce.user.jsp.tags.GetPropertyTag.getProperty(GetPropertyTag.java:161)
    at com.beasys.commerce.user.jsp.tags.GetPropertyTag.doStartTag(GetPropertyTag.java:107)
    at jsp_compiled._commerce._user._mydm._jspService(_mydm.java:268) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120).
    Where should I be looking to address this issue? In the database or application
    server?
    Thanx João

  • Use exceptions declared in remote package

    Hi,
    When handling exceptions, I use their name as declared inside the package from where they are thrown:
    MY_PACKAGE.OPERATION;
    EXCEPTION
    WHEN MY_PACKAGE.MY_EXCEPTION THEN
    Now I'm using a package in a remote database however, so I try:
    MY_PACKAGE.OPERATION@REMOTE_DB;
    EXCEPTION
    WHEN MY_PACKAGE.MY_EXCEPTION@REMOTE_DB THEN
    This fails with:
    PLS-00103: Encountered the symbol "@" when expecting one of the following: . then or The symbol ". was inserted before "@" to continue.
    Am I missing something or is this a known database bug or something?
    Thanks,
    K.

    Oooh, OK, I see, we have a bit of a misunderstanding here.
    I do raise an "Application exception" through RAISE_APPLICATION_ERROR() in the remote procedure, and the appropriate exception number is returned to the local procedure.
    The problem is when it comes to catching the exception. I can have error -20101 in both packages, and because they're different packages, the number is assigned to different kind of errors. If I catch the remote exception as the local number, I have a mix of definitions, which is really not advisable.
    We do the same thing between local packages:
    create or replace
    PACKAGE A AS
    TEST_E EXCEPTION;
    PRAGMA EXCEPTION_INIT(TEST_E, -20101);
    PROCEDURE TEST;
    END A;
    create or replace
    PACKAGE BODY A AS
    PROCEDURE TEST IS
    BEGIN
    RAISE_APPLICATION_ERROR(-20101, 'test');
    END;
    END A;
    create or replace
    PACKAGE B AS
    DIFFERENT_E EXCEPTION;
    PRAGMA EXCEPTION_INIT(DIFFERENT_E, -20101);
    PROCEDURE TEST;
    END B;
    create or replace
    PACKAGE B AS
    PROCEDURE TEST IS
    BEGIN
    A.TEST;
    EXCEPTION
    WHEN A.TEST_E THEN
    NULL;
    END;
    END B;
    This works locally, but if package A is declared remotely, catching A.TEST_E@REMOTE_DB inside B.TEST won't compile. Catching A.TEST_E as B.DIFFERENT_E really isn't nice and very confusing.
    So, is this a database bug?
    Any suggestions that don't imply changing all error numbers in all our packages to be unique (which is almost impossible for the amount of work and the limit in number of application exceptions)?
    Thanks,
    K.

  • Marshall exception when calling a remote business method in EJB

    Hi,
    From a java client, i am calling a business method from a ejb. the home and remote interface object is sucessfully received at the client. but at the time of calling the remote business method the following error occurs.
    java.rmi.RemoteException: ; nested exception is:
    weblogic.rmi.ServerException: A remote exception occurred while executing the method on the
    remote object
    - with nested exception:
    [weblogic.rmi.MarshalException: error marshalling return
    - with nested exception:
    [java.io.NotSerializableException: java.util.Vector$1]]
    java.io.NotSerializableException: java.util.Vector$1
    the business method returns an enumeration object.
    How to solve this?
    -chidam

    hi chidambaresh,
    you could have sent this to me directly.
    the Enumeration si an interface and so the object we get during the runtime is basically an object of some implementation of this interface.
    the Enumeration you get from HAshtable is actually Serializable.
    but the Enumeration you actually get from Vector (this is actaully an inner class of Vector viz., Vector$1) is not serializable. that is what the error you are getting.
    regards
    Srinivasan.R
    (VAMSOFT)

  • Trying to create a local instance of the remote object

    Hi,
    I have a ClassA on which I need to be able to invoke RMI calls. Problem is the interface which ClassA implements does not throw exceptions. To get around this problem I have created a wrapper class ClassWrap which has a ClassA attribute and calls made to ClassWrap are directed to this ClassA object. A facade type design I think it's called.
    ClassWrap implements Remote so it can be used as a Remote object.
    When I create an instance of ClassWrap and deploy it on a server, my client has no problem communicating with the remote ClassWrap object via a remote stub ClassWrap_Stub.
    Problem is I also want my client to be able to use a local instance of ClassWrap. Whan I try to create an instance of ClassWrap in my client I get a remote Exception ... but !! when I have a ClassWrap_Stub object in my classpath then there is no problem creating a ClassWrap object.
    Any ideas why this happens?

    What you are trying to do should work just fine. Do you have the wrapper class file in your client jar?

Maybe you are looking for