Support Article
EAR deployment fails with ConnectionFactory cast errors on JBoss
Summary
User deployed a Pega 7.1.7 ear file on Jboss 6.2 EAP server.
Server fails to start with com.pega.pegarules.ra.cci.PRConnectionFactoryImpl exception and cannot be cast to javax.resource.cci.ConnectionFactory.
Error Messages
15:56:15,780 INFO [stdout] (Dispatcher-Thread-314) 2015-05-12 15:56:15,779 [ xxxxx] [ STANDARD] [ ] [ ] ( pegarules.resadap.RAClient) ERROR - Caught exception while looking up Connection Factory with JNDI Name: java:comp/env/eis/PRAdapterConnectionFactory, java.lang.ClassCastException: com.pega.pegarules.ra.cci.PRConnectionFactoryImpl cannot be cast to javax.resource.cci.ConnectionFactory
15:56:15,780 INFO [stdout] (Dispatcher-Thread-314) java.lang.ClassCastException: com.pega.pegarules.ra.cci.PRConnectionFactoryImpl cannot be cast to javax.resource.cci.ConnectionFactory
15:56:15,781 INFO [stdout] (Dispatcher-Thread-314) at com.pega.pegarules.resadap.RAClient.init(RAClient.java:104)
Steps to Reproduce
Deploy Pega 7.1.7 ear file on JBoss 6.2 EAP
Root Cause
The root cause of this issue is due to a conflict of having two references for the ConnectionFactory class definition.
When user's Unix server is scanned for referenced jars of ConnectionFactory class, there was one jar which appears to be in Jboss 6.2 EAP server.
Also user's pr_engineclasses table is queried for the same class and found one reference from connector.jar file which has been included as an external jar.
PZJAR | PZPACKAGE | PZCLASS | PZMODULEVERSION | PZCODESET | PZCODESETVERSION | |
1 | connector.jar | javax/resource/cci | ConnectionFactory.class | 1385370240000 | customer | 06-01-01 |
Resolution
This issue is resolved by making the following Local-change to the operating environment:
Lowering the code-set version in pr_engineclasses table for the ConnectionFactory class entry works to resolve this issue, as this class is not picked up from connector.jar during runtime.
(or)
Deleting the connector.jar file helps to resolve the issue.
Published August 11, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.