On Wed, Apr 6, 2016 at 6:03 PM, Juan Hernández <jhernand@redhat.com> wrote:
On 04/06/2016 11:51 AM, Kai Kang wrote:
> Hi,
>
> I am building ovirt-engine 3.6.4.1 and failed with NullPointerException.
> I build for cross compile with commands:
>
>
>
> tmp_repo=/buildarea3/kkang/builds/Mar31-ovrit-engine/bitbake_build/tmp/work/corei7-64-wrs-linux/ovirt-engine/3.6.4.1-r0/repo
>     export MAVEN_OPTS="-Dmaven.repo.local=$tmp_repo"
>
>     make    EXTRA_BUILD_FLAGS="-s
> /buildarea3/kkang/builds/Mar31-ovrit-engine/bitbake_build/tmp/work/corei7-64-wrs-linux/ovirt-engine/3.6.4.1-r0/settings.xml
> --debug --offline"    -j1     BUILD_GWT=1     BUILD_LOCALES=0
> BUILD_UT=1      BUILD_VALIDATION=0
>  JAVA_DIR=/usr/share/ovirt-engine/java   LOCALSTATE_DIR=/var
> MAVENPOM_DIR=/usr/share/ovirt-engine/maven-poms         PREFIX=/usr
> SYSCONF_DIR=/etc        PKG_SYSCONF_DIR=/etc/ovirt-engine
> PKG_DOC_DIR=/usr/doc/ovirt-engine
> PKG_EAR_DIR=/usr/share/ovirt-engine/engine.ear
>  PKG_PKI_DIR=/etc/pki/ovirt-engine
> PKG_JBOSS_MODULES=/usr/share/ovirt-engine/modules
> PKG_CACHE_DIR=/var/cache/ovirt-engine
> PKG_LOG_DIR=/var/log/ovirt-engine
> PKG_TMP_DIR=/var/tmp/ovirt-engine
> PKG_STATE_DIR=/var/lib/ovirt-engine     PKG_USER=ovirt  PKG_GROUP=ovirt
>          all
>
>
> The error messages show:
>
> [INFO] oVirt Engine API Definition ....................... FAILURE [1.476s]
> ...
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.codehaus.mojo:exec-maven-plugin:1.2:java (default) on project
> restapi-definition: An exception occured while executing the Java class.
> null: InvocationTargetException: NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (default) on
> project restapi-definition: An exception occured while executing the
> Java class. null
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
>         ...
>         at javax.xml.bind.JAXB.marshal(JAXB.java:332)
>         at
> org.ovirt.engine.api.rsdl.RsdlManager.serializeRsdl(RsdlManager.java:134)
>         at
> org.ovirt.engine.api.rsdl.RsdlManager.generateRsdlFile(RsdlManager.java:84)
>         at org.ovirt.engine.api.rsdl.RsdlManager.main(RsdlManager.java:58)
>         ... 6 more
>
>
> My questions are:
>
> 1 I know the error occurs in
> file backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlManager.java,
> but how to debug it?
>
> 2 When I remove pom and jar files of javax.xml.bind.JAXB in mave repo
> with offline mode, it still could find the class.
> Which javax.xml.bind.JAXB is used? I searched the ovirt engine repo but
> didn't find it either.
>

The version of JAXB used by that area of the code is the version of JAXB
included in the JDK that you are using for the build. So the question is
what version of the JDK are you using?

Hi Juan,

I am using icedtea7 to build openjdk-7. And I found the JAXB file. 

Would you like to give some advice how to debug this issue? Does jdb could debug such code?

Thanks a lot.

--Kai
 

--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.