Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8358251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:44:12+00:00 2026-06-09T10:44:12+00:00

How can I set the classpath of one third-party JAR to include a second

  • 0

How can I set the classpath of one third-party JAR to include a second third-party JAR in Ant?

I need this to run the vanilla Using Schematron with ANT example from this site. (I’m 99% sure you don’t need to know what Schematron is to answer this question.) The example’s instructions are in a short PDF linked near the top of the page. I copy-pasted the contents of all the files directly from the PDF into Eclipse.

I then downloaded ant-schematron-2010-04-14.jar from the above site, and got saxon9he.jar from the SAXON SourceForge page. I also changed the buildfile to match. With line numbers and without comments, it looks like this:

09 <project name="schematron-ant-sample" default="validate">
14     <taskdef name="schematron"
15              classname="com.schematron.ant.SchematronTask"
16              classpath="lib/ant-schematron-2010-04-14.jar; lib/saxon9he.jar" />
22     <target name="validate" description="Test with a Fileset">
23         <schematron schema="sch/sample.sch" failonerror="false">
24             <fileset dir="xml" includes="*.xml" />
25         </schematron>
26     </target>
27 </project>

When I ran the buildfile, I got the following error:

validate:

BUILD FAILED
C:\Users\gdawes\Documents\workspace\SchematronAntExample\build.xml:23: /
javax.xml.transform.TransformerFactoryConfigurationError: Provider /
net.sf.saxon.TransformerFactoryImpl not found

Total time: 265 milliseconds

A similar error occurs if the SAXON JAR isn’t listed in schematron‘s classpath. I’ve confirmed that TransformerFactoryImpl is present in the SAXON JAR, but I can’t figure out how to get the Schematron code to recognize it. How should I set up the classpath? (Or, if I’m wrong and this isn’t a classpath issue, how do I get the build to succeed?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:44:16+00:00Added an answer on June 9, 2026 at 10:44 am

    The classpath in the <taskdef> should only contain: lib/ant-schematron-2010-04-14.jar, similar to the example provided in Using Schematron for Ant by example.

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="schematron-ant-sample" default="validate">
      <taskdef name="schematron"
          classname="com.schematron.ant.SchematronTask"
          classpath="lib/ant-schematron-2010-04-14.jar" />
      <target name="validate" description="Test with a Fileset">
        <schematron schema="sch/sample.sch" failonerror="false">
          <fileset dir="xml" includes="*.xml" />
        </schematron>
      </target>
    </project>
    

    In addition to correcting the <taskdef>, placing the saxon9he.jar in the Ant library folder makes net.sf.saxon.TransformerFactoryImpl available and resolves the error (tested on Ubuntu Linux with Ant 1.8.2).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can set the event on the calendar on my device by using this
I am trying to set the CLASSPATH variable so that my java programs can
I understand that we can set the various style attributes from code behind using
when using RunTime.exec(), one can specify the working directory of the subprocess (very useful,
I've inherited an Ant build system that contains many resource set definitions like this:
How do I set the classpath order in ant? Specifically, When I am trying
I am using smart gwt 2.0.3 on windows xp. I have set a classpath
I do not have a %CLASSPATH% set up. As I understand, this should not
Can anyone please help me with this? I've got a .jar file for which
I can set the width and height of my canvas by setting the width

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.