Hello guys! I started my tomcat at home with catalina.bat start -security. During startup I at once got a lot of exceptions, please see this pastie:http://pastie.org/8499210 When I try to access the webapp I get 404 right away.At the production server I at least could access the jsp:s direct, but through struts I got 404.Now at home I just get 404 in both ways. One interesting thing is that it looks like the app do not got permissions to load the struts-default.xml: Caused by: Caught exception while loading file struts-default.xml ...that could be the same issue in production since no struts is working at all. I have not worked with permissions before but examing the catalina.policy with polycytool I see there is alot of settings like:java.util.PropertyPermission java.vm.version read...that I guess means that it is OK to read the System.getProperty("java.vm.version"); If you draw any conclusion about my app like is there any permission I need to set to make it work (I guess it must be able to read struts-default.xml for eg), please let me know. Then I will get in contact with the webhotel-support and try to ask them to tell me if they got that permission-settings. Best regardsFredrik
> From: fredan...@hotmail.com > To: users@tomcat.apache.org > Subject: RE: 404 - Might there be something wrong with my permissions? > Date: Thu, 21 Nov 2013 15:46:07 +0000 > > Hello Konstantin!Thanks for your reply!Yes the message got really hard to > read, it looked fine when I send it!My apologies for that!I will start to > investigate your advice right away!Sounds really interesting!I will get back > as soon I got any new info!Best regards and thanks alot again!/Fredrik > > > Date: Thu, 21 Nov 2013 17:10:58 +0400 > > Subject: Re: 404 - Might there be something wrong with my permissions? > > From: knst.koli...@gmail.com > > To: users@tomcat.apache.org > > > > 2013/11/21 Fredrik Andersson <fredan...@hotmail.com>: > > > Hello Tomcat-experts! > > > > It is hard to read you message. > > > > > I have recently bought some space at a webhotel that uses Apache HTTP > > > server as front before a Tomcat 6.0.37.My account at the webhotel is said > > > to support Struts and Hibernate and such technics.At home I have > > > developed a app that uses those technics and of course it runs fine in a > > > similar environment as the one at the webhotel. I can deploy my app as a > > > ROOT-app or a ordinary app and the Struts works perfectly. > > > At the webhotel I have tried to deploy it booth as a ROOT-app and as a > > > MYAPP-webapp-1.0.0.war-file > > > Now I have stripped the app down to just a struts2-hello-world-app. > > > But at the webhotel I just keep getting this when I try to access the > > > ActionClass through struts.xml: > > > HTTP Status 404 - There is no Action mapped for namespace [/] and action > > > name [welcome] associated with context path [/MYAPP-webapp-1.0.0].type > > > Status reportmessage There is no Action mapped for namespace [/] and > > > action name [welcome] associated with context path > > > [/MYAPP-webapp-1.0.0].description The requested resource is not available. > > > > > Unfortenatly the support guys at the webhotel says they lack knowledge of > > > Tomcat so they can not help me out. > > > > If you want to change your hosting provider, there are a number of offers at > > http://wiki.apache.org/tomcat/PoweredBy#Hosting_providers > > > > > But today I at least found this exception in the catalina.log just after > > > my attempt yo access a struts-path: > > > /-- Encapsulated exception ------------\ java.lang.NullPointerException: > > > permission can't be null at > > > java.security.AccessController.checkPermission(Unknown Source) at > > > java.lang.SecurityManager.checkPermission(Unknown Source) at > > > ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:834) at > > > ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1280) at > > > ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1481) at > > > ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85) > > > at > > > ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162) > > > at > > > com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27) > > > at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2318) at > > > com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:77) > > > at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2318) at > > > ognl.ASTProperty.setValueBody(ASTProperty.java:127) at > > > ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220) at > > > ognl.SimpleNode.setValue(SimpleNode.java:301) at > > > ognl.Ognl.setValue(Ognl.java:737) at > > > com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:217) at > > > com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:186) > > > at > > > com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:173) > > > at > > > com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:151) > > > at > > > com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:292) > > > at > > > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:203) > > > at > > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211) > > > at > > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171) > > > at > > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) > > > at > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) > > > at > > > org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) > > > at > > > org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510) > > > at > > > org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) > > > at > > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > > > sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at > > > java.lang.reflect.Method.invoke(Unknown Source) at > > > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270) at > > > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269) at > > > java.security.AccessController.doPrivileged(Native Method) at > > > javax.security.auth.Subject.doAsPrivileged(Unknown Source) at > > > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302) > > > at > > > org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243) > > > at > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) > > > at > > > org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56) > > > at > > > org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189) > > > at java.security.AccessController.doPrivileged(Native Method) at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) > > > at > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > > > at > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > > > at > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > > > at > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > > > at > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > > > at > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > > > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) > > > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at > > > org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) at > > > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) > > > at > > > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) > > > at > > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) > > > at java.lang.Thread.run(Unknown Source) > > > \--------------------------------------/ > > > > > > I'm pretty sure this exception come from me. So perhaps the > > > webhotel-admin guys has set upp my rights incorrect? > > > For a couple of weeks I have struggle to test different apache-mapping, > > > context.xml and struts-namespace-settings. At home it work but not at the > > > webhotel. Even though I start to think that it might not has anything to > > > do with this I just add some info below about my settings: > > > Apache-mappings (that I have set at the webhotel):/*.jsp /*.jspx /*.jsf > > > /servlet/* /*.do /MYAPP-webapp-1.0.0/* /* > > > (At home I just got: JkMount /* worker1) > > > Context.xml (from inside the MYAPP-webapp-1.0.0.war)<Context path="" > > > override="true" /> > > > In my struts.xml I got this snippet: <package name="basicstruts2" > > > namespace="" extends="struts-default"> <action > > > name="login"> <result type="dispatcher">/login.jsp</result> > > > </action> > > > <action name="welcome" > > > class="se.MYAPP.web.actions.WelcomeUserAction"> <result > > > name="SUCCESS" type="dispatcher">/welcome.jsp</result> </action> > > > </package> > > > In my web.xml I got this snippet: <filter> > > > <filter-name>struts2</filter-name> > > > <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> > > > </filter> > > > <filter-mapping> > > > <filter-name>struts2</filter-name> > > > <url-pattern>/*</url-pattern> </filter-mapping> But if I try to > > > access the struts paths > > > like:http://www.MYAPP.se/MYAPP-webapp-1.0.0/loginhttp://www.MYAPP.se/MYAPP-webapp-1.0.0/login.dohttp://www.MYAPP.se/MYAPP-webapp-1.0.0/login.action > > > ...I just get the above > > > 404.http://www.MYAPP.se/MYAPP-webapp-1.0.0/login.jsp of course work. > > > So if you guys got any ideas or anything I could ask the > > > webhotel-support-guys to look for please let me know.Any ideas are most > > > welcomeBest regardsFredrik > > > > > > The message is that java.lang.SecurityManager.checkPermission() was > > called with a wrong argument. The code that makes that call is > > > > > ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:834) > > > > That is not Tomcat code. You should ask the authors of that OGNL > > library (and check whether you use the latest version of it). They are > > making that call with wrong arguments. > > > > > > The rest is from my general knowledge. Usually the calls to > > "checkPermission()" are performed only when you run with Java's > > SecurityManager being enabled. Try to enable it when you are running > > at home and see whether the error reproduces itself. (Or try to > > disable it in your production configuration and see how the error goes > > away). > > > > http://tomcat.apache.org/tomcat-6.0-doc/security-manager-howto.html > > > > Best regards, > > Konstantin Kolinko > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > >