Oracle apps OAF Page Import Error: Exception in thread “main” java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole

I usually import pages through Linux Console. This time I tried to Import a Page by Windows machine(Development Machine). I got the below Error.

 

Exception in thread “main” java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole
at oracle.jdbc.driver.DMSFactory.<clinit>(DMSFactory.java:51)
at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:3821)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:632)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:230)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at oracle.adf.mds.tools.util.ConnectUtils.getDBConnection(ConnectUtils.java:166)
at oracle.jrad.tools.xml.importer.XMLImporter.importDocuments(XMLImporter.java:232)
at oracle.jrad.tools.xml.importer.XMLImporter.main(XMLImporter.java:88)
Caused by: java.lang.ClassNotFoundException: oracle.dms.console.DMSConsole
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
… 11 more

After Searching I came to find that I had to modify a setup

Open the import.bat file(Import file will be in Jdeveloper (jdevbin\oaext\bin)) and modify the below line

set CLASSPATH=%JRAD_ROOT%\jdev\appslibrt\ebsuix.jar

to

set CLASSPATH=%JRAD_ROOT%\jdev\appslibrt\ebsuix.jar;%JRAD_ROOT%\lib\dms.jar

Now try to Import.

 

 

Advertisements

Jdeveloper Error : Error initializing server: At least one valid code-source or import-shared-library element is required

I came across this error when trying to run a page from my Jdeveloper.

1

18/09/23 15:51:30 Error initializing server: At least one valid code-source or import-shared-library element is required for shared-library “global.libraries” in /C:/SOFT/p19170592_R12_GENERIC-Jdev-R12.2.4/jdevbin/jdev/system/oracle.j2ee.10.1.3.43.6/embedded-oc4j/config/server.xml.
18/09/23 15:51:30 Fatal error: server exiting
Process exited with exit code 1.

I have migrated from old to new one from a different location and this was causing the problem.

So if you look into the error it will tell that it was not able to find the files in the server in the particular location. So we have change the correct path which is in the error.

You have to go to this path and change the location in server.xml file in your Jdeveloper.

Environment Variable has to corrected while configuring Jdeveloper

jdevbin/jdev/system/oracle.j2ee.10.1.3.43.6/embedded-oc4j/config/server.xml.

 

Thanks

Unable to open seeded Reports in Reports Builder

Steps to open a sample report

1. Apply patch to upgrade to Developer 10.1.2.3.0, which is the certified version on Windows 7 (32-bit).
For details, please review:

How to Install Developer Suite 10.1.2.3 on Windows Vista or Windows 7 (32bit) (Doc ID 559067.1)

2. Open Reports Builder 10.1.2.3.0.

3. Connect to database.

4. Open seeded report (for example, APXT7RVT.rdf).

 

As per the Below oracle document the steps has been given above.

Doc ID 2037038.1

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=107908767347540&parent=DOCUMENT&sourceId=2224886.1&id=2037038.1&_afrWindowMode=0&_adf.ctrl-state=4lxwf7w4_134

Oracle apps AME Error : An invalid approver has been encountered while processing the action type hr position level.

I have encountered the below error in AME Position hierarchy.

AME Error in Position Hiearchy

I have checked completely the Position Hierarchy was fine and User, Person was valid. Then on searching I came to know that I have changed something.

Change I did previously

Previously for a user the notification was not coming so checking the wf_roles table the position was present however on checking wf_user_roles table the user was not there. So I have inactivated and deleted the role using below code

DECLARE
lc_role_name apps.wf_roles.name%TYPE := ‘POS:2115549’;
BEGIN
wf_directory.setadhocroleexpiration(lc_role_name, sysdate -1 );
COMMIT;
wf_directory.setadhocrolestatus( lc_role_name, ‘INACTIVE’);
COMMIT;
wf_directory.deleterole(lc_role_name , ‘WF_LOCAL_ROLES’ , 0);
COMMIT;
END;
UPDATE wf_local_roles x
SET x.expiration_date = (SYSDATE-1)
,x.status =’INACTIVE’
WHERE x.name = ‘POS:2115549’;
COMMIT;
begin
wf_purge.AdHocDirectory();
end;

Solution:

As I have removed the wf role for the position it gives error in the AME so we have to recreate the position with updated user in wf_role table.

The Concurrent Program Synchronize WF LOCAL tables which will be in System Administrator Responsibility will recreate the position in wf_roles.

After running the concurrent program the position and users will be updated on wf_roles and wf_user_roles table.

Reference

Help >Diagnostics > Examine Error: Function Not Available to this Responsibility. Please check with your system administrator

If you are getting the error Function Not Available to this Responsibility. Please check with your system administrator then follow the below steps

 

Step 1. Navigate to System Administrator Responsibility > Profile > System

Step 2. Query for profile ‘Utilities:Diagnostics’

Step 3. At the ‘Site’ level give value as ‘Yes’

Step 4. Save and retry and users will not get above message, and they will be able to navigate to Help >Diagnostics > Examine

Splitting of words in two statements in SQL using INSTR and SUBSTR functions

Below is the code snippet

 

select substr(‘One Hundred Ninety Five Thousand Two Hundred Seventeen Qatari Riyals And Twenty Six Dirhams*****’, 0, case when instr(‘One Hundred Ninety Five Thousand Two Hundred Seventeen Qatari Riyals And Twenty Six Dirhams*****’, ‘ ‘,45, 1)= 0 then 45 else instr(‘One Hundred Ninety Five Thousand Two Hundred Seventeen Qatari Riyals And Twenty Six Dirhams*****’, ‘ ‘,45, 1) end) first_var
, substr(‘One Hundred Ninety Five Thousand Two Hundred Seventeen Qatari Riyals And Twenty Six Dirhams*****’, instr(‘One Hundred Ninety Five Thousand Two Hundred Seventeen Qatari Riyals And Twenty Six Dirhams*****’, ‘ ‘,45, 1), case when instr(‘One Hundred Ninety Five Thousand Two Hundred Seventeen Qatari Riyals And Twenty Six Dirhams*****’, ‘ ‘,45, 1)>45 then instr(‘One Hundred Ninety Five Thousand Two Hundred Seventeen Qatari Riyals And Twenty Six Dirhams*****’, ‘ ‘,45, 1) else 0 end) sec_var from dual;

Delete or Remove or Clear Approvers in AME using AME_API2

Below is the AME Api to clear the approvers in AME Transaction. So all the approved status will be reversed and will remove status in AME.

AME_API2.CLEARALLAPPROVALS (20003,
‘XXQF_BUYER’,
LN_REQ_ID);

Soon I will wirte a post in detail about the flow of the AME Api that can be used in PLSQL

Approve and Reject Approvers in AME by AME_API2 Api

In AME we will be able to set Approve and Reject status in AME using AME_API2.

So in AME on Test Workbench we can see that the approver gets approved or rejected and AME_API will give approvers based on past approvals.

Below is API to Approve and Reject. Only the parameter is different to Approve and Reject

AME_API2.UPDATEAPPROVALSTATUS2 (
APPLICATIONIDIN => 20003,
TRANSACTIONIDIN => LN_REQ_ID, –?GENERALLY ITEMKEY
APPROVALSTATUSIN => AME_UTIL.APPROVEDSTATUS, –?APPROVED_STATUS_OR_REJECTED_STATUS
APPROVERNAMEIN => LC_USER_NAME,
TRANSACTIONTYPEIN => LC_GET_AME_TRX_TYPE);

AME_API2.UPDATEAPPROVALSTATUS2 (
APPLICATIONIDIN => 20003,
TRANSACTIONIDIN => LN_REQ_ID, –?GENERALLY ITEMKEY
APPROVALSTATUSIN => AME_UTIL.REJECTSTATUS, –?APPROVED_STATUS_OR_REJECTED_STATUS
APPROVERNAMEIN => LC_USER_NAME,
TRANSACTIONTYPEIN => LC_GET_AME_TRX_TYPE);

Thank you.

PLSQL Logic to AME Approver Resultset as Table Type

In some cases when we have to bring the approvers to the display screen to show it is better to have a query so that it can be easily mapped with VO.

For Example as the below query

SELECT SEQ_NUM, FULL_NAME APPRIVER_FULL_NAME, APPROVER_POSITION approver_position, APPROVER_ROLE APPROVER_ROLE, ROWNUM SEQ_N, USER_NAME, PERSON_ID, USER_ID, USED_IN, TENDER_REQUEST_ID, REQUEST_TYPE FROM THE ( SELECT CAST ( XX_GET_APPROVERS_LIST (:1) AS xxqf_et_approvers_table) FROM DUAL)

So In the below query it fetches all the details based on the query getting from table type. So below is the sample format for creating table function based on AME output.

 

CREATE OR REPLACE FUNCTION XX_GET_APPROVERS_LIST(l_request_id in number)
RETURN xx_approvers_table
as
l_approvers_list xx_approvers_table
:= xx_approvers_table ();
— l_request_id NUMBER := 7333;
g_next_approvers ame_util.approversTable2;
l_completeYNO VARCHAR2 (100);
applicationId NUMBER := 201;
LN_USER_NAME VARCHAR2 (1000);
lc_name VARCHAR2 (200);

l_approvers_list xxqf_et_approvers_table
:= xxqf_et_approvers_table ();
l_request_type VARCHAR2 (50);
l_requisition_id NUMBER;
l_rfq_id NUMBER;

cursor get_info_pos_based(p_pos_id in number) is select papf.person_id, fu.user_id, papf.full_name, fu.user_name
from per_all_people_f papf, per_all_assignments_f paaf , fnd_user fu
where papf.person_id = paaf.person_id and fu.employee_id = papf.person_id
and paaf.position_id = p_pos_id
and sysdate between papf.effective_start_date and papf.effective_end_date
and sysdate between paaf.effective_start_date and paaf.effective_end_date
and rownum =1;

l_person_id number;
l_user_id number;
lc_full_name varchar2(2000);
lc_user_name varchar2(5000);
lc_position_name varchar2(5000);
lc_request_type varchar2(1000);

BEGIN

select REQUEST_TYPE into lc_request_type from xxqf_et_tender_eval_request where TENDER_REQUEST_ID = l_request_id;

ame_api2.getAllApprovers7 (
applicationIdIn => 20003,
transactionTypeIn => ‘XX_HIER’,
transactionIdIn => l_request_id,
approvalProcessCompleteYNOut => l_completeYNO,
approversOut => g_next_approvers);

IF g_next_approvers.COUNT > 0
THEN
FOR I IN 1 .. g_next_approvers.COUNT
LOOP
if (substr(g_next_approvers (I).NAME, 0, 4) = ‘POS:’)
then
DBMS_OUTPUT.PUT_LINE (‘AT MR POSITION Based Hierarchy’);
open get_info_pos_based(substr(g_next_approvers (I).NAME, 5));
fetch get_info_pos_based into l_person_id, l_user_id, lc_full_name, lc_user_name;
close get_info_pos_based;
l_approvers_list.EXTEND;
l_approvers_list (l_approvers_list.COUNT) :=
XXQF_ET_APPROVERS_T (
g_next_approvers (I).approver_order_number,
lc_user_name,
l_person_id,
l_user_id,
lc_full_name,
g_next_approvers (I).display_name,
‘MR Appr Hierarchy’,
‘BOTH’,
l_request_id,
lc_request_type);

else
l_approvers_list.EXTEND;
l_approvers_list (l_approvers_list.COUNT) :=
XXQF_ET_APPROVERS_T (
g_next_approvers (I).approver_order_number,
g_next_approvers (I).NAME,
g_next_approvers (I).approver_order_number,
g_next_approvers (I).approver_order_number,
g_next_approvers (I).display_name,
g_next_approvers (I).approval_status,
‘MR Appr Hierarchy’,
‘BOTH’,
l_request_id,
g_next_approvers (I).NAME);
end if;
END LOOP;
END IF;

FOR I IN (SELECT * FROM TABLE (l_approvers_list))
LOOP
NULL;
DBMS_OUTPUT.PUT_LINE (
‘ AFTER EXTEND Testing the Data :’
|| I.USER_NAME
|| ‘ display_name :’); –For Testing the Values
END LOOP;

RETURN l_approvers_list;
END;

 

Unable to launch the Java Virtual Machine Located at path: ..\..\jdk\jre\bin\client\jvm.dl

On running Jdevloper for first time you may see the below error

ERROR:
Unable to launch the Java Virtual Machine
Located at path:
..\..\jdk\jre\bin\client\jvm.dll

SOLUTION:
1. go to Control Panel->System->Advanced System Settings->Environmental Variables
2. Update the ‘Path’ setting to include the following directory: ‘<jdev home dir>\jdevbin\jdk\bin’
3. Reopen the jDeveloper.