facebook

JSF : convrsion error occured

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #264642 Reply

    abdel_aat
    Member

    Hi every body,
    I a J2EE newbe developper, I downloaded the “libraryweb” JSF application and it was running without effective database (there was a java classe simulating the database). And I tried to modify the code to access a MySql database containing a “book” table. I used hibernate as a mapping framwork, i developped and tested a classe that offers data access and was well running. But the problem is that the hole “libraryweb” JSF application with data access doesn’t work very well.

    It reads and displays all books in the table “book” of the database “librarybase”.
    It deletes a book from the table.
    But when creating or saving a book this Error Message appears : “id” : convrsion error occured.

    The code portion responsible for the error in editBook.jsp :
    <h:inputHidden id=”id” value=”#{bookBean.id}”/>
    For information the id attribute is a java.lang.long in the classe book called in this jsp.

    Help please, thank you in advance.

    #264695

    abdel_aat
    Member

    Hi,
    I had circumvented the problem of conversion error by chaging the type of book.id to “int” and let JSF use the default converter and it works well, but if someone how to convert to a java Long i would be happy to know from him.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JSF : convrsion error occured

You must be logged in to post in the forum log in