Arnaud,
That is correct, I am unmarshalling the xml stream in an EJB session bean,
and utilizing the resultant classes in either a .jsp or java application
that makes remote calls into the EJB.
The stacktrace (copied from the WebLogic console) is:
error marshalling return; nested exception is:
java.io.NotSerializableException: org.exolab.castor.types.AnyNode
Start server side stack trace:
java.rmi.MarshalException: error marshalling return; nested exception is:
java.io.NotSerializableException: org.exolab.castor.types.AnyNode
java.io.NotSerializableException: org.exolab.castor.types.AnyNode
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
1827)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
:480)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at java.util.ArrayList.writeObject(ArrayList.java:513)
at java.lang.reflect.Method.invoke(Native Method)
at
java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java
:1864)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at
weblogic.rmi.internal.CBVOutputStream.writeObjectInternal(CBVOutputSt
ream.java:216)
at
weblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.jav
a:209)
at
weblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.jav
a:186)
at
com.fhlbatl.i12e.SynergyServiceBean_p65ev2_EOImpl_WLSkel.invoke(Unkno
wn Source)
at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:93)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:265)
at
weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:166
)
at
weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:
92)
at
weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:11
2)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:255)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:222)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy69.fetchInstitutions(Unknown Source)
at jsp_servlet.__synprotgo._jspService(__synprotgo.java:139)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
End server side stack trace
Hope this helps,
Randy
-----Original Message-----
From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Marshaling problems...
Hi Randy,
Can you give more details of what you mean by "anything"? It could help
us to have the full stack trace.
Given your information, I would say that you are passing your array to a
remote object and since AnyNode is not serializable, you have the
NotSerializableException...
Here there is no reason why you have an AnyNode, are you sure you are
using the descriptors generated by the Source Generator (are they
generated? Are they compiled?are they in the CLASSPATH?)
Arnaud
> -----Original Message-----
> From: Cobb, Randal [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 27, 2002 2:07 PM
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] Marshaling problems...
>
> Hello all,
>
> I have a small annoying problem that is probably caused by my own
> ignorance,
> but I can't figure out what to do to fix it...
> I have some SourceGenerator'ed classes based upon the following
schema:
>
> <?xml version='1.0' ?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.whatever.com/i12e">
> <xsd:element name="ReportContainer">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="report" maxOccurs="unbounded"
> minOccurs="1" type="ReportStructure"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:complexType name="ReportStructure">
> <xsd:sequence>
> <xsd:element name="name" type="xsd:string" minOccurs="0"
/>
> <xsd:element name="source" type="xsd:string"/>
> <xsd:element name="application" type="xsd:string"
> minOccurs="0"
> />
> <xsd:element name="institution" type="xsd:string"
> minOccurs="0"
> />
> <xsd:element name="date" type="xsd:string" minOccurs="0"
/>
> <xsd:element name="reportContents" type="xsd:IDREF"
> minOccurs="0" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
>
> and an xml file similar to:
>
> <?xml version="1.0"?>
> <ReportContainer>
> <report>
> <name>001 fred's report</name>
> <source>synergy</source>
> <application>ACH</application>
> <institution>00</institution>
> <date>20020221</date>
> <reportContents>arbitrary report contents</reportContents>
> </report>
> <report>
> <name>008 Bill's report</name>
> <source>synergy</source>
> <application>ACH</application>
> <institution>00</institution>
> <date>20020221</date>
> <reportContents>more arbitrary report
contents</reportContents>
> </report>
> </ReportContainer>
>
> and finally, here is the code that performs the unmarshalling of the
above
> xml file:
>
> ArrayList instArray = new ArrayList();
> ReportContainer repCont = null;
> try {
> repCont = ReportContainer.unmarshal(new
> InputStreamReader(methodURL.openStream()));
> int reportCount = repCont.getReportCount();
> for (int x = 0; x < reportCount; x++) {
> Report rep = (Report)repCont.getReport(x);
> instArray.add(rep);
> }
> } catch (Exception e) {
> throw new EJBException(e.getMessage());
> }
> return instArray;
>
> Enough preliminaries... In a WebLogic stateless session bean, I have a
> method that returns an ArrayList of Report objects that are the
results of
> unmarshalling the above xml file. BUT, no matter what client I use
(.jsp
> or
> .class), whenever I try to do ANYTHING with the ArrayList that is
being
> returned, I get a MarshalException with a nested exception of:
> NotSerializableException: org.exolab.castor.types.AnyNode. I've also
> copied
> in the snippet of code that performs the unmarshaling in the ejbean.
>
> Can anyone help me determine what I have done wrong?
>
> Thanks in advance,
> Randy
>
>
________________________________________________________________________
__
> __
> This e-mail message is private and may contain confidential or
privileged
> information.
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
____________________________________________________________________________
This e-mail message is private and may contain confidential or privileged
information.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev