Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.2.0
-
None
-
None
-
ivy-2.2.jar, Sun jdk 1.5 and 1.6 for compiling, Jenkins 1.436 as CI server, ant 1.8.2, Linux, Jenkins ivy plugin 1.20
Description
Setup:
o Using ivy-2.2.jar.
o Compiling with Sun jdk versions 1.5 or 1.6 (project dependent) on a Linux box.
o Running ant 1.8.2 via a wrapper script inside Jenkins 1.436 with 5 or so
executors. That is, each build invokes a simple custom wrapper-script around
Ant that puts some custom tasks and ivy-2.2 on the build classpath.
o Jenkins Ivy plugin version is version 1.20 which uses ivy 2.2.0 internally.
Problem:
We hit this error perhaps 8 % of the builds when there are several
parallel builds happening:
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:828)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:617)
at org.apache.ivy.ant.IvyReport.genStyled(IvyReport.java:322)
at org.apache.ivy.ant.IvyReport.genreport(IvyReport.java:248)
at org.apache.ivy.ant.IvyReport.doExecute(IvyReport.java:211)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
:
:
The build always runs fine for a single job when invoked from the
command line, and 99.9% of the time runs fine when the Jenkins job is
requeued. But when it happens during parallel builds, the error
message is always the same and always in exactly the same spot in
IvyReport.java.
The relevant ant task is this (we are behind a firewall so retrieves
never go out to the internet, all resolvers are FileSystem resolvers,
which explains some of the attribute values):
<macrodef name="resolve-dependencies">
<attribute name="ivyconfig"/>
<sequential>
<ivy:resolve
conf="@
log="${option.ivy.log}"
resolveMode="dynamic"
showprogress="false"
checkIfChanged="false"
/>
<ivy:retrieve
conf="@{ivyconfig}
"
log="${option.ivy.log}"
pattern="${ivy.lib.dir}/@
symlink="true"
sync="true"
/>
<ivy:report <---------------- INTERMITTENT FAILURE DURING THIS TASK
conf="@{ivyconfig}
"
dot="${option.ivyreport.dot}" <--- false on Jenkins, settable for indiv developer
graph="${option.ivyreport.graphml}" <--- false on Jenkins, settable for indiv developer
outputpattern="dependencies-[conf].[ext]"
todir="${dir.build}/report"
/>
</sequential>
</macrodef>
As you can see from the code, we are not using our own stylesheet, but
the one in the ivy distribution.
The code in IvyReport.java looks ok to me but I am not a TRaX user and
certainly no expert on it so it is not clear to me why occasionally we
get this "cannot compile stylesheet" error. And we only get it when
many builds are happening in parallel, never for one-build-at-a-time,
which makes me wonder if there is some issue with grabbing resources
from inside a jar, something I do not do myself.