AccessControlException

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Sandhase
Posts: 1
Joined: Tue Mar 08, 2011 11:33 am
antibot: No, of course not.

AccessControlException

Post by Sandhase » Tue Mar 08, 2011 11:48 am

Hello,

I'm using JFreeChart in an applet. The applets starts via JNLP. In the JNLP File i grant all permissions and the jar containing my applet is signed. also the jcommond and jfreechart jars are signed with the same key.

It is a BarChart and works fine if the data is plotted in the start method of the applet. unfortunately i need some data out of a database, so i give data via liveconnect and public applet emthods to the java applet.

here comes the exception.
All methods work fine and all calls i do are okay. even the data is correct in the chart.
but when the plot routine has finished the chart is not repainted and i get the AccessControlException.

When i click in the applet the data gets plotted correct.
So i don't know where the error is located. hope you can help me.

Here is the complete ExceptionMessage:

Exception in thread "AWT-EventQueue-3" java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkMemberAccess(Unknown Source)
at java.lang.Class.checkMemberAccess(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at org.jfree.chart.urls.URLUtilities.encode(URLUtilities.java:74)
at org.jfree.chart.urls.StandardCategoryURLGenerator.generateURL(StandardCategoryURLGenerator.java:146)
at org.jfree.chart.renderer.category.AbstractCategoryItemRenderer.addItemEntity(AbstractCategoryItemRenderer.java:1681)
at org.jfree.chart.renderer.category.BarRenderer.drawItem(BarRenderer.java:1091)
at org.jfree.chart.plot.CategoryPlot.render(CategoryPlot.java:3825)
at org.jfree.chart.plot.CategoryPlot.draw(CategoryPlot.java:3605)
at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1235)
at org.jfree.chart.ChartPanel.paintComponent(ChartPanel.java:1668)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Additional Information: This is not my only Applet with JFreeChart. All other applets do not have this problem. Also this problem seems to be a phenomen of windows. i have testet Firefox and Internet Explorer under windows and i get the error. when i use linux and firefox it works fine. no error message. I've compared the ControlPanel of both java vm's and they seem to be identical in the security options.

Hope you can help me
BR
Sandhase

Locked