How to use Field mapping for custom classes in an EJB2 CMP application in EAP6
Issue
- We migrate an EJB2 application with CMP Entities to EAP6 and use the following jbosscmp-jdbc.xml mapping
<user-type-mappings>
<user-type-mapping>
<java-type>custom.cmp.SimpleType</java-type>
<mapped-type>java.lang.String</mapped-type>
<mapper>custom.cmp.FieldMapper</mapper>
</user-type-mapping>
</user-type-mappings>
- After deploy a legacy EJB2 CMP application in EAP6 we see the following Exception
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."persistence.jar".component.LanguageCode.jdbc.store-manager.INIT: org.jboss.msc.service.StartException in service jboss.deployment.unit."persistence.jar".component.LanguageCode.jdbc.store-manager.INIT: JBAS010784: Failed to start JDBCStore
...
Caused by: java.lang.RuntimeException: JBAS010793: Could not create mapper: customer.cmp.FieldMapper
...
Caused by: java.lang.ClassNotFoundException: customer.cmp.FieldMapper from [Module "org.jboss.as.cmp:main" from local module loader @5b5ac942 (finder: local module finder @25533ae9 (roots: :\opt\jboss\jboss-eap-6.2.2\modules\system\layers\base\.overlays\layer-base-jboss-eap-6.2.2.CP,
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
