Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 47671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:09:33+00:00 2026-05-10T16:09:33+00:00

I’m having a problem with my Seam code and I can’t seem to figure

  • 0

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:

Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field com.oobjects.sso.manager.home.PresenceHome.customerId to java.lang.String 

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:

<page view-id='/customer/presences.xhtml'>   <begin-conversation flush-mode='MANUAL' join='true' />   <param name='customerId' value='#{presenceHome.customerId}' />   <raise-event type='PresenceHome.init' />   <navigation>     <rule if-outcome='persisted'>       <end-conversation />       <redirect view-id='/customer/presences.xhtml' />     </rule>   </navigation> </page> 

My bean starts like this:

@Name('presenceHome') @Scope(ScopeType.CONVERSATION) public class PresenceHome extends EntityHome<Presence> 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 } 

Finally the link I use to link one one page to the next looks like this:

<s:link styleClass='#{selected == 'presences' ? 'selected' : ''}'     view='/customer/presences.xhtml' title='Presences' propagation='none'>     <f:param name='customerId' value='#{customerId}' />     Presences </s:link> 

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.

If I remove the element from my page declaration, I get through to the page fine.

So, does anyone have any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:09:34+00:00Added an answer on May 10, 2026 at 4:09 pm

    You want to add a converter to your pages.xml file. Like this:

    <param name='customerId'        value='#{presenceHome.customerId}'  converterId='javax.faces.Long' /> 

    See the seampay example provided with seam for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 51k
  • Answers 51k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Have you tried the clear method on the property bag… May 11, 2026 at 6:29 am
  • added an answer Short explanation: If an algorithm is of Θ(g(n)), it means… May 11, 2026 at 6:29 am
  • added an answer As long as the languages in question actually produce Java… May 11, 2026 at 6:29 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.