title: Seam Problem: Could not set field value by reflection
body: <p>I'm having a problem with my Seam code and I can't seem to figure out what I'm doing wrong.  It's doing my head in :)  Here's an excerpt of the stack trace:</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field com.oobjects.sso.manager.home.PresenceHome.customerId to java.lang.String
  </code></pre>
  
  <p>I'm trying to get a parameter set on my URL passed into one of my beans.  To do this, I've got the following set up in my pages.xml:</p>
  
  <pre><code>&lt;page view-id="/customer/presences.xhtml"&gt;
    &lt;begin-conversation flush-mode="MANUAL" join="true" /&gt;
    &lt;param name="customerId" value="#{presenceHome.customerId}" /&gt;
    &lt;raise-event type="PresenceHome.init" /&gt;
    &lt;navigation&gt;
      &lt;rule if-outcome="persisted"&gt;
        &lt;end-conversation /&gt;
        &lt;redirect view-id="/customer/presences.xhtml" /&gt;
      &lt;/rule&gt;
    &lt;/navigation&gt;
  &lt;/page&gt;
  </code></pre>
  
  <p>My bean starts like this:</p>
  
  <pre><code>@Name("presenceHome")
  @Scope(ScopeType.CONVERSATION)
  public class PresenceHome extends EntityHome&lt;Presence&gt; implements Serializable {
    @In
    private CustomerDao customerDao;
  
    @In(required = false)
    private Long presenceId;
  
    @In(required = false)
    private Long customerId;
  
    private Customer customer;
  
    // Getters, setters and other methods follow. They return the correct types defined above
  }
  </code></pre>
  
  <p>Finally the link I use to link one one page to the next looks like this:</p>
  
  <pre><code>&lt;s:link styleClass="#{selected == 'presences' ? 'selected' : ''}"
      view="/customer/presences.xhtml" title="Presences" propagation="none"&gt;
      &lt;f:param name="customerId" value="#{customerId}" /&gt;
      Presences
  &lt;/s:link&gt;
  </code></pre>
  
  <p>All this seems to work fine.  When I hover over the link above in my page, I get a URL ending in something like "?customerId=123".  So the parameter is being passed over and it's something that can be easily converted into a Long type.  But for some reason, it's not.  I've done similar things to this before in other projects and it's worked then.  I just can't see what it isn't working now.</p>
  
  <p>If I remove the  element from my page declaration, I get through to the page fine.</p>
  
  <p>So, does anyone have any thoughts?</p>