Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-6416

No way to find original stream handler for jar protocol

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 12.6
    • None
    • None
    • Windows 10,

      Openjdk 17,

      Netbeans 12.6

      Netbeans API versions: RELEASE126

       

    Description

      We're currently trying to migrate a Netbeans platform project from java 1.8 to 17, and are running into multiple Netbeans related problems. When launching the application, the very first error that is occurring is the following: 

      SEVERE: No way to find original stream handler for jar protocol
      java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.net.URLStreamHandler java.net.URL.handler accessible: module java.base does not "opens java.net" to unnamed module @448139f0
          at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
          at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
          at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
          at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
          at org.netbeans.ProxyURLStreamHandlerFactory.register(ProxyURLStreamHandlerFactory.java:59)
          at org.netbeans.JarClassLoader.<clinit>(JarClassLoader.java:117)
          at org.netbeans.MainImpl.execute(MainImpl.java:153)
          at org.netbeans.MainImpl.main(MainImpl.java:60)
          at org.netbeans.Main.main(Main.java:58)

      {}I've tried adding J-add-opens java.base/java.net=ALL-UNNAMED to the maven-compiler-plugin as a compiler argument in multiple modules to try and fix the problem, but it doesn't seem to work.

      Attachments

        Activity

          People

            Unassigned Unassigned
            antoai anton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: