0

binary installation and source build errors

asked 2008-07-27 06:41:16 +0800

papikondalu gravatar image papikondalu
9 1

I'm a newbie to tomcat and zk trying to install zk on a 64-bit machine with Ubuntu linux, OpenJDK1.6, tomcat 5.5, ant 1.7.

After copying all the .jar files into tomcat shared/lib directory, with the binary installation, i'm getting the following errors:

javax.servlet.ServletException: Servlet.init() for servlet zkLoader threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:636)

root cause

java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/zkdemo/WEB-INF/classes/logging.properties read)
java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
java.security.AccessController.checkPermission(AccessController.java:553)
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
java.lang.SecurityManager.checkRead(SecurityManager.java:888)
java.io.File.exists(File.java:748)
org.apache.naming.resources.FileDirContext.file(FileDirContext.java:828)

A similar access denied error comes with ZeroKode, which might be due to some tomcat setup issue.

When I try to do a source build ( ./build in zk-src-3.0.6 ) , I get the following errors:

compile:
Compiling 152 source files to /home/.../downloads/zk/tmp/zk-src-3.0.6/zcommon/debug
/home/.../downloads/zk/tmp/zk-src-3.0.6/zcommon/src/org/zkoss/xel/el/ELFactory.java:26: package org.zkforge.apache.commons.el does not exist
import org.zkforge.apache.commons.el.ExpressionEvaluatorImpl;
^
/home/.../downloads/zk/tmp/zk-src-3.0.6/zcommon/src/org/zkoss/xel/el/ELFactory.java:38: cannot find symbol
symbol : class ExpressionEvaluatorImpl
location: class org.zkoss.xel.el.ELFactory
private final ExpressionEvaluatorImpl _eval;
^
/home/.../downloads/zk/tmp/zk-src-3.0.6/zcommon/src/org/zkoss/xel/el/ELXelExpression.java:26: package org.zkforge.apache.commons.el does not exist
import org.zkforge.apache.commons.el.ExpressionApi;
^
/home/.../downloads/zk/tmp/zk-src-3.0.6/zcommon/src/org/zkoss/xel/el/ELXelExpression.java:35: cannot find symbol
symbol : class ExpressionApi


I get the same errors even in versions 2.4.3 and 3.0.5, which indicates that there is something wrong with the build setup!

Please suggest some solution either to the binary or src installation problems.

Thanks and regards

-PK

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2008-07-27 11:08:57 +0800

papikondalu gravatar image papikondalu
9 1

addng the following to catalina.policy did not help

grant codeBase "file:${catalina.home}/webapps/zkdemo/-" {
permission java.security.AllPermission;
};

By disabling security completely did give me access. For testing this is fine. However, in real web server situations I don't think turning security off is not a solution.

Any suggestions ???

-PK

link publish delete flag offensive edit

answered 2008-07-27 11:32:09 +0800

papikondalu gravatar image papikondalu
9 1

With ZeroKode I'm getting the following exception:

javax.servlet.ServletException: Only one layout servlet is allowed in one context: org.apache.catalina.core.ApplicationContextFacade@300b6421
org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:91)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:636)

This is a new installation and not an upgrade. The HowTo indicates that during an upgrade there could be a possibility ! I've installed ZeroKode-0.8.1

Any suggestions about where I might have gone wrong?

-PK

link publish delete flag offensive edit

answered 2008-07-30 19:44:48 +0800

dcjarrell gravatar image dcjarrell
3

I have had the same problem. Using tomcat5.5 on Ubuntu. Tomcat is up and running correctly, but I get the error message listed above. Its a fresh install so the upgrade fix did not work. There is only one copy of the relevant *.jar files on the system.

Any help is appreciated.

link publish delete flag offensive edit

answered 2008-08-19 05:06:36 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

about 'javax.servlet.ServletException: Only one layout servlet is allowed in one context: ' problem,
please double check there is no other older version of zk jar files in your application or share/common folder in tomcat.
a better way to do upgrade is delete old, copy new, don't just copy and replace.

link publish delete flag offensive edit

answered 2008-08-19 06:30:37 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

About the permission problem,

did you ever try this ?
grant codeBase "file:${catalina.home}/webapps/zkdemo/WEB-INF/lib/-" {
permission java.security.AllPermission;
};

if this still doesn't work, please make sure you modify the correct correct policy file of you tomcat.

/Dennis

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: 2008-07-27 06:41:16 +0800

Seen: 1,073 times

Last updated: Aug 19 '08

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