ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Petterson (KI/EAB)" <mikael.petter...@ericsson.com>
Subject TransformerFactory cannot be found
Date Fri, 19 Dec 2003 08:58:40 GMT
Hi again, 

I am trying to use checkstyle with ant but I still have problems to use <style> in my
build file.

I am using:

java version "1.3.1_03"
Apache Ant version 1.5.4 compiled on August 12 2003

I have the following jars in a directory ("${support.tools}/checkstyle32" - see build.xml
below).

checkstyle-all-3.2.jar   jaxp-api.jar             xalan.jar

I have also tried to use only the checkstyle-all-3.2.jar ( without jaxp-api.jar xalan.jar
but with the same error as below).


Any hints?!

//Mikael



I still get the following error:

style] Processing /vobs/rbs/sw/rbssw1/boam_subsys/swtools/checkstyle/checkstyle_errors.xml
to /home/eraonel/tmp/checkstyle/checkstyle/checkstyle_errors.html
    [style] Loading stylesheet /vobs/rbs/sw/rbssw_tools/boam_tools/eclipse/swtools/checkstyle32/checkstyle-noframes.xsl

BUILD FAILED
javax.xml.transform.TransformerFactoryConfigurationError: Provider for javax.xml.transform.TransformerFactory
cannot be found
        at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.getFactory(TraXLiaison.java:387)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTemplates(TraXLiaison.java:336)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer(TraXLiaison.java:354)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:181)
        at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:487)
        at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:259)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 8 minutes 24 seconds
javax.xml.transform.TransformerFactoryConfigurationError: Provider for javax.xml.transform.TransformerFactory
cannot be found
        at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.getFactory(TraXLiaison.java:387)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTemplates(TraXLiaison.java:336)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer(TraXLiaison.java:354)
        at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:181)
        at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:487)
        at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:259)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
Provider for javax.xml.transform.TransformerFactory cannot be found

BUILD.XML
========

<?xml version="1.0" encoding="UTF-8"?>
<!-- Written to assume that classpath is rooted in the current directory. -->
<!-- So this should be OK if you make this script in the root of a filesystem. -->
<!-- If not, you may prefer to adjust the basedir, or move some directories around. -->
<!-- The idea is that both Ant and NetBeans have to know what the package root is -->
<!-- for the classes in your application. -->
<project basedir="." default="all" name="swtools">

    <!-- Don't worry if you don't know the Ant syntax completely or need help on some tasks!
-->
    <!-- The standard Ant documentation can be downloaded from AutoUpdate and -->
    <!-- and then you can access the help in menu Help | Help Sets | Ant 1.5.1 Manual.
-->

    <target name="init">
        <!-- You can set up any variables you want used throughout the script here. -->
        
        <!-- Directories -->
        <property name="support.tools" value="/vobs/rbs/sw/rbssw_tools/boam_tools/eclipse/swtools/"/>
        <property name="target.temp" value="/vobs/rbs/sw/rbssw1/boam_subsys/swtools"/>
        <property name="target.web" value="/home/eraonel/tmp/checkstyle"/>
        <property name="source.java" value="../src"/>
        <property name="classes.dir" value="../classes"/>
        
        <!-- Version or custom names -->
         <property name="template" value="sun_checks.xml"/>
         
        
        <!-- Libraries for boam -->
        <property name="cma" value="/vobs/cello/struct/cello_dp/lib/jvm/cma.jar"/>
        <property name="foundation" value="/vobs/cello/struct/cello_dp/lib/jvm/foundation.jar"/>
        <property name="oms" value="/vobs/cello/struct/cello_dp/lib/jvm/oms.jar"/>
        <property name="vbjorb" value="/vobs/cello/struct/cello_dp/lib/jvm/vbjorb.jar"/>
        <property name="asms" value="/vobs/cello/struct/cello_dp/lib/jvm/install_stubbed/asms.jar"/>
        
       
        
    </target>

    <target depends="init" name="compile">
      <javac debug="true" deprecation="true" destdir="${classes.dir}" srcdir="${source.java}">
            <!-- To add something to the classpath: -->
            <!-- <classpath><pathelement location="${mylib}"/></classpath>
-->
            <!-- To exclude some files: -->
            <!-- <exclude name="com/foo/SomeFile.java"/><exclude name="com/foo/somepackage/"/>
-->
            <classpath><pathelement location="${cma}"/></classpath>
            <classpath><pathelement location="${foundation}"/></classpath>
            <classpath><pathelement location="${oms}"/></classpath>
            <classpath><pathelement location="${vbjorb}"/></classpath>
            <classpath><pathelement location="${asms}"/></classpath>
            <exclude name="se/ericsson/wcdma/rbs/boam/pms/tb/"/>
            <exclude name="se/ericsson/wcdma/rbs/boam/conv/"/>

        </javac>
    </target>

    <target depends="init,compile" description="Build everything." name="all">
        <echo message="Application built. Hello ${hello}!"/>
    </target>

    <target depends="init" description="Clean all build products." name="clean">
        <delete>
            <fileset dir=".">
                <include name="**/*.class"/>
            </fileset>
        </delete>
    <delete file="myapp.jar"/>
        <delete dir="apidoc"/>
    </target>
    
    <target depends="init" description="Check Style - works on source code" name="checkstyle">
  <mkdir dir="${target.temp}/checkstyle"/>
  <mkdir dir="${target.web}/checkstyle"/>
  <taskdef resource="checkstyletask.properties">
    <classpath>
      <fileset dir="${support.tools}/checkstyle32"
          includes="**/*.jar"/>
    </classpath>
  </taskdef>
  <copy file="${support.tools}/checkstyle32/${template}"
      overwrite="true"
      tofile="${target.temp}/checkstyle/${template}">
    <filterset>
      <filter token="source.java"
          value="${basedir}/${source.java}"/>
      <filter token="target.checkstyle"
          value="${basedir}/${target.temp}/checkstyle"/>
    </filterset>
  </copy>
  <checkstyle config="${target.temp}/checkstyle/${template}"
      failOnViolation="false">
    <fileset dir="${source.java}"
        includes="**/*.java"/>
    <formatter type="plain"/>
    <formatter type="xml"
        toFile="${target.temp}/checkstyle/checkstyle_errors.xml"/>
  </checkstyle>
  <style
      basedir="${target.temp}/checkstyle"
      destdir="${target.web}/checkstyle"
      includes="checkstyle_errors.xml"
      style="${support.tools}/checkstyle32/checkstyle-noframes.xsl"/>
</target>

    
    

</project>




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message