Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

NoClassDefFoundError during migration of Data schema to Pega718

SA-20623

Summary



User upgrading the Production environment from PRPC 6.2 SP2 to Pega 7.1.8 and facing the NoClassDefFoundError during the migration of the Data schema using the JAR upload.

Error Messages



javax.ejb.EJBException: EJB Exception: : java.lang.RuntimeException: Problem during method invocation (save)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:278)
at com.pega.pegarules.internal.etier.ejb.DatabaseBeanBoot.save(DatabaseBeanBoot.java:138)
at com.pega.pegarules.internal.etier.ejb.Database_7slfdk_ELOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:33)
at com.pega.pegarules.internal.etier.ejb.Database_7slfdk_ELOImpl.save(Unknown Source)
at com.pega.pegarules.generation.internal.cache.appcentric.RACacheAppCentricImpl.addEntryToMemoryCache(RACacheAppCentricImpl.java:1305)
at com.pega.pegarules.generation.internal.cache.appcentric.RACacheAppCentricImpl.find(RACacheAppCentricImpl.java:989)
at com.pega.pegarules.generation.internal.cache.AssemblyCacheWrapper.find(AssemblyCacheWrapper.java:799)
at com.pega.pegarules.generation.internal.assembly.FUAManagerImpl.getInternal(FUAManagerImpl.java:1408)
at com.pega.pegarules.generation.internal.assembly.FUAManagerImpl.get(FUAManagerImpl.java:1296)
at com.pega.pegarules.generation.internal.PRGenProviderImpl.get(PRGenProviderImpl.java:476)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:3987)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:3861)
PI.java:3322)
Caused by: java.lang.NoClassDefFoundError: com/pega/pegarules/pub/database/BadTableMappingException
at com.pega.pegarules.data.internal.access.DatabaseImpl.processUpdates(DatabaseImpl.java:2308)
at com.pega.pegarules.data.internal.access.Saver.save(Saver.java:651)
at com.pega.pegarules.data.internal.access.DatabaseImpl.save(DatabaseImpl.java:5045)
at com.pega.pegarules.data.internal.access.DatabaseImpl.save(DatabaseImpl.java:5031)
at com.pega.pegarules.data.internal.access.DatabaseImpl.save(DatabaseImpl.java:5023)
at com.pega.pegarules.generation.internal.cache.appcentric.AppEntryImpl.writeEntryToDatabase(AppEntryImpl.java:378)
at com.pega.pegarules.generation.internal.cache.appcentric.AppEntryImpl.save(AppEntryImpl.java:597)
at com.pega.pegarules.generation.internal.cache.appcentric.AppEntryImpl.save(AppEntryImpl.java:65)
at com.pega.pegarules.data.internal.access.DatabaseImpl.save(DatabaseImpl.java:13869)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.DatabaseImpl._save_privact(DatabaseImpl.java:137)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.DatabaseImpl.save(DatabaseImpl.java:105)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.DatabaseBean.save(DatabaseBean.java:170)
at sun.reflect.GeneratedMethodAccessor241.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:367)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:408)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:272)
... 84 more


Steps to Reproduce



1. Migrate the rules schema to new rules schema.

2. Upgrade the new rules schema.

3. Migration of the data schema using the JAR upload of data.


Root Cause



The EJB classloader hierarchy does not have these exception classes preloaded at startup. They are in the web tier class loader hierarchy, but not in the ejb tier loader. So in the business scenario there are times that Application Based
Assembler (ABA) believes it needs to do an assembly, so it does so, then it creates entries and/or shortcuts to be written to the database.  In the JEE app servers, these db.save() requests get passed over to the ejb tier. That does the write and hits a database IntegrityConstraintViolationException, which could be a duplicate key, or some other integrity constraint from the database. The etier calls the logic to handle that db exception, but because it cannot load these classes, we get the NoClassDefFoundError errors in the log. The real cause of the exceptions are lost.

Resolution



1. Local Change:
From Pega 7.1.7 (and later) engine code can preload classes from a space delimited list using the prconfig.xml setting below:

<env name="initialization/preloadengineclasses" value="com.pega.pegarules.pub.database.BadTableMappingException com.pega.pegarules.pub.clipboard.InvalidStreamError com.pega.pegarules.pub.database.IntegrityConstraintViolationException com.pega.pegarules.pub.database.DuplicateKeyException" />

2. Product Update:
In the Pega Platform releases later than Pega v7.1.9, these classes are added to the existing preload list within the code so they do not need to be added via prconfig setting.

Suggest Edit

Published March 16, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us