4 Replies Latest reply on Apr 27, 2007 4:50 AM by Magnus Sandberg

    entityConverter problem

    Magnus Sandberg Novice

      I'm trying out the entityConverter, and I have a control like:

      <h:selectManyListbox value="#{tagSearch.selected}">
       <s:selectItems value="#{tagSearch.tags}" var="tag" label="#{tag.value}" />
       <s:convertEntity />
      </h:selectManyListbox>
      


      displaying this works fine but when I submit the form I get:

      java.lang.NullPointerException:
       at org.jboss.seam.framework.EntityIdentifier.find(EntityIdentifier.java:21)
       at org.jboss.seam.ui.EntityConverterStore.get(EntityConverterStore.java:44)
       at org.jboss.seam.ui.EntityConverter.getAsObject(EntityConverter.java:74)
       at org.apache.myfaces.shared_impl.renderkit._SharedRendererUtils.getConvertedUISelectManyValue(_SharedRendererUtils.java:176)
      
      


      I have tried putting my components in different scopes but that doesn't help.

      What can be amiss?

      /Magnus


        • 1. Re: entityConverter problem
          Pete Muir Master

          Show your components.xml. I've improved the error messages in CVS.

          • 2. Re: entityConverter problem
            Magnus Sandberg Novice

             

            
            <?xml version="1.0" encoding="UTF-8"?>
            <components xmlns="http://jboss.com/products/seam/components"
             xmlns:core="http://jboss.com/products/seam/core"
             xmlns:security="http://jboss.com/products/seam/security"
             xmlns:drools="http://jboss.com/products/seam/drools"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation=
             "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
             http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd
             http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.2.xsd
             http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd">
            
             <!-- Init -->
             <core:init jndi-pattern="psysj/#{ejbName}/local" debug="true" />
            
             <!-- Security -->
             <security:identity authenticate-method="#{authenticator.authenticate}"/>
            
             <drools:rule-base name="securityRules">
             <drools:rule-files>
             <value>/META-INF/security-rules.drl</value>
             </drools:rule-files>
             </drools:rule-base>
            
             <event type="org.jboss.seam.notLoggedIn">
             <action expression="#{redirect.captureCurrentView}"/>
             </event>
            
             <event type="org.jboss.seam.postAuthenticate">
             <action expression="#{redirect.returnToCapturedView}"/>
             </event>
            
             <!-- em -->
             <component name="em" auto-create="true"
             class="org.jboss.seam.core.ManagedPersistenceContext">
             <property name="persistenceUnitJndiName">java:/EntityManagerFactories/myDatabase</property>
             </component>
            
             <component name="org.jboss.seam.ui.entityConverter">
             <property name="entityManager">#{em}</property>
             </component>
            
            </components>
            
            


            • 3. Re: entityConverter problem
              Pete Muir Master

              oops, this looks like a bug. Can you create a JIRA issue for this please? Thanks :)