A fix is available
APAR status
Closed as program error.
Error description
Issue making the openJpa work with WebSphere Application Server 6.1.0.31 + Feature Pack for EJB 3.0 See the error thrown below: [08/04/11 15:53:37:514 UTC] 00000020 SystemOut O <openjpa-1.0.4-SNAPSHOT-r420667:908274 fatal user error> org.apache.openjpa.persistence.ArgumentException: The type for "test.aaa.bbb" is mapped to custom strategy"test.DecimalWrapperValueHandler", but this strategy cannot beinstantiated. at org.apache.openjpa.jdbc.meta.MappingRepository.mappedStrategy(Ma ppingRepository.java:953) at org.apache.openjpa.jdbc.meta.MappingRepository.defaultStrategy(M appingRepository.java:750) :::::::::::::: Caused by: <openjpa-1.0.4-SNAPSHOT-r420667:908274 fatal user error> org.apache.openjpa.persistence.ArgumentException: The class name "test.DecimalWrapperValueHandler" used in a metadata extension on field"test.aaa.bbb" is not valid. at org.apache.openjpa.meta.JavaTypes.classForName(JavaTypes.java:22 7) at org.apache.openjpa.meta.JavaTypes.classForName(JavaTypes.java:19 4)
Local fix
candidate to be fixed in next release
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Feature Pack for EJB 3.0 who use * * an OpenJPA ValueHandler or FieldStrategy. * **************************************************************** * PROBLEM DESCRIPTION: OpenJPA doesn't find a ValueHandler * * and/or FieldStrategy class with an * * applicable class loader. * **************************************************************** * RECOMMENDATION: * **************************************************************** When a user's JPA entities makes use of (implement) an OpenJPA 'org.apache.openjpa.jdbc.meta.ValueHandler' or 'org.apache.openjpa.jdbc.meta.FieldStrategy', a potential exists for said classes/implementation to not be found by the current classloader. That is, take the following code as an example: package test; @Entity public class TestEntity { @Id private Long id; @Persistent @Strategy("test.MyStringValueHandler") private String testString; ..... package test; public class MyStringValueHandler extends org.apache.openjpa.jdbc.meta.strats.AbstractValueHandler { ..... When OpenJPA attempts to load the 'MyStringValueHandler' class (the class listed in the @Strategy annotation), it may not be able to load the class depending on the classloader in use. In this case OpenJPA is attempting to load the class with the wrong classloader. Thus the following exception results: org.apache.openjpa.persistence.ArgumentException: The type for "test.TestEntity.testString" is mapped to custom strategy "test.MyStringValueHandler", but this strategy cannot be instantiated.
Problem conclusion
With this fix, code has been added to ensure that OpenJPA uses the correct classloader when it attempts to load a class which has implemented a 'ValueHandler' or 'FieldStrategy' interface. The fix for this APAR is currently targeted for inclusion in Enterprise JavaBeans 3.0 Feature Pack Fix Pack 43 (6.1.0.43) of WebSphere Application Server version 6.1.0.
Temporary fix
Comments
APAR Information
APAR number
PM41571
Reported component name
WAS EJB3 FEATUR
Reported component ID
5724J0851
Reported release
610
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-06-14
Closed date
2011-08-12
Last modified date
2011-08-12
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WAS EJB3 FEATUR
Fixed component ID
5724J0851
Applicable component levels
R610 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
27 October 2021