AnsweredAssumed Answered

Build problem with HEAD (as of rev 13853) : Cured

Question asked by gyro.gearless on Mar 12, 2009
Latest reply on Mar 12, 2009 by mikeh
Hi folks,

i had quite some problems building Alfresco from HEAD the last few days, always caught an build failure when the JIBVX bindings where compiled:

BUILD FAILED
C:\usr\src\Alfresco-HEAD\root\projects.xml:199: JiBXException in JiBX binding compilation
   at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:252)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.Target.execute(Target.java:341)
   at org.apache.tools.ant.Target.performTasks(Target.java:369)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   at org.apache.tools.ant.Main.runBuild(Main.java:668)
   at org.apache.tools.ant.Main.startAnt(Main.java:187)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.jibx.runtime.JiBXException: Error running binding compiler
   at org.jibx.binding.Compile.compile(Compile.java:321)
   at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248)
   … 12 more
— Nested Exception —
Error running binding compiler
java.lang.NoClassDefFoundError: org/alfresco/error/AlfrescoRuntimeException
   at java.lang.ClassLoader.defineClass1(Native Method)

I just cured this by augmenting the classpath for JiBX with "core" - here is the tweaked project.xml, around line 190:

   <target name="compile-repository-jibx" 
           depends="init">
      <!– load the JIBX task definition –>
      <taskdef name="bind"
               classname="org.jibx.binding.ant.CompileTask"
               classpath="${dir.project.3rdparty.lib}/jibx/jibx-bind.jar;${dir.project.3rdparty.lib}/jibx/jibx-run.jar;${dir.project.3rdparty.lib}/bcel.jar;${dir.project.3rdparty.lib}/xpp3-1.1.3_8.jar" />
      <bind verbose="false"
            load="true"
            binding="${file.jibx.binding.m2}">
         <classpathset dir="${dir.project.repository.classes}"/>
         <classpathset dir="${dir.project.core.classes}"/>
      </bind>
      <bind verbose="false"
            load="true"
            binding="${file.jibx.binding.systeminfo}">
         <classpathset dir="${dir.project.repository.classes}"/>
         <classpathset dir="${dir.project.core.classes}"/>
     </bind>
   </target>


I suppose it would be good idea to integrate this change into HEAD  :roll:

Cheers
Andreas


Andreas Wollschläger
Senior Consultant
abcona active business consulting agency
http://www.abcona.de

Outcomes