QMS_TRANSACTION_MGT.OPEN_TRANSACTION
Hi,
In a process of migrating my D2k(Forms 6i) application to Java based Web application through Jdeveloper 9i (9.0.3.x) using the JHeadstart 9.0.4.5, ofcourse all the process is successfully completed and the project is generated. But the time I run the project, in the browser when I do any changes to the existing data that was fecthed from the database or do any inserts and save the changes done, I get the follwoing error:
JBO-29000: ORA-06550:PLS-00201: identifier 'QMS_TRANSACTION_MGT.OPEN_TRANSACTION' must be declared ORA-6550" Line 1, col 7 : PL/SQL:Statement ignored.
I am using Oracle 8.1.7.4.1, with forms 6i and Designer 6i (Ver-4.10)
Can any smart brain tell me the reason for which the above mentioned error is encountered pleaseeee???
Thanks & Regards
Phani
I'm not real familiar with JHeadstart, I would try reposting this in the JHeadstart forum at JHeadstart
Rob
Team JDev
Similar Messages
-
When only entering the statement
exec qms_transaction_mgt.open_transaction('PATCH') on the SQL*Plus prompt raises the following error:
ORA-20998: Transaction Failed
ORA-06512: at "HST65.QMS$ERRORS", line 128
ORA-06512: at "HST65.QMS$ERRORS", line 238
ORA-06512: at "HST65.QMS$ERRORS", line 455
ORA-06512: at "HST65.QMS_TRANSACTION_MGT", line 666
ORA-06512: at line 1
How is this possible? No DML was actually executed.
Has anyone an idea?I'm not real familiar with JHeadstart, I would try reposting this in the JHeadstart forum at JHeadstart
Rob
Team JDev -
QMS_TRANSACTION_MGT.OPEN_TRANSACTIOM
Hi,
In a process of migrating my D2k(Forms 6i) application to Java based Web application through Jdeveloper 9i (9.0.3.x) using the JHeadstart 9.0.4.5, ofcourse all the process is successfully completed and the project is generated. But which I run the project, in the browser when I do any changes to the existing data that was fecthed from the database or do any inserts and save the changes done, I get the follwoing error:
JBO-29000: ORA-06550:PLS-00201: identifier 'QMS_TRANSACTION_MGT.OPEN_TRANSACTION' must be declared ORA-6550" Line 1, col 7 : PL/SQL:Statement ignored.
I am using Oracle 8.1.7.4.1, with forms 6i and Designer 6i (Ver-4.10)
Can any smart brain tell me if the above mentioned package is a built in of Oracle, if so, which version of Oracle?
Thanks & Regards
PhaniI'm not real familiar with JHeadstart, I would try reposting this in the JHeadstart forum at JHeadstart
Rob
Team JDev -
ADF BC with CDM Ruleframe informationals and warnings
Best experts,
I have an issue regarding using ADF BC in combination with CDM-RuleFrame.
We are raising different kind of messsages (errors,warnings,informationals).
JHeadstart delivers an AM that raises the errors but ignores the transactions with warnings and informationals.
To display the informationals and warnings I want to follow this path:
DB ==> Transaction (stores the messages on the AM) ==> CommitBean (Displays the messages in browser)
I use the folowing transactionImpl:
public class RuleFrameTransactionImpl extends DBTransactionImpl2{
String mUndoId;
private static Logger sLog = Logger.getLogger(RuleFrameTransactionImpl.class);
private boolean hasErrors;
public static String MESSAGE_SEPARATOR = "<br>";
public static String QMS_UNHANDLED_EXCEPTION = "QMS-00100";
public RuleFrameTransactionImpl()
super();
* Standard Ruleframe
private void openRuleFrameTransaction()
try
CallableStatement cs = this.createCallableStatement("begin qms_transaction_mgt.open_transaction('JAVA'); end;",
1);
try
cs.execute();
catch (java.sql.SQLException e)
handleSQLError(e);
finally
try
cs.close();
catch (Exception ex)
sLog.error("Error closing Callable Statement for CDM RuleFrame Open Transaction: " + ex);
public void closeRuleFrameTransaction()
// Close RuleFrame transaction
CallableStatement cs = this.createCallableStatement("begin qms_transaction_mgt.close_transaction('JAVA'); end;",
1);
try
cs.execute();
setDBFeedbackOnApplicationModule();
catch (java.sql.SQLException e)
handleSQLError(e);
finally
try
cs.close();
catch (Exception ex)
sLog.error("Error closing Callable Statement for CDM RuleFrame Close Transaction: " + ex);
@Override
public void postChanges(TransactionEvent te)
passivateStateForUndo();
openRuleFrameTransaction();
super.postChanges(te);
setDBFeedbackOnApplicationModule();
catch (DMLException e)
// retrieve SQL error from details
Object details[] = e.getDetails();
if (details[0] instanceof SQLException)
handleSQLError((SQLException)details[0]);
// If reached this line, the detail is not a SQLException,
// so throw it again
throw e;
public void handleSQLError(SQLException e)
throws JboException
if ((e.toString().indexOf("ORA-20998") > 0) ||
// 20999 is raised when posting of changes fails
// due to database constraint violation or built-in TAPI rule
(e.toString().indexOf("ORA-20999") > 0))
setDBFeedbackOnApplicationModule();
else
// Raise the SQL exception, it is not a RuleFrame error
throw new JboException(e);
@Override
public void doCommit()
closeRuleFrameTransaction();
super.doCommit();
public void passivateStateForUndo()
sLog.debug("Executing passivateStateForUndo so we can roll back the Application Module when RuleFrame transaction fails");
ApplicationModule am = getRootApplicationModule();
String undoId = am.passivateStateForUndo("beforeRuleFramePost",
null,
0);
mUndoId = undoId;
hasErrors = false;
public void activateStateForUndo()
// If an undoId is stored on the request, we rollback the transaction
// to the undoId savepoint. The undoId is stored prior to deleteing rows
// from a table. By rolling back to the state prior to removing the
// rows, we can re-display the failed-to-delete rows
String undoId = mUndoId;
if (undoId != null)
sLog.debug("Executing activateStateForUndo, restoring state of before postChanges because RuleFrame transaction failed");
ApplicationModule am = getRootApplicationModule();
am.activateStateForUndo(undoId,
0);
* Aanpassingen vanwege QMS-messages (informationals + warnings)
public void setDBFeedbackOnApplicationModule()
RuleFrameApplicationModuleImpl am = (RuleFrameApplicationModuleImpl)getRootApplicationModule();
sLog.debug("SetDBFeedback");
CallableStatement st = null;
try
sLog.trace("create statement");
// 1. Create a JDBC PreparedStatement for
st = createCallableStatement("begin jhs_pck_errors.get_db_feedback(?,?,?);end;",
0);
sLog.trace("define parameters");
// 2. Define out parameters
st.registerOutParameter(1,
Types.VARCHAR);
st.registerOutParameter(2,
Types.VARCHAR);
st.registerOutParameter(3,
Types.VARCHAR);
sLog.trace("Execute statement");
// 3. Execute the statement
st.executeUpdate();
sLog.trace("Build return objects");
// 4. Build return objects
ArrayList informationArray = new ArrayList();
ArrayList warningArray = new ArrayList();
ArrayList errorArray = new ArrayList();
sLog.trace("merge into array");
mergeStringIntoArray(informationArray,
st.getString(1));
mergeStringIntoArray(warningArray,
st.getString(2));
mergeStringIntoArray(errorArray,
st.getString(3));
if (errorArray.size() > 0)
//Error occured ==> rollback am.
activateStateForUndo();
am.addErrorArray(errorArray);
am.addWarningArray(warningArray);
am.addInformationArray(informationArray);
catch (SQLException e)
throw new JboException(e);
finally
if (st != null)
try
// 5. Close the statement
st.close();
catch (SQLException e)
private void mergeStringIntoArray(ArrayList al, String string)
sLog.debug(string);
if (string != null)
string = string.replaceAll(" ",
"°");
StringTokenizer st = new StringTokenizer(string,
"°");
int tokenCount = st.countTokens();
sLog.debug("Tokencount messages : " + tokenCount);
for (int i = 0; i < tokenCount; i++)
sLog.debug("Add " + i);
al.add(st.nextToken());
}This works when there are only informationals or warnings.
When errors are raised I recieve the following stacktrace:
<Warning> <oracle.adf.controller.faces.lifecycle.Utils> <BEA-000000> <ADF: Adding the following JSF error message: Internal error:Entity.afterCommit.status_modified
oracle.jbo.JboException: Internal error:Entity.afterCommit.status_modified
at oracle.jbo.server.EntityImpl.afterCommit(EntityImpl.java:7049)
at oracle.jbo.server.DBTransactionImpl.doAfterCommit(DBTransactionImpl.java:2189)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2085)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2273)
at local.achmeavastgoed.model.adfbc.base.RuleFrameTransactionImpl.commit(RuleFrameTransactionImpl.java:188)
Can you give me some advise?
Regards,
RomanoHi Romano,
your application is not aware of the fact that there are errors because all exceptions are gracefully handled.
Because of that the doCommit() in your code example will just commit the changes by calling super.doCommit() even after the activateStateForUndo() did a rollback.
public void doCommit()
closeRuleFrameTransaction();
super.doCommit();
}So you need to change two things:
First rewrite the doCommit()
public void doCommit()
closeRuleFrameTransaction();
try{
super.doCommit();
} catch (JboException e){
// do something here
}And also throw a Jbo exception in the handleSQLError()
public void handleSQLError(SQLException e) throws JboException
if ((e.toString().indexOf("ORA-20998") > 0)
// 20999 is raised when posting of changes fails
// due to database constraint violation or built-in TAPI rule
|| (e.toString().indexOf("ORA-20999") > 0)
setDBFeedbackOnApplicationModule();
throw new JboException(e);
else
....................................Now it should work. Your application will gracefully handle the errors, and once that is done, you just throw an exception in order not to commit.
Regards
Luc Bors -
CEV business rule only uses first set of parameters in multiple inserts
We have a cev rule that logs data for emails when a record is inserted in a table.
Where there are two records inserted from a script, even where a qms_transaction_mgt.open_transaction and close transaction are used around each insert, the CEV record parameters do not change.
By this I mean we have two records:
1 - id: 22
2 - id: 23
We pass the id to the CEV business rule and dbms_output the parameter value - it indicates that for both records the p_id = 22.
The insert into the table indicates that the record ids were 22 and 23.
This appears to have been reported several times but there is no solution.I would set it lower than 20 minutes as that is quite high before it sends the rules into the background, if the spawning at 10 minutes try setting it just lower than 10 as a test.
It may also be worth looking into the apache timeout (if you are using the apache web server plugin) as that could also be playing a part.
Cheers
John
http://john-goodwin.blogspot.com/ -
We have a package in the database in which we use the TAPI INS procedure to insert data into a table.
How should we open an close the transaction so that for every insert record a record in the journal table is created.
We have created journalling business rules. A normal INSERT INTO statement works (because we also use the TAPI triggers). But if we use a cursor loop and within the loop the TAPI INS statement, only 1 record is created in the journal table (the first record that was inserted).
Should we place the openening and closing of the transaction inside or outside of the cursor loop?
The current code is outside the loop, like this:
qms_transaction_mgt.open_transaction
( p_trans_opened_by => 'myprocedure'
for r_import in c_import
loop
l_rec.id := Null;
l_rec.code := r_import.code;
l_rec.description := r_import.description;
l_ind.id := False;
l_ind.code := True;
l_ind.description := True;
cg$my_table.ins(l_rec, l_ind);
end loop;
qms_transaction_mgt.close_transaction
( p_trans_opened_by => 'myprocedure'
commit;
Anyone have a suggestion how solve this?The only way we can circumvent this problem is by not using the TAPI procedure, but use normal DML (INSERT, UPDATE).
-
Unwanted application interaction after deployment
Hi,
At the moment we have three small JHeadstart (10.1.2) applications deployed against a iAS 9.0.4 on a True64 server, let's say appl A, B and C. Appl A has got CDM ruleframe implemented and works fine. B and C do not have CDM ruleframe implemented, no Table API's or any other Designer/Headstart related objects.
After deployment of B and C however, errors occur when DML-ing, related to CDM Ruleframe (??). Redeployment sometimes gets rid of the errors, sometimes not. So does restarting the OC4J container.
The following errors occur:
ORA-6550; line 1, column 7: PLS-00201: identifier 'QMS_TRANSACTION_MGT.OPEN_TRANSACTION' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
Another one:
ORA-06550: line 1, column 13: PLS-00201: identifier 'CG$ERRORS.GETERRORS' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
These errors appear in the HTML page and do not occur when developing with JDeveloper, nor when deployed to the stand-alone OC4J container on the client developer machine.
I'm a little confused here, don't know what or where to look for. It seems that the applications make use of the same object(s) in some way. Could it be that a wrong database connection is applied. If so, that's strange because querying data goes fine. Can anyone give me a hint what to check or where to look for?
Greetings,
ErikHi Steven,
First to answer your question, there is no java error stack, java thinks all's fine.
But we solved the problem, there seemed indeed unwanted interaction between applications deployed on the same OC4J instance, caused by object sharing of some sort.
We solved it by trial and error. As we could reproduce the problem, we just included/excluded a library to the view controller project and then redeployed the application.
The errors were gone after we did the following:
1) In the project properties of the view controller project we included the following libraries:
BC4J Struts Runtime
ADF Web Runtime
Taglibs
2) In the deployment profile properties - File Groups - WEB-INF/lib - Contributors, we checked the following libraries:
ADF Model Runtime
BC4J Oracle Domains
BC4J Runtime
ADF Web Runtime
Hope to contribute a bit,
Greetings Erik
Message was edited by:
vochte -
Transaction failed in Demo application
Hi,
I have a problem getting the demo application working properly. In de debug monitor I get the following messages:
HSD0004F EMP Transaction Failed
Server Error : HSD-00213 Employee 22; An employee with job SALESMAN must have a value for Commission.
11:59:34 - QMS_TRANSACTION_MGT.CLOSE_TRANSACTION by cg$hsd_employees
11:59:34 - HSD21.HSD_EMP_CAPI.need_br_emp005_trs (f)
11:59:34 - HSD21.HSD_EMP_CAPI.need_br_emp004_ent (f)
11:59:34 - QMS_TRANSACTION_MGT.ADD_BUSINESS_RULE BR_EMP003_TPL
11:59:34 - HSD21.HSD_EMP_CAPI.need_br_emp003_tpl (f)
11:59:34 - HSD21.HSD_EMP_CAPI.need_br_emp002_att (f)
11:59:34 - HSD21.HSD_EMP_CAPI.need_br_emp001_att (f)
11:59:34 - QMS_TRANSACTION_MGT.OPEN_TRANSACTION by cg$hsd_employees
It looks like the business Rules are put on the stack but after executing the Business Rules there a problem getting the error-messages on a message-stack (?).
In forms I only get a pop-up error message with 'transaction failed' while I expected to get the Transaction window (QMS$TRANS_ERRORS) with the HSD-00213 error-message.
any suggestions??
EdwardWhat version of the following objects do you have? (I'm assuming you are using Headstart 2.1.2 up through Patch 12.4. If you are using the Headstart 6i beta release, substitute '65' for '50 below.)
qmslib50.pll
qmsevh50.pll
qmsolb50.olb
qms$errors
cg$errors
You are clearing opening and closing the transaction correctly and the error is being recognized.
The display of the transaction errors window should be handled via the on-error trigger in qmsevh50. Each form should have a block and window for the transaction errors window (both modal and modeless). The on-error trigger should be calling qms$forms.push, which in turn reads all messages from the stack in cg$errors and displays them in the transaction error window.
The problem has to be somewhere in this area. Since this works fine for many installations, I can only assume that you have an incompatible version of one of these files somewhere.
Regards,
Lauri -
Upgrading to Headstart Ruleframe
At the moment we have several applications running. Some have been build using
Headstart Desinger/2000, while others have been build using Headstart
Ruleframe.
Of course, because of this we have to maintain both versions of Headstart. We
would like to use only one version of headstart, Headstart Ruleframe.
Is there any information on how to easily migrate the applications using Headstart
Designer/2000 to Headstart Ruleframe?
Is it possible to regenerate an application replacing Headstart Designer templates and libraries with those of Headstart Ruleframe?
Which steps are involved?
Appreciate your help!
nullMatthijs,
Yes, it is possible to migrate the Headstart software to the new versions (i.e. patch 12) without really starting to use CDM RuleFrame.
In each form that will be recompiled after you upgraded Headstart to patch 12, there will be a call to qms_transaction_mgt.open_transaction and close_transaction. So these packages should be installed but because no business rules are put on the rule stack (TAPI does not call CAPI package), the close_transaction will always succeed.
Notice that several utilities will be disabled after installation of CDM RuleFrame (e.g. the utility to workaround the Mutating Table problem, which has become obsolete as soon as you start using CDM RuleFrame).
Kind Regards, Marc -
I'm trying to implement the headstart batchprocessing using cdm ruleframe. I'm running into the following problem:
When one of the dml statements returns a error the whole batch gets rejected.
When reading the headstart user manual they imply that it is possible to skip the rejected record but still accept the rest of the batch. From reading the manual I can not figure out how to implement this.
What code do I put in the exception area to prevent the batch from rejecting the whole batch.
It is my intention to skip only the individual INSERTs that fail.
This is an example of the code I use for testing:
PROCEDURE testen_batch IS
l_message_rectype_tbl hil_message.message_tabtype;
l_message_count number:=0;
l_raise_error boolean:=false;
l_run_number number;
v_foutmelding varchar2(200); -- Oracle errortext
v_foutnummer number(4); -- Oracle errorcode
cursor cur_test is
select * from izi_rollen_test;
begin
qms_transaction_mgt.OPEN_TRANSACTION(p_trans_opened_by => 'Batch izi_xml_xml_orditf_naar_ord');
for rec_test in cur_test loop
begin
insert into izi_rollen (code, omschrijving, startdatum, einddatum) values (rec_test.code, rec_test.omschrijving, rec_test.startdatum, rec_test.einddatum);
end;
end loop;
qms_transaction_mgt.CLOSE_TRANSACTION(p_trans_opened_by => 'Batch izi_xml_xml_orditf_naar_ord');
commit;
exception
when qms$errors.qms$exception then
cg$errors.GET_ERROR_MESSAGES
( l_message_rectype_tbl
, l_message_count
, l_raise_error
if l_message_count > 0
then
for i in 1..l_message_count loop
-- exception handling
end loop;
end if;
qms_transaction_mgt.abort_transaction;
when others then
v_foutnummer := sqlcode;
v_foutmelding := sqlerrm;
-- exception handling
end testen_batch;
Can anyone help me out please!Tried the following, but it doesn't solve the problem.
Can anyone give me any advise in right direction?
PROCEDURE testen_batch2
IS
v_bool boolean:=true;
PROCEDURE testen_batch
IS
l_message_rectype_tbl hil_message.message_tabtype;
l_message_count number:=0;
l_raise_error boolean:=false;
l_run_number number;
v_rolrow_id number;
v_foutmelding varchar2(200); -- de Oracle foutmelding
v_foutnummer number(4); -- de Oracle foutcode
cursor cur_test is
select *
from izi_rollen_test
where gelukt='Y';
begin
qms_transaction_mgt.OPEN_TRANSACTION(p_trans_opened_by => 'Batch izi_xml_xml_orditf_naar_ord');
for rec_test in cur_test loop
begin
v_rolrow_id:=rec_test.rol_id;
insert into izi_rollen (code, omschrijving, startdatum, einddatum)
values (rec_test.code, rec_test.omschrijving, rec_test.startdatum, rec_test.einddatum);
end;
end loop;
qms_transaction_mgt.close_transaction(p_trans_opened_by => 'Batch izi_xml_xml_orditf_naar_ord');
v_bool:=false;
commit;
exception
when qms$errors.qms$exception then
set_gelukt(v_rolrow_id,'N');
cg$errors.GET_ERROR_MESSAGES ( l_message_rectype_tbl , l_message_count , l_raise_error);
if l_message_count > 0
then
for i in 1..l_message_count loop
izi_apl.apl_log_melding ( 'testen_batch',izi_apl.apl_systeemvariabele('E'), 'PROCEDURE AFGEBROKEN: qms$exception, msg_code: '||l_message_rectype_tbl(i).msg_code||', msg_text '||l_message_rectype_tbl(i).msg_text||', table_rowid '||l_message_rectype_tbl(i).table_rowid||', testrol_rol_id: '||v_rolrow_id);
end loop;
end if;
qms_transaction_mgt.abort_transaction;
qms_transaction_mgt.close_transaction(p_trans_opened_by => 'Batch izi_xml_xml_orditf_naar_ord');
when others then
set_gelukt(v_rolrow_id,'N');
v_foutnummer := sqlcode;
v_foutmelding := sqlerrm;
izi_apl.apl_log_melding ( 'testen_batch',izi_apl.apl_systeemvariabele('E'), 'PROCEDURE AFGEBROKEN: when others, Oracle foutcode: '||v_foutnummer||', '||v_foutmelding );
qms_transaction_mgt.abort_transaction;
end testen_batch;
begin
while v_bool loop
testen_batch;
end loop;
end testen_batch2;
PROCEDURE SET_GELUKT
(ID IN number,
WAARDE IN VARCHAR2
IS
v_log_id number(10);
pragma autonomous_transaction;
begin
-- CORRECT THE DATA: Sets a flag to prevent it from running next batch
update izi_rollen_test
set gelukt=WAARDE
where rol_id=id;
commit;
end SET_GELUKT; -
How do I disable a CAPI business rule?
I have a capi business rule that requires that an order have at least one order line. The business rule is on both the order and the order line table.
I have written a procedure which must insert a record into the order table and a record in the order line table but of course the constraints restrict me.
I can disable the insert triggers on the two tables and that will work but I was wondering if there was another way of doing this without interfering with the TAPI.
Does anyone have an example you could send me?
Also, I have noticed the TAPI triggers use an indicator for the table columns which can be set to TRUE or FALSE, where can I find information on the use of the indicator parametre?
I would appreciate any direction and help you may have to offer.
Lise McGillis.I think your problem is that TAPI triggers are opening and closing RuleFrame transaction and the BR fails immediately when you insert the record in master table (orders).
You don't have to disable TAPI triggers nor business rules!
You just have to open the RuleFrame transaction explicitly, make the DML operations (insert, update, delete), and then close the transaction. In that way, the business rules are being checked at the end of the transaction (when you call close_transaction). TAPI triggers will know that the RuleFrame transaction is already opened and they will not try to open or close another one.
Here's the sample code:
begin
qms_transaction_mgt.open_transaction( p_trans_opened_by => 'XYZ' );
insert into orders ...
insert into order_lines ...
qms_transaction_mgt.close_transaction( p_trans_opened_by => 'XYZ');
commit; -- it is important that you close the transaction before commit
end;
Instead of 'XYZ' put a string that will be meaningful for you. It's only important that you put the same string in open_transaction and close_transaction.
For more information about this, you can look at Headstart User's Guide, chapter 12.
I hope that helps!
Dalibor -
Headstart CEV rule doesnt get called
Hi,
I have a problem with my first CEV rule. It doesnt get called
although it does get put on the stack as the following debug log
shows:
17:05:03 - QMS_TRANSACTION_MGT.CLOSE_TRANSACTION by qq
17:05:03 - OHVADM.OHV_VFM_CAPI.need_br_vfm001_cev (f)
17:05:03 - QMS_TRANSACTION_MGT.OPEN_TRANSACTION by qq
Cleared
Do you have any ideas why it doesnt get run?
Thanks, Adrian.Hi Adrian,
as far as I can see the business rule is not put on the stack,
the 'need ' function you see appear in the debugger just
evaluates if the rule needs to be 'performed', this function is
called from the appropriate database trigger that should trigger
the BR. When function this evaluates to true you should also see
a message in the debugger like
'QMS_TRANSACTION_MGT.ADD_BUSINESS_RULE br_vfm001_cev'.
This means the BR is put on stack.
Check the code in the need function to see why it is not put on
the stack.
suggestions:
-check the trigger-when-condition in Designer (table, triggers)
-check the enabled flag in Designer for the table trigger of
this BR
kind regards
Geert -
Ora 02290 when using qms_transaction_mgt and autonomous transactions
Hi all,
I'm using the qms procedures:
qms_transaction_mgt for openeing and closing transactions.
Somewhere in my procedure when the transaction is opened i call another procedure which contains a autonomous transaction.
The next time qms_transaction_mgt.close_transaction is called i get an ORA-02290: check constraint (HST65.QMS_NEED_TO_CLOSE_TRANSACTION) violated
When i debug the qms_transaction_mgt.close transaction the g_current_trans_id variable is empty, which indicates the transaction is allready closed.
When i remove the pragma autonomous_transaction statement and the commit statement from the procedure i call, the problem is resolved.
Version information:
Designer 9.0.2 with a with a Oracle 9i 9.2 database and Headstart 9i.
Does anybody know how i can resolve this or if this is a bug and how to fix it?
Thanks,
YvonIan, Yvon,
It is unfortunately a know restriction that the CDM RuleFrame component of both Headstart for Designer 6i and Headstart for Designer 9i doesn't work in combination with autonomous transactions.
The reason is that the RuleFrame administration relies on information stored in 1. pl/sql package variables and 2. database tables. Using autonomous transactions (that involve CDM RuleFramed DML) causes this information to dissynchronize.
A year ago I investigated the possibilities to make autonomous transactions possible with RuleFrame but unfortunately this is fundamental problem: RuleFrame wants to combine multiple DML-actions into one logical transaction (gards this with the "need_to_close_transaction" constraint), while autonomous transactions intend to to the opposite: commit a part of a transaction while the rest of the transaction still is posted/not committed.
There is one exception: if you call an atonomous procedure that does DML on a non-ruleframe-enabled table (no TAPI triggers that intend to open/close the transaction, no CAPI etc), everything functions.
Problem explanation:
====================
1. Outer transaction is opened (by front end or TAPI triggers of first DML)
2. DML takes place
3. Autonomous transaction-procedure is called
4. Auto-transaction again tries (and succeeds!) to open the transaction, it doesn't see that the transaction is opened (db table qms_transactions is empty for the autonomous transaction on query)
5. DML within auto-transaction is posted
6. Auto-transaction closes transaction
7. Auto-transaction is committed
8. Outer transaction thinks the transaction is already closed, because the auto-transaction cleaned out the package variables when it closed the transaction.
9. Commit of the outer transaction fails as the deferred check constraint need_to_close_transaction avoids this to happen (rollback takes place because of this violation).
Hope this helps
Kind Regards
Marc Vahsen
Headstart Team Oracle NL -
Urgent please -- got error while doing a simple update -- Thanks:)
Hi guys,
I have a procedure that updates a table, when I run the update manually from sqlplus it works and when I run the procedure by it self from sqlplus it also works the problem comes when I call that procedure from another procedure that I have I get the following error:
ERROR at line 1:
ORA-20998: Transaction Failed
ORA-06512: at "HSO.QMS$ERRORS", line 128
ORA-06512: at "HSO.QMS_TRANSACTION_MGT", line 900
ORA-06512: at "IAIGC.CG$AUS_CSH_LEDGER_HEADER", line 115
ORA-04088: error during execution of trigger 'IAIGC.CG$AUS_CSH_LEDGER_HEADER'
ORA-06512: at "IAIGC.CSH_GL_PKG", line 7634
ORA-06512: at "IAIGC.CSH_GL_PKG", line 266
ORA-06512: at line 1
This procedure was working fine until I took an export of my production dB and import it in my test database to test a fix in a diff procedure, here is my code
================================================
BEGIN
-- Get the Last day in the period
v_date := last_day(to_date(p_period,'RRRRMM'));
-- delete the trail revaluation etries from the detail
delete from csh_v_ledger_detail
where leh_period = p_period
and leh_own_id = p_own_id
and leh_jv_type in ('PR','RV');
-- delete the trial revaluation etries from the header
/*delete from csh_v_ledger_HEADER
where period = p_period
and own_id = p_own_id
and jv_type in ('PR','RV');
-- adjust difference between debit and credit in jvs
-- update balances
FOR ret_rec IN c_gen_mon_bal(v_date) LOOP
-- initialize balances for each account
v_bal_base := 0;
v_bal_fc := 0;
v_end_bal_fc := 0;
v_end_bal_base := 0;
v_trn_dr_fc := 0;
v_trn_cr_fc := 0;
v_trn_dr_base := 0;
v_trn_cr_base := 0;
v_ins := 0;
-- Get Beginning Balances for the period from the
-- csh_balances table
BEGIN
select round(amount_base,ret_rec.own_dec)
,round(amount_fc,ret_rec.bal_dec)
into v_bal_base
,v_bal_fc
from csh_balances
where gla_id = ret_rec.gla_id
and period = p_period
and own_id = p_own_id;
v_ins := 0;
EXCEPTION
WHEN NO_DATA_FOUND THEN v_bal_fc := 0;
v_bal_base := 0;
v_ins := 1;
END;
-- Get the sum of all debit and credit transaction
-- from the transactions table for the current month
select sum(round(entered_dr,ret_rec.bal_dec))
,sum(round(entered_cr,ret_rec.bal_dec))
,sum(round(accounted_dr,ret_rec.own_dec))
,sum(round(accounted_cr,ret_Rec.own_dec))
into v_trn_dr_fc
,v_trn_cr_fc
,v_trn_dr_base
,v_trn_cr_base
from csh_v_ledger_detail
where gla_id = ret_rec.gla_id
and to_char(leh_value_date,'RRRRMM') = p_period
and leh_own_id = p_own_id
and leh_closed_flag = 'N';
-- Add Balances for the month to all the transactions
v_end_bal_fc := nvl(v_bal_fc,0) - nvl(v_trn_dr_fc,0) + nvl(v_trn_cr_fc,0);
v_end_bal_base := nvl(v_bal_base,0) - nvl(v_trn_dr_base,0) + nvl(v_trn_cr_base,0);
-- Get the exchange rate for the month
v_rate := csh_acc_pkg.csh_get_rate(p_own_id,ret_rec.cur_id,v_date,'ACC');
if v_ins = 1 then
insert into csh_balances(
OWN_ID
,GLA_ID
,MONTH_END
,AMOUNT_BASE
,AMOUNT_FC
,CONVERSION_RATE
,PERIOD_STATUS
,PERIOD)
values(
p_own_id
,ret_rec.gla_id
,v_date
,v_end_bal_base
,v_end_bal_fc
,v_rate
,'C'
,p_period);
else
update csh_balances
set amount_fc = v_end_bal_fc,
amount_base = v_end_bal_base,
period_status = 'C',
conversion_rate = v_rate
where gla_id = ret_rec.gla_id
and period = p_period
and own_id = p_own_id;
end if;
END LOOP;
/* update csh_v_ledger_header
set closed_flag = 'Y'
where own_id = p_own_id
and period = p_period
and closed_flag = 'N'; */
csh_gl_pkg.csh_upd_leh_close(p_own_id,p_period);
END;
================================================There is a messages.sql script available at the hst\scripts folder of your headstart installation. When you run this script the error stack will be written to the output, this might give you the information why the procedure fails.
-
ORA-20998: Transaction Failed on Headstart Utilities 6.5 installation
Hello,
I am having problem when running insthsu.sql script to install
Headstart utilities 6.5. We are doing client/server approach. The
server is Sun 450 - Oracle 8.1.7.0.0
Designer 6i Release 4 repository was installed on the server.
How far was the installation:
1. Installed HST65 --> No problem found
2. Installed HDEMO65 --> No problem found
3. Failed on the following statement on insthsu.sql script:
... installing Quality Check utilities
execute hsu_qa_app.install;
error message:
hsu65@devl> execute hsu_qa_app.install
BEGIN hsu_qa_app.install; END;
ERROR at line 1:
ORA-20998: Transaction Failed
ORA-06512: at "HST65.QMS$ERRORS", line 128
ORA-06512: at "HST65.QMS_TRANSACTION_MGT", line 814
ORA-06512: at "HSU65.CG$AIS_HSU_UTILITIES", line 39
ORA-04088: error during execution of
trigger 'HSU65.CG$AIS_HSU_UTILITIES'
ORA-06512: at "HSU65.HSU_INSTALL", line 132
ORA-06512: at "HSU65.HSU_QA_APP", line 40
ORA-06512: at line 1
Any idea or direction where should I go from here?
Thanks,
Sanny SubowoAli,
You are running into a bug in the install form. It sees the tables that you imported manually (like the message told you to do), and then complains about them. The best thing to do is change the code in the hsdinst.fmb where the check for existing objects is performed in program units CHECK_USERS:
function hsu_objects_exist
return boolean
is
cursor c_chk
is
select 'x'
from user_objects
where object_name like 'BL_%'
-- or object_name like 'HSU_%'
-- or object_name like 'OMR_%'
So comment out the two lines as indicated above and recreate the fmx.
Kind regards,
Peter
Maybe you are looking for
-
Anyone who would be so kind and guide me trough the setup of dns on my LAN? on my 5.th install now
-
Urgent: Publisher scheduling error while FTP
Hi team, i m trying to ftp a file on one of the windows server via Publisher.But i get this error. oracle.apps.xdo.servlet.scheduler.ProcessingException: java.lang.StringIndexOutOfBoundsException at oracle.apps.xdo.servlet.scheduler.XDOJob.deliv
-
Bug report for erroneous Vimeo password error
If your Vimeo password contains a left parenthesis '(', when you attempt to share to Vimeo from Final Cut Pro X, it will tell you that your Vimeo password is invalid. If you change your password to remove the parenthesis, sharing will then be success
-
Which is better? What are the advantages of black or white? Thanks
-
Problem setting default browser to Firefox
Hey everyone, I'm stumped and could use some help. I have set my default browser to Firefox (Safari - preferences - default browser - Firefox.) Here's the problem: I click on a URL in Mail and get an error message. (Result - clicking the URL won't op