Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

xjc java.lang.IllegalArgumentException: Illegal pattern character 'g'  RSS feed

 
Dora Di Donato
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I hava thiso problem :

java.lang.IllegalArgumentException: Illegal pattern character 'g'
how to solve this?

thanks

Dora
 
Vivek SharmaJi
Ranch Hand
Posts: 38
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please provide some more code to see from where 'g' is coming, it seems this is being appended in the parameter.
 
Dora Di Donato
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my project I am using ant and inside the build.xml I have this task with xjc :

<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<classpath>
<fileset dir="${lib.dir}/jaxb2-basics-dist-0.6.4/lib">
<include name="activation.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jsr173_1.0_api.jar"/>
<include name="stax-api-*.jar"/>
<include name="jaxb-xjc.jar"/>
</fileset>
<fileset dir="${lib.dir}/jaxb2-basics-dist-0.6.4/dist">
<include name="jaxb2-basics-ant-*.jar"/>
</fileset>
</classpath>
<classpath>
<path refid="runtime.classpath">
</path>
</classpath>
</taskdef>



<!-- Generate the code -->
<xjc destdir="${src.generated.server.dir}" extension="true" package="${webservice.class.objectsPackage}">
<binding dir="${xsd.dir}">
<include name="jaxb-bindings.xml"/>
</binding>
<schema dir="${basedir}/xsd/base">
<include name="baseRequestResponse.xsd"/>
</schema>

</xjc>


and this is error message :




[xjc] Consider using <depends>/<produces> so that XJC won't do unnecessary compilation
[xjc] Compiling file:/C:/Users/dora/workspace_new/JAWS-TEMPLATE-SDK/xsd/base/baseRequestResponse.xsd
[xjc] Writing output to C:\Users\dora\workspace_new\JAWS-TEMPLATE-SDK\generated-server

BUILD FAILED
C:\Users\dora\workspace_new\JAWS-TEMPLATE-SDK\build\build.template.xml:167: java.lang.IllegalArgumentException: Illegal pattern character 'g'
 
Vivek SharmaJi
Ranch Hand
Posts: 38
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, please check the link

https://netbeans.org/bugzilla/show_bug.cgi?id=216575

Try JAXB 2.2.7 jar or higher version and check if the issue is resolved.
 
Dora Di Donato
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used this jar :

<include name="activation.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jsr173_1.0_api.jar"/>
<include name="stax-api-*.jar"/>
<include name="jaxb-xjc.jar"/>

version 2.2.7 but it gives the same errors .

Dora
 
Dora Di Donato
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solve my problem it denpends from congifuration about ant that reads the jar inside the ide eclipse a runtime but no those in the build.xml.

Thanks so much

dora
 
Dora Di Donato
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and it is important modify the jar following this link :

http://stackoverflow.com/questions/10757211/cannot-generate-classes-with-jaxb

dora
 
Vivek SharmaJi
Ranch Hand
Posts: 38
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice to hear
 
Dora Di Donato
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
:-)


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!