Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8327440

Fix "bad source file" error during beaninfo generation

XMLWordPrintable

    • b01

      [ filing this on behalf of Thomas Fitzsimmons fitzsim at redhat.com ]

      I saw two occurrences of a GitHub Actions pre-submit check build failure during beaninfo generation with a "bad source file" error. Here is an example from https://github.com/gnu-andrew/jdk8u-dev/actions/runs/7979614913/job/21787468883 :

      {noformat}
      Generating beaninfo
      Generating Nimbus source files
      Error: encoded value was less than 0: encode(-8.326673E-17, 5.0, 11.0, 16.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
      Error: encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
      Error: Encountered Infinity: encode(-0.00877193, 0.0, 7.0, 7.0)
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:33: error: cannot access IllegalSelectorException
      import java.nio.channels.IllegalSelectorException;
                              ^
        bad source file: d:\a\jdk8u-dev\jdk8u-dev\jdk\build\windows-x64\jdk\gensrc\java\nio\channels\IllegalSelectorException.java
          file does not contain class java.nio.channels.IllegalSelectorException
          Please remove or make sure it appears in the correct subdirectory of the sourcepath.
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:68: error: cannot find symbol
          private SelectionKey[] keys = null;
                  ^
        symbol: class SelectionKey
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:102: error: cannot find symbol
          private void addKey(SelectionKey k) {
                              ^
        symbol: class SelectionKey
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:125: error: cannot find symbol
          private SelectionKey findKey(Selector sel) {
                                       ^
        symbol: class Selector
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:125: error: cannot find symbol
          private SelectionKey findKey(Selector sel) {
                  ^
        symbol: class SelectionKey
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:136: error: cannot find symbol
          void removeKey(SelectionKey k) { // package-private
                         ^
        symbol: class SelectionKey
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:168: error: cannot find symbol
          public final SelectionKey keyFor(Selector sel) {
                                           ^
        symbol: class Selector
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:168: error: cannot find symbol
          public final SelectionKey keyFor(Selector sel) {
                       ^
        symbol: class SelectionKey
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:198: error: cannot find symbol
          public final SelectionKey register(Selector sel, int ops,
                                             ^
        symbol: class Selector
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:198: error: cannot find symbol
          public final SelectionKey register(Selector sel, int ops,
                       ^
        symbol: class SelectionKey
        location: class AbstractSelectableChannel
      d:\a\jdk8u-dev\jdk8u-dev\jdk\jdk\src\share\classes\java\nio\channels\spi\AbstractSelectableChannel.java:289: error: cannot find symbol
          public final SelectableChannel configureBlocking(boolean block)
                       ^
        symbol: class SelectableChannel
        location: class AbstractSelectableChannel
      make[2]: *** [gensrc/GensrcSwing.gmk:79: /cygdrive/d/a/jdk8u-dev/jdk8u-dev/jdk/build/windows-x64/jdk/gensrc_no_srczip/_the.generated_beaninfo] Error 1
      make[2]: *** Waiting for unfinished jobs....
      make[1]: *** [BuildJdk.gmk:55: gensrc-only] Error 2
      make: *** [/cygdrive/d/a/jdk8u-dev/jdk8u-dev/jdk//make/Main.gmk:117: jdk-only] Error 2
      Error: Process completed with exit code 1.
      {noformat}

            andrew Andrew Hughes
            abobrov Anton Bobrov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: