users@jaxb.java.net

Adapter get's ignored on a mac OS X

From: Ely Schoenfeld <ely.jaxb.1_at_mitalteli.com>
Date: Mon, 03 Jan 2011 07:22:40 -0600

Hello everybody.

Happy new year.

I'm struggling with making my application to work properly in a
macintosh MacBook (Mac OS X Snow Leopard)

The problem is that the generated xml doesn't get the correct numbers
format upon marshalling. I don't know why, but it represents:

100 instead of a 1
10000,000000 instead of a 100.000000 (I'm not sure about the number
of zeros, but it is using a "," instead of a ".")

Anybody have had problems like this?

It's very strange, since tried specifying by hand the Locale, and also
created an DecimalFormatSymbols object specifying the "." as decimal
separator.

After that, while debugging, I discovered the Adapter responsible to
format the numbers never gets called when running the application in the
mac, but it does in other OSs. This is: The same Jar works just fine in
windows (xp and 7) and linux (ubuntu and fedora).

The java versions are:

Windows:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

Mac:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)


I'm not sure what code snippets should I give. Please let me know what
should I send.

In the meantime, my xjb contains:
--------------------
<xjc:javaType name="java.math.BigDecimal" xmlType="cfd:t_Importe"
        adapter="com.mitalteli.cfd.feu.ImporteAdapter"
/>
--------------------

Thank you all.

Ely.