0

From what I have read, I believe that XJC arguments are used to customize the o/p Java file . We have used these inside the jaxws-maven-plugin . I had an issue with the 'MaskingClassLoader' not being found which resolved on adding the jaxb-xjc jar .

Inside the jaxws-maven-plugin one of the xjc arguments provided is '-Xybdisplay' apart from '-Xcollection-setter-injector' and '-Xboolean-getter' . when I try to do a 'wsimport' , I get the error

[INFO] jaxws:wsimport args: [-s, D:\HeartBeat_Admin\test\testmodel\target\jaxws\wsimport\java, -d, D:\HeartBeat_Admin\test\testmodel\target\classes, -extension, -Xnocompile, -B-verbose, -B-extension, -B-Xcollection-setter-injector, -B-Xboolean-getter, -B-Xybdisplay, D:\HeartBeat_Admin\test\testmodel\src\main\wsdl\test.wsdl]
Using java.util.ServiceLoader
[ybdisplay] XJC Plugin class com.sun.tools.xjc.addon.DisplayPlugin instantiated
[ybdisplay] Parse argument -Xybdisplay
parsing WSDL...


[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.265s
[INFO] Finished at: Wed May 23 23:35:11 IST 2012
[INFO] Final Memory: 63M/63M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:1.12:wsimport (profile) on project testmodel: Error executing: wsimport [-s, D:\HeartBeat_Admin\test\testmodel\target\jaxws\wsimport\java, -d, D:\HeartBeat_Admin\test\testmodel\target\classes, -extension, -Xnocompile, -B-verbose, -B-extension, -B-Xcollection-setter-injector, -B-Xboolean-getter, -B-Xybdisplay, D:\HeartBeat_Admin\test\testmodel\src\main\wsdl\test.wsdl] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

-e and -X doesn't help much . I tried to search for the term 'ybdisplay' in the xsd but I am not able to understand what the issue is or how the customization works . Removing the xjc argument 'ybdisplay' results in an error stating that I need to enable it for customization .

In the XSD we have the following

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:ybmeta="http://www.yellowbook.com/bp/model/meta"
        xmlns:tns="http://www.yellowbook.com/bp/model/types"
        xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
        xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
        targetNamespace="http://www.yellowbook.com/bp/model/types"
        elementFormDefault="unqualified"
        attributeFormDefault="unqualified" jxb:version="2.0" jxb:extensionBindingPrefixes="ybmeta xjc">

<!-- Use our specific bindings -->
<xsd:annotation>
    <xsd:appinfo>
        <jxb:bindings schemaLocation="test.xsd">
            <jxb:schemaBindings>
                <jxb:package name="com.test.model.api"/>
            </jxb:schemaBindings>
        </jxb:bindings>
    </xsd:appinfo>
</xsd:annotation>

I am not sure if the above is related to the xjc argument 'ybdisplay' . Kindly guide me on the working of xjc and how I can debug this issue .

Marco
  • 8,592
  • 1
  • 32
  • 48
Aravind A
  • 8,747
  • 4
  • 34
  • 44

1 Answers1

0

This had nothing to do about XJC args . If it helps anyone , the issue was caused due to the memory running out . I modified the heap size in MAVEN_OPTs and everything worked perfectly .

Aravind A
  • 8,747
  • 4
  • 34
  • 44