Showing posts with label exception. Show all posts
Showing posts with label exception. Show all posts

Saturday, February 22, 2014

Sample procedure in Oracle

Sample oracle procedure which involves loops and also statements to execute. Exception handling not done perfectly but could use for a start ups.
---------------------------------------------------------------------------------------------------
create or replace 
PROCEDURE MANAGE_MONITOR_RECORDS
IS
EVENT_CAT varchar2(100);
PROCESS_NAME VARCHAR2(100);
COUNT_TOTAL NUMBER;
SQL_STMT VARCHAR2(200);
BEGIN
for x in (select distinct PROCESS_INSTANCE_ID FROM HMT_PROCESS_AUDIT_INFO)
LOOP
DBMS_OUTPUT.PUT_LINE(X.PROCESS_INSTANCE_ID);
SELECT COUNT(*) INTO COUNT_TOTAL FROM GLF_EVENT_LOG WHERE LOG_INSTANCE_ID = x.PROCESS_INSTANCE_ID;
IF (COUNT_TOTAL > 0 ) THEN
  SELECT EVENT_CAT,PROCESS_CODE INTO EVENT_CAT,PROCESS_NAME FROM GLF_EVENT_LOG
          WHERE LOG_INSTANCE_ID=x.PROCESS_INSTANCE_ID AND ROWNUM=1;
  DBMS_OUTPUT.PUT_LINE(EVENT_CAT);
  DBMS_OUTPUT.PUT_LINE(PROCESS_NAME);
  SQL_STMT := 'UPDATE HMT_PROCESS_AUDIT_INFO SET KEYWORD2=:1,KEYWORD3=:2 WHERE PROCESS_INSTANCE_ID=:3';
  EXECUTE IMMEDIATE SQL_STMT USING ''||EVENT_CAT||'',''||PROCESS_NAME||'',''||x.PROCESS_INSTANCE_ID||''; 
  DBMS_OUTPUT.PUT_LINE('Updated the entry in HMT_PROCESS_AUDIT_INFO table');
  EVENT_CAT := NULL;
ELSE
  DBMS_OUTPUT.PUT_LINE('ELSE BLOCK');
END IF;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
 return;
END;

Monday, February 10, 2014

One Problem of having CWS and ISVP in a single Environment

Scenario:

 This post is about the problem I have faced by having the CWS content and ISVP content only in one single environment. I have one project's CWS content and ISVP content in my local environment. Now what I did was, I have uninstalled the isvp from my local machine. The UnInstallation was successful but however both the CWS content and ISVP content in the same environment will be sharing common cordys database, while uninstalling the ISVP it removed certain content from the cordys database (Assumable its xsd related content). The process of uninstallation was successful. But now I am facing a problem from my development content. When i publish any of the newly created web service it doesn't succeed throwing the exception which is shown below,

<![CDATA[ApplicationTransaction 'com.cordys.cap.applicationconnector.Transaction' threw an exception during abort.]]></log4j:message>
<log4j:NDC><![CDATA[Running Publishing document(s)
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS/ESBAppCompositeWSI
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS/ESBAppCompositeWSI/GetDistintOrgsFromConfiguration
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS/ESBAppCompositeWSI/GetDistintOrgsFromConfiguration/GetDistintOrgsFromConfigurationRealization
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1/COMM_JOBRUN_WORKITEM_DETAILS.xsd
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1/COMM_JOBRUN_WORKITEM_DETAILS.xsd/Reference_to_00505687-00BD-11E3-E8EE-2679912CB788
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1/XMLSchema_Binary_Reference_WSAppServerSchema.xsd
]]

I have understood that I created a mess first by having both cws and ISVP content in one single environment and second by unInstalling isvp. I have installed the isvp again in the environment and tried publishing the newly created web service. But NO LUCK :( still I have the same issue. This issue got resolved when I restarted the cordys monitor and then tried publishing the service. 

The situation is same for any newly created web service in this scenario. Whenever I create a new web service in my local development server, in order to publish it successfully I have to restart cordys monitor and then try publishing.

Note : I could able to find the resolution, but I wasn't able to understand what exactly went wrong. People can put their thoughts on this and let me know if they have found the reason behind this by giving a clear explanation.