See comments inline:
David Sean Taylor wrote:
Ok, removed jetspeed-portal.jar and jetspeed-security.jar from shared
lib. Added the RoleCheckValve jar to {Jetspeed_home}/WEB-INF/lib
Set all org.apache.jetspeed packages to debug level.
Still no joy.
Some logging:
Sounds like its getting into the valve:
2008-10-16 15:41:03,592 [main] DEBUG
org.apache.jetspeed.security.impl.RoleCheckValve - instantiating
RoleCheckValve with arg roleToCheck=unconsented
yes, as I said, at Tomcat's startup it instantiates the RoleCheckValve bean.
So what happens next, does it your valve execute the redirect?
No the valve never shows up again the log after instantiation. It does
have several logging statements within the invoke and all jetspeed
packages are set to log at debug level.
This line shows in the log just before I log the roleToCheck argument.
2008-10-20 14:38:26,038 [main] DEBUG
org.springframework.beans.factory.support.DefaultListableBeanFactory -
Creating instance of bean 'roleCheckValve' with merged definition [Root
bean: class [org.apache.jetspeed.security.impl.RoleCheckValve];
scope=singleton; abstract=false; lazyInit=false;
autowireCandidate=false; autowireMode=0; dependencyCheck=0;
factoryBeanName=null; factoryMethodName=null; initMethodName=initialize;
destroyMethodName=null; defined in ServletContext resource
[/WEB-INF/assembly/pipelines.xml]]
Note the autowireCandidate attribute = false, all the other pipeline
beans have this set to true I believe. Certainly the localization valve,
the capabilities valve and the portalURL valve all do. But I can't see
anything in the pipelines.xml that looks wrong.
i'm attaching my pipelines.xml, I can attach the jetspeed log, but at
9000+ lines just for a startup and login, I'm guessing you probably
don't want me to.
Either put more debug statements in or attach your code to a debugger
and find out
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
<beans>
-->
<bean id="roleCheckValve" class="org.apache.jetspeed.security.impl.RoleCheckValve" init-method="initialize">
<constructor-arg>
<value>unconsented</value>
</constructor-arg>
</bean>
<bean id="localizationValve"
class="org.apache.jetspeed.localization.impl.LocalizationValveImpl"
init-method="initialize"
>
<constructor-arg>
<value><[EMAIL PROTECTED]><[EMAIL PROTECTED]></value>
</constructor-arg>
</bean>
<bean id="capabilityValve"
class="org.apache.jetspeed.capabilities.impl.CapabilityValveImpl"
init-method="initialize"
>
<constructor-arg>
<ref bean="org.apache.jetspeed.capabilities.Capabilities" />
</constructor-arg>
</bean>
<bean id="portalURLValve"
class="org.apache.jetspeed.container.url.impl.PortalURLValveImpl"
init-method="initialize"
>
<constructor-arg>
<ref bean="NavigationalStateComponent" />
</constructor-arg>
</bean>
<bean id="securityValve"
class="org.apache.jetspeed.security.impl.SecurityValveImpl"
init-method="initialize"
>
<constructor-arg index='0'>
<ref bean="org.apache.jetspeed.profiler.Profiler" />
</constructor-arg>
<constructor-arg index='1'>
<ref bean="org.apache.jetspeed.security.UserManager" />
</constructor-arg>
<constructor-arg index='2'>
<ref bean="PortalStatistics" />
</constructor-arg>
<constructor-arg index='3'>
<ref bean="org.apache.jetspeed.administration.PortalAuthenticationConfiguration" />
</constructor-arg>
</bean>
<bean id="passwordCredentialValve"
class="org.apache.jetspeed.security.impl.PasswordCredentialValveImpl"
init-method="initialize"
/>
<bean id="loginValidationValve"
class="org.apache.jetspeed.security.impl.LoginValidationValveImpl"
init-method="initialize">
<!-- remove (from the session) the following list of session attributes upon login -->
<constructor-arg index="0">
<list>
<value>org.apache.jetspeed.powertool.actions</value>
</list>
</constructor-arg>
</bean>
<bean id="profilerValve"
class="org.apache.jetspeed.profiler.impl.ProfilerValveImpl"
init-method="initialize"
>
<constructor-arg index="0">
<ref bean="org.apache.jetspeed.profiler.Profiler" />
</constructor-arg>
<constructor-arg index="1">
<ref bean="org.apache.jetspeed.portalsite.PortalSite" />
</constructor-arg>
<!--
request fallback to root folder/page enabled by default;
if set to false, requests generate HTTP 403/404 errors
for access errors or missing pages
-->
<constructor-arg index="2"><value>true</value></constructor-arg>
<!--
use last visited page histories to select default page
for folder navigational urls; if set to false, the
default page specified in PSML, (or the first page in
the folder), is always selected
DST:OVERRIDE to false, dont use history
-->
<constructor-arg index="3"><value>false</value></constructor-arg>
</bean>
<!--
To create a new page when a user first logs in from their roles,
add this valve after each profilerValve entry in the pipeline configs
below
-->
<bean id="createPageValve"
class="org.apache.jetspeed.profiler.impl.CreatePageValveImpl"
>
<constructor-arg index="0">
<ref bean="PortletActionSecurityBehavior" />
</constructor-arg>
</bean>
<!--
To create new pages when a user first logs in from user template pages,
add this valve after each profilerValve entry in the pipeline configs
below
-->
<bean id="createUserTemplatePagesValve"
class="org.apache.jetspeed.profiler.impl.CreateUserTemplatePagesValveImpl"
>
<constructor-arg index="0">
<ref bean="org.apache.jetspeed.profiler.Profiler" />
</constructor-arg>
<constructor-arg index="1">
<ref bean="org.apache.jetspeed.portalsite.PortalSite" />
</constructor-arg>
<!--
request fallback to root folder/page enabled by default;
if set to false, requests generate HTTP 403/404 errors
for access errors or missing pages
-->
<constructor-arg index="2"><value>true</value></constructor-arg>
<!--
use last visited page histories to select default page
for folder navigational urls; if set to false, the
default page specified in PSML, (or the first page in
the folder), is always selected
-->
<constructor-arg index="3"><value>true</value></constructor-arg>
<constructor-arg index="4">
<ref bean="org.apache.jetspeed.page.PageManager" />
</constructor-arg>
</bean>
<bean id="containerValve"
class="org.apache.jetspeed.container.ContainerValve"
init-method="initialize"
/>
<bean id="actionValve"
class="org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl"
init-method="initialize"
>
<constructor-arg>
<ref bean="org.apache.pluto.PortletContainer" />
</constructor-arg>
<constructor-arg>
<ref bean="PortletWindowAccessor" />
</constructor-arg>
<constructor-arg>
<ref bean="portletContentCache"/>
</constructor-arg>
<!--
Setting to true will force Action response isCommitted to true
as there is a bug in Websphere 5 where request.isCommitted always returns false
Set this boolean to TRUE if running on Websphere 5 pre-cumulative fix 5.1.1.9
<constructor-arg type="boolean">
<value>false</value>
</constructor-arg>
-->
</bean>
<bean id="desktopActionValve"
class="org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl"
init-method="initialize"
>
<constructor-arg>
<ref bean="org.apache.pluto.DesktopPortletContainer" />
</constructor-arg>
<constructor-arg>
<ref bean="PortletWindowAccessor" />
</constructor-arg>
<constructor-arg>
<ref bean="portletContentCache"/>
</constructor-arg>
<!--
Setting to true will force Action response isCommitted to true
as there is a bug in Websphere 5 where request.isCommitted always returns false
Set this boolean to TRUE if running on Websphere 5 pre-cumulative fix 5.1.1.9
<constructor-arg type="boolean">
<value>false</value>
</constructor-arg>
-->
</bean>
<bean id="desktopEncoderRedirectValve"
class="org.apache.jetspeed.desktop.impl.DesktopEncoderRedirectValveImpl">
<!-- /desktop pipeline -->
<constructor-arg index="0"><value>/desktop</value></constructor-arg>
<!-- /render pipeline -->
<constructor-arg index="1"><value>/render</value></constructor-arg>
</bean>
<bean id="portletValve"
class="org.apache.jetspeed.aggregator.PortletValve"
init-method="initialize"
>
<constructor-arg>
<ref bean="org.apache.jetspeed.aggregator.PortletAggregator"/>
</constructor-arg>
</bean>
<bean id="portletValveTitleInHeader"
class="org.apache.jetspeed.aggregator.PortletValve"
init-method="initialize"
>
<constructor-arg>
<ref bean="org.apache.jetspeed.aggregator.PortletAggregatorTitleInHeader"/>
</constructor-arg>
</bean>
<bean id="fileServerValve"
class="org.apache.jetspeed.aggregator.FileServerValve"
init-method="initialize"
>
<!-- portlet -->
<constructor-arg index="0"><value>demo::ContentViewer</value></constructor-arg>
<!-- entity -->
<constructor-arg index="1"><value>public.content.21</value></constructor-arg>
</bean>
<bean id="aggregatorValve"
class="org.apache.jetspeed.aggregator.AggregatorValve"
init-method="initialize"
>
<constructor-arg>
<ref bean="org.apache.jetspeed.aggregator.PageAggregator"/>
</constructor-arg>
</bean>
<bean id="headerAggregatorValvePortal"
class="org.apache.jetspeed.aggregator.HeaderAggregatorValve"
init-method="initialize"
>
<constructor-arg>
<ref bean="HeaderAggregatorPortal"/>
</constructor-arg>
</bean>
<bean id="headerAggregatorValveDesktop"
class="org.apache.jetspeed.aggregator.HeaderAggregatorValve"
init-method="initialize"
>
<constructor-arg>
<ref bean="HeaderAggregatorDesktop"/>
</constructor-arg>
</bean>
<bean id="cleanUpValve"
class="org.apache.jetspeed.pipeline.valve.impl.CleanupValveImpl"
init-method="initialize"
>
</bean>
<bean id="AJAXValve"
class="org.apache.jetspeed.ajax.AJAXValve"
init-method="initialize"
>
<constructor-arg>
<ref bean="AJAXService"/>
</constructor-arg>
<constructor-arg>
<ref bean="RolesSecurityBehavior"/>
</constructor-arg>
</bean>
<bean id="DecorationValve"
class="org.apache.jetspeed.decoration.DecorationValve"
init-method="initialize">
<constructor-arg index='0'>
<ref bean="DecorationFactory" />
</constructor-arg>
<constructor-arg index='1'>
<ref bean="PortletWindowAccessor" />
</constructor-arg>
<constructor-arg index='2'>
<ref bean="org.apache.jetspeed.security.SecurityAccessController" />
</constructor-arg>
<!--
<constructor-arg index='3'>
<ref bean="decorationContentCache"/>
</constructor-arg>
-->
<!-- When clicking on Edit Mode, also switch to Maximize -->
<property name="maximizeOnEdit"><value>false</value></property>
</bean>
<bean id="loginViewValve"
class="org.apache.jetspeed.login.impl.LoginJSPViewValve"
init-method="initialize"
>
<constructor-arg>
<value>/WEB-INF/templates/login</value>
</constructor-arg>
</bean>
<bean id="desktopValve"
class="org.apache.jetspeed.desktop.impl.DesktopValveImpl"
>
<constructor-arg>
<ref bean="JetspeedDesktop" />
</constructor-arg>
</bean>
<bean id="resourceValve"
class="org.apache.jetspeed.resource.ResourceValveImpl"
init-method="initialize">
<constructor-arg>
<ref bean="org.apache.pluto.PortletContainer" />
</constructor-arg>
<constructor-arg>
<ref bean="PortletWindowAccessor" />
</constructor-arg>
</bean>
<bean id="jetspeed-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>JetspeedPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="localizationValve"/>
<ref bean="roleCheckValve" />
<ref bean="securityValve"/>
<ref bean="passwordCredentialValve"/>
<ref bean="loginValidationValve"/>
<ref bean="profilerValve"/>
<ref bean="com.artifact_software.services.valves.BannerSelectorValve"/>
<ref bean="containerValve"/>
<ref bean="actionValve"/>
<ref bean="resourceValve"/>
<ref bean="DecorationValve" />
<ref bean="headerAggregatorValvePortal"/>
<ref bean="aggregatorValve"/>
<ref bean="cleanUpValve"/>
</list>
</constructor-arg>
</bean>
<bean id="configure-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>ConfigurePipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="roleCheckValve" />
<ref bean="passwordCredentialValve"/>
<ref bean="loginValidationValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
<ref bean="actionValve"/>
<ref bean="resourceValve"/>
<ref bean="DecorationValve" />
<ref bean="headerAggregatorValvePortal"/>
<ref bean="aggregatorValve"/>
<ref bean="cleanUpValve"/>
</list>
</constructor-arg>
</bean>
<bean id="login-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>LoginPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="capabilityValve"/>
<ref bean="localizationValve"/>
<ref bean="roleCheckValve" />
<ref bean="loginViewValve"/>
</list>
</constructor-arg>
</bean>
<bean id="action-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>ActionPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="localizationValve"/>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="containerValve"/>
<ref bean="actionValve"/>
</list>
</constructor-arg>
</bean>
<bean id="desktop-action-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>DesktopActionPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
<ref bean="desktopActionValve"/>
</list>
</constructor-arg>
</bean>
<bean id="desktop-render-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<!-- same as /portlet pipeline except for the addition of the desktopEncoderRedirectValve -->
<constructor-arg>
<value>DesktopRenderPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="desktopEncoderRedirectValve"/>
<ref bean="portalURLValve"/>
<ref bean="capabilityValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
<ref bean="portletValveTitleInHeader"/>
</list>
</constructor-arg>
</bean>
<bean id="portlet-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>PortletPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="portalURLValve"/>
<ref bean="capabilityValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
<ref bean="portletValveTitleInHeader"/>
</list>
</constructor-arg>
</bean>
<bean id="ajax-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>AjaxPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
<!-- this is the standard Jetspeed API entry point -->
<ref bean="layoutValve"/>
</list>
</constructor-arg>
</bean>
<bean id="ajax-direct-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>AjaxDirectPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
<ref bean="AJAXValve"/>
</list>
</constructor-arg>
</bean>
<bean id="fileserver-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>FileServerPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="portalURLValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
<ref bean="fileServerValve"/>
<ref bean="portletValve"/>
</list>
</constructor-arg>
</bean>
<bean id="desktop-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>DesktopPipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="headerAggregatorValveDesktop"/>
<ref bean="desktopValve"/>
</list>
</constructor-arg>
</bean>
<bean id="dtconfigure-pipeline"
class="org.apache.jetspeed.pipeline.JetspeedPipeline"
init-method="initialize"
>
<constructor-arg>
<value>DesktopConfigurePipeline</value>
</constructor-arg>
<constructor-arg>
<list>
<ref bean="capabilityValve"/>
<ref bean="portalURLValve"/>
<ref bean="securityValve"/>
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="headerAggregatorValveDesktop"/>
<ref bean="desktopValve"/>
</list>
</constructor-arg>
</bean>
<bean id='pipeline-map'
class='java.util.HashMap'>
<constructor-arg>
<map>
<entry key='/portlet'>
<value>portlet-pipeline</value>
</entry>
<entry key='/portal'>
<value>jetspeed-pipeline</value>
</entry>
<entry key='/ajaxapi'>
<value>ajax-pipeline</value>
</entry>
<entry key='/login'>
<value>jetspeed-pipeline</value>
</entry>
<entry key='/fileserver'>
<value>fileserver-pipeline</value>
</entry>
<entry key='/ajax'>
<value>ajax-direct-pipeline</value>
</entry>
<entry key='/desktop'>
<value>desktop-pipeline</value>
</entry> <!-- for jetspeed desktop, the keys /desktop, /action and /render cannot be changed -->
<!-- without also editing src/webapp/javascript/jetspeed/common.js and these beans: -->
<!-- the JetspeedDesktop bean expects argument for /desktop (3rd arg in constructor) -->
<!-- the DesktopPluto bean expects arguments for /desktop, /action and /render -->
<!-- the DesktopPortalURL bean expects arguments for /render and /action -->
<!-- the desktopEncoderRedirectValve bean expects arguments for /desktop and /render -->
<entry key='/action'>
<value>desktop-action-pipeline</value>
</entry>
<entry key='/render'>
<value>desktop-render-pipeline</value>
</entry>
<entry key='/configure'>
<value>configure-pipeline</value>
</entry>
<entry key='/dtconfigure'>
<value>dtconfigure-pipeline</value>
</entry>
</map>
</constructor-arg>
</bean>
<bean id="debugValve"
class="org.apache.jetspeed.pipeline.valve.impl.DebugValveImpl"
/>
</beans>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]