Unable to Compile the Custom Forms using ANT tool

Unable to Compile the Custom Forms using ANT tool

book

Article ID: KB0077769

calendar_today

Updated On:

Products Versions
TIBCO MDM 9.1.0

Description

While trying to compile custom HTML Email templates using ANT tool(ant compile) through Command Line interface we may experience below error.

C:\tibco\mdm\9.1\bin\buildTool\bin>ant compile
Buildfile: C:\tibco\mdm\9.1\bin\buildTool\bin\build.xml

init:

compileVeloselDependent:
     [echo] Compiling velosel dependent classes
    [javac] C:\tibco\mdm\9.1\bin\buildTool\bin\build.xml:198: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
     [echo] Finished Compiling velosel dependent classes

compileCustomClasses:
     [echo] Compiling Non Velosel Dependent Custom classes
    [javac] C:\tibco\mdm\9.1\bin\buildTool\bin\build.xml:178: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
     [echo] Finished Compiling velosel dependent classes

compileHtml:
  Using XMLC to compile 2 HTML files

BUILD FAILED
C:\tibco\mdm\9.1\bin\buildTool\bin\build.xml:225: java.lang.NoClassDefFoundError: org/enhydra/xml/xmlc/commands/xmlc/XMLC
        at com.martquest.anttask.HTMLCompiler.execute(HTMLCompiler.java:411)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: org.enhydra.xml.xmlc.commands.xmlc.XMLC

Issue/Introduction

Getting Error while Compiling custom HTML Templates by using ANT tool and the build is getting failed

Environment

ALL

Resolution

The Build is getting failed and throwing Exception(java.lang.ClassNotFoundException: org.enhydra.xml.xmlc.commands.xmlc.XMLC) while compiling the compileHtml of XMLC to compile the HTML files.Where as the XMLC.bat is Verifying the Class Path of the MQ_HOME and JAVA_HOME path for the environment.
So,To make sure the build successful we need to set the Proper CLASSPATH's for these environment variables before executing the ANT Tool.

Below Jar Files should be present under MQ_HOME.
"%MQ_HOME%"\lib\external\xmlc\lib\xml-apis.jar
"%MQ_HOME%"\lib\external\xmlc\build-lib\gnu-regexp.jar
"%MQ_HOME%"\external\xmlc\lib\xmlc.jar
"%MQ_HOME%"\lib\external\xmlc\lib\jtidy.jar

Additional Information

01780130,https://docs.tibco.com/pub/mdm/9.1.0/doc/html/GUID-A3DB5BDB-E28D-4A41-96BD-2FF61C14291E.html