openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuong Pham (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (OPENJPA-1976) EntityManager.find method cause errors
Date Sun, 10 Apr 2011 05:09:05 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018031#comment-13018031
] 

Chuong Pham edited comment on OPENJPA-1976 at 4/10/11 5:08 AM:
---------------------------------------------------------------

Thanks for your prompt response, Rick. I have attached ENTITY.TXT, SCENARIO 1 STACKTRACE.TXT
and SCENARIO 2 STACKTRACE.TXT for your perusal. Please let me know if you need further information.

Thanks
Chuong

      was (Author: chuongpham):
    Thanks for prompt response, Rick. I have attached ENTITY.TXT, SCENARIO 1 STACKTRACE.TXT
and SCENARIO 2 STACKTRACE.TXT for your perusal. Please let me know if you need further information.

Thanks
Chuong
  
> EntityManager.find method cause errors
> --------------------------------------
>
>                 Key: OPENJPA-1976
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1976
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.1.0
>         Environment: Glassfish 3.1, JSF 2.1.0, Apache OpenJPA 2.1.0, MySQL 5.5.10, Eclipse
Helios IDE, Windows XP Service Pack 3
>            Reporter: Chuong Pham
>              Labels: features, test
>         Attachments: ENTITY.txt, SCENARIO 1 STACKTRACE.txt, SCENARIO 2 STACKTRACE.txt
>
>
> Scenario 1: The EntityManager.find method is unable to pass a String value as its second
parameter and caused the following error:
> <openjpa-2.1.0-r422266:1071316 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
The given value "214736890D96ED598E1D3050F1F025A7" cannot be converted into an identity for
"com.ckd.model.BookModel".  The value is the wrong type (java.lang.String).
> java.lang.NumberFormatException: For input string: "214736890D96ED598E1D3050F1F025A7"
> It seems from the errors above that the EntityManager.find method will only accept a
numeric value as its second parameter.
> Scenario 2: The EntityManager.find method is unable to pass a Long value and caused the
following error:
> <openjpa-2.1.0-r422266:1071316 fatal user error> org.apache.openjpa.persistence.ArgumentException:
An error occurred while processing registered class "class com.ckd.model.BookModel".
> java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [org.apache.openjpa.util.LongId],
because it has not yet been started, or was already stopped
> The columns used for testing are from a MySQL 5.x table and have the following definitions:
> ID SMALLINT(5)
> HASHID VARCHAR(32)
> The value of HASHID is used to test Scenario 1; while the value of ID is used to test
Scenario 2.
> Conclusion: The above scenarios show that the EntityManager.find method is currently
unusable/buggy and needs to be investigated for the next release.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message