This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 216575 - JAXB compile error Illegal pattern character 'g'
Summary: JAXB compile error Illegal pattern character 'g'
Status: RESOLVED DUPLICATE of bug 251566
Alias: None
Product: xml
Classification: Unclassified
Component: JAXB (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P4 normal with 5 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-09 08:09 UTC by crispaiola
Modified: 2015-04-28 14:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crispaiola 2012-08-09 08:09:56 UTC
I've created an empty project, added a JAXB binding, specified an XSD file and then compiled the project. After compiling the project I get this error:

D:\Documenti\Programmi\testxml\nbproject\xml_binding_build.xml:17: 
java.lang.IllegalArgumentException: Illegal pattern character 'g'
	at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:768)
	at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:575)
	at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:500)
	at com.sun.tools.xjc.Options.getPrologComment(Options.java:924)
	at com.sun.tools.xjc.Options.createCodeWriter(Options.java:909)
	at com.sun.tools.xjc.Options.createCodeWriter(Options.java:899)
	at com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:523)
	at com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:454)
	at com.sun.tools.xjc.XJC2Task.execute(XJC2Task.java:379)
	at com.sun.istack.tools.ProtectedTask.execute(ProtectedTask.java:103)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:392)
	at org.apache.tools.ant.Target.performTasks(Target.java:413)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 2 seconds)

This is the xml schema I've used.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xs:element name="name" type="xs:string"/>
</xs:schema>

If I load this project in netbeans 7.1 I have no errors and the project is successfully compiled. Notice, the project is created in netbeans 7.2 and then loaded in netbeans 7.1 and it is successfully compiled. I have nly problems in netbeans 7.2.
Comment 1 ags77 2012-09-10 09:29:57 UTC
It seem to be an JABX 2.2.6 error, as described here: 

http://java.net/jira/browse/JAXB-915?page=com.atlassian.streams.streams-jira-plugin%3Aactivity-stream-issue-tab

It's resolved by JAXB 2.2.7 (still in development).
Comment 2 gdm 2013-05-08 15:29:53 UTC
Still present in development version 7.4 build 201305072300
Work around (works with older versions, too): 
add "-J-Duser.language=en" to netbeans_default_options in netbeans.conf
Comment 3 ags77 2013-10-01 15:52:36 UTC
More than 1 year and the the bug is still not fixed in 7.4 beta!!!

How long we have to wait???
Comment 4 Svata Dedic 2013-10-01 16:36:48 UTC
There are bugs with higher priority / severity that need to be fixed and features to be implemented; this is not an excuse, just an fact statement. 

If you want to speed up the solution, you're welcome to provide a patch - see the community resources for details of how to contribute. If you don't agree with the priority, consult the bug guidelines and provide proper justification for a higher one.
Comment 5 Svata Dedic 2015-04-28 14:32:19 UTC

*** This bug has been marked as a duplicate of bug 251566 ***