RMI/Unmarshaling exception

Hi,
I tried to run numerous RMI examples off the web, but i still get the same exceptions thrown each time.
I tried running it on WinXP and a 98 m/c but of no avail.
Any help would be appreciated.
Thanks.
For testing purposes I kept all the .java files and java.policy files in the same directory.
After compiling all the .java files [included at the end of this post], i ran
rmic myRMIImpl
rmiregistryand then i tried to run the server but then i get the exception shown below
=========================================
C:\rmi3>java -Djava.rmi.server.codebase=c:\rmi3\ -Djava.rmi.server.hostname=127.
0.0.1 -Djava.security.policy=c:\rmi2\java.policy myRMIServer
Exception occurred: java.rmi.ServerException: RemoteException occurred in server
thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.net.MalformedURLException: unknown protocol: c
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.net.MalformedURLException: unknown protocol: c
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: unknown protocol: c
java.net.MalformedURLException: unknown protocol: c
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.bind(Unknown Source)
at java.rmi.Naming.bind(Unknown Source)
at myRMIImpl.<init>(myRMIImpl.java:11)
at myRMIServer.main(myRMIServer.java:11)
=========================================
rmic myRMIImpl
rmiregistry
=========================================
public interface myRMIInterface extends java.rmi.Remote
public java.util.Date getDate() throws java.rmi.RemoteException;
=========================================
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class myRMIImpl extends UnicastRemoteObject implements myRMIInterface
public myRMIImpl(String name) throws RemoteException
super();
try
Naming.bind(name, this);
catch(Exception e)
System.out.println("Exception occurred: " + e);
public java.util.Date getDate()
return new java.util.Date();
=======================================
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class myRMIServer
public static void main(String[] argv)
System.setSecurityManager(new RMISecurityManager());
try
myRMIImpl implementation = new myRMIImpl("myRMIImpl instance");
catch (Exception e)
System.out.println("Exception occurred: " + e);
=======================================
import java.rmi.*;
import java.rmi.registry.*;
import java.rmi.server.*;
import java.util.Date;
public class myRMIClient
public static void main(String[] argv)
System.setSecurityManager(new RMISecurityManager());
if (argv.length != 1)
System.out.println("usage: java myRMIClient <IP address of host running RMI server>");
System.exit(0);
String serverName = argv[0];
try
//bind server object to object in client
myRMIInterface myServerObject = (myRMIInterface) Naming.lookup("rmi://"+serverName+"/myRMIImpl instance");
//invoke method on server object
Date d = myServerObject.getDate();
System.out.println("Date on server is " + d);
catch(Exception e)
System.out.println("Exception occured: " + e);
System.exit(0);
System.out.println("RMI connection successful");

Looks like if is trying to understand you URL given as the codebase and failing to do so. You specify the protocol to be used to retrieve the URL in the beginning of the URL string. For a http protocol is is http://URL, for rmi it is rmi://URL and in this case im not sure how a file URL should be written but it should be something like file://URL. Check this site for correct syntax or somewhere on the net. Anyway after you get if right, you should try it with something like
"-Djava.rmi.server.codebase=file://c:\rmi3\"
or something in those lines. That is what the exception is about anyways.
-teka

Similar Messages

  • Java.rmi.RemoteException: Exception in ejbLoad

    I use findByPrimaryKey() to find the object first.And I also can get PrimaryKey by method getPrimaryKey().
    But when I invoke method getName()(the method I defined to get name) ,it throws out exception:
    java.rmi.RemoteException: Exception in ejbLoad:; nested exception is:
    java.lang.NullPointerException
    what's wrong?

    Hi Susan ,
    By looking at your question , the first thing that comes to my mind is the "Null pointer Exception" migt only come when you have the null reference to your primary key . I mean , your metod call findByPrimaryKey shoudl return you a NOT NULL reference . But I guess there is a probablility that it might be returning NULL. And after that when u try to use that reference to invoke getName() method , it must be throwing NULL pointer exception. Just try priting the reference returned by your findByPrimaryKey() method.
    If it does not work out , write me more about what exactly is happening at your end.
    -amit

  • Unmarshal Exception on big XML files

    First, sorry for my english.
    I have a problem using a unmarshal method. I�m trying to unmarshal a XML file which size is almost 4.1Mb. When I do that an Unmarshal Exception is thrown. But if I broke the file in little parts (0.5Mb each) the unmarshal method works perfectly for all those little XML files. Is there any body that knows what is happening?
    Tanks.

    I don't have any solution. But I can remenber having already seen someone speaking about this problem on this forum. Try to find his thread which a search with keywords as XML, Exception, big file ... You'll perhaps find it. This subject was discussed a few weeks ago.

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

  • Java.rmi.MarshalException: Exception

    hi,
    i am getting the below error while displaying the data from a servlet. Here in servlet i had written the code to store values. And then i had written a function "getDetails()" which will give result set object. At that time i am getting this error. This method code is in bena class.
    In servlet this is the code i had wriiten
    InitialContext initContext=new InitialContext();
                        home=(InsuranceHome)initContext.lookup(ejbJndiName);
                        remote=home.create();
                        int n=remote.insertDetails(cname,frm_date,to_date,type,ppaid,rmks);
                        ResultSet rs=remote.getResults();
                        while(rs.next())
                             System.out.print(rs.getString(1));
                             System.out.print(rs.getString(2));
                             System.out.print(rs.getString(3));
                             System.out.println(rs.getString(4));
                        System.out.println(n);
    [10/Apr/2008:11:34:06] INFO ( 3108): CORE3282: stdout:      java.rmi.MarshalException: Exception occurred in server thread; nested exception is:
    [10/Apr/2008:11:34:06] INFO ( 3108): CORE3282: stdout:      java.io.NotSerializableException

    the NEVER used here, is it an EJB specification issue or design issue. If EJB specification issue then you should be right of which i am not sure. Please quote reference.
    If design issue then NEVER is wrong. Its depends on task to be addressed. Data Transfer Pattern allows the use of Rowset to exchange data between clients and servers.These options are either DTOs, containers, RowSets all are serializabel.How will you managed bandwidth and memory issues in a critical application where by clients needs to get a copy of data store in their memory(delete,update, insert) and after finished with their task they simply click synchronized.
    this copy(rowset) in client is simply sent to sever for updates rather than doing update, insert, delete request to server for every operation.
    This is a pattern design issue and the choice of Data Transfer Object depends on the task and type of communication between clients and server.
    A RowSet in the situation whereby 1. number of request to server has to be reduced, 2. connection to server has to be minimal. 3. each client gets a copy of his data as a snapshot of server contents processed it an then do synchronization when needed(bulk).Also this is issued when memory of client is a big issue like mobiles so installing a DB on the mobile is not possible. The rowset sent to client must not hold a connection to DB.
    Ivo Sumelong

  • J2SE 1.3 client - Weblogic 8.14 Problem with unmarshal exception

    Hi
    I have problem with using RMI IIOP with J2SE 1.3.1_01 - Weblogic 8.1 SP4. Client is runing good, methods are working perfectly, but when EJB throws my exception, it is not serialized and thrown on client but MarshalException is thrown.
    I did everything as it is in weblogic documentation and I really do not know what to do.
    Also I read in weblogic documentation this note:
    Limitations Using RMI-IIOP on the Client
    Use WebLogic Server with JDK 1.3.1_01 or higher. Earlier versions are not RMI-IIOP compliant. Note the following about these earlier JDKs:
    Do not correctly unmarshal unchecked exceptions.But I am using 1.3.1_01 ...
    When I run it with 1.4 it is of course running without problem.
    Martin
    My Exception :
    java.io.IOException:
         at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:272)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:245)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:207)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1059)
         at com.upsscs.europe.cdmv.spl.ejb.service._SBTelnetKitting_Stub.getPickList(Unknown Source)
         at Pokus.main(Pokus.java:59)
    java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
         org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : minor code: 0 completed: No
    org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : minor code: 0 completed: No
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1065)
         at com.upsscs.europe.cdmv.spl.ejb.service._SBTelnetKitting_Stub.getPickList(Unknown Source)
         at Pokus.main(Pokus.java:59)
    Exception in thread "main"

    Hi,
    I am sending the supported configuration link
    please go through it.
    http://e-docs.bea.com/platform/suppconfigs/configs81/81_over/overview.html#1146550
    Regards
    Prasanna Yalam

  • RMI - Unmarshell Exception - Nested Exception is java.io.EOFException

    Hi,
    I get the following error while executing my RMI client.
    The fact is that i dont get this everytime. When i make nearly 4000 RMI method calls then for the further method calls i get the exception as given below..
    *java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:*
    *     java.io.EOFException*My RMI Client Implementation is like this.
    - Create a static object of RMI Client
    m_objRmiServiceProxy = (IExposedInterface) Naming.lookup(ConnectionURL);And use the same object for all my further rmi server calls....
    can anyone tell me when we will get the above exception?
    What can be the possible cause for it ?
    Thanks...

    If you find an answer elsewhere please let me know, your problem seems to be very much akin to what my program is experiencing. Just one question, is your program affected by the error if you call the one remoteserver method consecutive times or if you call multiple methods in parallel?
    Edited by: Inusevs on Sep 10, 2008 6:24 AM
    Edited by: Inusevs on Sep 10, 2008 6:24 AM

  • RMI Nervous Exception

    I am new to rmi
    I got the following exception:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.lang.ClassNotFoundException: extst.Test_Stub
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at clnttst.ClientMainFrame.testRMI(ClientMainFrame.java:177)
         at clnttst.ClientMainFrame$1.actionPerformed(ClientMainFrame.java:120)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at javax.swing.plaf.basic.BasicInternalFrameUI$Handler.retargetMouseEvent(Unknown Source)
         at javax.swing.plaf.basic.BasicInternalFrameUI$Handler.forwardMouseEvent(Unknown Source)
         at javax.swing.plaf.basic.BasicInternalFrameUI$Handler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: extst.Test_Stub
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
         at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
         at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
         at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
         at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
         at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
         at java.io.ObjectInputStream.readClassDesc(Unknown Source)
         at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         ... 38 moreI set the classpath enviroment variable in the windows to the server pakage that contain the server classes and the stub class.
    I also try to set the code base as :
    java -Djava.rmi.server.codebase = "file:/c:/ExTest/ServerTest" extst.Driver
    but all that does not work

    "If the code base specifies a directory (as opposed to a JAR file), you must include the trailing slash in the code base URL"
    http://java.sun.com/docs/books/tutorial/rmi/running.html
    Genady
    Message was edited by:
    genady

  • RMI -NullPointer Exception

    I am using java on RedHat Linux 8.0, (J2sdk1.4)
    I am trying to do an RMI program on Linux. I need it as per academic syllabus. I tried a calculator problem. Created interface, server etc. After compiling them when i try to create stub and skeleton by rmic i got stucked by errors, like Null PointerException as follows, So I cant move forward. Could you please help me to solve a simple problem using RMI.
    Classpath is correct. I had configured and done Servlet , JSP , JDBC etc on Linux. But here i got stucked. Please provide help to me.........
    $ rmic CalculatorImpl
    // following are the error messages i got
    java.lang.NullPointerException
    at 0x4027812c: java.lang.Throwable.Throwable() (/usr/lib/libgcj.so.3)
    at 0x4026b0af: java.lang.Exception.Exception() (/usr/lib/libgcj.so.3)
    at 0x4026e9b3: java.lang.RuntimeException.RuntimeException() (/usr/lib/libgcj.so.3)
    at 0x4026e0a7: java.lang.NullPointerException.NullPointerException() (/usr/lib/libgcj.so.3)
    at 0x4022a547: JvThrowNullPointerException (/usr/lib/libgcj.so.3)
    at 0x4033099f: ?? (??:0)
    at 0x4032ce5d: gnu.java.rmi.rmic.RMIC.generateStub() (/usr/lib/libgcj.so.3)
    at 0x4032bd25: gnu.java.rmi.rmic.RMIC.processClass(java.lang.String) (/usr/lib/libgcj.so.3)
    at 0x4032bc7c: gnu.java.rmi.rmic.RMIC.run() (/usr/lib/libgcj.so.3)
    at 0x4032bb3b: gnu.java.rmi.rmic.RMIC.main(java.lang.String[]) (/usr/lib/libgcj.so.3)
    at 0x40252308: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/libgcj.so.3) at 0x402bd0b1: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
    at 0x4025efdc: JvThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
    at 0x4022b78c: JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.3)
    at 0x4022b8ad: JvRunMain (/usr/lib/libgcj.so.3)
    at 0x080485a0: ?? (??:0)
    at 0x420158d4: ?? (??:0)
    at 0x080484ed: ?? (??:0)
    thanks
    rajesh

    The alternative is to use the Sun rmic, which you'll find (probably) lives somewhere near javac, javap, javah et cetera.
    You are not using the sun rmic, as the stacktrace shows.
    Dont just tell us that your 'paths are all correct' - post the invocation of the compiler that causes the stacktrace, along with some environment, then you might get some more detailed help

  • RMI Security Exception

    Hi I have followed the sun java RMI trail (tutorial).
    However my server side application is giving me a security exception. I think it s because of the grant code sections:
    grant {
        permission java.net.SocketPermission "*:1024-65535",
            "connect,accept";
        permission java.net.SocketPermission "*:80", "connect";
    };My problem is that I can't understand were to put this code segment, and I read the same page over and over again, and could not find were is says were to put it!!
    As I said I think it is from this, but maybe it is from other parts! not sure! ... Maybe you need to run the server side from a web server??
    The links of the tutorial I am following is the following (from sun java website itself):
    http://java.sun.com/docs/books/tutorial/rmi/
    and the following link is were there is the grant permission code:
    http://java.sun.com/docs/books/tutorial/rmi/running.html
    Thanks for any sugestions!

    I still have the exception:
    ComputeEngine exception: access denied (java.net.SocketPermission host resolve)
    java.security.AccessControlException: access denied (java.net.SocketPermission host resolve)I followed the tutorial step by step, reading and writing the provided code so far. So this is what I have now at the moment:
    I create a permision file and I called it java.policy. In this file I have the following code:
    grant {
        permission java.net.SocketPermission "*:1024-65535",
            "connect,accept";
        permission java.net.SocketPermission "*:80", "connect";
    };Then I have the following code sugested by WirajR in the engine class, which is the server side application:
    static{
        System.setProperty("security.policy", "java.policy");
    }I compiled everything, and no errors are given. But when i run just the server side, I still recieve the above error. When I debuged the application it stops on the following line:
    Naming.rebind(name, engine);Were name is a string containing the following text :
    "//host/Compute"and engine is the class to be exposed over RMI.
    I am betting my problem is with name!! ... maybe
    or else my permission file has invalid data.
    Also wanted to add that security seems to have been taken care of in that tutorial by the following lines of code:
    if (System.getSecurityManager() == null) {
       System.setSecurityManager(new RMISecurityManager());
    }Aren't these to set the security policy?

  • JAXB unmarshal exception "unexpected root element"

    I have a very simple xsd and just one xml file I am trying to unmarshal. I switched to jws-2.0 and am still getting the same exception I go when using jws-1.5. I would be very grateful for any assistance on this:
    Here is my main program:
    public static void main(String[] args) {
    getCancelPenalty();
    public static void getCancelPenalty() {
    String jaxbContext = "generated";
    String cancelPenaltyFilename = "CancelPenaltyOne.xml";
    JAXBContext jc = null;
    Unmarshaller u = null;
    CancelPenalty cancelPenalty = null;
    try {
    jc = JAXBContext.newInstance(jaxbContext);
    u = jc.createUnmarshaller();
    cancelPenalty = (CancelPenalty) u.unmarshal(
    new FileInputStream(cancelPenaltyFilename));
    } catch (Exception e) {
    e.printStackTrace();
    System.exit(0);
    int updateTUID = cancelPenalty.getUpdateTUID();
    System.out.println("These values were retrieved from " +
    "the Cancel Penalty object:");
    System.out.println("UpdateTUID: "+ updateTUID);
    Here is my xsd file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:complexType name="CancelPenalty">
    <xsd:sequence>
    <xsd:element name="UpdateTUID" type="xsd:int"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Here is my xml file that i am trying to parse:
    <?xml version="1.0" encoding="UTF-8"?>
    <CancelPenalty>
    <UpdateTUID>1</UpdateTUID>
    </CancelPenalty>
    And finally here is stack trace of exception:
    javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"CancelPenalty"). Expected elements are (unknown)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:523)
         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199)
         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:194)
         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:71)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:920)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:364)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:345)
         at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:117)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:200)
         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:173)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
         at populateDB.Populate.getCancelPenalty(Populate.java:28)
         at populateDB.Populate.main(Populate.java:15)
    Any ideas what is going awry?

    Solved:
    My xsd file was incorrect (I guess):
    instead of:
         <xs:complexType name="CancelPenalty">
    I needed to use:
         <xsd:element name="CancelPenalty">
              <xsd:complexType>
    Not sure why the first construct is incorrect, but I found another example of an xsd file that used the second construct and it worked for me as well.

  • Rmi Server Exception

    Hello Everyone,
    I encountered the following errors during deployment using J2ee's Deployment Tool.
    I have an Entity EJB called Books using Cloudscape as the database. When I clicked on 'Generate SQL Now' in Deployment Tool, I received the following errors. "java.rmi.ServerException, - nested exception - connecting to database - no suitable driver".
    Prior to deployment I have j2ee server, cloudscape database up and running. Cloudscape has the following Driver Class - COM.core.RmiJdbcDriver, COM.cloudscape.core.RmiJdbcDriver 1.7.2. The Database JNDI name is jdbc/BooksInCloudscape. I tried to re-register the driver in j2ee and cloudscape, then brought both servers down and up with no luck. I have put c:\Books\classes in my CLASSPATH.
    Could anyone please shed lights on this issue? Thanks in advance.

    I am having the EXACT SAME ISSUE. I've been to countless message boards and support sites to no avail (I'm assuming you are also working from EJB 2.1 Kick Start by Peter Thaggard.)
    If you've resolved this issue from another source please update this posting any help would be greatly appreciated. I can't express how much time has been wasted on this simple connectivity issue.

  • RMI Unmarshaling Error

    I got a problem with runing RMI application.Sometimes it works well, but when I made some changes to Impl class, it sometimes shows :
    Exception in thread "main" java.rmi.ServerException: Server RemoteException; nes
    ted exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: com.qa.rmi.QAserverImpl_Stub
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
    RemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
    223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:159)
    at com.qa.rmi.QAserverImpl.main(QAserverImpl.java:29)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
    ception is:
    java.lang.ClassNotFoundException: com.qa.rmi.QAserverImpl_Stub
    Caused by: java.lang.ClassNotFoundException: com.qa.rmi.QAserverImpl_Stub
    I will appreciate whoeven gives me some idea to solve this problem.
    David

    Most likely your java.server.rmi.codebase system property is not properly set (or if you are not trying do download the class files automatically, your classpath is not set properly).
    It looks like the rmiregistry cannot find the class file for the com.qa.rmi.QAserverImpl rmi stub. Either you did not generate the stub file with rmic, or the codebase (or classpath) does not point to where it can be found.

  • Rmi iiop exception (orb)

    Hi,
    When i run my program i receive an exception. The orbd tool is running on port 900. Stubs are created for iiop. The class extends the PortableRemoteObject. This exception arises when creating the initialContext with:
    Properties p = new Properties ();
    p.put (Context.INITIAL_CONTEXT_FACTORY,
       "com.sun.jndi.cosnaming.CNCtxFactory");
    p.put (Context.PROVIDER_URL,"iiop://localhost:900");
    InitialContext ctx = new InitialContext (p);The exception is:
    javax.naming.CommunicationException: Cannot connect to ORB.  Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
         at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
         at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
         at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
         at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:638)
         at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:580)
         at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1004)
         at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:687)
         at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1085)
         at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:978)
         at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2422)
         at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
         at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
         at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
         at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
         at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
         at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:195)
         at nl.infoprofs.components.monitor.MonitorSender.registerObject(MonitorSender.java:97)
         at nl.infoprofs.components.monitor.MonitorSender.getInstance(MonitorSender.java:122)
         at nl.infoprofs.components.monitor.MonitorTest.main(MonitorTest.java:25)Thanks in advance,
    Rico

    I am trying to run a simple rmi over iiop server.
    I started the tnameserv with
    tnameserv -ORBInitialPort 2222
    I am trying to run the server
    static final String CONTEXT_NAME = "java.naming.factory.initial";
    static final String IIOP_STRING = "com.sun.jndi.cosnaming.CNCtxFactory";
    static final String URL_NAME = "java.naming.provider.url";
    static final String IIOP_URL_STRING = "iiop://localhost:2222";
    And in the main method
    // Create and install a security manager
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    // Create the IIOP Initial Context
    Properties iiopProperties = new Properties();
    iiopProperties.put( LFChallenger_SimImpl.CONTEXT_NAME,
    LFChallenger_SimImpl.IIOP_STRING );
    iiopProperties.put( LFChallenger_SimImpl.URL_NAME,
    LFChallenger_SimImpl.IIOP_URL_STRING );
    // create and initialize the ORB
    ORB orb = ORB.init(args, null);
    // initialize naming context
    iiopProperties.put("java.naming.corba.orb", orb);
    Context initialNamingContext = new InitialContext( iiopProperties );
    LFChallenger_SimImpl obj = LFChallenger_SimImpl.getInstance();
    // Bind the object to the IIOP registry
    initialNamingContext.rebind("LFChallengerServer",obj);
    System.out.println("LFChallengerServer bound in registry");
    } catch (Exception e) {
    System.out.println("LFChallenger_SimImpl err: " + getMessage ());
    e.printStackTrace();
    Running the server using
    java -Djava.rmi.server.codebase=C:/CEMS/Corvis/home/TMF/cems_sim/src/java/classes/ -Djava.security.policy=policy -Djava.naming.provider.url=iiop://localhost:2222 -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory -classpath c:\Borland\AppServer\lib\vbjorb.jar; com.corvis.cems_sim.LFChallenger_SimImpl
    And I am getting these annoying exceptions when I run the above command
    LFChallenger_SimImpl err: COS Name Service not registered with ORB under the name 'NameService'
    javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService'. Root exception is org.omg.CORBA.ORBPackage.InvalidName
    at com.inprise.vbroker.orb.ORB.resolve_initial_references(ORB.java:712)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:254)
    at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:184)
    at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:71)
    at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:35)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.init(InitialContext.java:222)
    at javax.naming.InitialContext.<init>(InitialContext.java:198)
    at com.corvis.cems_sim.LFChallenger_SimImpl.main(LFChallenger_SimImpl.java:72)
    Please help me with this problem
    thanks
    kishore

  • RMI Connect Exception

    I have a client server application,
    1) Server is running on a Linux Suse machine
    2) Client is running on a Windows 2000 machine
    I had been running this application for some time now, but now i started getting this weird problem.
    When i try to run the client i get this exception below:
    java.rmi.ConnectException: Connection refused to host: 127.0.0.2;
    and im unable to bring up the client.

    I'm inclined to doubt that a security policy error, especially on the client side, would given you such a general error. You't get an exception from the security manager instead.
    The "connection refused" is pretty much always down to not having a listener running on the port you're trying to connect to.
    Pinging uses a lower level of connection than TCP/IP so it doesn't tell you anything about ports being open. All it establishes is that the server's operating system is up and reachable.
    On unix you can use netstat to check what ports are being listened to by what tasks, don't know if you can do that on Windows. There's a netstat but I haven't explored the options.
    Agreed, it's probably not a problem with the code, it's more likely to be a problem with the scripts that start the server, or nameserver.

Maybe you are looking for

  • Text input control the length

    Hey, I have a text input field with 240 length (displayed in 3 rows). when users enters more than this length it stops the user but when he copies from some where else and pastes the text here it does not stop the user to the size. (he can copy more

  • ERROR WHILE DELETING FUNCTION LOCATION

    HI GUYS, I TRIED TO DELETE FL USING THE PROGRAM IN SE 38, RIARCTPV IT GIVES THIS MESSAGE  Program RIARCTPV started: 02.12.2011 15:24:53 Program RIARCTPV ended: 02.12.2011 15:24:53 THEN WHEN I TRY TO RIARCTPA AND CHECKED 'GENERATE ARCHIVE FILE' IM GET

  • Is there a limit of words for shortcuts on the iphone?

    I'm having a problem with the shortcuts on my iphone. I had a bunch of shortcuts and since i had too many it started to rarely worked. Is there a limit or something? Now the option for shortcuts is still available. But only to add and when i try to s

  • New MacBook Pro - Move Music?

    Hello, I just recently bought my first macbook pro (yay), however i'm having trouble moving files. The main reason i even use a laptop is for music - which i keep stored on an external drive. I like the reassurance that, should, my laptop break i hav

  • ITunes Match 256 kbps

    I would like to know if there is a way make iTunes match stop coding my songs in the format of 256 kbps, sometimes I want to download songs and they are heavier than the ones that are on my PC