You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Michael Dick (JIRA)" <ji...@apache.org> on 2007/02/09 01:20:05 UTC

[jira] Created: (OPENJPA-139) PersistenceException merging an entity with a Calendar field.

PersistenceException merging an entity with a Calendar field. 
--------------------------------------------------------------

                 Key: OPENJPA-139
                 URL: https://issues.apache.org/jira/browse/OPENJPA-139
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
            Reporter: Michael Dick


I get the following exception when I try to merge an entity which contains a java.util.Calendar field. 

<0|true|0.0.0> org.apache.openjpa.persistence.PersistenceException: mikedd.entities.CalendarEntity.cal
	at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:255)
	at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:131)
	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:236)
	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:97)
	at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3141)
	at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1128)
	at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:650)
	at mikedd.tests.TestCalendar.testMergeCalendar(TestCalendar.java:47)
        <snip>

I'm running the test in eclipse and my classpath probably isn't set up to properly display the openjpa version, 
output from svnversion -c : 406193:505052M

It looks like we're missing a case statement for JavaTypes.CALENDAR in org.apache.openjpa.kernelAttachStrategy.attachField. I added one under JavaTypes.DATE and that resolved the issue for me. 




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OPENJPA-139) PersistenceException merging an entity with a Calendar field.

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter reassigned OPENJPA-139:
------------------------------------

    Assignee: Kevin Sutter

> PersistenceException merging an entity with a Calendar field. 
> --------------------------------------------------------------
>
>                 Key: OPENJPA-139
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-139
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Michael Dick
>         Assigned To: Kevin Sutter
>
> I get the following exception when I try to merge an entity which contains a java.util.Calendar field. 
> <0|true|0.0.0> org.apache.openjpa.persistence.PersistenceException: mikedd.entities.CalendarEntity.cal
> 	at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:255)
> 	at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:131)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:236)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:97)
> 	at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3141)
> 	at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1128)
> 	at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:650)
> 	at mikedd.tests.TestCalendar.testMergeCalendar(TestCalendar.java:47)
>         <snip>
> I'm running the test in eclipse and my classpath probably isn't set up to properly display the openjpa version, 
> output from svnversion -c : 406193:505052M
> It looks like we're missing a case statement for JavaTypes.CALENDAR in org.apache.openjpa.kernelAttachStrategy.attachField. I added one under JavaTypes.DATE and that resolved the issue for me. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-139) PersistenceException merging an entity with a Calendar field.

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter resolved OPENJPA-139.
----------------------------------

    Resolution: Fixed

Code changed per Issue comments via SVN revision 505099.

> PersistenceException merging an entity with a Calendar field. 
> --------------------------------------------------------------
>
>                 Key: OPENJPA-139
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-139
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Michael Dick
>         Assigned To: Kevin Sutter
>
> I get the following exception when I try to merge an entity which contains a java.util.Calendar field. 
> <0|true|0.0.0> org.apache.openjpa.persistence.PersistenceException: mikedd.entities.CalendarEntity.cal
> 	at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:255)
> 	at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:131)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:236)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:97)
> 	at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3141)
> 	at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1128)
> 	at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:650)
> 	at mikedd.tests.TestCalendar.testMergeCalendar(TestCalendar.java:47)
>         <snip>
> I'm running the test in eclipse and my classpath probably isn't set up to properly display the openjpa version, 
> output from svnversion -c : 406193:505052M
> It looks like we're missing a case statement for JavaTypes.CALENDAR in org.apache.openjpa.kernelAttachStrategy.attachField. I added one under JavaTypes.DATE and that resolved the issue for me. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-139) PersistenceException merging an entity with a Calendar field.

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471536 ] 

Kevin Sutter commented on OPENJPA-139:
--------------------------------------

Mike will work with me to get this patch committed.

> PersistenceException merging an entity with a Calendar field. 
> --------------------------------------------------------------
>
>                 Key: OPENJPA-139
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-139
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Michael Dick
>         Assigned To: Kevin Sutter
>
> I get the following exception when I try to merge an entity which contains a java.util.Calendar field. 
> <0|true|0.0.0> org.apache.openjpa.persistence.PersistenceException: mikedd.entities.CalendarEntity.cal
> 	at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:255)
> 	at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:131)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:236)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:97)
> 	at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3141)
> 	at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1128)
> 	at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:650)
> 	at mikedd.tests.TestCalendar.testMergeCalendar(TestCalendar.java:47)
>         <snip>
> I'm running the test in eclipse and my classpath probably isn't set up to properly display the openjpa version, 
> output from svnversion -c : 406193:505052M
> It looks like we're missing a case statement for JavaTypes.CALENDAR in org.apache.openjpa.kernelAttachStrategy.attachField. I added one under JavaTypes.DATE and that resolved the issue for me. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.