sniezna.stopa schrieb:
Hi!
I have simple bean:

    <bean id="Registration" class="pl.bazaar.beans.Registration"
scope="conversation.access">
        <property name="bazaarUserService" ref="bazaarUserService"/>
        <property name="productCategoryService"
ref="productCategoryService"/>
        <property name="businessCategoryService"
ref="businessCategoryService"/>
    </bean>

I use this bean thru some simple jsf pages. On last page, when the
validation or conversion fails, the exception is thrown:

   Caused by: javax.el.PropertyNotFoundException: /registration/step4.jspx
@16,236 value="#{Registration.bazaarUser.email}": Target Unreachable,
'bazaarUser' returned nul

Is this a bug in MyFaces Orchestra or am I missing something in
configuration files?

Here is my applicationContext-orchestra.xml:

<import resource="applicationContext-service.xml"/>
    <import resource="applicationContext-jpa.xml"/>
    <import resource="classpath*:/META-INF/spring-orchestra-init.xml" />
    <bean
class="org.springframework.beans.factory.config.CustomScopeConfigurer">
        <property name="scopes">
            <map>
                <entry key="conversation.manual">
                    <bean
class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope">
                        <property name="timeout" value="30" />
                        <property name="advices">
                            <list>
                                <ref
bean="persistentContextConversationInterceptor"/>
                            </list>
                        </property>
                    </bean>
                </entry>
                <entry key="conversation.access">
                    <bean
class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope">
                        <property name="timeout" value="30" />
                        <property name="advices">
                            <list>
                                <ref
bean="persistentContextConversationInterceptor"/>
                            </list>
                        </property>
                        <property name="lifetime" value="access"/>
                    </bean>
                </entry>
            </map>
        </property>
    </bean>
    <bean id="persistentContextConversationInterceptor"
class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor">
        <property name="persistenceContextFactory"
ref="persistentContextFactory"/>
    </bean>
    <bean id="persistentContextFactory"
class="org.apache.myfaces.orchestra.conversation.spring.JpaPersistenceContextFactory">
        <property name="entityManagerFactory" ref="localEmf"/>
    </bean>
    <bean id="Registration" class="pl.bazaar.beans.Registration"
scope="conversation.access">
        <property name="bazaarUserService" ref="bazaarUserService"/>
        <property name="productCategoryService"
ref="productCategoryService"/>
        <property name="businessCategoryService"
ref="businessCategoryService"/>
    </bean>

This EL error message means that
  Registration.getBazaarUser()
returned null.

What does that method do?

I see your config above injects something called "bazaarUserService" into the registration bean, but I don't see anything related to the "bazaarUser" property itself...

Regards, Simon

Reply via email to