i try to generate classes using JAXB but I a get an exception : IllegalArgumentException: Illegal pattern character \'g\' I\'using a complex XSD file and a binding file as
I might guess that one of your xsd files have a regexp-based restriction attached to a type/element. Have you validated those files?
At last I found the answer. The problem is due to a mistake in the class Options in the package com.sun.tools.xjc. In the method getPrologComment the class builds a localized message taking parameter fot date and time from a localized resource bundle, but then formats the date using a fixed Locale.ENGLISH. This behavior is inside JAXB 2.2.6. I solved the problem simply updating the file MessageBundle_it.properties (in my case for italian) in the package com\sun\tools\xjc\ of the jar file jaxb-xjc.jar. The changes I made was : Driver.DateFormat = aaaa.MM.gg (original) to Driver.DateFormat = yyyy/MM/dd (new) and Driver.TimeFormat = hh:mm:ss a z (original) to Driver.TimeFormat = HH:mm:ss (new) With those changes I was able to generate the classes as needed. HTH Flavio