0

We are running a Jenkins on Ubuntu.

When we try to use a Java library in a Pipeline that uses REST calls, we run into problems. UriBuilder is apparently used in a old version: The method toTemplate is missing and caused a MethodNotFound. This is strange because the Java library depends transitively on

<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>

which contains the new version of UriBuilder. We used Grape and correctly copied the library with all transitive dependencies to Jenkins. Outside Jenkins, the library works fine.

My guess: Jenkins runs on a version of Jetty which provides an old version of UriBuilder which somehow "wins" against the new version of UriBuilder from javax.ws.rs-api 2.0.1?

Can anybody shed light on this?

M. Justin
  • 14,487
  • 7
  • 91
  • 130
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
  • I haven't been able to find a UriBuilder anywhere in the jenkins 2.107.1 ubuntu distribution – twinklehawk Mar 21 '18 at 13:53
  • Deactivation of the Jira Plugin did the trick. See also https://issues.jenkins-ci.org/browse/JENKINS-44378. I wonder: Is it possible to separate the class loading of the plugins and my pipeline? Can I use a separate JVM? – J Fabian Meier Mar 22 '18 at 07:41

0 Answers0