struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mathias-ewald <nitehoax...@gmx.net>
Subject Re: Problem with LoginInterceptor
Date Mon, 20 Jul 2009 10:42:27 GMT

Thx for the reply! I checked the Login Intercepter Tutorial once again and
recognized I forgot some Interceptors as you told. This is what they suggest
to define:




You need to include one of the framework interceptor stacks (e.g
"defaultStack") in your "defaultLoginStack" stack. As you have
configured it, your interceptor is the only one that is being
executed, so none of the framework "magic" gets applied.

---------------------------------------------------------------------------------
		<interceptors>
		    <interceptor name="login"
class="de.mathiasewald.projektseminar.interceptor.LoginInterceptor">
		   
		    </interceptor>
			<interceptor-stack name="defaultLoginStack">
				<interceptor-ref name="servlet-config" />
				<interceptor-ref name="params" />
				<interceptor-ref name="login" />
				<interceptor-ref name="prepare" />
				<interceptor-ref name="chain" />
				<interceptor-ref name="model-driven" />
				<interceptor-ref name="fileUpload" />
				<interceptor-ref name="static-params" />
				<interceptor-ref name="params" />
				<interceptor-ref name="conversionError" />
				<interceptor-ref name="validation" />
				<interceptor-ref name="workflow" />
			</interceptor-stack>

			<interceptor-stack name="defaultInsecureStack">
				<interceptor-ref name="servlet-config" />
				<interceptor-ref name="params" />
				<interceptor-ref name="prepare" />
				<interceptor-ref name="chain" />
				<interceptor-ref name="model-driven" />
				<interceptor-ref name="fileUpload" />
				<interceptor-ref name="static-params" />
				<interceptor-ref name="params" />
				<interceptor-ref name="conversionError" />
				<interceptor-ref name="validation" />
				<interceptor-ref name="workflow" />
			</interceptor-stack>
		</interceptors>
---------------------------------------------------------------------------------


This brings up the following Exception as Tomcat starts:

---------------------------------------------------------------------------------
Jul 20, 2009 12:38:50 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:projektseminar' did not
find a matching property.
Jul 20, 2009 12:38:50 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/lib/jvm/java-6-sun-1.6.0.14/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.14/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.14/jre/../lib/amd64:/usr/lib64/xulrunner-addons:/usr/java/packages/lib/amd64:/lib:/usr/lib
Jul 20, 2009 12:38:50 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 20, 2009 12:38:50 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 692 ms
Jul 20, 2009 12:38:50 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 20, 2009 12:38:50 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
12:38:51,865  INFO XmlConfigurationProvider:31 - Parsing configuration file
[struts-default.xml]
12:38:51,991  INFO XmlConfigurationProvider:31 - Parsing configuration file
[struts-plugin.xml]
12:38:52,075  INFO XmlConfigurationProvider:31 - Parsing configuration file
[struts.xml]
Jul 20, 2009 12:38:52 PM org.apache.catalina.core.StandardContext
filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - interceptor-ref -
file:/home/mathias/.workspace_j2ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/projektseminar/WEB-INF/classes/struts.xml:23:46
	at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
	at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
	at
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
	at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
	at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
	at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
	at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
	at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Unable to find interceptor class referenced by ref-name
servlet-config - interceptor-ref -
file:/home/mathias/.workspace_j2ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/projektseminar/WEB-INF/classes/struts.xml:23:46
	at
com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:52)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:1092)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStack(XmlConfigurationProvider.java:798)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStacks(XmlConfigurationProvider.java:811)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptors(XmlConfigurationProvider.java:834)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:441)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265)
	at
org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
	at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189)
	at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
	... 22 more
Jul 20, 2009 12:38:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jul 20, 2009 12:38:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/projektseminar] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in
class reloading, using NOPLoggerRepository.
Jul 20, 2009 12:38:52 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 20, 2009 12:38:52 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 20, 2009 12:38:52 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/46  config=null
Jul 20, 2009 12:38:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1942 ms
---------------------------------------------------------------------------------

So obviously the additions Interceptors cannot be found. Where are they
defined??

cu
Mathias
-- 
View this message in context: http://www.nabble.com/Problem-with-LoginInterceptor-tp24565562p24567491.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message