Hanson Char wrote:
> Hi,
>
> I just ran (ie ant) all the samples of Jaxb 2.1 (JAXB2_20061211.jar),
> but I got one compilation error (sample/create-marshal),
> and 2 run time errors (sample/character-escape and
> sample/updateablePartialBind).
Hmm. Somehow it looks like your system is not picking up JAXB 2.1 API.
Maybe you run on Mustang?
A part of the test process runs all samples and check it against the
expected output, so I suspect some platform related issues.
>
> Are these expected or should they be fixed ?
>
> See details below.
>
> Hanson
>
> sample/character-escape
>
>
> [echo] Running the sample application...
> [java] <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
> [java] <e>Gödel & his friends</e>
>
> [java] Exception in thread "main"
> javax.xml.bind.PropertyException: name:
> com.sun.xml.bind.marshaller.CharacterEscapeHandler value:
> CustomCharact
> erEscapeHandler_at_145c859
> [java] at javax.xml.bind.helpers.AbstractMarshallerImpl.setProperty
> (AbstractMarshallerImpl.java:338)
> [java] at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.setProperty(MarshallerImpl.java:516)
> [java] at Main.main(Main.java:38)
> [java] Java Result: 1
>
> sample/create-marshal
>
> [javac] C:\Playground\jaxb-ri\20061211\samples\create-marshal\src\Main.java:114:
> cannot find symbol
>
> [javac] symbol : variable JAXB
> [javac] location: class Main
> [javac] JAXB.marshal( poElement, System.out );
> [javac] ^
> [javac] 1 error
>
> sample/updateablePartialBind
>
> run:
> [echo] Running the sample application...
> [java] Using binder to perform xpath that returns JAXB objects
>
> [java] Ship Address found by xpath
> [java] Alice Smith
> [java] 123 Maple Street
> [java] Cambridge, MA 12345
> [java] US
>
> [java] Bill Address found by xpath
>
> [java] Robert Smith
> [java] Exception in thread "main" java.lang.IllegalArgumentException
> [java] at
> com.sun.xml.bind.v2.runtime.BinderImpl.updateXML(BinderImpl.java:168)
> [java] at
> com.sun.xml.bind.v2.runtime.BinderImpl.updateXML(BinderImpl.java:164)
> [java] at
> UpdateablePartialBinding.updateablePartialBind(UpdateablePartialBinding.java:190)
> [java] at UpdateablePartialBinding.main
> (UpdateablePartialBinding.java:73)
> [java] 8 Oak Avenue
> [java] Cambridge, MA 12345
> [java] US
>
> [java] items over $25 found by xpath
> [java] 5 copies of "Nosferatu - Colorized (1929)" price=
> 25.00
> [java] 3 copies of "Godzilla and Mothra: Battle for
> Earth/Godzilla vs. King Ghidora" price= 25.00
> [java] 5 copies of "Nosferatu - Colorized (1929)" price= 25.00
> [java] Completed jaxbXpath
>
>
> [java] Updateable partial binding allowing for schema evolution
> and preservations of comments in XML document
> [java] Java Result: 1
>
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com