tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A. Alonso Dominguez" <alonso.do...@gmail.com>
Subject Unexpected Jasper Exception
Date Mon, 12 Sep 2005 09:07:29 GMT
Hi there!

I'm developing a web application covered inside a security manager. The 
problem is that I left the right permissions to the commons libraries and 
now the jasper compiler can not initialize the tlds cache. This the 
exception:

org.apache.jasper.JasperException: Unable to initialize
TldLocationsCache: XML parsing error on file
/WEB-INF/tlds/displaytag-el-12.tld
	org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:252)
	org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:223)
	org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:519)
	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:417)
	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
	org.apache.jasper.compiler.Parser.parse(Parser.java:126)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:585)
	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
	java.security.AccessController.doPrivileged(Native Method)
	javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
	java.security.AccessController.doPrivileged(Native Method)
	com.interlogical.portal.security.WebappSecurityFilter.doFilter(WebappSecurityFilter.java:51)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:585)
	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
	java.security.AccessController.doPrivileged(Native Method)
	javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)

I'm using Tomcat 5.5.9 and JVM 1.5.0. The catalina.policy file looks like:
...
grant codeBase "file:/home/domains/i/interlogical.com/htdocs/-" {
	permission java.net.SocketPermission "jakarta.apache.org:80
<http://jakarta.apache.org:80>", "connect";
	permission java.net.SocketPermission "jakarta.apache.org:80
<http://jakarta.apache.org:80>", "resolve";

	permission java.util.PropertyPermission "file.encoding", "read";
	permission java.util.PropertyPermission "java.class.path", "read";
	permission java.util.PropertyPermission "java.compiler", "read";
	permission java.util.PropertyPermission "java.ext.dirs", "read";
	permission java.util.PropertyPermission "java.io.tmpdir", "read";
	permission java.util.PropertyPermission "java.library.path", "read";
	permission java.util.PropertyPermission "java.runtime.name
<http://java.runtime.name>", "read";
	permission java.util.PropertyPermission "java.runtime.version", "read";
	permission java.util.PropertyPermission "java.vm.info
<http://java.vm.info>", "read";
	permission java.util.PropertyPermission "user.country", "read";
	permission java.util.PropertyPermission "user.region", "read";
	permission java.util.PropertyPermission "user.dir", "read";
	permission java.util.PropertyPermission "user.home", "read";
	permission java.util.PropertyPermission "user.language", "read";
	permission java.util.PropertyPermission "user.name <http://user.name>", "read";

	permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.tomcat.util.buf";
	permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.tomcat.util.buf.*";

	permission java.io.FilePermission "/WEB-INF/tlds/*", "read";

	permission com.interlogical.portal.security.URLPermission "/";
	permission com.interlogical.portal.security.URLPermission "/welcome.do";
	permission com.interlogical.portal.security.URLPermission "/favicon.ico";
	permission com.interlogical.portal.security.URLPermission "/menu/*";
	permission com.interlogical.portal.security.URLPermission "/skin/*";
	permission com.interlogical.portal.security.URLPermission "/user/logon.do";
	permission com.interlogical.portal.security.URLPermission "/WEB-INF/tlds/*";
};

The commons-lang, commons-collections and commons-beanutils libraries
are under /common/lib
Maybe I'm forgetting some permissions or maybe the problem is
something different.

... And another question: When my webapp starts I get this logs from
the commons-beanutils library:
WARN  12-09 10:56:35 (MethodUtils.java:583) - Cannot use JVM pre-1.4
access bug workaround die to restrictive security manager.
WARN  12-09 10:56:35 (MethodUtils.java:583) - Cannot use JVM pre-1.4
access bug workaround die to restrictive security manager.

I hope someone of you knows whats going around.

Regards,
Alonso

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message