swingx-ws
  1. swingx-ws
  2. SWINGX_WS-19

AbstractTileFactory incompatible with SwingX 1.0 / PaintUtils.loadCompatibleImage no mor existent

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: initial
    • Fix Version/s: 1.0
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      19

      Description

      Using the swingx-ws-2009_06_14.jar release combined with SwingX 1.0.
      I get the following Exception:

      30.07.2009 17:16:54 org.jdesktop.swingx.mapviewer.AbstractTileFactory$TileRunner run
      SCHWERWIEGEND: Failed to load a tile at url:
      http://tile.openstreetmap.org/3/3/3.png, retrying
      java.lang.NoSuchMethodError:
      org.jdesktop.swingx.util.PaintUtils.loadCompatibleImage(Ljava/io/InputStream;)Ljava/awt/image/BufferedImage;
      at
      org.jdesktop.swingx.mapviewer.AbstractTileFactory$TileRunner.run(AbstractTileFactory.java:308)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

      The problem seems to be that org.jdesktop.swingx.util.PaintUtils from SwingX 1.0
      is missing the method PaintUtils.loadCompatibleImage(...).

      Thus, Line 309 in AbstractTileFactory:
      309: img = PaintUtils.loadCompatibleImage(new ByteArrayInputStream(bimg));
      should be replaced by
      309: img = ImageIO.read(new ByteArrayInputStream(bimg));

        Activity

        Hide
        bavarian added a comment -

        Created an attachment (id=2)
        patched AbstractTileFactory.java previous line commented out. patched line beneath.

        Show
        bavarian added a comment - Created an attachment (id=2) patched AbstractTileFactory.java previous line commented out. patched line beneath.
        Hide
        kleopatra added a comment -

        well, this project is more or less unmaintained, no wonder the swingx version
        wasn't updated in two years

        Miraculously, the incompatibility you found seems to be the one. Recommended
        patch is to replace

        PaintUtils.loadCompatibleImage by
        GraphicUtils.loadCompatibleImage

        Will try to contact someone with write access to get this updated, too nice a
        project to entirely die

        Cheers
        Jeanette

        Show
        kleopatra added a comment - well, this project is more or less unmaintained, no wonder the swingx version wasn't updated in two years Miraculously, the incompatibility you found seems to be the one. Recommended patch is to replace PaintUtils.loadCompatibleImage by GraphicUtils.loadCompatibleImage Will try to contact someone with write access to get this updated, too nice a project to entirely die Cheers Jeanette
        Hide
        rah003 added a comment -

        Project have been updated by Fabrizio to work against SwingX 1.6 as of November
        4th 2009. I believe this should have fixed the issue. Please reopen if not

        Show
        rah003 added a comment - Project have been updated by Fabrizio to work against SwingX 1.6 as of November 4th 2009. I believe this should have fixed the issue. Please reopen if not

          People

          • Assignee:
            swingx-ws-issues
            Reporter:
            bavarian
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: