Permission denied

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Edmund Geesken

Permission denied

Post by Edmund Geesken » Tue Aug 13, 2002 5:22 pm

Hi, I am working with weblogic 5.1 and I am trying to get JFreeChart running. I have managed it on Tomcat 4 but with weblogic I alwas get the error message

Tue Aug 13 18:14:10 CEST 2002:<E> <ServletContext-General> Servlet failed with Exception
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.security.AllPermission <all permissions> <all actions>)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:231)
at sun.awt.SunToolkit.getImage(SunToolkit.java:284)
at javax.swing.ImageIcon.<init>(ImageIcon.java:115)
at javax.swing.ImageIcon.<init>(ImageIcon.java:134)
at com.jrefinery.chart.JFreeChartInfo.<init>(Unknown Source)
at com.jrefinery.chart.JFreeChart.<clinit>(Unknown Source)
at com.jrefinery.chart.ChartFactory.createPieChart(Unknown Source)
at dreba.prj.limes.gui.chart.TestChartServlet.doGet(TestChartServlet.java:51)

I have registered the servlet in the weblogic.properties file but I still get this strange exception

Has anyone an idea what i should change to get JFreechart running.


Thanks in advance
Edmund

David Gilbert

Re: Permission denied

Post by David Gilbert » Tue Aug 13, 2002 5:58 pm

It looks like there is a problem loading the gorilla.jpg file in the JFreeChartInfo class (at the bottom of the JFreeChart.java file). I'm not sure what causes the problem, but if you find out let me know so I can put in a workaround.

Regards,

DG.

Edmund Geesken

Re: Permission denied

Post by Edmund Geesken » Wed Aug 14, 2002 9:55 am

We extracted the gorilla.jpg from tha jar-archive into our serverclasses directory (com/jref...) and after that the weblogic could find and access the lovely gorilla. Now JFreechart runs within weblogic.
Thanks
Edmund

Locked