portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sie, Yang" <yang....@fmr.com>
Subject RE: Jetspeed2.1 security-atz.xml issue
Date Thu, 22 Mar 2007 01:16:25 GMT
Hello David:

As Raman pointed out in his earlier post, in our security-atz.xml, we
need three jetspeed objects: pageManager, searchEngine and registry.
They are all injected in via spring. Among them, pageManager was from
constructor and searchEngine and registry are via property setting as
follows (note from constructor index=2 on...) (yea, as you see, two
people wrote the code, one prefers constructor and one property). 

To your point, if we remove registry, what is your suggestion to get the
registry component into our class? We definitely need all of them in our
code though. I thought Spring was the easy way to inject objects.  Also,
in pluin.jelly's "j2:_db.seed", registry is part of the original copy
process (line 1094 of plugin.jelly) so that registry.xml is available
under /portal-sql/. That made me think the registry might not be the
cause in this case, maybe I am wrong, but what do you think after
looking at the following bean definition?

<bean id="com.co.imt.jetspeed.security.PortalAuthorization"
	class="com.co.imt.jetspeed.security.PortalAuthorizationImpl">
  <constructor-arg index="0">
    <ref bean="com.co.imt.util.auth.IAuthorization"/>
  </constructor-arg>
  <constructor-arg index="1">
    <ref bean="com.co.imt.jetspeed.security.PortalArrowMap"/>
  </constructor-arg>
  <constructor-arg index="2">
    <ref bean="org.apache.jetspeed.page.PageManager"/>
  </constructor-arg>
  <property name="searchEngine">
    <ref bean="org.apache.jetspeed.search.SearchEngine"/>
  </property>
  <property name="registry">
    <ref
bean="org.apache.jetspeed.components.portletregistry.PortletRegistry"/>
  </property>
</bean>

Please advise

Thank you.


---Yang


-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: Wednesday, March 21, 2007 5:34 PM
To: Jetspeed Developers List
Subject: Re: Jetspeed2.1 security-atz.xml issue


OK, now we are just plain bringing in more dependencies than needed
Could you possibly have another constructor on your component that  
doesn't need the Registry?
Otherwise we can look into further separating out the Spring files,  
such as moving the RequestContextComponent  into its own xml file

On Mar 21, 2007, at 2:04 PM, Tallamraju, Raman wrote:

> Hi David,
>
> I fixed the path issue and am now getting this error:
>
>     [java] org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'javax.servlet.ServletConfig' defined in
> file
> [c:\a322887_portal\vob_jsportal\fmr\workspace\fep\target\portal-sql 
> \asse
> mbly\jetspeed-spring.xml]: Invocation of init method failed; nested
> exception is java.lang.IllegalStateException: You invoke the
> ServletConfigFactoryBean.setServletConfig() method prior to attempting
> to get the ServletConfig.
>     [java] Caused by: java.lang.IllegalStateException: You invoke the
> ServletConfigFactoryBean.setServletConfig() method prior to attempting
> to get the ServletConfig.
>     [java] 	at
> org.apache.jetspeed.components.factorybeans.ServletConfigFactoryBean.v

> er
> ifyState(ServletConfigFactoryBean.java:75)
>     [java] 	at
> org.apache.jetspeed.components.factorybeans.ServletConfigFactoryBean.c

> re
> ateInstance(ServletConfigFactoryBean.java:50)
>     [java] 	at
> org.springframework.beans.factory.config.AbstractFactoryBean.afterProp

> er
> tiesSet(AbstractFactoryBean.java:75)
>     [java] 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF

> ac
> tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
>     [java] 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF

> ac
> tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
>     [java] 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF

> ac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:420)
>     [java] 	at
> org.springframework.beans.factory.support.AbstractBeanFactory 
> $1.getObjec
> t(AbstractBeanFactory.java:245)
>     [java] 	at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry

> .g
> etSingleton(DefaultSingletonBeanRegistry.java:141)
>     [java] 	at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(

> Ab
> stractBeanFactory.java:242)
>     [java] 	at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(

> Ab
> stractBeanFactory.java:156)
>     [java] 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.p

> re
> InstantiateSingletons(DefaultListableBeanFactory.java:287)
>     [java] 	at
> org.springframework.context.support.AbstractApplicationContext.refresh

> (A
> bstractApplicationContext.java:348)
>     [java] 	at
> org.apache.jetspeed.components.SpringComponentManager.<init> 
> (SpringCompo
> nentManager.java:118)
>     [java] 	at
> org.apache.jetspeed.components.jndi.SpringJNDIStarter.setUp 
> (SpringJNDISt
> arter.java:90)
>     [java] 	at
> org.apache.jetspeed.serializer.JetspeedSerializerApplication.main 
> (Jetspe
> edSerializerApplication.java:362)
>     [java] [ERROR] Java Result: 1
>
> Any ideas? I'm looking at JetspeedSerializerApplication code myself  
> and
> report back if I spot a problem.
>
> Thanks,
> Raman
>
> -----Original Message-----
> From: David Sean Taylor [mailto:david@bluesunrise.com]
> Sent: Tuesday, March 20, 2007 8:00 PM
> To: Jetspeed Developers List
> Subject: Re: Jetspeed2.1 security-atz.xml issue
>
>
>
> On Mar 20, 2007, at 1:56 PM, Tallamraju, Raman wrote:
>
>> Hi All,
>>
>> We've been trying to upgrade to the jetspeed-2.1 release but have  
>> been
>> having problems enabling JAAS security. Here are the details of the
>> problem - hopefully one of you can help:
>>
>> We have a JAAS policy implementation that takes PageManager,
>> SearchEngine & PortletRegistry as constructor arguments. These are
>> bean
>> references in the security-atz.xml file. When we build jetspeed, the
>> jetspeed plugin tries to create this policy object when running the
>> j2:_db.seed goal. This goal fails because page-manager.xml isn't
>> included in the ${temp.assembly.dir} directory (leads to a bean
>> definition not found error). Including page-manager.xml (and
>> jetspeed-spring.xml) in that directory ultimately leads to path  
>> issues
>> (can't find jetspeed.properties file).
>>
>> We're stuck at this point with two choices:
>>
>> A) Modify jetspeed plugin so that _db.seed works by copying all
>> dependencies to the target\portal-sql directory
>> B) Modify security-atz so that we don't need PageManager,
>> SearchEngine &
>> PortletRegistry objects
>>
>> We don't see approach B working. Can one of you help us with
>> approach A?
>>
> Yes, I know, I've been there before in quadruple trying to get this
> working for Maven-1 build, Maven-2 build, Maven-1 plugin, Maven-2
> archetype....
>
> For solution #1, can you try setting a <sysproperty> on the java task
> for the j2:_db.seed goal?
> Something like:
>
>            <sysproperty key="applicationRoot"
>                         value="./src/webapp"/>
>
> for the ${applicationRoot} property in jetspeed-spring.xml
>
> I don't think this is the ultimate solution but it may get you
> further for now
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message