OM6b : is JAI needed (again?)

27 views
Skip to first unread message

Bart Jourquin

unread,
Sep 12, 2019, 11:58:52 AM9/12/19
to openmap-users
Hi,

It seems that the latest om6b sources are dependent on JAI (again?). This is a stack trace for a MapTileLayer:

java.lang.ClassNotFoundException: javax.media.jai.JAI

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:348)

at com.bbn.openmap.util.ComponentFactory._create(ComponentFactory.java:432)

at com.bbn.openmap.util.ComponentFactory.create(ComponentFactory.java:390)

at com.bbn.openmap.util.ComponentFactory.create(ComponentFactory.java:369)

at com.bbn.openmap.util.ComponentFactory.create(ComponentFactory.java:295)

at com.bbn.openmap.image.BufferedImageHelper.getJAI(BufferedImageHelper.java:73)

at com.bbn.openmap.image.BufferedImageHelper.getJAIBufferedImage(BufferedImageHelper.java:92)

at com.bbn.openmap.image.BufferedImageHelper.getJAIBufferedImage(BufferedImageHelper.java:178)

at com.bbn.openmap.image.BufferedImageHelper.getBufferedImage(BufferedImageHelper.java:225)

at com.bbn.openmap.image.BufferedImageHelper.getBufferedImage(BufferedImageHelper.java:202)

at com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory.load(StandardMapTileFactory.java:201)

at com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory.loadTile(StandardMapTileFactory.java:750)

at com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory.getTiles(StandardMapTileFactory.java:643)

at com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory.getTiles(StandardMapTileFactory.java:531)

at com.bbn.openmap.layer.image.MapTileLayer.prepare(MapTileLayer.java:232)


Note that the layer is correctly displayed. I've just this ugly stack trace in the console... 


Any hint ?


Bart


Don Dietrick

unread,
Sep 13, 2019, 2:57:09 AM9/13/19
to Bart Jourquin, openmap-users
Hi Bart,

It shouldn’t be required, but used if available. I’ll have to check into it. 

-- Don
--
You received this message because you are subscribed to the Google Groups "openmap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmap-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openmap-users/0020e56b-bc19-464a-b861-788ead5e5554%40googlegroups.com.

Bart Jourquin

unread,
Sep 13, 2019, 3:46:03 AM9/13/19
to Don Dietrick, openmap-users
Hi Don,

Digging in the source code, I found the following warning in com.bbn.openmap.util.ComponentFactory._create(…)

 // Apparently, this fails in certain cases where OpenMap is being
 // used as a plugin in a NetBeans or Eclipse architecture and the
 // application classloader isn't aware of the plugins classes. It
 // limits the creation of the object to classes in the caller's
 // classloader.

I’m not sure what this exactly means, but it comes out that the stack trace was indeed thrown in my Eclipse environment, and that nor error is thrown when my application runs standalone. No problem thus.

In order to avoid this exception when working in Eclipse, I’ve added the following « fake » class in my source tree:

package javax.media.jai;

public class JAI {

  public JAI() {}

  public Object create(String s, Object o) {
    return null;
  }
}


BTW : Is there a date scheduled for the release of OM6 (non beta)?

Bart
Reply all
Reply to author
Forward
0 new messages