Did you run "ant run" or from the command line? When you send your version it worked
with my settings as well but only when I ran the ant target. It turned out that ant
was calling the wrong, or probably right, jvm. I found out by running with verbose and
debug flags on, after a lot of staring.
I use win2k sp 2 and xerces 1.4.0 ( the one that came with castor )
Here is the output first of a run with j2sdk1.4.0_02, then with jdk1.3.1_04:
<snip>
Tue Oct 29T10:05:49 PC0414:type$ ant run
Buildfile: build.xml
prepare:
type:
[echo] generate the java files from the schema using castor. ./classes
[java] -- Suppressing non fatal warnings.
[java] bla: type.xsd
[java] blob:
[java] found ns Prefix as
[java] found ns Prefix as null
[java] found ns Prefix as null
[java] found ns Prefix as null
gen:
[echo] compile the <some-castor-generated>.java files in the test.generated
package.
[javac] Compiling 8 source files to C:\Documents and
Settings\hoogland\Desktop\junk\type2\type\classes
run:
[java] avmaria: 2 arguments
[java] after unmarshalRoot
[java] avmaria: 0 arguments
[java] AFter marshal root
BUILD SUCCESSFUL
Total time: 45 seconds
Tue Oct 29T10:06:41 PC0414:type$ echo $JAVA_HOME
/cygdrive/c/j2sdk1.4.0_02
Tue Oct 29T10:06:48 PC0414:type$ export JAVA_HOME=/cygdrive/c/jdk1.3.1_04
Tue Oct 29T10:07:12 PC0414:type$ ls $JAVA_HOME
COPYRIGHT LICENSE README.txt Uninst.isu bin demo include include-old jre lib
readme.html src.jar
Tue Oct 29T10:07:21 PC0414:type$ ant run
Buildfile: build.xml
prepare:
type:
[echo] generate the java files from the schema using castor. ./classes
[java] -- Suppressing non fatal warnings.
gen:
[echo] compile the <some-castor-generated>.java files in the test.generated
package.
[javac] Compiling 8 source files to C:\Documents and
Settings\hoogland\Desktop\junk\type2\type\classes
run:
[java] avmaria: 2 arguments
[java] org.xml.sax.SAXException: unable to find FieldDescriptor for 'item' in
ClassDescriptor of genericContainer
[java] at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1021)
[java] at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
[java] at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1197)
[java] at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
[java] at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1238)
[java] at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
[java] at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
[java] at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:485)
[java] at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:417)
[java] at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:557)
[java] at test.generated.Root.unmarshalRoot(Root.java:264)
[java] at test.test.unmarshal(test.java:27)
[java] at test.test.main(test.java:54)
[java] avmaria: 0 arguments
[java] AFter marshal root
BUILD SUCCESSFUL
Total time: 42 seconds
</snap>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:Erik.Ostermueller@;alltel.com]
> Sent: Monday, October 28, 2002 6:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] please (was) xsi:type and jdk 1.3x
>
>
> Daan,
>
> Whoops. I forgot about that. I just downloaded jdk1.3.1_04
> ran my tests with it. I got it to work OK.
>
> other variables:
> Xerces: 1.4.4
> OS: Win2k service pack 3
>
> --Erik
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:Daan.Hoogland@;nc3a.nato.int]
> > Sent: Monday, October 28, 2002 10:14 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [castor-dev] please (was) xsi:type and jdk 1.3x
> >
> >
> > I allready did at the tenth. Actually you reply that it
> > worked. That's how i found out it was a jdk version
> > thing. but i cannot think of any new jdk feature that
> > is used in this (or jdk bug fix). The sample was called
> > type.zip. I'll post it again, if needed. I can't lookup
> > the archive message id from here.
> >
> > This is a partially of list discussion I am making
> > public as to clarify some things to others.
> > from the conversation back then:
> > YOU:
> > Daan,
> >
> > I tried your example -- I didn't get any exceptions
> > when unmarshalling.
> > I've attached my version. I didn't change any code,
> > either, 'cept for a
> > few println()'s.
> >
> > ME:
> > ok I get the exception from your code too:
> >
> > YOU:
> > I get this:
> >
> > avmaria: 2 arguments
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > org/exolab/castor/xml/ValidationException
> > at test.test.unmarshal(test.java:27)
> > at test.test.main(test.java:53)
> >
> > When I add castor and xerces, all is OK.
> >
> > ME:
> > You are using jdk 1.4 right?
> >
> > YOU:
> > yep. j2sdk1.4.1
> >
> > ME:
> > I knew,
> >
> > I sent this to the list this morning:
> > <self-quoting-mode>
> > With some help I reduced the problem to an jdk/jvm
> > version related problem.
> > jdk1.3.1_04 does not work.
> > j2sdk1.4.0_02 works
> >
> > both marshal fine, so the message about finding it is
> incorrect.
> > </self-quoting-mode>
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:Erik.Ostermueller@;alltel.com]
> > > Sent: Monday, October 28, 2002 4:06 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [castor-dev] please (was) xsi:type and jdk 1.3x
> > >
> > >
> > > Daan,
> > >
> > > If you post a small example
> > > I'll loan you this extra set of eyes.
> > >
> > > --Erik
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:Daan.Hoogland@;nc3a.nato.int]
> > > > Sent: Monday, October 28, 2002 8:36 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [castor-dev] please (was) xsi:type
> > and jdk 1.3x
> > > >
> > > >
> > > > I am stuck to jdk 1.3.1 due to another library
> > > > (LuciadMap) with swing problems, so please
> is anyone
> > > > has the vaguest of clues....
> > > >
> > > > -----Original Message-----
> > > > From: Hoogland Daan
> > > > Sent: Monday, October 28, 2002 2:35 PM
> > > > To: Castor Dev (E-mail)
> > > > Subject: xsi:type and jdk 1.3x
> > > >
> > > >
> > > > Does anyone know why unmarshalling an
> > abstract type by
> > > > means of xsi:type doesn't work in jdk 1.3, while it
> > > > does in .4? Or is this maybe fixed by now?
> > > >
> > > > where to look...
> > > >
> > > > thanks
> > > >
> > > >
> > -----------------------------------------------------------
> > > > 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
> > >
> > >
> >
> > -----------------------------------------------------------
> > 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
>
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev