uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: Simple Rest Server
Date Tue, 16 Jun 2009 09:55:50 GMT
Stergos D. Afantenos wrote:
> Dear all,
> 
> I am trying to develop a web service using the Simple Rest Server. I
> am using the default installation of Tomcat5.5 under Ubuntu 9.04.
> Actually, my web service runs quite smoothly when I try to "manually"
> start Tomcat using the following  script of my own device :)
> 
> sudo  java -Dcatalina.base=/usr/share/tomcat5.5
> -Dcatalina.home=/usr/share/tomcat5.5
> -Dwtp.deploy=/var/lib/tomcat5.5/webapps
> -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed -classpath
> /usr/share/tomcat5.5/bin/bootstrap.jar:/usr/lib/jvm/java-6-sun-1.6.0.13/lib/tools.jar
> org.apache.catalina.startup.Bootstrap start
> 
> On the other hand, when I try to start Tomcat normally
> (/etc/init.d/tomcat5.5 restart) I get the following errors once I try
> to access my web service :
> 
> HTTP Status 500 -
> 
> type Exception report
> 
> message
> 
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
> 
> exception
> 
> javax.servlet.ServletException
> 	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:294)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115)
> 	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
> 	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> 	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.lang.ExceptionInInitializerError
> 	org.apache.uima.simpleserver.Service.<clinit>(Service.java:71)
> 	org.apache.uima.simpleserver.servlet.SimpleServerServlet.init(SimpleServerServlet.java:229)
> 	javax.servlet.GenericServlet.init(GenericServlet.java:211)
> 	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	java.lang.reflect.Method.invoke(Method.java:616)
> 	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
> 	java.security.AccessController.doPrivileged(Native Method)
> 	javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
> 	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115)
> 	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
> 	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> 	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
> 
> org.apache.uima.UIMA_IllegalStateException: The UIMA framework
> implementation (class org.apache.uima.impl.UIMAFramework_impl) could
> not be created.
> 	org.apache.uima.UIMAFramework.<clinit>(UIMAFramework.java:1183)
> 	org.apache.uima.simpleserver.Service.<clinit>(Service.java:71)
> 	org.apache.uima.simpleserver.servlet.SimpleServerServlet.init(SimpleServerServlet.java:229)
> 	javax.servlet.GenericServlet.init(GenericServlet.java:211)
> 	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	java.lang.reflect.Method.invoke(Method.java:616)
> 	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
> 	java.security.AccessController.doPrivileged(Native Method)
> 	javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
> 	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115)
> 	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
> 	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> 	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.util.PropertyPermission * read,write)
> 	java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
> 	java.security.AccessController.checkPermission(AccessController.java:553)
> 	java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
> 	java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1269)
> 	java.beans.Introspector.setBeanInfoSearchPath(Introspector.java:316)
> 	org.apache.uima.impl.UIMAFramework_impl._initialize(UIMAFramework_impl.java:167)
> 	org.apache.uima.UIMAFramework.<clinit>(UIMAFramework.java:1180)
> 	org.apache.uima.simpleserver.Service.<clinit>(Service.java:71)
> 	org.apache.uima.simpleserver.servlet.SimpleServerServlet.init(SimpleServerServlet.java:229)
> 	javax.servlet.GenericServlet.init(GenericServlet.java:211)
> 	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	java.lang.reflect.Method.invoke(Method.java:616)
> 	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
> 	java.security.AccessController.doPrivileged(Native Method)
> 	javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
> 	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
> 	org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115)
> 	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
> 	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> 	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)
> 
> 
> 
> My guess is that I should explicitly grand some permissions to the
> Simple Rest Server via the various
> /usr/share/tomcat5.5/conf/policy.d/*.policy files, but no matter what
> I change, the SimpleRestServer stubbornly refuses to start up.

The code is trying to ascertain that it can set system
properties.  This line is the culprit:

    // attempt to improve initialization performance
    Introspector.setBeanInfoSearchPath(new String[0]);

See if you can allow setting system properties in
your Tomcat's policy file.  Note: I'm not a Tomcat
expert, and I've never seen this issue before with
UIMA and Tomcat 5.5.

--Thilo

> 
> In case that you have any idea of what might be going on, I would be
> very happy to hear from you.
> 
> Best,
> Stergos D. Afantenos

Mime
View raw message