Re: ant junit target fails

2005-08-08 Thread Jeremias Maerki
On 07.08.2005 20:41:42 Simon Pepping wrote:
 I have always commented this test out in my working copy. I do not
 like tests that actually (also) test the exact innards of certain
 Xerces and Xalan versions.

They were not supposed to check the innards of certain Xerces and Xalan
versions. The tests check the basic functionality of the FOP API. Given
that most of the directy dependencies on the input source are now removed 
(only getDefaultHandler() remains) we can probably remove some of those
methods, especially the DOM-related ones. Do you agree?

 I have got several copies of those two on my system, and I use them
 via the endorsed-dirs mechanism. Some scripts use a different copy
 than others, and for me FOP should just work with any recent parser
 and transformer.

That's right, but there's simply the fact the there were a lot of little
bugs in the TraX portion of Xalan WRT DOM. There's not much we can do
about that in FOP.

 IMHO An upgrade of the jars in FOP does not solve the
 problem of this test file.

Any additional ideas?

 Regards, Simon
 
 On Sun, Aug 07, 2005 at 06:46:17PM +0200, Jeremias Maerki wrote:
  There were a number of these issues in the past. Yes, it's definitely
  time to upgrade the Xerces and Xalan JARs, although it won't fix the
  problems for those people who don't know how to replace the default
  Xerces/Crimson and Xalan versions coming with the JDK. But that can't be
  helped. As a rule, I always use the latest Xerces and Xalan versions on
  my machine. I even have a customized Xalan ATM since the Xalan people
  haven't fixed a bug which causes a problem with Barcode4J and FOP for
  over a year now.
  
  On 07.08.2005 14:21:55 Manuel Mall wrote:
   On Sat, 6 Aug 2005 10:37 pm, you wrote:
I am consistently getting the error below on the ant junit target.
   
   snip/
   
   Further investigation showed that I can get rid of the error by
   upgrading the xerces/xalan combination. Here is a summary of what I
   found:
   
   xalan 2.4.1/xerces 2.2.1 as extracted from SVN doesn't work
   xalan 2.5.x/xerces 2.?.? doesn't work
   xalan 2.6.1/xerces from xalan 2.6.1 bundle does prevent the error below 
   but I then get similar NAMESPACE_ERR errors from within the layout 
   engine test suite
   xalan 2.7.0/xerces from xalan 2.7.0 bundle does work
   
   All this evaluated under RH Enterprise ES 3 with Sun Java 5.0 latest
   release.
   
   Time to upgrade the xalan/xerces jars in SVN?
   
   Manuel
   
There was 1 error:
1)
testFO2PDFWithDOM(org.apache.fop.BasicDriverTestCase)javax.xml.transf
   orm.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An
attempt is made to create or change an object in a way which is
incorrect with regard to namespaces.
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
   ormerIdentityImpl.java:511) at
org.apache.fop.BasicDriverTestCase.loadDocument(BasicDriverTestCase.j
   ava:62) at
org.apache.fop.BasicDriverTestCase.testFO2PDFWithDOM(BasicDriverTestC
   ase.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  
  
  
  Jeremias Maerki
  
 
 -- 
 Simon Pepping
 home page: http://www.leverkruid.nl



Jeremias Maerki



Re: ant junit target fails

2005-08-08 Thread Jeremias Maerki

On 08.08.2005 02:22:55 Manuel Mall wrote:
 On Mon, 8 Aug 2005 02:41 am, Simon Pepping wrote:
 snip/
  IMHO An upgrade of the jars in FOP does not solve
  the problem of this test file.
 
 Simon,
 
 1. do you actually understand what the problem is because I don't? The 
 test file (test/xml/bugtests/block.fo) is trivial. It works from the 
 fop command line, it works with the SAX test, its only when using the 
 identity transformation to convert it into a DOM source that the error 
 happens.

It's a matter of version-constellation. Lots of little Xalan bugs in
older versions plus the problem that Sun do their own release of Xerces
and Xalan in their JDK (custom modifications). See also my reponse to
Simon.

 2. While I agree that fop as such should work with any JAXP compliant 
 parser I don't have a problem if building/verifying fop requires a 
 particular parser / transformer version. However, IMHO it would be 
 desirable that fop builds / verifies out-of-the-box without the need to 
 upgrade components delivered with it. It seems to me that we could 
 achieve that by upgrading xerces/xalan in SVN. I do believe that the 
 current xerces/xalan versions are still compatible with JDK 1.3 which 
 is the oldest JDK version fop attempts to support. If there are 
 arguments against upgrading xerces/xalan than we should do what you 
 have done and disable the tests that fail in SVN so that fop 
 builds/verifies correctly.

I don't think Simon objects to upgrading Xerces and Xalan, merely that
it doesn't fix the problem in his opinion and I think he's right.
Upgrading Xerces and Xalan only helps for JDK 1.3 users, and for users
with JDK = 1.4 it only helps if they place the three JARs in their
lib/endorsed directory of the JDK/JRE installation or adjust fop.bat to
specify an alternate location for the endorsed directory.


Jeremias Maerki



Re: ant junit target fails

2005-08-08 Thread Simon Pepping
On Mon, Aug 08, 2005 at 09:20:19AM +0200, Jeremias Maerki wrote:
 On 07.08.2005 20:41:42 Simon Pepping wrote:
  I have always commented this test out in my working copy. I do not
  like tests that actually (also) test the exact innards of certain
  Xerces and Xalan versions.
 
 They were not supposed to check the innards of certain Xerces and Xalan
 versions. The tests check the basic functionality of the FOP API. Given
 that most of the directy dependencies on the input source are now removed 
 (only getDefaultHandler() remains) we can probably remove some of those
 methods, especially the DOM-related ones. Do you agree?

That is right. Since FOP receives the data in all cases as a SAX
content handler, the different tests do not make a difference for FOP
anymore.

  I have got several copies of those two on my system, and I use them
  via the endorsed-dirs mechanism. Some scripts use a different copy
  than others, and for me FOP should just work with any recent parser
  and transformer.
 
 That's right, but there's simply the fact the there were a lot of little
 bugs in the TraX portion of Xalan WRT DOM. There's not much we can do
 about that in FOP.

That could be. I have just worked around the annoyance that the test
failed for reasons that I could not understand or change. But this
means that people get exceptions when they do this kind of work with
FOP and older versions of X + X. That is indeed a reason to upgrade
them in FOP's distribution.
 
  IMHO An upgrade of the jars in FOP does not solve the
  problem of this test file.
 
 Any additional ideas?

Not really, esp. if it is suspected that it is a bug in X + X.
 
Regards, Simon

  On Sun, Aug 07, 2005 at 06:46:17PM +0200, Jeremias Maerki wrote:
   There were a number of these issues in the past. Yes, it's definitely
   time to upgrade the Xerces and Xalan JARs, although it won't fix the
   problems for those people who don't know how to replace the default
   Xerces/Crimson and Xalan versions coming with the JDK. But that can't be
   helped. As a rule, I always use the latest Xerces and Xalan versions on
   my machine. I even have a customized Xalan ATM since the Xalan people
   haven't fixed a bug which causes a problem with Barcode4J and FOP for
   over a year now.
   
   On 07.08.2005 14:21:55 Manuel Mall wrote:
On Sat, 6 Aug 2005 10:37 pm, you wrote:
 I am consistently getting the error below on the ant junit target.

snip/

Further investigation showed that I can get rid of the error by
upgrading the xerces/xalan combination. Here is a summary of what I
found:

xalan 2.4.1/xerces 2.2.1 as extracted from SVN doesn't work
xalan 2.5.x/xerces 2.?.? doesn't work
xalan 2.6.1/xerces from xalan 2.6.1 bundle does prevent the error below 
but I then get similar NAMESPACE_ERR errors from within the layout 
engine test suite
xalan 2.7.0/xerces from xalan 2.7.0 bundle does work

All this evaluated under RH Enterprise ES 3 with Sun Java 5.0 latest
release.

Time to upgrade the xalan/xerces jars in SVN?

Manuel

 There was 1 error:
 1)
 testFO2PDFWithDOM(org.apache.fop.BasicDriverTestCase)javax.xml.transf
orm.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An
 attempt is made to create or change an object in a way which is
 incorrect with regard to namespaces.
 at
 org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:511) at
 org.apache.fop.BasicDriverTestCase.loadDocument(BasicDriverTestCase.j
ava:62) at
 org.apache.fop.BasicDriverTestCase.testFO2PDFWithDOM(BasicDriverTestC
ase.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
   
   Jeremias Maerki
  
  Simon Pepping
 
 Jeremias Maerki

-- 
Simon Pepping
home page: http://www.leverkruid.nl



Re: ant junit target fails

2005-08-08 Thread Jeremias Maerki
Ok then, I'll upgrade X + X and remove the unnecessary test methods.

On 08.08.2005 21:44:56 Simon Pepping wrote:
 On Mon, Aug 08, 2005 at 09:20:19AM +0200, Jeremias Maerki wrote:
  On 07.08.2005 20:41:42 Simon Pepping wrote:
   I have always commented this test out in my working copy. I do not
   like tests that actually (also) test the exact innards of certain
   Xerces and Xalan versions.
  
  They were not supposed to check the innards of certain Xerces and Xalan
  versions. The tests check the basic functionality of the FOP API. Given
  that most of the directy dependencies on the input source are now removed 
  (only getDefaultHandler() remains) we can probably remove some of those
  methods, especially the DOM-related ones. Do you agree?
 
 That is right. Since FOP receives the data in all cases as a SAX
 content handler, the different tests do not make a difference for FOP
 anymore.
 
   I have got several copies of those two on my system, and I use them
   via the endorsed-dirs mechanism. Some scripts use a different copy
   than others, and for me FOP should just work with any recent parser
   and transformer.
  
  That's right, but there's simply the fact the there were a lot of little
  bugs in the TraX portion of Xalan WRT DOM. There's not much we can do
  about that in FOP.
 
 That could be. I have just worked around the annoyance that the test
 failed for reasons that I could not understand or change. But this
 means that people get exceptions when they do this kind of work with
 FOP and older versions of X + X. That is indeed a reason to upgrade
 them in FOP's distribution.
  
   IMHO An upgrade of the jars in FOP does not solve the
   problem of this test file.
  
  Any additional ideas?
 
 Not really, esp. if it is suspected that it is a bug in X + X.


Jeremias Maerki



Re: ant junit target fails

2005-08-07 Thread Manuel Mall
On Sat, 6 Aug 2005 10:37 pm, you wrote:
 I am consistently getting the error below on the ant junit target.

snip/

Further investigation showed that I can get rid of the error by
upgrading the xerces/xalan combination. Here is a summary of what I
found:

xalan 2.4.1/xerces 2.2.1 as extracted from SVN doesn't work
xalan 2.5.x/xerces 2.?.? doesn't work
xalan 2.6.1/xerces from xalan 2.6.1 bundle does prevent the error below 
but I then get similar NAMESPACE_ERR errors from within the layout 
engine test suite
xalan 2.7.0/xerces from xalan 2.7.0 bundle does work

All this evaluated under RH Enterprise ES 3 with Sun Java 5.0 latest
release.

Time to upgrade the xalan/xerces jars in SVN?

Manuel

 There was 1 error:
 1)
 testFO2PDFWithDOM(org.apache.fop.BasicDriverTestCase)javax.xml.transf
orm.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An
 attempt is made to create or change an object in a way which is
 incorrect with regard to namespaces.
 at
 org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:511) at
 org.apache.fop.BasicDriverTestCase.loadDocument(BasicDriverTestCase.j
ava:62) at
 org.apache.fop.BasicDriverTestCase.testFO2PDFWithDOM(BasicDriverTestC
ase.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)


Re: ant junit target fails

2005-08-07 Thread Jeremias Maerki
There were a number of these issues in the past. Yes, it's definitely
time to upgrade the Xerces and Xalan JARs, although it won't fix the
problems for those people who don't know how to replace the default
Xerces/Crimson and Xalan versions coming with the JDK. But that can't be
helped. As a rule, I always use the latest Xerces and Xalan versions on
my machine. I even have a customized Xalan ATM since the Xalan people
haven't fixed a bug which causes a problem with Barcode4J and FOP for
over a year now.

On 07.08.2005 14:21:55 Manuel Mall wrote:
 On Sat, 6 Aug 2005 10:37 pm, you wrote:
  I am consistently getting the error below on the ant junit target.
 
 snip/
 
 Further investigation showed that I can get rid of the error by
 upgrading the xerces/xalan combination. Here is a summary of what I
 found:
 
 xalan 2.4.1/xerces 2.2.1 as extracted from SVN doesn't work
 xalan 2.5.x/xerces 2.?.? doesn't work
 xalan 2.6.1/xerces from xalan 2.6.1 bundle does prevent the error below 
 but I then get similar NAMESPACE_ERR errors from within the layout 
 engine test suite
 xalan 2.7.0/xerces from xalan 2.7.0 bundle does work
 
 All this evaluated under RH Enterprise ES 3 with Sun Java 5.0 latest
 release.
 
 Time to upgrade the xalan/xerces jars in SVN?
 
 Manuel
 
  There was 1 error:
  1)
  testFO2PDFWithDOM(org.apache.fop.BasicDriverTestCase)javax.xml.transf
 orm.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An
  attempt is made to create or change an object in a way which is
  incorrect with regard to namespaces.
  at
  org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
 ormerIdentityImpl.java:511) at
  org.apache.fop.BasicDriverTestCase.loadDocument(BasicDriverTestCase.j
 ava:62) at
  org.apache.fop.BasicDriverTestCase.testFO2PDFWithDOM(BasicDriverTestC
 ase.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)



Jeremias Maerki



Re: ant junit target fails

2005-08-07 Thread Simon Pepping
I have always commented this test out in my working copy. I do not
like tests that actually (also) test the exact innards of certain
Xerces and Xalan versions.

I have got several copies of those two on my system, and I use them
via the endorsed-dirs mechanism. Some scripts use a different copy
than others, and for me FOP should just work with any recent parser
and transformer. IMHO An upgrade of the jars in FOP does not solve the
problem of this test file.

Regards, Simon

On Sun, Aug 07, 2005 at 06:46:17PM +0200, Jeremias Maerki wrote:
 There were a number of these issues in the past. Yes, it's definitely
 time to upgrade the Xerces and Xalan JARs, although it won't fix the
 problems for those people who don't know how to replace the default
 Xerces/Crimson and Xalan versions coming with the JDK. But that can't be
 helped. As a rule, I always use the latest Xerces and Xalan versions on
 my machine. I even have a customized Xalan ATM since the Xalan people
 haven't fixed a bug which causes a problem with Barcode4J and FOP for
 over a year now.
 
 On 07.08.2005 14:21:55 Manuel Mall wrote:
  On Sat, 6 Aug 2005 10:37 pm, you wrote:
   I am consistently getting the error below on the ant junit target.
  
  snip/
  
  Further investigation showed that I can get rid of the error by
  upgrading the xerces/xalan combination. Here is a summary of what I
  found:
  
  xalan 2.4.1/xerces 2.2.1 as extracted from SVN doesn't work
  xalan 2.5.x/xerces 2.?.? doesn't work
  xalan 2.6.1/xerces from xalan 2.6.1 bundle does prevent the error below 
  but I then get similar NAMESPACE_ERR errors from within the layout 
  engine test suite
  xalan 2.7.0/xerces from xalan 2.7.0 bundle does work
  
  All this evaluated under RH Enterprise ES 3 with Sun Java 5.0 latest
  release.
  
  Time to upgrade the xalan/xerces jars in SVN?
  
  Manuel
  
   There was 1 error:
   1)
   testFO2PDFWithDOM(org.apache.fop.BasicDriverTestCase)javax.xml.transf
  orm.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An
   attempt is made to create or change an object in a way which is
   incorrect with regard to namespaces.
   at
   org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
  ormerIdentityImpl.java:511) at
   org.apache.fop.BasicDriverTestCase.loadDocument(BasicDriverTestCase.j
  ava:62) at
   org.apache.fop.BasicDriverTestCase.testFO2PDFWithDOM(BasicDriverTestC
  ase.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
   Method)
 
 
 
 Jeremias Maerki
 

-- 
Simon Pepping
home page: http://www.leverkruid.nl



Re: ant junit target fails

2005-08-07 Thread Manuel Mall
On Mon, 8 Aug 2005 02:41 am, Simon Pepping wrote:
snip/
 IMHO An upgrade of the jars in FOP does not solve
 the problem of this test file.

Simon,

1. do you actually understand what the problem is because I don't? The 
test file (test/xml/bugtests/block.fo) is trivial. It works from the 
fop command line, it works with the SAX test, its only when using the 
identity transformation to convert it into a DOM source that the error 
happens.

2. While I agree that fop as such should work with any JAXP compliant 
parser I don't have a problem if building/verifying fop requires a 
particular parser / transformer version. However, IMHO it would be 
desirable that fop builds / verifies out-of-the-box without the need to 
upgrade components delivered with it. It seems to me that we could 
achieve that by upgrading xerces/xalan in SVN. I do believe that the 
current xerces/xalan versions are still compatible with JDK 1.3 which 
is the oldest JDK version fop attempts to support. If there are 
arguments against upgrading xerces/xalan than we should do what you 
have done and disable the tests that fail in SVN so that fop 
builds/verifies correctly.

Cheers, 

Manuel