This page helps investigating any oracle error during saving step for a given AMT analyzer.
Example of errors for Oracle
Comparing objects on server . . .
SQL Error: ORA-01427: single-row subquery returns more than one row
SQL Error: ORA-06512: a "KB.AMT_P_FILL_OBJ", ligne 44.
SQL Error: ORA-06512: a "KB.AMT_P_SPLIT_FILL", ligne 40.
SQL Error: ORA-06512: a "KB.AMT_P_SPLIT_IN", ligne 18.
SQL Error: ORA-06512: a "KB.CACHE_PROCESSID", ligne 57.
SQL Error: ORA-06512: a ligne 1 (Severity 1, Msg No 1427).
Procedure call failed: ?KB.CACHE_PROCESSID,I_IDSESSION,I_IDUSRPRO
Comparing objects on server . . .
Comparison completed.
Merging objects on server . . .
SQL Error: ORA-20000: AMT_F_MAJ_KB_PRJ:ObjPro(isInSourceLink):Duplicate data found
SQL Error: ORA-06512: à "KB701.AMT_F_MAJ_KB_PRJ", ligne 143
SQL Error: ORA-06512: à "KB701.AMT_F_MAJ_KB", ligne 17
SQL Error: ORA-06512: à "KB701.CACHE_FLUSHDATA", ligne 35
SQL Error: ORA-06512: à ligne 1 (Severity 1, Msg No 20000)
Procedure call failed: ?KB701.CACHE_FLUSHDATA,I_IDSESSION
Example of errors for SQL Server
SQL error cannot insert duplicate key row in object 'dbo.ObjInf' with unique index 'PK_ObjInf'
AMT Analyzers are : J2EE analyzer, C/CPP analyzer, Universal Analyzer, New DotNet Analyzer, ABAP analyzer, New PL\SQL analyzer
Release | Yes/No |
---|---|
8.3.x | |
8.2.x | |
8.1.x | |
8.0.x | |
7.3.x |
- Detect duplicated objects on the KB
Run these queries on the KB:s
SELECT IDNAM FROM OBJECTS group by IDNAM having count\(*) > 1
SELECT IDNAM, FULLNAME, OBJTYP FROM OBJECTS o join OBJFULNAM f on f.IDOBJ = o.IDKEY where IDNAM in (SELECT IDNAM FROM OBJECTS group by IDNAM having count\(*) > 1)
If queries return one or more rows, this means that some duplicated objects are detected on this KB and we can conclude that Oracle error raised during saving step is related to these objects
- If any duplicated objects can be detected
- Counter issue
This step is possible only if you can identify source code file of objects generating error.
Example1
Here the list of object generating errors
J:\SOURCES\Revision\customer\appname\module_486997.ABAP/ABAP/MACRO/DEL_TAB_A
J:\SOURCES\Revision\customer\appname\module_486997.ABAP/ABAP/MACRO/DEL_TAB_A_PHere you see that objects belonging to the file 'module_486997.ABAP'
Example2
Here the list of object generating errors
C_NS.PEP.C_NS.Common.C_FctD.operator <<(658513529)<:std::basic_ostream(char):&>
C_NS.PEP.C_NS.Data.C_FctD.prosXMLformat(658513529)<:void:>
C_NS.boost.C_NS.posix_time.C_Cl.millisec_posix_time_system_config.C_Mem.tick_per_second.C_FiIn this case we cannot identify the source code file generating error just with object name.
However we can do this with enlighten- put object in the view
- Click on F12 to get object properties : see source code file.
We can counter issue as follows
- removing the file from analyzed code source
- Drop job result and restart analysis
- Transmit to the Production team in charge of the analyzer
- Counter issue
- If no duplicated objects can be detected
- Get customer's input
- Analyzed code source
- Analysis log file
- If customer is using CAST-MS to create and run analysis job : ask for the pmx file
- If customer is using Analysis manager to create and run analysis job : ask for job export
- Reproduce issue
- In this case it's very recommanded to create a dedicated KB for reproduction
- AMT Saving debug mode
- Use CAST-MS to create and run analysis job
- create a managment base
- update customer pmx file with code source path folders
- connect with CAST-MS to the managment base
- import the updated pmx file
- add the created as analysis service
- Synchronize KB and run analysis
If customer refuses to provide code source of if you cannot reproduce issue in your end, you can ask customer to
- AMT Saving debug mode.
- Run the analysis again.
- Provide you with dump of this KB with this new analysis
- Get objects generating error
Get the number of objects with errors
Run following query on the knowledge base used for reproduction (See the conditions in the Reproduce issue)
select '1' as "Id", 'Number of duplicated GUID in IN_OBJECTS table' as Description,count(1) as "FailedLines" from (select NAME_ID from IN_OBJECTS group by NAME_ID having count(1)>1) t union all select '2' as "Id", 'Number of objects with OBJECT_TYPE_ID not defined' as Description, count(1) as "FailedLines" from IN_OBJECTS where not exists (select 1 from Typ where IdTyp = IN_OBJECTS.OBJECT_TYPE_ID) union all select '3' as "Id", 'Number of objects not attached to a project' as Description,count(1) as "FailedLines" from IN_OBJECTS o where not exists (select 1 from IN_LINKS l where SOURCE_ID = o.OBJECT_ID and l.LINK_TYPE_ID = 1054) union all select '4' as "Id", 'Number of objects used as projects but not declared CAST_KBProject' as Description, count(1) as "FailedLines" from IN_OBJECTS where OBJECT_ID in ( select distinct l.TARGET_ID/*, tc.IdCatParent, o.OBJECT_TYPE_ID*/ from (IN_LINKS l join IN_OBJECTS o on (TARGET_ID = OBJECT_ID and LINK_TYPE_ID = 1054)) left outer join (TypCat tc join Cat c on (c.IdCat = tc.IdCatParent and c.CatNam = 'CAST_KBProject')) on (tc.IdTyp = o.OBJECT_TYPE_ID) where c.IdCat is null) union all select '5' as "Id", 'Number of projects not attached to himself(lnkTyp 1054)' as Description, count(1) as "FailedLines" from (select distinct TARGET_ID from (IN_LINKS l join IN_OBJECTS o on (TARGET_ID = OBJECT_ID and LINK_TYPE_ID = 1054))) prj left outer join IN_LINKS l on (l.TARGET_ID = prj.TARGET_ID and l.SOURCE_ID = prj.TARGET_ID and LINK_TYPE_ID = 1054) where l.LINK_ID is null union all select '6' as "Id", 'Number of objects without name or fullname' as Description, count(1) as "FailedLines" from IN_OBJECTS o left join IN_CHAR_PROPERTIES p1 on (o.OBJECT_ID = p1.OBJECT_ID and p1.PROPERTY_TYPE_ID = 125) left join IN_CHAR_PROPERTIES p2 on (o.OBJECT_ID = p2.OBJECT_ID and p2.PROPERTY_TYPE_ID = 3) where p1.OBJECT_ID is null or p2.OBJECT_ID is null union all select '7' as "Id", 'Number of links using objects not in IN_OBJECTS' as Description, count(1) as "FailedLines" from IN_LINKS l left join IN_OBJECTS o1 on (l.SOURCE_ID = o1.OBJECT_ID and SOURCE_KIND ='E' ) left join IN_OBJECTS o2 on (l.TARGET_ID = o2.OBJECT_ID and TARGET_KIND ='E') where o1.OBJECT_ID is null or o2.OBJECT_ID is null union all select '8' as "Id", 'Object not attached to a source(isInSourceLink)' as Description, count(1) as "FailedLines" from IN_OBJECTS o1 left join IN_LINKS l on (l.SOURCE_ID = o1.OBJECT_ID and SOURCE_KIND ='E' and l.LINK_TYPE_ID = 2671) where l.SOURCE_ID is null union all select '9' as "Id", 'Object with CRC should be attached to himself with (isInSourceLink)' as Description, count(1) as "FailedLines" from IN_INT_PROPERTIES p join IN_OBJECTS o on (o.OBJECT_ID = p.OBJECT_ID and PROPERTY_TYPE_ID = 106) left join IN_LINKS l on (l.SOURCE_ID = o.OBJECT_ID and l.LINK_TYPE_ID = 2671 and l.SOURCE_ID = o.OBJECT_ID ) where l.SOURCE_ID is null union all select '10' as "Id", 'Links with incorrect project attachment' as Description, count(1) as "FailedLines" from IN_LINKS l left join IN_OBJECTS o on (o.OBJECT_ID = l.PROJECT_ID) where PROJECT_KIND ='E' and LINK_TYPE_ID not in (1032,1054,1056,2671) and o.OBJECT_ID is null union all select '11' as "Id" , 'Duplicate links for attachment to project' as Description, count(1) as "FailedLines" from (select 1 from IN_LINKS where LINK_TYPE_ID = 1054 and TARGET_KIND ='E' and PROJECT_KIND ='E' group by SOURCE_ID, TARGET_ID having count(1) > 1) t order by 1
The query result is like this one
Id
DESCRIPTION
FailedLines
1
Number of duplicated GUID in IN_OBJECTS table
10
10
Links with incorrect project attachment
0
11
Duplicate links for attachment to project
0
2
Number of objects with OBJECT_TYPE_ID not defined
0
3
Number of objects not attached to a project
0
4
Number of objects used as projects but not declared CAST_KBProject
0
5
Number of projects not attached to himself(lnkTyp 1054)
0
6
Number of objects without name or fullname
0
7
Number of links using objects not in IN_OBJECTS
0
8
Object not attached to a source(isInSourceLink)
0
9
Object with CRC should be attached to himself with (isInSourceLink)
0
Here we can see for example that Number of duplicated GUID in IN_OBJECTS table=10
Get the list of these objects using this query
select NAME_ID from IN_OBJECTS group by NAME_ID having count(1)>1)
or this one
select o.* from (select NAME_ID from SAV_IN_OBJECTS_1 group by NAME_ID having count(1)>1) t, SAV_IN_OBJECTS_1 o where o.NAME_ID = t.NAME_ID order by o.NAME_ID
Get the files containing objects generating a duplication for J2EE
The following sql*plus script provides a list of files that can be removed in order to suppress the GUID duplication that can be generated with generic class instantiation (usually with implicit instantiations)
--------------------------------------------------------------------------------------------------- -- Script providing the list of Java files which call generic object with duplicated GUID --------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- -- Create a temp table containing all the duplicated guid for instanciated java objects create table TMP_DUPL_GUID as select IdNam from Objects where ObjTyp in (975, 976, 977, 978) group by IdNam having count(1) > 1; / --------------------------------------------------------------------------------------------------- -- Create a temp table containing all the duplicated guid with the number of project using them create table TMP_DUPL_NB_USE as select dup.IdNam, b.IdCle as IdCle, count(distinct b.IdPro) as NbPro from Objects o, Acc b, TMP_DUPL_GUID dup where o.IdNam = dup.IdNam and b.IdCle = o.IdKey group by dup.IdNam, b.IdCle; / --------------------------------------------------------------------------------------------------- -- Select all the files to be removed from analysis which containing a call to a duplicated GUID select distinct rp.path from Acc ac, ObjFilRef ofr, RefPath rp, TMP_DUPL_NB_USE nbUse2 where ac.idcle = nbUse2.IdCle and ac.idcle not in (select NbUse.IdCle from TMP_DUPL_NB_USE NbUse, (select IdNam, max(NbPro) as MaxNbPro from TMP_DUPL_NB_USE group by IdNam) MaxUse where Nbuse.idnam = MaxUse.idNam and Nbuse.nbpro = MaxUse.MaxNbPro ) and ofr.idobj = ac.idclr and rp.idfilref = ofr.idfilref; / --------------------------------------------------------------------------------------------------- -- Drop the temp tables drop table TMP_DUPL_NB_USE; / drop table TMP_DUPL_GUID; / --------------------------------------------------------------------------------------------------- exit;
- Counter issue
This step is possible only if you can identify source code file of objects generating error.
Example1
Here the list of object generating errors
J:\SOURCES\Revision\customer\appname\module_486997.ABAP/ABAP/MACRO/DEL_TAB_A
J:\SOURCES\Revision\customer\appname\module_486997.ABAP/ABAP/MACRO/DEL_TAB_A_PHere you see that objects belonging to the file 'module_486997.ABAP'
Example2
Here the list of object generating errors
C_NS.PEP.C_NS.Common.C_FctD.operator <<(658513529)<:std::basic_ostream(char):&>
C_NS.PEP.C_NS.Data.C_FctD.prosXMLformat(658513529)<:void:>
C_NS.boost.C_NS.posix_time.C_Cl.millisec_posix_time_system_config.C_Mem.tick_per_second.C_FiIn this case we cannot identify the source code file generating error just with object name.
However we can do this with enlighten- put object in the view
- Click on F12 to get object properties : see source code file.
We can counter issue as follows
- removing the file from analyzed code source
- Drop job result and restart analysis
- Run the attached Fix.sql in the Local base. The issue was with several entries in temporary table AMT_LINK for the same EXTERNAL_ID.This is not forbidden at this stage of the computation, but procedure AMT_P_DIFF_POS was querying as if it were (expecting only one result).So the attached query would modify procedures AMT_P_DIFF_POS and AMT_P_FILL_PROPC
- Transmit to the Production team in charge of the analyzer
- Get customer's input
Relevant input
- The connection string to the KB used for reproduction
- Code source for reproduction
- Analysis log file
- result of the queries above