On 23/06/20 09:23, Francesco Chicchiriccò wrote:
> On 22/06/20 16:58, Cédric Damioli wrote:
>> Le 22/06/2020 à 15:29, Francesco Chicchiriccò a écrit :
>>> On 22/06/20 12:11, Cédric Damioli wrote:
>>>> Le 22/06/2020 à 08:57, Francesco Chicchiriccò a écrit :
>>>>> On 21/06/20 22:11, Cédric Damioli wrote:
>>>>>> I just tested with JDK 1.6 and it worked fine (my exact JDK version is 
>>>>>> 1.6.0_18, Windows version).
>>>>> Mine is 1.6.0_45 (Linux) e.g. the one you can download at the moment from 
>>>>> Oracle.
>>>>>
>>>>>> I'm a bit worried if we must change to 1.8, as Cocoon 2.1.x is supposed 
>>>>>> to be compatible with 1.6.
>>>>>> Furthermore, javac claims about a RESyntaxException being not catched, 
>>>>>> but it's actually a RuntimeException, so I don't see the problem ...
>>>>> The actual issue seems to be the fact that RESyntaxException is contained 
>>>>> either by
>>>>>
>>>>> ./lib/endorsed/jakarta-regexp-1.5.jar
>>>>>
>>>>> and
>>>>>
>>>>> ./lib/endorsed/xalan-2.7.2.jar
>>>>>
>>>>> with the former extending RuntimeException and the latter extending 
>>>>> Exception; so it actually depends on which one is picked during build, 
>>>>> I'd say.
>>>>>
>>>>> Since all classes from the former JAR are included by the latter JAR, I 
>>>>> think we should remove jakarta-regexp, but this will not solve the build 
>>>>> problem, it will only make it more consistent - which I also believe it 
>>>>> is better.
>>>>>
>>>> Ok, understood. I was wondering why did this never happen before ? 
>>>> jakarta-regexp-1.5 and xalan are used since 10+ years together
>>>> I just found than Xalan has been upgraded to 2.7.2 last year. Before that, 
>>>> our provided xalan-2.7.1 did not embed org.apache.regexp package
>>>> Did we had our own xalan version ?
>>>>
>>>> BTW, a similar issue was raised 15 years ago :) : 
>>>> https://issues.apache.org/jira/browse/COCOON-1576
>>> I was able to build (and run some tests - not all because I had not time to 
>>> look up for HTMLUnit) with the changes embedded in this commit:
>>>
>>> https://github.com/ilgrosso/cocoon/commit/c438857f594d770d865f4e8b7244b5fda026f6b2
>>>
>>> As you can see from there, I have:
>>>
>>> * removed jakarta-regexp-1.5 and introduced CocoonRESyntaxException to wrap 
>>> RESyntaxException
>>> * replaced jakarta-bcel-20040329.jar (there were compilation errors) with 
>>> bcel-5.2.jar - because of some visibility change, I introduced CocoonFrame
>>>
>>> Please have a look and let me know: in case we are fine with such changes, 
>>> I would svn-commit to BRANCH_2_1_X and set COCOON-1576 as fixed in 2.1.13.
>> Why not, but are we sure that we won't have regressions due to downgrade of 
>> jakarta-regexp (the xalan bundled version is 1.2 AFAIU) ?
>>
>> From a design POV, I find it quite strange to rely on an XSLT lib (ie Xalan) 
>> to provide regexp processing.
>> Could it be better to remove org.apache.bcel and org.apache.regexp from the 
>> xalan jar and keep the existing librairies ?
>> I suppose that was how it has been done previously for xalan-2.7.1
> It seems you are quite right.
>
> I took cocoon-2.1.12-deps.tar.gz from
>
> http://cocoon.apache.org/mirror.html
>
> then extracted
>
> lib/endorsed/xalan-2.7.1.jar
>
> and found that it is *not the same* you can download from Maven Central under
>
> https://repo1.maven.org/maven2/xalan/xalan/2.7.1/xalan-2.7.1.jar
>
> but that it matches the one you can download from
>
> http://archive.apache.org/dist/xalan/xalan-j/binaries/xalan-j_2_7_1-bin-2jars.zip
>
> because it does not contain any org.apache.bcel.* nor any org.apache.regexp.* 
> class.
>
> So I went ahead and replaced the current
>
> lib/endorsed/xalan-2.7.2.jar
>
> in the source tree with the one contained in
>
> http://archive.apache.org/dist/xalan/xalan-j/binaries/xalan-j_2_7_2-bin-2jars.zip
>
> and all went out smoothly.
>
> Problem solved :-)

Jenkins confirms: build #142 is succeeding again.
https://builds.apache.org/view/A-D/view/Cocoon/job/Cocoon%202.1.X/142/

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to