0

Chart Demo throws Servlet Exception

asked 2006-10-10 14:58:07 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2006-10-10 14:59:29 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2006-10-10 16:29:19 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2006-10-11 02:25:33 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

link publish delete flag offensive edit

answered 2006-10-11 02:27:22 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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.

link publish delete flag offensive edit

answered 2006-10-11 03:28:23 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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)

link publish delete flag offensive edit

answered 2006-10-11 15:09:52 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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!

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-10-10 14:58:07 +0800

Seen: 224 times

Last updated: Oct 11 '06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More