I solved it by adding this listener to web.xml:

org.cdisource.springintegration.servletsupport.ApplicationContextFinderServletContextListener



On Fri, Jan 13, 2012 at 11:12 AM, Jiayun <jia...@gmail.com> wrote:

> Hi strub,
>
> I want to try it, but there is not a simple setup guide.
>
> I tried to add the
> file META-INF/services/javax.enterprise.inject.spi.Extension with one line
> org.cdisource.springintegration.SpringIntegrationExtention in it, but got
> this message:
>
> org.apache.myfaces.view.facelets.el.ContextAwareELException:
> javax.el.ELException: java.lang.IllegalStateException: 1: Applicaiton
> context must be associated with the current classloader first
>  at
> org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:104)
> at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:246)
>  at javax.faces.component.UIOutput.getValue(UIOutput.java:67)
> at javax.faces.component.UIInput.getValue(UIInput.java:150)
>  at
> org.apache.myfaces.shared.renderkit.RendererUtils.getValue(RendererUtils.java:505)
> Truncated. see log file for complete stacktrace
> Caused By: javax.el.ELException: java.lang.IllegalStateException: 1:
> Applicaiton context must be associated with the current classloader first
> at javax.el.BeanELResolver.getValue(BeanELResolver.java:266)
>  at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
> at
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:169)
>  at org.apache.el.parser.AstValue.getValue(AstValue.java:169)
> at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
>  Truncated. see log file for complete stacktrace
> Caused By: java.lang.IllegalStateException: 1: Applicaiton context must be
> associated with the current classloader first
>  at
> org.cdisource.springintegration.springsupport.ApplicationContextLocatorImpl.<init>(ApplicationContextLocatorImpl.java:40)
> at
> org.cdisource.springintegration.springsupport.ApplicationContextLocatorManager.locateAppContextLocator(ApplicationContextLocatorManager.java:129)
>  at
> org.cdisource.springintegration.springsupport.ApplicationContextLocatorManager.getInstance(ApplicationContextLocatorManager.java:79)
> at
> org.cdisource.springintegration.springsupport.ApplicationContextLocatorManager.getInstance(ApplicationContextLocatorManager.java:55)
>  at
> org.cdisource.springintegration.SpringIntegrationExtention$SpringBean.create(SpringIntegrationExtention.java:173)
> Truncated. see log file for complete stacktrace
>
>
> regards,
> jiayun
>
>
> On Thu, Jan 12, 2012 at 8:17 PM, Mark Struberg <strub...@yahoo.de> wrote:
>
>> Hi!
>>
>> Check out the CDISource project
>>
>> https://github.com/cdisource
>>
>> It allows to @Inject CDI beans into Spring beans and the other way around.
>>
>> LieGrue,
>> strub
>>
>>
>>
>> ----- Original Message -----
>> > From: Jiayun <jia...@gmail.com>
>> > To: MyFaces Discussion <users@myfaces.apache.org>
>> > Cc:
>> > Sent: Thursday, January 12, 2012 12:53 PM
>> > Subject: Getting Spring beans from CODI bean
>> >
>> > Hi,
>> >
>> > Is there any recommended way to get Spring beans from CODI bean?
>> >
>> >
>> > regards,
>> > jiayun
>> >
>>
>
>

Reply via email to