You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Dan Tran <da...@gmail.com> on 2008/06/02 04:41:14 UTC

[Orchestra] How to annotate conversation scope bean


Hello, I would like to use spring 2.5.x to annotate my backing bean with
conversation.

So here is what have so far

@Component
@Scope( "conversation.access" )

what about conversation' name?

big thanks ahead.

-D


-- 
View this message in context: http://www.nabble.com/-Orchestra--How-to-annotate-conversation-scope-bean-tp17593130p17593130.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Orchestra] Exception in Core15 [Was] How to annotate conversation scope bean

Posted by Dan Tran <da...@gmail.com>.

Thanks Simon 1.1 fixes it,   It was my intention  to use 1.1, but forgot to
do the 1.0 exclusion

-Dan


simon.kitching@chello.at wrote:
> 
> 
> On Mon, 2008-06-02 at 08:49 -0700, Dan Tran wrote:
>> 
>> Per Mario suggestion, I load up myface-orchestra-core15 1.0 into my war's
>> WEB-INF/lib
>> 
>> and it crashes at at startup, it seems core15 interfere with the spring
>> configuration for orchestra
>> ( per installation's instructions)
>> 
>> here is the stack trace.
>> 
>> Invalid lifetime:access
> 
> The name "access" was introduced in orchestra-core 1.1. Previously it
> was called "flash". 
> 
> So it looks like orchestra-core15 does require orchestra-core 1.1. But
> you must be using orchestra-core 1.0.
> 
> That's a mistake; I had thought that core15 was compatible with core
> 1.0, so that's what the pom declares it needs. But using a lifetime name
> only introduced in 1.1 kind of kills that, even if it's just a synonym
> for the original name.
> 
> Can you upgrade to orchestra-core 1.1?
> 
> Regards,
> Simon
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-Orchestra--How-to-annotate-conversation-scope-bean-tp17593130p17612129.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Orchestra] Exception in Core15 [Was] How to annotate conversation scope bean

Posted by simon <si...@chello.at>.
On Mon, 2008-06-02 at 08:49 -0700, Dan Tran wrote:
> 
> Per Mario suggestion, I load up myface-orchestra-core15 1.0 into my war's
> WEB-INF/lib
> 
> and it crashes at at startup, it seems core15 interfere with the spring
> configuration for orchestra
> ( per installation's instructions)
> 
> here is the stack trace.
> 
> Invalid lifetime:access

The name "access" was introduced in orchestra-core 1.1. Previously it
was called "flash". 

So it looks like orchestra-core15 does require orchestra-core 1.1. But
you must be using orchestra-core 1.0.

That's a mistake; I had thought that core15 was compatible with core
1.0, so that's what the pom declares it needs. But using a lifetime name
only introduced in 1.1 kind of kills that, even if it's just a synonym
for the original name.

Can you upgrade to orchestra-core 1.1?

Regards,
Simon


[Orchestra] Exception in Core15 [Was] How to annotate conversation scope bean

Posted by Dan Tran <da...@gmail.com>.

Per Mario suggestion, I load up myface-orchestra-core15 1.0 into my war's
WEB-INF/lib

and it crashes at at startup, it seems core15 interfere with the spring
configuration for orchestra
( per installation's instructions)

here is the stack trace.

SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.beans.factory.config.CustomScopeConfigurer#0'
defined in class path resource
[org/glvnsjc/applicationContext-orchestra.xml]: Cannot create inner bean
'org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope#d844a9'
of type
[org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope]
while setting bean property 'scopes' with key [TypedStringValue: value
[conversation.access], target type [null]]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope#d844a9'
defined in class path resource
[org/glvnsjc/applicationContext-orchestra.xml]: Error setting property
values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'lifetime'
threw exception; nested exception is java.lang.IllegalArgumentException:
Invalid lifetime:access
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
	at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:534)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:363)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	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:578)
	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: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope#d844a9'
defined in class path resource
[org/glvnsjc/applicationContext-orchestra.xml]: Error setting property
values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'lifetime'
threw exception; nested exception is java.lang.IllegalArgumentException:
Invalid lifetime:access
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1277)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
	... 35 more
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'lifetime'
threw exception; nested exception is java.lang.IllegalArgumentException:
Invalid lifetime:access
	at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
	at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1274)
	... 41 more
Jun 2, 2008 8:40:12 AM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'glvnsjc.webroot' =
[C:\dev\glvnsjc\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\shamrock-web\]
Jun 2, 2008 8:40:12 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from
[C:\dev\glvnsjc\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\shamrock-web\WEB-INF\log4j.properties]
Jun 2, 2008 8:40:12 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.glvnsjc.webapp.listener.StartupListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.beans.factory.config.CustomScopeConfigurer#0'
defined in class path resource
[org/glvnsjc/applicationContext-orchestra.xml]: Cannot create inner bean
'org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope#d844a9'
of type
[org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope]
while setting bean property 'scopes' with key [TypedStringValue: value
[conversation.access], target type [null]]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope#d844a9'
defined in class path resource
[org/glvnsjc/applicationContext-orchestra.xml]: Error setting property
values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'lifetime'
threw exception; nested exception is java.lang.IllegalArgumentException:
Invalid lifetime:access
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
	at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:534)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:363)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	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:578)
	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: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope#d844a9'
defined in class path resource
[org/glvnsjc/applicationContext-orchestra.xml]: Error setting property
values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'lifetime'
threw exception; nested exception is java.lang.IllegalArgumentException:
Invalid lifetime:access
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1277)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
	... 35 more
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'lifetime'
threw exception; nested exception is java.lang.IllegalArgumentException:
Invalid lifetime:access
	at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
	at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1274)
	... 41 more





Dan Tran wrote:
> 
> 
> Hello, I would like to use spring 2.5.x to annotate my backing bean with
> conversation.
> 
> So here is what have so far
> 
> @Component
> @Scope( "conversation.access" )
> 
> what about conversation' name?
> 
> big thanks ahead.
> 
> -D
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-Orchestra--How-to-annotate-conversation-scope-bean-tp17593130p17604507.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Orchestra] How to annotate conversation scope bean

Posted by "simon.kitching@chello.at" <si...@chello.at>.
That's an email from February. Things change :-)

See the docs here on annotation class ConversationName:
 http://myfaces.apache.org/orchestra/myfaces-orchestra-core15/apidocs/index.html

Regards,
Simon

Dan Tran schrieb:
> sorry, I found a reference to this issue and it is not supported yet.
>
> http://www.nabble.com/-orchestra--Spring-2.5-to15292381.html
>
> -D
>
> Dan Tran wrote:
>   
>> Hello, I would like to use spring 2.5.x to annotate my backing bean with
>> conversation.
>>
>> So here is what have so far
>>
>> @Component
>> @Scope( "conversation.access" )
>>
>> what about conversation' name?
>>
>> big thanks ahead.
>>
>> -D
>>
>>
>>
>>     
>
>   


Re: [Orchestra] How to annotate conversation scope bean

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> sorry, I found a reference to this issue and it is not supported yet.
>
> http://www.nabble.com/-orchestra--Spring-2.5-to15292381.html
>   
As far as I remember Simon already added this feature to the core15
release. So @ConversationName should be your friend :-)

Ciao,
Mario
> -D
>
> Dan Tran wrote:
>   
>> Hello, I would like to use spring 2.5.x to annotate my backing bean with
>> conversation.
>>
>> So here is what have so far
>>
>> @Component
>> @Scope( "conversation.access" )
>>
>> what about conversation' name?
>>
>> big thanks ahead.
>>
>> -D
>>
>>
>>
>>     
>
>   


-- 
mit freundlichen Grüßen

Mario Ivankovits
Software Engineering

OPS EDV VertriebsgesmbH
A-1120 Wien, Michael-Bernhard-Gasse 10

Firmenbuch Nr.: FN51233v, Handelsgericht Wien
Tel.: +43-1-8938810; Fax: +43-1-8938810/3700
http://www.ops.co.at

E-Mail: mario@ops.co.at
Skype: mario_ivankovits


Re: [Orchestra] How to annotate conversation scope bean

Posted by Dan Tran <da...@gmail.com>.

sorry, I found a reference to this issue and it is not supported yet.

http://www.nabble.com/-orchestra--Spring-2.5-to15292381.html

-D

Dan Tran wrote:
> 
> 
> Hello, I would like to use spring 2.5.x to annotate my backing bean with
> conversation.
> 
> So here is what have so far
> 
> @Component
> @Scope( "conversation.access" )
> 
> what about conversation' name?
> 
> big thanks ahead.
> 
> -D
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-Orchestra--How-to-annotate-conversation-scope-bean-tp17593130p17593660.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.