users@jaxb.java.net

Re: Jaxb 2.1 sample bugs ?

From: Hanson Char <hanson.char_at_gmail.com>
Date: Sat, 6 Jan 2007 10:04:37 -0800

Indeed I was running on Mustang. After I switched back to jdk1.5.0_10, the
compilation error is gone. However, there are still runtime errors.
Details below.

Hanson

java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
samples/character-escape:

Apache Ant version 1.6.5 compiled on June 2 2005

run:
     [echo] Running the sample application...
     [java] <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
     [java] <e>G&#246;del &amp; his friends</e>
     [java] Exception in thread "main" javax.xml.bind.PropertyException:
name: com.sun.xml.bind.marshaller.CharacterEscapeHandler value:
CustomCharact
erEscapeHandler_at_1632c2d
     [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

samples/updateablePartialBind:

     [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] 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] 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] Java Result: 1



On 1/2/07, Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_sun.com> wrote:
>
> 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.
>