xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franck_Schmid...@eFunds.com
Subject org.w3c.Document RMI serialization
Date Thu, 05 Jul 2001 13:41:46 GMT


I don't want to pollute this list with something that might be caused by
VAJ environment, but I have been experiencing a weird problem which I'd
like to understand.

A complete history of my problem can be found at
http://www.jguru.com/forums/view.jsp?EID=449679 but I hope maybe someone on
this list might come up with something.

I have a very simple test session EJB (see below) which returns a
org.w3c.dom.Document either by parsing the document or by building it from
scratch.

Using the WTE EJB test client getDocument(0) always work but getDocument(1)
will only work if the FIRST call to the EJB after the server is started was
a call to getDocument(0).

If the first call to the EJB is to getDocument(1) the call will fail, and
so will any other call to getDocument(1). However calls to getDocument(0)
will always work!!!

So, regardless of what bug VAJ might have, my question is

What is the difference between parse() and building the document from
scratch that could affect the RMI serialization?? Are different class
loaders called? Different DOMImplementation?

I'll appreciate any comment.

Cheers.

NB: I am using xerces 1.4 (as downloaded with xalan 2.1.0)


public org.w3c.dom.Document getDocument(int i)
{
     try
     {
          if (i == 0)
          {
               javax.xml.parsers.DocumentBuilderFactory dbf=
                    javax.xml.parsers.DocumentBuilderFactory.newInstance();

               javax.xml.parsers.DocumentBuilder db= dbf.newDocumentBuilder
();

               return db.parse("test.xml");
          }
          else if (i == 1)
          {
               javax.xml.parsers.DocumentBuilderFactory dbf=
                    javax.xml.parsers.DocumentBuilderFactory.newInstance();

               javax.xml.parsers.DocumentBuilder db= dbf.newDocumentBuilder
();

               org.w3c.dom.Document doc= db.newDocument();

               org.w3c.dom.Node root= doc.createElement("test");
               org.w3c.dom.Node text= doc.createTextNode("");
               text.setNodeValue("this is a test");
               root.appendChild(text);
               doc.appendChild(root);

               return doc;
          }

     }
     catch (Exception e)
     {
          e.printStackTrace();
     }
     return null;
}

Here is the complete exception trace:

As far as I understand, the 'org.omg.CORBA.MARSHAL:   minor code: 2 completed: Maybe' simply
means that the client stub cannot match the serialized
class it received with the actuall class it expects

org.omg.CORBA.MARSHAL:   minor code: 2 completed: Maybe
 java.lang.Throwable(java.lang.String)
 java.lang.Exception(java.lang.String)
 java.lang.RuntimeException(java.lang.String)
 org.omg.CORBA.SystemException(java.lang.String, int,org.omg.CORBA.CompletionStatus)
 org.omg.CORBA.MARSHAL(java.lang.String, int,org.omg.CORBA.CompletionStatus)
 org.omg.CORBA.MARSHAL(int, org.omg.CORBA.CompletionStatus)
 com.ibm.org.omg.CORBA.ValueDefPackage.FullValueDescription
com.ibm.rmi.io.FVDCodeBaseImpl.meta(java.lang.String)
 com.ibm.org.omg.CORBA.ValueDefPackage.FullValueDescription
com.ibm.org.omg.SendingContext.CodeBase_Tie.meta(java.lang.String)
 com.ibm.org.omg.CORBA.ValueDefPackage.FullValueDescription
com.ibm.CORBA.iiop.IIOPConnection.getFVD(java.lang.String)
 com.ibm.org.omg.CORBA.ValueDefPackage.FullValueDescription
com.ibm.rmi.iiop.FVDCodeBaseDelegate.meta(java.lang.String)
 java.util.Vector
com.ibm.rmi.io.IIOPInputStream.getOrderedDescriptions(java.lang.String,com.ibm.org.omg.SendingContext.CodeBase)
 java.lang.Object
com.ibm.rmi.io.IIOPInputStream.inputObjectUsingFVD(java.lang.Class,java.lang.String, com.ibm.org.omg.SendingContext.CodeBase)
 java.lang.Object
com.ibm.rmi.io.IIOPInputStream.simpleReadObject(java.lang.Class,java.lang.String, com.ibm.org.omg.SendingContext.CodeBase)
 java.io.Serializable
com.ibm.rmi.io.ValueHandlerImpl.readValueInternal(com.ibm.rmi.io.IIOPInputStream, org.omg.CORBA_2_3.portable.InputStream,
int, java.lang.Class,
java.lang.String, com.ibm.org.omg.SendingContext.CodeBase)
 java.io.Serializable
com.ibm.rmi.io.ValueHandlerImpl.readValue(org.omg.CORBA.portable.InputStream, int, java.lang.Class,
java.lang.String, org.omg.SendingContext.RunTime)
 java.io.Serializable
com.ibm.rmi.iiop.CDRInputStream.read_value(java.lang.Class)
 org.w3c.dom.Document XMLTests._TestBean_BaseStub.getDocument(int)
 org.w3c.dom.Document XMLTests._TestBean_Stub.getDocument(int)
 java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object,java.lang.Object [])
 void com.ibm.ivj.testpilot.model.MethodModel.invoke()
 void com.ibm.ivj.testpilot.control.MemberController.invoke()
 void
com.ibm.ivj.testpilot.view.desktop.swing.TestpilotDesktopFrame.invokeWithStatusUpdate(com.ibm.ivj.testpilot.control.MemberController)
 java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object,java.lang.Object [])
 void com.ibm.ivj.testpilot.utils.MethodRunnerThread.runLoop()
 void com.ibm.ivj.testpilot.utils.MethodRunnerThread.run()





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message