Closed etatara closed 2 years ago
This is due to a change in Java3D such that the Font3D classes uses a java service loader to find a class, but the service loader uses the default Java class loader instead of the Repast class loader, causing the class not found exception. I've included call to setContextClassLoader in the AbstractLabel class for the 3D displays that solves the issue:
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
When enabling an agent label in the 3D Cartesian display, an exception is thrown:
ERROR [AWT-EventQueue-0] 12:12:13,565 repast.simphony.visualization.engine.DisplayComponentControllerAction - Error while creating displays java.lang.IllegalStateException: No GeometryService implementation found. Please add j3d-core-utils to the classpath. at org.jogamp.java3d.Font3D.newGeometryService(Font3D.java:956) at org.jogamp.java3d.Font3D.triangulateGlyphs(Font3D.java:471) at org.jogamp.java3d.Text3DRetained.updateCharacterData(Text3DRetained.java:700) at org.jogamp.java3d.Text3DRetained.setString(Text3DRetained.java:254) at org.jogamp.java3d.Text3D.(Text3D.java:276)
at repast.simphony.visualization.visualization3D.AbstractLabel.getBranchGroup(AbstractLabel.java:159)