[JIRA] (JENKINS-44079) Sharable Libraries class loader "Grabs" to different class loader

2 views
Skip to first unread message

iponomarev@mail.ru (JIRA)

unread,
Nov 2, 2018, 7:19:02 PM11/2/18
to jenkinsc...@googlegroups.com
Ivan Ponomarev commented on Bug JENKINS-44079
 
Re: Sharable Libraries class loader "Grabs" to different class loader

Another example:

@Grab('org.asciidoctor:asciidoctorj:1.5.6')
import org.asciidoctor.Asciidoctor

AsciiDoctorJ has transitive dependency from

org.jruby:jruby-complete:9.1.17.0

However, when I do

import org.jruby.Ruby
echo Ruby.globalRuntime.evalScriptlet("JRUBY_VERSION").toString()

I see 1.7.3 (no idea where it came from).

And this is why I cannot use asciidoctorj:1.5.6 (I get
`java.lang.NoSuchMethodError: org.jruby.RubyModule.getMethodLocation()Lorg/jruby/RubyModule;`
during initialization: indeed, no such method in JRuby 1.7.3)

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

iponomarev@mail.ru (JIRA)

unread,
Nov 2, 2018, 7:20:01 PM11/2/18
to jenkinsc...@googlegroups.com

iponomarev@mail.ru (JIRA)

unread,
Nov 2, 2018, 7:27:03 PM11/2/18
to jenkinsc...@googlegroups.com
Ivan Ponomarev edited a comment on Bug JENKINS-44079
 
Re: Sharable Libraries class loader "Grabs" to different class loader
Another example:


{code:groovy}
@Grab('org.asciidoctor:asciidoctorj:1.5.
6 8.1 ')
import org.asciidoctor.Asciidoctor
{code}


AsciiDoctorJ has transitive dependency from

{noformat}
org.jruby:jruby-complete:9.1.17.0
{noformat}

However, when I do


{code:groovy}

import org.jruby.Ruby
echo Ruby.globalRuntime.evalScriptlet("JRUBY_VERSION").toString()
{code}


I see 1.7.3 (no idea where it came from).

And this is why I cannot use asciidoctorj:1.5.6 (I get
`java.lang.NoSuchMethodError: org.jruby.RubyModule.getMethodLocation()Lorg/jruby/RubyModule;`
during initialization: indeed, no such method in JRuby 1.7.3)

vivek.pandey@gmail.com (JIRA)

unread,
Nov 16, 2018, 11:14:01 AM11/16/18
to jenkinsc...@googlegroups.com
Vivek Pandey updated an issue
 
Change By: Vivek Pandey
Labels: groovy pipeline shared-groovy-libraries shared-libraries triaged-2018-11

claudio.sturiale.uni@gmail.com (JIRA)

unread,
Mar 14, 2020, 5:21:02 AM3/14/20
to jenkinsc...@googlegroups.com
Claudio Sturiale commented on Bug JENKINS-44079
 
Re: Sharable Libraries class loader "Grabs" to different class loader

Hi, 
I have the same problem trying to @Grab jackson-databind lib with version > 2.9 .
I noticed that in the first environment everything works well but in the second environment ,using the same configuration, a different version of the library is loaded.
The version loaded was used by the allure-plugin , if I remove that plugin the shared library works again.

Hope this comment will help in order to solve the issue.

 

 

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages