Illegal pattern character 'o' at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:769) at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:576) .....
(characted may be different - es. 'g' or other).
What is the problem?
Problem seems to be your locale setting because jaxb-xcj doen't support locale different from US.
Solution
Generate your classes with ant and introduce a javascript function to change your locale to US.
Sample ant file
<taskdef
name="xjc" classname="com.sun.tools.xjc.XJCTask">
<scriptdef
importClass(java.util.Locale);
actualDefault = Locale.getDefault();
project.setProperty("actual-default-locale", actualDefault);
Locale.setDefault(Locale.US);
]]>
name="setLocale" language="javascript"><![CDATA[
</scriptdef>
<target name="gen-oci-as" description="generates java classes from the OCISchemaAS.xsd">
<setLocale />
<xjc schema="${basedir}/xsd/OCISchemaAS.xsd" destdir="${basedir}/src" extension="true" removeOldOutput="true">
</target>
<produces dir="${basedir}/src" includes="**/*.java" />
<arg value="-verbose" />
<arg value="-npa" />
</xjc>
Nessun commento:
Posta un commento