Bug 300721 - JPA SRG failed with JDK 1.6.0_18
Summary: JPA SRG failed with JDK 1.6.0_18
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2010-01-25 14:32 EST by Edwin Tang CLA
Modified: 2022-06-09 10:20 EDT (History)
2 users (show)

See Also:


Attachments
patch file (808 bytes, patch)
2010-01-25 14:39 EST, Edwin Tang CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin Tang CLA 2010-01-25 14:32:22 EST
JPA SRG failed with the following exception, after I updated JDK 1.6 from 1.6.0_17 to 1.6.0_18 recently.

Stack Trace:
============
Could not initialize class org.eclipse.persistence.testing.models.jpa.advanced.EmployeeListener

java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.persistence.testing.models.jpa.advanced.EmployeeListener
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListenerMetadata.getClass(EntityListenerMetadata.java:165)
at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListenerMetadata.process(EntityListenerMetadata.java:339)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.MappedSuperclassAccessor.processEntityListeners(MappedSuperclassAccessor.java:924)
at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processListeners(EntityAccessor.java:1002)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.addEntityListeners(MetadataProcessor.java:104)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:326)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.getServerSession(JUnitTestCase.java:365)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.isWeavingEnabled(JUnitTestCase.java:147)
at org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite.testWeaving(EntityManagerJUnitTestSuite.java:7448)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:457)
Comment 1 Edwin Tang CLA 2010-01-25 14:39:39 EST
Created attachment 157155 [details]
patch file

The new JDK patch requires more strict date format. Changed one line in org.eclipse.persistence.testing.models.jpa.advanced.EmployeeListener
from:
    public static final Date UPDATE_DATE = Date.valueOf("2004-1-1");
to:
    public static final Date UPDATE_DATE = Date.valueOf("2004-01-01");
Comment 2 Edwin Tang CLA 2010-01-25 14:41:41 EST
Checked in both 2.0.1 and 2.1.0

Code reviewed by: James Sutherland
Comment 3 Edwin Tang CLA 2010-02-04 09:23:03 EST
Checked in 1.2.1
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:20:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink