Debian Bug report logs - #552032
ant: xslt task cannot use Commons resolver

version graph

Package: ant; Maintainer for ant is Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>; Source for ant is src:ant.

Reported by: "brian m. carlson" <sandals@crustytoothpaste.net>

Date: Thu, 22 Oct 2009 21:09:01 UTC

Severity: normal

Found in version ant/1.7.1-4

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Thu, 22 Oct 2009 21:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
New Bug report received and forwarded. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Thu, 22 Oct 2009 21:09:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ant: xslt task cannot use Commons resolver
Date: Thu, 22 Oct 2009 19:52:45 +0000
[Message part 1 (text/plain, inline)]
Package: ant
Version: 1.7.1-4
Severity: normal

I use ant to build my website, which includes transforming DocBook 5
into XHTML via ant's xslt task.  For several reasons, I want to use
catalogs.  Consequently, I've created a file called .antrc in my home
directory and included the following line in it:

  LOCALCLASSPATH="/usr/share/java/xml-commons-resolver-1.1.jar:/etc/xml/resolver"

However, ant still does not use the resolver.  In
org.apache.tools.ant.types.XMLCatalog, getCatalogResolver seems to fail
at the line (approximately line 510):

  clazz = Class.forName(APACHE_RESOLVER, true, baseResolverLoader);

with the debugging message:

  Apache resolver library not found, internal resolver will be used
  Failed to load Apache resolver: java.lang.ClassNotFoundException: org.apache.tools.ant.types.resolver.ApacheCatalogResolver

My strong preference is that the Commons resolver always be used if it
is installed on the machine; there really is no reason not to.  However,
if that is judged to be infeasible for whatever reason, I'd prefer that
it at least work in some case and have it be documented how to make it
work.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ant depends on:
ii  default-jre-headless [jav 1.6-33         Standard Java or Java compatible R
ii  gcj-4.4-jre-headless [jav 4.4.1-6        Java runtime environment using GIJ
ii  gcj-jre-headless [java2-r 4:4.3.3-9+nmu1 Java runtime environment using GIJ
ii  gij-4.3 [java2-runtime-he 4.3.4-4        The GNU Java bytecode interpreter
ii  java-gcj-compat-headless  1.0.80-5.1     Java runtime environment using GIJ
ii  libxerces2-java           2.9.1-4        Validating XML parser for Java wit
ii  openjdk-6-jre-headless [j 6b16-1.6.1-2   OpenJDK Java runtime, using Hotspo

Versions of packages ant recommends:
pn  ant-gcj                       <none>     (no description available)
ii  ant-optional                  1.7.1-4    Java based build tool like make - 

Versions of packages ant suggests:
ii  ant-doc                   1.7.1-4        Java based build tool like make - 
ii  default-jdk [java-sdk]    1.6-33         Standard Java or Java compatible D
ii  gcj-4.3 [java-compiler]   4.3.4-4        The GNU compiler for Java(TM)
ii  gcj-jdk [java-sdk]        4:4.3.3-9+nmu1 gcj and classpath development tool
ii  java-gcj-compat-dev [java 1.0.80-5.1     Java runtime environment with GCJ
ii  openjdk-6-jdk [java-sdk]  6b16-1.6.1-2   OpenJDK Development Kit (JDK)

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Fri, 23 Oct 2009 07:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Onkar Shinde <onkarshinde@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Fri, 23 Oct 2009 07:21:03 GMT) Full text and rfc822 format available.

Message #10 received at 552032@bugs.debian.org (full text, mbox):

From: Onkar Shinde <onkarshinde@ubuntu.com>
To: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>, 552032@bugs.debian.org
Subject: Re: Bug#552032: ant: xslt task cannot use Commons resolver
Date: Fri, 23 Oct 2009 12:44:00 +0530
Do you have ant-optional package installed? ant-apache-resolver.jar is
part of that package. Simply installing the package should ideally fix
the issue.


Onkar




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Fri, 23 Oct 2009 13:24:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Fri, 23 Oct 2009 13:24:06 GMT) Full text and rfc822 format available.

Message #15 received at 552032@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Onkar Shinde <onkarshinde@ubuntu.com>
Cc: 552032@bugs.debian.org
Subject: Re: Bug#552032: ant: xslt task cannot use Commons resolver
Date: Fri, 23 Oct 2009 12:50:57 +0000
[Message part 1 (text/plain, inline)]
On Fri, Oct 23, 2009 at 12:44:00PM +0530, Onkar Shinde wrote:
> Do you have ant-optional package installed? ant-apache-resolver.jar is
> part of that package. Simply installing the package should ideally fix
> the issue.

I do.  I still get a message that says:

  Warning: XML resolver not found; external catalogs will be ignored

even with it installed.  This occurs whether or not I comment out the
LOCALCLASSPATH= line in .antrc.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Thu, 24 Dec 2009 11:21:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Thu, 24 Dec 2009 11:21:04 GMT) Full text and rfc822 format available.

Message #20 received at 552032@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: 552032@bugs.debian.org
Subject: Found working configuration
Date: Thu, 24 Dec 2009 11:20:06 +0000
[Message part 1 (text/plain, inline)]
I've found that if I set LOCALCLASSPATH="/etc/xml/resolver" in ~/.antrc,
*and* I invoke ant with "-lib /usr/share/java", then it works properly.
If there are other things in LOCALCLASSPATH, it fails.  Similarly, it
also fails if I omit the -lib argument.  Hopefully this is helpful in
tracking down the root of the problem.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Sat, 20 Feb 2010 21:42:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Claude <ludovic.claude54@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Sat, 20 Feb 2010 21:42:09 GMT) Full text and rfc822 format available.

Message #25 received at 552032@bugs.debian.org (full text, mbox):

From: Ludovic Claude <ludovic.claude54@googlemail.com>
To: 552032@bugs.debian.org
Subject: Any sample build file?
Date: Sat, 20 Feb 2010 22:38:31 +0100
Hello Brian,

Do you have a sample build file that I could run to reproduce this
problem, that would help.

Thanks,
Ludovic




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Wed, 02 Jun 2010 19:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Wed, 02 Jun 2010 19:57:03 GMT) Full text and rfc822 format available.

Message #30 received at 552032@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Ludovic Claude <ludovic.claude54@googlemail.com>, 552032@bugs.debian.org
Subject: Testcase for ant commons resolver problem
Date: Wed, 2 Jun 2010 19:53:39 +0000
[Message part 1 (text/plain, inline)]
I didn't notice your email, since you didn't CC me.  The BTS does not
automatically CC submitters by default.

Anyway, there is a testcase attached.  Unpack it, run "ant" and watch it
fail.  You will need w3c-dtd-xhtml installed, as well as ant,
ant-optional, and libxml-commons-resolver1.1-java.  It works for me if I
run it instead as "ant -lib /usr/share/java/xml-commons-resolver-1.1.jar".

Also, I am using OpenJDK.  IIRC, the Sun VM packages their own copy of
the catalog resolver, so that may cause a difference in results.  Any
more questions, let me know.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[ant-testcase.tar.gz (application/octet-stream, attachment)]
[signature.asc (application/pgp-signature, inline)]

Changed Bug submitter to '"brian m. carlson" <sandals@crustytoothpaste.net>' from '"brian m. carlson" <sandals@crustytoothpaste.ath.cx>' Request was from "brian m. carlson" <sandals@crustytoothpaste.net> to control@bugs.debian.org. (Thu, 03 Feb 2011 20:51:50 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Sun, 13 May 2012 20:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.net>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Sun, 13 May 2012 20:33:02 GMT) Full text and rfc822 format available.

Message #37 received at 552032@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: 552032@bugs.debian.org
Subject: ant workaround no longer functional
Date: Sun, 13 May 2012 20:29:34 +0000
[Message part 1 (text/plain, inline)]
I've recently tried the workaround that I previously specified for this
bug and it no longer works.  In debug mode, I get the following error:

  Apache resolver library not found, internal resolver will be used
  Failed to load Apache resolver: java.lang.ClassNotFoundException: org.apache.tools.ant.types.resolver.ApacheCatalogResolver
  No matching catalog entry found, parser will use: 'profile-mode.xsl'

and I still see the message:

  Warning: XML resolver not found; external catalogs will be ignored

Not using the resolver makes things very, very slow and if I were
parsing XHTML before XHTML 5, it would not work at all, since it would
try (and fail with a 503 error) to load things off the W3C website.  I
suspect that the slowness is downloading the myriad stylesheets off of
DocBook's website.

Can someone look into why this is happening?  The bug has been open for
about two-and-a-half years now and it isn't getting any better.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#552032; Package ant. (Thu, 04 Jul 2013 10:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aleksey Dobrunov <ctapmex@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Thu, 04 Jul 2013 10:00:05 GMT) Full text and rfc822 format available.

Message #42 received at 552032@bugs.debian.org (full text, mbox):

From: Aleksey Dobrunov <ctapmex@gmail.com>
To: 552032@bugs.debian.org
Subject: Two ways of improving
Date: Thu, 4 Jul 2013 15:58:17 +0600
[Message part 1 (text/plain, inline)]
Hi.
stupid problem. a lot of time taken away.
the main problem is not in Ant. it is in the xerces 2.
two options fixes
1. build xerces from the trunk. it works for me. but I do not know what
kind of correction affected.
2. edit /usr/share/ant/bin/ant, by removing the substring
"/usr/share/java/xmlParserAPIs.jar :/usr/share/java/xercesImpl.jar" (roll
back the patch 0003-add-Xerces-from-Debian-s-path.patch).

Aleksey Dobrunov
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 06:53:54 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.