Bernard:

I would guess that this line is actually the interesting one:

Caused by: java.security.AccessControlException: access denied

Caused when you try to render the shape file.  I had a similar problem
because the Shape file jar also had to access the local file it had to
be signed as well.  I also ended up signing the GT2-Main (2.0) jar as
well, but I think I did that for a different reason.

AP

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bernhard Kastner
Sent: Monday, December 05, 2005 5:38 AM
To: [email protected]
Subject: [Geotools-gt2-users] Receiving Exceptions when using
Shapefilerenderer in Applet


Hi list,

I'm trying to create an applet, that renders shapefiles using the 
org.geotools.renderer.shape.Shapefilerenderer.

I'm devoloping using the Eclipse IDE and to test it, I use the 
eclipse-internal Applet Viewer. With this one, it works fine, but when I

pack my classes up to a jar, and sign it (to be able to read files from 
local FS), I get the exceptions listed below. The ShaperenderingJPanel 
is a class, I wrote by myself. This class extends a JPanel and uses the 
Shapefilerenderer to draw on itself.
Especially the exception "ExceptionInInitializerError" sounds weird to
me...
Anyways: it may be interesting, that the exceptions always occur at the 
same line in RendererUtilities.java (in org.geotools.renderer.lite)

Maybe someone can point me out in the right direction...

thanks in advance
Bernhard

--------------------- Java Console Output----------------------

Java VM: Sun Microsystems Inc. 1.5.0_05
[EMAIL PROTECTED]
----------------------------------------------------
Konqueror Java Console Help
  c: clear console
  g: run garbage collection
  h: show help
  m: show memory infothe following exceptions when trying to display it 
in a browser:
  s: print system properties
  t: list threads
  x: empty classloader cache
----------------------------------------------------
05.12.2005 10:29:21 org.geotools.data.shapefile.ShapefileDataStore 
openPrjReader
WARNING: projection (.prj) for shapefile not available 05.12.2005
10:29:22 org.geotools.data.shapefile.ShapefileDataStore 
openPrjReader
WARNING: projection (.prj) for shapefile not available 05.12.2005
10:29:22 org.geotools.data.shapefile.ShapefileDataStore 
openPrjReader
WARNING: projection (.prj) for shapefile not available 05.12.2005
10:29:22 org.geotools.data.shapefile.ShapefileDataStore 
openPrjReader
WARNING: projection (.prj) for shapefile not available
paintComponent()
[ShaperenderingPanel] started rendering at 10:29:22.503 Exception in
thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
    at 
org.geotools.renderer.lite.RendererUtilities.calculateScale(RendererUtil
ities.java:109)
    at 
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.ja
va:1238)
    at 
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.ja
va:1198)
    at 
org.geotools.gui.swing2.ShaperenderingJPanel._paintComponent(Shaperender
ingJPanel.java:324)
    at 
org.geotools.gui.swing2.ShaperenderingJPanel.paintComponent(Shaperenderi
ngJPanel.java:275)
    at
javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4967)
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
    at javax.swing.JComponent.paint(JComponent.java:995)
    at
java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
    at 
sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
    at 
sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
    at java.awt.Container.paint(Container.java:1709)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
    at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
    at sun.awt.RepaintArea.paint(RepaintArea.java:224)
    at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:630)
    at java.awt.Component.dispatchEventImpl(Component.java:4031)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.java:242)
    at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
java:163)
    at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.security.AccessControlException: access denied 
(java.lang.RuntimePermission shutdownHooks)
    at 
java.security.AccessControlContext.checkPermission(AccessControlContext.
java:264)
    at 
java.security.AccessController.checkPermission(AccessController.java:427
)
    at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at 
org.kde.kjas.server.KJASSecurityManager.checkPermission(KJASSecurityMana
ger.java:64)
    at java.lang.Runtime.addShutdownHook(Runtime.java:188)
    at 
org.geotools.referencing.factory.epsg.DefaultFactory.onRegistration(Defa
ultFactory.java:384)
    at 
javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.ja
va:698)
    at 
javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistr
y.java:257)
    at 
org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java
:464)
    at 
org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry
.java:121)
    at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.
java:228)
    at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.
java:200)
    at 
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.ja
va:90)
    at 
org.geotools.referencing.FactoryFinder.getCoordinateOperationAuthorityFa
ctory(FactoryFinder.java:376)
    at 
org.geotools.referencing.operation.AuthorityBackedFactory.getAuthorityFa
ctory(AuthorityBackedFactory.java:124)
    at 
org.geotools.referencing.operation.AuthorityBackedFactory.isReady(Author
ityBackedFactory.java:238)
    at 
org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:83)
    at
javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:793)
    at javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:787)
    at 
javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.ja
va:491)
    at 
org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry
.java:123)
    at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.
java:228)
    at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.
java:200)
    at 
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.ja
va:90)
    at 
org.geotools.referencing.FactoryFinder.getCoordinateOperationFactory(Fac
toryFinder.java:251)
    at org.geotools.referencing.CRS.<clinit>(CRS.java:283)
    ... 25 more
paintComponent()
[ShaperenderingPanel] started rendering at 10:29:22.686 Exception in
thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError
    at 
org.geotools.renderer.lite.RendererUtilities.calculateScale(RendererUtil
ities.java:109)
    at 
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.ja
va:1238)
    at 
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.ja
va:1198)
    at 
org.geotools.gui.swing2.ShaperenderingJPanel._paintComponent(Shaperender
ingJPanel.java:324)
    at 
org.geotools.gui.swing2.ShaperenderingJPanel.paintComponent(Shaperenderi
ngJPanel.java:275)
    at javax.swing.JComponent.paint(JComponent.java:1005)
    at
javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
    at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
    at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
    at 
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEve
ntQueueUtilities.java:114)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.java:242)
    at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
java:163)
    at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
paintComponent()
[ShaperenderingPanel] started rendering at 10:29:49.415 Exception in
thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError
    at 
org.geotools.renderer.lite.RendererUtilities.calculateScale(RendererUtil
ities.java:109)
    at 
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.ja
va:1238)
    at 
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.ja
va:1198)
    at 
org.geotools.gui.swing2.ShaperenderingJPanel._paintComponent(Shaperender
ingJPanel.java:324)
    at 
org.geotools.gui.swing2.ShaperenderingJPanel.paintComponent(Shaperenderi
ngJPanel.java:275)
    at
javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4967)
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
    at javax.swing.JComponent.paint(JComponent.java:995)
    at
java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
    at 
sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
    at 
sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
    at java.awt.Container.paint(Container.java:1709)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
    at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
    at sun.awt.RepaintArea.paint(RepaintArea.java:224)
    at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:630)
    at java.awt.Component.dispatchEventImpl(Component.java:4031)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.java:242)
    at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
java:163)
    at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems?  Stop!  Download the new AJAX search engine that
makes searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-gt2-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to