Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64831

illegal reflective access in remoting

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.317

      Description

      I see the following exception after installing the selenium plugin. I know the plugin is not maintained anymore, but I'm not sure if the exception is caused by remoting.

       /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp /var/cache/jenkins/war/WEB-INF/lib/remoting-4.5.jar hudson.remoting.Launcher -cp /var/lib/jenkins/plugins/selenium/WEB-INF/lib/selenium-server-standalone-3.141.59.jar:/var/lib/jenkins/plugins/selenium/WEB-INF/lib/htmlunit-driver-standalone-2.33.3.jar -connectTo localhost:37677
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by hudson.remoting.Launcher (file:/var/cache/jenkins/war/WEB-INF/lib/remoting-4.5.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
      WARNING: Please consider reporting this to the maintainers of hudson.remoting.Launcher
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at hudson.remoting.Launcher.addClasspath(Launcher.java:154)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at io.jenkins.remoting.shaded.org.kohsuke.args4j.spi.MethodSetter.addValue(MethodSetter.java:47)
      	at io.jenkins.remoting.shaded.org.kohsuke.args4j.spi.StringOptionHandler.parseArguments(StringOptionHandler.java:19)
      	at io.jenkins.remoting.shaded.org.kohsuke.args4j.CmdLineParser.parseArgument(CmdLineParser.java:520)
      	at hudson.remoting.Launcher.main(Launcher.java:293)
      

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            https://github.com/jenkinsci/remoting/pull/468 would cover the originally reported case. The ChannelSwapper warning is different.

            Show
            jglick Jesse Glick added a comment - https://github.com/jenkinsci/remoting/pull/468 would cover the originally reported case. The ChannelSwapper warning is different.
            Hide
            basil Basil Crow added a comment -

            The ChannelSwapper warning is different.

            Indeed. The ChannelSwapper warning is covered in JENKINS-65582.

            Show
            basil Basil Crow added a comment - The ChannelSwapper warning is different. Indeed. The ChannelSwapper warning is covered in JENKINS-65582 .
            Hide
            jglick Jesse Glick added a comment -

            The ChannelSwapper warning could be eliminated by just deleting StandardOutputSwapper and StandardOutputStream. The risk is that poorly behaved plugins might have code which writes to System.out from a Remoting callable. If they do, and Remoting is using stdio mode (e.g. CommandLauncher), you could get sudden channel corruption.

            Show
            jglick Jesse Glick added a comment - The ChannelSwapper warning could be eliminated by just deleting StandardOutputSwapper and StandardOutputStream . The risk is that poorly behaved plugins might have code which writes to System.out from a Remoting callable. If they do, and Remoting is using stdio mode (e.g. CommandLauncher ), you could get sudden channel corruption.
            Hide
            jglick Jesse Glick added a comment -

            I suppose this could be dealt with by having the stdio mode use a slightly more complicated protocol (new Channel.Mode?) whereby each packet is printed as text-ish with a distinctive or even random prefix and a trailing newline. Thus any unrelated messages printed to stdout would just be ignored.

            Show
            jglick Jesse Glick added a comment - I suppose this could be dealt with by having the stdio mode use a slightly more complicated protocol (new Channel.Mode ?) whereby each packet is printed as text-ish with a distinctive or even random prefix and a trailing newline. Thus any unrelated messages printed to stdout would just be ignored.
            Hide
            markewaite Mark Waite added a comment -

            Remoting 4.11 is included in Jenkins 2.317. Remoting 4.11 removes the -cp argument from the remoting command line.

            Show
            markewaite Mark Waite added a comment - Remoting 4.11 is included in Jenkins 2.317. Remoting 4.11 removes the -cp argument from the remoting command line.

              People

              Assignee:
              jthompson Jeff Thompson
              Reporter:
              mbo Markus
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: