Monday, August 24, 2015

Deployment Of Application Fails on Weblogic With 'Failed to deploy process XXX.jpd. There are running instances with incompatible serialization shape'

PROBLEM


Deployment of any custom application or Metasolv core application(e.g. mss_integration.ear) fails with below exception.


<Mar 3, 2015 5:24:49 AM EST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'mss_integration'. java.lang.RuntimeException: Failed to deploy process

/API/com/metasolv/api/workflow/customer/GetCustomerAccountSync.jpd. There are running instances with incompatible serialization shape.

        at com.bea.wli.management.WLIAppListener.checkProject(WLIAppListener.java:172)
        at com.bea.wli.management.WLIAppListener.postStart(WLIAppListener.java:418)
        at weblogic.application.internal.flow.BaseLifecycleFlow$PostStartAction.run(BaseLifecycleFlow.java:292)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        Truncated. see log file for complete stacktrace



CAUSE



The problem is caused by aborted/running processes data in the APP_INT.WLI_PROCESS_INSTANCE_INFO table. There could be 2 reasons for the error.

1. It occurs when there are running / aborted instances of a JPD and an attempt is made to deploy a newer version of incompatible JPD (code changed) or same ear file with no in the old one's place
and as WLI keeps state of previous JPD's therefore old instances in running or aborted state does not allow new ear to be deployed.

2. If the ear file(no change at all) is exactly the same as before server restart/application deployment and the issue occurs if there are any running or aborted instances.

Here we will only discuss about the 2nd scenario.

The query below identifies running/aborted transaction processes:


SELECT * FROM APP_INT.WLI_PROCESS_INSTANCE_INFO WHERE PROCESS_TYPE  LIKE '%jpd_name' AND PROCESS_STATUS IN (0,1);



Description of various PROCESS_STATUS that can be found:
0=RUNNING
1=ABORTED
2=SUSPENDED
3=COMPLETED
4=FROZEN
5=TERMINATED
If the process tracking is set to NONE we can also see a status=7.

Note: In case you have multiple domains in M6 application and each domain may use different WLI user for same DB instance.
e.g. I have two diff domains where I may have installed M6 and their names are 'ENTERPRISE' and  'WHOLESALE'. I may create different WLI users 'ENTERPRISE_INT' and 'WHOLESALE_INT' respectively. In such cases login with such users instead of APP_INT.



SOLUTION




If the server is restarted and the application is deployed with 'Failed' status after server is started. Do as below


1. Go to database(with APP_INT) delete all the running/aborted instances for the particular jpd/process


DELETE FROM APP_INT.WLI_PROCESS_INSTANCE_INFO WHERE PROCESS_TYPE  LIKE '%jpd_name' AND PROCESS_STATUS IN (0,1);
COMMIT;

2. Also delete all the child records for PROCESS_TYPE in tables like WLI_PROCESS_EVENT to have clean and consistent data.


3. Redeploy the application ear.

OR

Shutdown WebLogic(where the ear is deployed) Server & truncate WLI_PROCESS_INSTANCE_INFO. Start the WebLogic server.

Hope above helps in fixing the deployment issues with applications having running instances in WLI schema, please leave your feedback or query.

No comments:

Post a Comment