-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3956148
By: nobody
Hello,
All demos work fine but chart throws servlet exception.
I have followed instructions in quickstart
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3956150
By: nobody
oops..hit enter and got published...sorry.
Here is the rest of the post.
Using Tomcat5
Did the catalina.policy change and here is the catalinalog:
2006-10-10 16:56:33 ApplicationDispatcher[/zkdemo-all] Servlet.service() for servlet auEngine threw exception java.lang.ExceptionInInitializerError
at org.jfree.chart.title.TextTitle.arrangeRR(TextTitle.java:489)
at org.jfree.chart.title.TextTitle.arrange(TextTitle.java:450)
at org.jfree.chart.JFreeChart.drawTitle(JFreeChart.java:1125)
at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1015)
at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1213)
at org.zkoss.zul.impl.SimpleChartEngine.drawChart(SimpleChartEngine.java
:151)
at org.zkoss.zul.Chart$2.onEvent(Chart.java:524)
at org.zkoss.zk.ui.impl.EventProcessingThread.process1(EventProcessingTh
read.java:469)
at org.zkoss.zk.ui.impl.EventProcessingThread.process0(EventProcessingTh
read.java:451)
at org.zkoss.zk.ui.impl.EventProcessingThread.run(EventProcessingThread.
java:358)
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5/webapps/zkdemo-all/WEB-INF/classes/org/jfree/base/jcommon.properties
read)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:264)
at java.security.AccessController.checkPermission(AccessController.java:
427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.exists(File.java:700)
at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:8
26)
at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java
:208)
at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.ja
va:287)
at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(Web
appClassLoader.java:1708)
at org.apache.catalina.loader.WebappClassLoader.findResource(WebappClass
Loader.java:920)
at org.apache.catalina.loader.WebappClassLoader.getResource(WebappClassL
oader.java:1054)
at org.jfree.util.ObjectUtilities.getResourceRelative(ObjectUtilities.ja
va:306)
at org.jfree.util.ObjectUtilities.getResourceRelativeAsStream(ObjectUtil
ities.java:373)
at org.jfree.base.config.PropertyFileConfiguration.load(PropertyFileConf
iguration.java:68)
at org.jfree.base.AbstractBoot.createDefaultHierarchicalConfiguration(Ab
stractBoot.java:272)
at org.jfree.base.BaseBoot.loadConfiguration(BaseBoot.java:99)
at org.jfree.base.AbstractBoot.getGlobalConfig(AbstractBoot.java:121)
at org.jfree.text.TextUtilities.<clinit>(TextUtilities.java:111)
... 10 more
Thanks for the help!
Cheers,
-Eric
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3956346
By: nobody
When I deactivate Tomcat Security Manager, the demo works...
What else do i need to put apart from the lines above in catalina.policy?
Thanks in advance,
-Eric
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3956937
By: henrichen
See if this help?
https://sourceforge.net/forum/message.php?msg_id=3939553
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3956938
By: nobody
Thanks for your quick response Henri!
I already did that but doesn't solve the chart problem.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3956990
By: henrichen
1. Did you reboot your Tomcat?
2. Did the jcommon.properties is readable to your Tomcat service user(The user that run your Tomcat as a service)?
3. I guess you know the file in question is this one:
"/var/lib/tomcat5/webapps/zkdemo-all/WEB-INF/classes/org/jfree/base/jcommon.prop
erties"
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5/webapps/zkdemo-all/WEB-INF/classes/org/jfree/base/jcommon.properties
read)
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 java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.exists(File.java:700)
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3957835
By: nobody
Yep, the only problem is that that file doesn't exist...I have the jfreechart.jar in the lib/ directory of my webapp, that's all...
Strange is that when I remove security manager it doesn't bother with that...
I'll check permissions on WEB-INF/Classes and let you know!
Thanks for your support!
Asked: 2006-10-10 14:58:07 +0800
Seen: 224 times
Last updated: Oct 11 '06