No commit and error triggers
Hi,
In OWB 10.1.0.4.0 , I see a parameter NO COMMIT and ERROR TRIGGERS in mapping configuration properties - code generation options. i was not able to find any details regarding this.
Can anyone tell me the function of these two parameters.?
Error Trigger - Name a procedure to be fired when map fail. You may want to execute some DDL's here.
I don't know the NO COMMIT parameter. Usualy, when you click in the parameter you can see a brief description of that parameter in the lower part of the conf. widow.
Isn't there any for this NO COMMIT?
Regards
Marcos
Similar Messages
-
URGENT! Problems with On-Commit and Key-Commit triggers!!
Hi there,
We are having a problem with our form actually saving a value to the database after the commit_form is given.
When we hit the Save Button (which triggers the Key-Commit, and that in turn triggers the On-Commit trigger) we want a populated global variable to save to the database. Now when we hit Save, we can see the field get populated properly with this Global Variable (Global.Last_Tckt_Read), BUT it doesn't save to the database.
Here is the code from the On-Commit trigger:
IF :cg$bf_meter.closing_ticket_issued = 'N'
THEN
:CG$bf_meter.opening_meter_reading := :GLOBAL.LAST_TCKT_READ;
:CG$bf_meter.opening_meter_reading_date := :GLOBAL.LAST_TCKT_DATE;
:CG$bf_meter.closing_meter_reading_date := :CG$bf_meter.last_ticket_date;
:GLOBAL.PREV_METER_READING := :CG$BF_METER.LAST_TICKET_READING;
:GLOBAL.WINDOW_ACTIVE_CHECK := 'true';
:GLOBAL.FTDAYCHM_SAVED := 'true';
commit_form;
ELSE
:GLOBAL.PREV_METER_READING := :CG$BF_METER.LAST_TICKET_READING;
:GLOBAL.WINDOW_ACTIVE_CHECK := 'true';
:GLOBAL.FTDAYCHM_SAVED := 'true';
commit_form;
END IF;
The code in the Key-Commit trigger is just commit_form;. Now, the code from the On-Commit seems to work fine if its in the Key-Commit trigger -- BUT we need to use the On-Commit in case the user exits the Form with the Exit Button on the toolbar or "X" on the title bar (Neither the Exit Button and the "X" will call the Key-Commit trigger).
Any ideas how we can get this data value to actually SAVE in the database??
Thanks for any help -- please respond, this deadline has already passed!
MikeWell, I can't say I understand what you want, but:
1) if you have only commit_form in key-commit - then you do not need this trigger. key-commit will fire when F10 (commit) is pressed, but since it is doing the same - there is no need.
2) why don't you populate your block values to be saved right in SAVE button trigger and issue commit_form in the same trigger?
Then you can have key-commit to cover the same functionality for F10 with code:
go_item('save');
execute_trigger('when-button-pressed');
3) I cannot get the point of the "close" stuff - on close you want to check for changes or not? and to allow the user to exit with or without saving? -
My doubt is about the execution of triggers
I have a table T1
create table T1
+(ID1 number(9,2) primary key,+
NAME1 VARCHAR2(100)) ;
It has following 2 rows.
insert into t1 values (1,'sandeep')
insert into t1 values (2,'tom')
commit;
I have following 4 triggers
create or replace
TRIGGER TRIGGER1_before_statement
before update on T1
begin
dbms_output.put_line('fired before statement');
END;
create or replace
trigger TRIGGER_BEFORE_EACHROW
before update on T1 for each row
begin
DBMS_OUTPUT.PUT_LINE('fired before each row');
END;
create or replace
TRIGGER TRIGGER_after_eachrow
after update ON T1
FOR EACH ROW
begin
DBMS_OUTPUT.PUT_LINE('fired trigger after eachrow');
END;
create or replace
trigger TRIGGER1_AFTER_STATEMENT
after update on T1
begin
dbms_output.put_line('fired after statement');
END;
i ran the following script
SET SERVEROUTPUT ON;
begin
update T1 set T1.ID1=1 where T1.ID1 = 2;
end;
This update statement will fail because it violates the primary key constraint on the table.
During execution of the update statement, i expect only the before statement and row triggers to fire because after triggers will be fired after execution of the statement and in this case the update execution has failed.
But the output i am getting is
fired before statement
fired before each row
fired trigger after eachrow
which means the after TRIGGER_after_eachrow has also fired but my update statement has failed and TRIGGER_after_eachrow should fire only after updating the rows.
Why this trigger was fired? If oracle processes all the triggers even if the triggerig statement fails, then why TRIGGER1_AFTER_STATEMENT was not fired.
Thanks in advance.Hi Sandeep,
While trying to search for the answer to your after trigger execution related issue, I got below from asktom site where I got a discussion regarding the same topic.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:29259877603106
Below is the exact question post by one member and answer by tom in it.
I thought
Here is some sample which shows that after row statement fires event though the integrity
constraint check should have failed first.
Me and my colleagues are confused with the definition found at
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/triggers.htm#sthref3288
drop table emp;
drop table dept;
-- Create table
create table DEPT
ID NUMBER not null,
name VARCHAR2(100)
alter table DEPT add primary key (ID);
create table EMP
ID NUMBER not null,
NAME VARCHAR2(100),
DEPT_ID NUMBER
alter table EMP
add primary key (ID);
alter table EMP
add constraint EMP_DEPT_FK foreign key (DEPT_ID)
references DEPT (ID);
create or replace trigger EMP_AFT_INS_ROW_TRG after insert on emp for each row
declare
n number;
begin
select 1 into n from dept where dept.id = :new.dept_id;
exception
when no_data_found then
raise_application_error(-20001, 'No such department');
end;
insert into dept(id, name) values (1,'First department');
commit;
insert into emp (id, name, dept_id) values (101, 'First employee', 1);
commit;
rem here I expect a foreign key violation message instead of 'No such department' application error
insert into emp (id, name, dept_id) values (102, 'Second employee', 2);
commit;
Followup September 5, 2006 - 5pm Central time zone:
constraints technically are validated AFTER the statement executes - it is not really defined
whether a trigger will or will not fire (and if you have logic that depends on such intricate
ordering, we have a really big logic problem)
but a for each row trigger - sure, because tables are allowed to violate their constraints during
the DML, think about this:
update emp set empno = empno+1;
every row updated could temporarily violate uniqueness as there could be two empno =2, empno=3 and
so on as this goes through row by row. May be its useful to you..
Regards,
Dipali.. -
Is it possible to trap the user's COMMIT and do something?
I need to do some actions when a user (actually a program that I can't access) performs COMMIT and close the session.
My functionality is activated from triggers. I keep many variable in package. Before a session ends I need to do some final steps using package variables.
I use Pl/SQL in Oracle 7.3
Does somebody know any way to perform that?
Thank you for any suggestion.
nullLayer Bounds, Look at the scripts in my Photo Collage Toolkit Package
Documentation and Examples
Download -
Two phase commit and bean managed transactions
To all the Transaction GURUS!
Hi guys (-and gals).
I've been doing J2EE for quite a while, but today was my first at
XA-Transactions and Bean Managed Transactions.
Why am I doing this?
====================
Well I have to be able to controll the transactionalbehaviour of my
bean
during runtime, since some bean calls would cause a transactional
overflow due to the stress they would cause to the system, whereas
smaller bean calls need to run in one transaction.
-> Therefore I need Bean Managed Transactions
Since the bean does a call on two Database Connections it has to use a
XA-Transaction.
-> Therefore I need XA-Transactions.
Abstract
========
- I just can't get a User TransAction into the right Status it stays
in 'STATUS_NO_TRANSACTION' all the time
- Therefore the SQL Commands can be comitted 'java.sql.SQLException:
Does not support SQL execution with no global transaction'
- Therefore I can't do a rollback 'java.lang.IllegalStateException:
Transaction does not exist'
- Therefore I wrote this mail.
I don't want to be a smart-"ass" writing such a detailed and indepth
mail. I just would like to show that I tried, and would like to have
some replies from you guys.
Below are my configurations, code and logfiles.
Thanx for taking your time and hope that the other people may learn
something as well.
cu
Stefan
Scenario
========
used Software
Bea Weblogic (WL) 6.0 SPx (not real sure which SP i have)
Oracle 8.1.6 using the API-Version 8
I configured the system as follows:
(ofcourse I 'xxx'ed out all of the confidential data, sorry guys;-))
excerpt from:
config.xml
<JDBCConnectionPool CapacityIncrement="5"
DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="2"
LoginDelaySeconds="1" MaxCapacity="5" Name="oraclePool"
Properties="user=xxx;password=xxx;dll=ocijdbc8;protocol=thin"
RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
TestTableName="languages" URL="jdbc:oracle:thin:@xxx:1521:xxx "/>
<!-- Since this is our Main Datasource I would not like to use a XA
Transaction due to performance Issues
and the TxDataSource:
-->
<JDBCTxDataSource EnableTwoPhaseCommit="true"
JNDIName="finstral.datasource.fbs" Name="finstral Content Datasource"
PoolName="oraclePool" Targets="fbsserver"/>
<!-- no comment required -I hope.
Next comes the "special" Pool
-->
<JDBCConnectionPool CapacityIncrement="5"
DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
Properties="user=xxx;password=xxx;server=xxx.xxx.xxx"
RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
TestTableName="Users" SupportsLocalTransaction="true"/>
<!-- Well since there can only be one none XARessourceManager involved
in a 2PC
(keyword: Two Phase Commit) I will have to use a XACapable Driver for
the other
Datasource. Due to all the bugs in the oracle.xxx driver. I'll be
using the jdriver for oci.
I activated 'SupportsLocalTransaction' hoping it would solve my
problem - without effect. I just left in there now, since it made
sense me. Not?
Again the TxDataSource:
-->
<JDBCTxDataSource EnableTwoPhaseCommit="true"
JNDIName="finstral.datasource.fbssecurity" Name="finstral Security
Datasource" PoolName="oracleSecurityPool" Targets="fbsserver"/>
<!-- The System starts right up and can locate the test tables and
everything. So I think all of this stuff is working here -->
ejb-jar.xml
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>TPCTestBean</ejb-name>
<home>de.sitewaerts.futuna.common.test.tpcbean.TPCHome</home>
<remote>de.sitewaerts.futuna.common.test.tpcbean.TPC</remote>
<ejb-class>de.sitewaerts.futuna.common.test.tpcbean.TPCBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor/>
</ejb-jar>
<!-- Originally I had the assembly-descriptor full of transaction
requirements. I thought since
the bean is handling all of the transaction stuff itself, it might get
confused by the 'container-transaction'
properties, and deleted them. Do I need them anyway?-->
weblogic-ejb-jar.xml
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>TPCTestBean</ejb-name>
<stateless-session-descriptor/>
<jndi-name>finstral/ejb/test_tpc</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
<!-- Nothing I have to explain here -->
BeanCode (from the implementingBeanClass:
'de.sitewaerts.futuna.common.test.tpcbean.TPCBean')
public void setupTables() throws RemoteException
UserTransaction tx = getTransaction();
//getTransaction calls: 'tx = sCtx.getUserTransaction()' and does
some errorhandling
log.info("Die Transaktion vor den Connections: "+tx.toString());
//Sorry bout the German. You should get the Message though.
log.info("Der Transaktionsstatus vor den Connections:
"+transactionStatus(tx));
Connection conSecurity = getConnection(DATASOURCE_SECURITY, tx);
//gets a Connection via a DataSourceName from the JNDI tree
Connection conContent = getConnection(DATASOURCE_CONTENT, tx);
log.info("Die frische Connection conSecurity: "+conSecurity);
log.info("Die frische Connection conContent: "+conContent);
tearDownTable(conSecurity);
//Does nothing special
tearDownTable(conContent);
log.info("Die Transaktion nach dem Teardown: "+tx.toString());
log.info("Der Transaktionsstatus nach dem Teardown:
"+transactionStatus(tx));
Statement stmt = null;
try
stmt = conSecurity.createStatement();
//Well its getting interesting now.....
log.info("Die Transaktion vor dem createtable: "+tx.toString());
log.info("Der Transaktionsstatus vor dem createtable:
"+transactionStatus(tx));
log.info("Die Connection conSecurity vor dem createtable:
"+conSecurity);
log.info("Die Connection conContent vor dem createtable:
"+conContent);
stmt.executeUpdate(CREATE_TABLE);
//above is the row 91 -> throws: 'java.sql.SQLException: Does
not support SQL execution with no global transaction'
stmt.close();
stmt = conContent.createStatement();
stmt.executeUpdate(CREATE_TABLE);
stmt.close();
commitTransaction(tx);
catch (SQLException sqle)
log.error("Konnte kein table init machen", sqle);
rollbackTransaction(tx);
//The Code for this method is below
throw new EJBException(sqle);
finally
closeConnection(conSecurity);
closeConnection(conContent);
protected void rollbackTransaction(UserTransaction tx)
log.info("Der Transaktionsstatus vor dem Rollback:
"+transactionStatus(tx));
log.info("Die Transaktion vor dem Rollback: "+tx.toString());
try
tx.rollback();
//above is row 200 -> throws: 'java.lang.IllegalStateException:
Transaction does not exist'
log.info("Der Transaktionsstatus nach dem Rollback:
"+transactionStatus(tx));
log.info("Die Transaktion nach dem Rollback: "+tx.toString());
catch (Exception e)
log.error("Konnte die Transaktion nicht backrollen.", e);
throw new EJBException(e);
Log Excerpt
===========
INFO setupTables() (66) - Die Transaktion vor den Connections:
[email protected]
INFO setupTables() (67) - Der Transaktionsstatus vor den Connections:
STATUS_NO_TRANSACTION
INFO setupTables() (72) - Die frische Connection conSecurity:
weblogic.jdbc.rmi.SerialConnection@7c6daa
INFO setupTables() (73) - Die frische Connection conContent:
weblogic.jdbc.rmi.SerialConnection@3b425
INFO setupTables() (78) - Die Transaktion nach dem Teardown:
[email protected]
INFO setupTables() (79) - Der Transaktionsstatus nach dem Teardown:
STATUS_NO_TRANSACTION
INFO setupTables() (86) - Die Transaktion vor dem createtable:
[email protected]
INFO setupTables() (87) - Der Transaktionsstatus vor dem createtable:
STATUS_NO_TRANSACTION
INFO setupTables() (88) - Die Connection conSecurity vor dem
createtable: weblogic.jdbc.rmi.SerialConnection@7c6daa
INFO setupTables() (89) - Die Connection conContent vor dem
createtable: weblogic.jdbc.rmi.SerialConnection@3b425
ERROR setupTables() (101) - Konnte kein table init machen
java.sql.SQLException: Does not support SQL execution with no global
transaction
at
weblogic.jdbc.oci.xa.XAConnection.beforeExecute(XAConnection.java:137)
at
weblogic.jdbc.oci.xa.Statement.executeUpdate(Statement.java:112)
at weblogic.jdbc.jta.Statement.executeUpdate(Statement.java:185)
at
weblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.jav
a:42)
at
weblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:54)
at
de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.jav
a:91)
at
de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBean
Impl.java:130)
at
de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCBe
anEOImpl.java:64)
at
de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseCo
mmitUnitTest.java:51)
at
org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTes
tCase.java:297)
at
org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servle
tTestCaller.java:148)
at
org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCal
ler.java:199)
at
org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTes
tRedirector.java:149)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:213)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
INFO rollbackTransaction() (196) - Der Transaktionsstatus vor dem
Rollback: STATUS_NO_TRANSACTION
INFO rollbackTransaction() (197) - Die Transaktion vor dem Rollback:
[email protected]
ERROR rollbackTransaction() (206) - Konnte die Transaktion nicht
backrollen.
java.lang.IllegalStateException: Transaction does not exist
at
weblogic.transaction.internal.TransactionManagerImpl.rollback(Transactio
nManagerImpl.java:228)
at
weblogic.transaction.internal.TransactionManagerImpl.rollback(Transactio
nManagerImpl.java:222)
at
de.sitewaerts.futuna.common.test.tpcbean.TPCBean.rollbackTransaction(TPC
Bean.java:200)
at
de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.jav
a:102)
at
de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBean
Impl.java:130)
at
de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCBe
anEOImpl.java:64)
at
de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseCo
mmitUnitTest.java:51)
at
org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTes
tCase.java:297)
at
org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servle
tTestCaller.java:148)
at
org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCal
ler.java:199)
at
org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTes
tRedirector.java:149)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:213)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
CONCLUSION
==========
I'm going nuts.
I just don't get it.
The transaction is the same. I don't change the Connection. I start
the Transaction at the beginning before I do anything!
Please guys help me out.
Thx alot.
Stefan "it's three o'clock in the morning, my girlfriend left me, and
my only friend is that stupid linux pinguine" Siprell
Software-Development
<<<<<<<<<<<<<<<<<<<<<<<<<<<
<sitewaerts> GmbH
Hebelstraße 15
D-76131 Karlsruhe
Tel: +49 (721) 920 918 22
Fax: +49 (721) 920 918 29
http://www.sitewaerts.de
>>>>>>>>>>>>>>>>>>>>>>>>>>>
Hi Priscilla
(did you ever see the movie ? :-))
Well I moved away from the idea of using bean managed transaction. I'll
be using Container Managed Transactions. To modify the
transactionalbehaviour I'll write proxymethods which have certain
different containermanaged transaction properties, but which all call
the same private methods.
But it works! Here is my experience:
- I was doing a DDL statement: I was trying to create new Tables, which
is a definite "no-go"
- pay careful attention to:
http://edocs.bea.com/wls/docs60/jta/trxejb.html#1051405
and
http://edocs.bea.com/wls/docs60/jta/trxejb.html#1051741
and use these Settings for the Pool, don't ask me why, but it took me
hours to find it out by myself:
<JDBCConnectionPool CapacityIncrement="5"
DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
Properties="user=xxx; password=xxx; server=xxx.xxx.xxx"
RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
TestTableName="Users" SupportsLocalTransaction="true"/>
where as the server (shown as: xxx.xxx.xxx) is the TNS Name of the
Oracle Driver.
It works great.
Another thing you guys might want to do is write a simple StatelessSB
which does JDBC calls and two different database Connections.
Then write a UnitTest which calls this bean a couple hundred times (with
the same transaction). Have one test do clean writes, and another which
causes some SQL-Exception (too long Data Columns, or likewise).
Always count the entries and see if everything worked out. We're using
this SetupConstruction to test new combinations of AS(sorry Priscilla) /
Database / Db-Drivers to have a "standard test".
I know my two cents were uncalled for, but it might save you some
time.....
thanx for your help
Stefan
-----Ursprüngliche Nachricht-----
Von: Priscilla Fung [mailto:[email protected]]
Bereitgestellt: Donnerstag, 2. August 2001 21:42
Bereitgestellt in: transaction
Unterhaltung: Two phase commit and bean managed transactions
Betreff: Re: Two phase commit and bean managed transactions
Hi Stefan,
Looks like you have not actually begun a transaction by calling
UserTransaction.begin(),
so your setupTables method is really executing with no transaction
context.
Priscilla
Stefan Siprell <[email protected]> wrote:
>To all the Transaction GURUS!
>
>Hi guys (-and gals).
>I've been doing J2EE for quite a while, but today was my first at
>XA-Transactions and Bean Managed Transactions.
>
>Why am I doing this?
>====================
>Well I have to be able to controll the transactionalbehaviour of my
>bean
>during runtime, since some bean calls would cause a transactional
>overflow due to the stress they would cause to the system, whereas
>smaller bean calls need to run in one transaction.
>-> Therefore I need Bean Managed Transactions
>Since the bean does a call on two Database Connections it has to use
>a
>XA-Transaction.
>-> Therefore I need XA-Transactions.
>
>Abstract
>========
>- I just can't get a User TransAction into the right Status it stays
>in 'STATUS_NO_TRANSACTION' all the time
>- Therefore the SQL Commands can be comitted 'java.sql.SQLException:
>Does not support SQL execution with no global transaction'
>- Therefore I can't do a rollback 'java.lang.IllegalStateException:
>Transaction does not exist'
>- Therefore I wrote this mail.
>
>I don't want to be a smart-"ass" writing such a detailed and indepth
>mail. I just would like to show that I tried, and would like to have
>some replies from you guys.
>
>Below are my configurations, code and logfiles.
>
>Thanx for taking your time and hope that the other people may learn
>something as well.
>
>cu
>
>Stefan
>
>
>Scenario
>========
>
>used Software
>-------------
>Bea Weblogic (WL) 6.0 SPx (not real sure which SP i have)
>Oracle 8.1.6 using the API-Version 8
>
>
>I configured the system as follows:
>(ofcourse I 'xxx'ed out all of the confidential data, sorry guys;-))
>excerpt from:
>
>config.xml
>----------
><JDBCConnectionPool CapacityIncrement="5"
>DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="2"
>LoginDelaySeconds="1" MaxCapacity="5" Name="oraclePool"
>Properties="user=xxx;password=xxx;dll=ocijdbc8;protocol=thin"
>RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
>TestTableName="languages" URL="jdbc:oracle:thin:@xxx:1521:xxx "/>
>
><!-- Since this is our Main Datasource I would not like to use a XA
>Transaction due to performance Issues
>and the TxDataSource:
>-->
>
><JDBCTxDataSource EnableTwoPhaseCommit="true"
>JNDIName="finstral.datasource.fbs" Name="finstral Content Datasource"
>PoolName="oraclePool" Targets="fbsserver"/>
>
><!-- no comment required -I hope.
>Next comes the "special" Pool
>-->
>
><JDBCConnectionPool CapacityIncrement="5"
>DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="1"
>LoginDelaySeconds="1" MaxCapacity="2" Name="oracleSecurityPool"
>Properties="user=xxx;password=xxx;server=xxx.xxx.xxx"
>RefreshMinutes="5" Targets="fbsserver" TestConnectionsOnRelease="true"
>TestTableName="Users" SupportsLocalTransaction="true"/>
>
><!-- Well since there can only be one none XARessourceManager involved
>in a 2PC
>(keyword: Two Phase Commit) I will have to use a XACapable Driver for
>the other
>Datasource. Due to all the bugs in the oracle.xxx driver. I'll be
>using the jdriver for oci.
>I activated 'SupportsLocalTransaction' hoping it would solve my
>problem - without effect. I just left in there now, since it made
>sense me. Not?
>Again the TxDataSource:
>-->
>
><JDBCTxDataSource EnableTwoPhaseCommit="true"
>JNDIName="finstral.datasource.fbssecurity" Name="finstral Security
>Datasource" PoolName="oracleSecurityPool" Targets="fbsserver"/>
>
><!-- The System starts right up and can locate the test tables and
>everything. So I think all of this stuff is working here -->
>
>
>
>ejb-jar.xml
>-----------
><ejb-jar>
> <enterprise-beans>
> <session>
> <ejb-name>TPCTestBean</ejb-name>
>
><home>de.sitewaerts.futuna.common.test.tpcbean.TPCHome</home>
>
><remote>de.sitewaerts.futuna.common.test.tpcbean.TPC</remote>
>
><ejb-class>de.sitewaerts.futuna.common.test.tpcbean.TPCBean</ejb-class>
> <session-type>Stateless</session-type>
> <transaction-type>Bean</transaction-type>
> </session>
> </enterprise-beans>
> <assembly-descriptor/>
></ejb-jar>
>
><!-- Originally I had the assembly-descriptor full of transaction
>requirements. I thought since
>the bean is handling all of the transaction stuff itself, it might get
>confused by the 'container-transaction'
>properties, and deleted them. Do I need them anyway?-->
>
>weblogic-ejb-jar.xml
>--------------------
><weblogic-ejb-jar>
> <weblogic-enterprise-bean>
> <ejb-name>TPCTestBean</ejb-name>
> <stateless-session-descriptor/>
> <jndi-name>finstral/ejb/test_tpc</jndi-name>
> </weblogic-enterprise-bean>
></weblogic-ejb-jar>
>
><!-- Nothing I have to explain here -->
>
>BeanCode (from the implementingBeanClass:
>'de.sitewaerts.futuna.common.test.tpcbean.TPCBean')
>-----------------------------------------------------------------------
>---------------------
>
> public void setupTables() throws RemoteException
> {
> UserTransaction tx = getTransaction();
> //getTransaction calls: 'tx = sCtx.getUserTransaction()' and does
>some errorhandling
>
> log.info("Die Transaktion vor den Connections: "+tx.toString());
> //Sorry bout the German. You should get the Message though.
> log.info("Der Transaktionsstatus vor den Connections:
>"+transactionStatus(tx));
>
> Connection conSecurity = getConnection(DATASOURCE_SECURITY, tx);
> //gets a Connection via a DataSourceName from the JNDI tree
> Connection conContent = getConnection(DATASOURCE_CONTENT, tx);
>
> log.info("Die frische Connection conSecurity: "+conSecurity);
> log.info("Die frische Connection conContent: "+conContent);
>
> tearDownTable(conSecurity);
> //Does nothing special
> tearDownTable(conContent);
>
> log.info("Die Transaktion nach dem Teardown: "+tx.toString());
> log.info("Der Transaktionsstatus nach dem Teardown:
>"+transactionStatus(tx));
>
> Statement stmt = null;
> try
> {
> stmt = conSecurity.createStatement();
> //Well its getting interesting now.....
>
> log.info("Die Transaktion vor dem createtable: "+tx.toString());
> log.info("Der Transaktionsstatus vor dem createtable:
>"+transactionStatus(tx));
> log.info("Die Connection conSecurity vor dem createtable:
>"+conSecurity);
> log.info("Die Connection conContent vor dem createtable:
>"+conContent);
>
> stmt.executeUpdate(CREATE_TABLE);
> //above is the row 91 -> throws: 'java.sql.SQLException: Does
>not support SQL execution with no global transaction'
>
> stmt.close();
>
> stmt = conContent.createStatement();
> stmt.executeUpdate(CREATE_TABLE);
> stmt.close();
> commitTransaction(tx);
> }
> catch (SQLException sqle)
> {
> log.error("Konnte kein table init machen", sqle);
> rollbackTransaction(tx);
> //The Code for this method is below
> throw new EJBException(sqle);
> }
> finally
> {
> closeConnection(conSecurity);
> closeConnection(conContent);
> }
> }
>
> protected void rollbackTransaction(UserTransaction tx)
> {
> log.info("Der Transaktionsstatus vor dem Rollback:
>"+transactionStatus(tx));
> log.info("Die Transaktion vor dem Rollback: "+tx.toString());
> try
> {
> tx.rollback();
> //above is row 200 -> throws: 'java.lang.IllegalStateException:
>Transaction does not exist'
> log.info("Der Transaktionsstatus nach dem Rollback:
>"+transactionStatus(tx));
> log.info("Die Transaktion nach dem Rollback: "+tx.toString());
> }
> catch (Exception e)
> {
> log.error("Konnte die Transaktion nicht backrollen.", e);
> throw new EJBException(e);
> }
> }
>
>Log Excerpt
>===========
>INFO setupTables() (66) - Die Transaktion vor den Connections:
>[email protected]
>INFO setupTables() (67) - Der Transaktionsstatus vor den Connections:
>STATUS_NO_TRANSACTION
>INFO setupTables() (72) - Die frische Connection conSecurity:
>weblogic.jdbc.rmi.SerialConnection@7c6daa
>INFO setupTables() (73) - Die frische Connection conContent:
>weblogic.jdbc.rmi.SerialConnection@3b425
>INFO setupTables() (78) - Die Transaktion nach dem Teardown:
>[email protected]
>INFO setupTables() (79) - Der Transaktionsstatus nach dem Teardown:
>STATUS_NO_TRANSACTION
>INFO setupTables() (86) - Die Transaktion vor dem createtable:
>[email protected]
>INFO setupTables() (87) - Der Transaktionsstatus vor dem createtable:
>STATUS_NO_TRANSACTION
>INFO setupTables() (88) - Die Connection conSecurity vor dem
>createtable: weblogic.jdbc.rmi.SerialConnection@7c6daa
>INFO setupTables() (89) - Die Connection conContent vor dem
>createtable: weblogic.jdbc.rmi.SerialConnection@3b425
>ERROR setupTables() (101) - Konnte kein table init machen
>java.sql.SQLException: Does not support SQL execution with no global
>transaction
> at
>weblogic.jdbc.oci.xa.XAConnection.beforeExecute(XAConnection.java:137)
> at
>weblogic.jdbc.oci.xa.Statement.executeUpdate(Statement.java:112)
> at weblogic.jdbc.jta.Statement.executeUpdate(Statement.java:185)
> at
>weblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.ja
v
>a:42)
> at
>weblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:54
> at
>de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.ja
v
>a:91)
> at
>de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBea
n
>Impl.java:130)
> at
>de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCB
e
>anEOImpl.java:64)
> at
>de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseC
o
>mmitUnitTest.java:51)
> at
>org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTe
s
>tCase.java:297)
> at
>org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servl
e
>tTestCaller.java:148)
> at
>org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCa
l
>ler.java:199)
> at
>org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTe
s
>tRedirector.java:149)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl
>java:213)
> at
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServ
l
>etContext.java:1265)
> at
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl
>java:1631)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>INFO rollbackTransaction() (196) - Der Transaktionsstatus vor dem
>Rollback: STATUS_NO_TRANSACTION
>INFO rollbackTransaction() (197) - Die Transaktion vor dem Rollback:
>[email protected]
>ERROR rollbackTransaction() (206) - Konnte die Transaktion nicht
>backrollen.
>java.lang.IllegalStateException: Transaction does not exist
> at
>weblogic.transaction.internal.TransactionManagerImpl.rollback(Transacti
o
>nManagerImpl.java:228)
> at
>weblogic.transaction.internal.TransactionManagerImpl.rollback(Transacti
o
>nManagerImpl.java:222)
> at
>de.sitewaerts.futuna.common.test.tpcbean.TPCBean.rollbackTransaction(TP
C
>Bean.java:200)
> at
>de.sitewaerts.futuna.common.test.tpcbean.TPCBean.setupTables(TPCBean.ja
v
>a:102)
> at
>de.sitewaerts.futuna.common.test.tpcbean.TPCBeanImpl.setupTables(TPCBea
n
>Impl.java:130)
> at
>de.sitewaerts.futuna.common.test.tpcbean.TPCBeanEOImpl.setupTables(TPCB
e
>anEOImpl.java:64)
> at
>de.sitewaerts.futuna.common.test.TwoPhaseCommitUnitTest.setUp(TwoPhaseC
o
>mmitUnitTest.java:51)
> at
>org.apache.commons.cactus.AbstractTestCase.runBareServerTest(AbstractTe
s
>tCase.java:297)
> at
>org.apache.commons.cactus.server.ServletTestCaller.callTestMethod(Servl
e
>tTestCaller.java:148)
> at
>org.apache.commons.cactus.server.ServletTestCaller.doTest(ServletTestCa
l
>ler.java:199)
> at
>org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTe
s
>tRedirector.java:149)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl
>java:213)
> at
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServ
l
>etContext.java:1265)
> at
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl
>java:1631)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>CONCLUSION
>==========
>I'm going nuts.
>I just don't get it.
>The transaction is the same. I don't change the Connection. I start
>the Transaction at the beginning before I do anything!
>Please guys help me out.
>Thx alot.
>
>Stefan "it's three o'clock in the morning, my girlfriend left me, and
>my only friend is that stupid linux pinguine" Siprell
>Software-Development
><<<<<<<<<<<<<<<<<<<<<<<<<<<
><sitewaerts> GmbH
>Hebelstraße 15
>D-76131 Karlsruhe
>
>Tel: +49 (721) 920 918 22
>Fax: +49 (721) 920 918 29
>http://www.sitewaerts.de
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>
>
-
FTP - Receiver Comm channel error
Scenario: Send a file to a 3rd party via FTP adapter
Error: MONI is OK but comm channel monitor is in error state and error is displayed as:
An error occurred while connecting to the FTP server 'xxx.xx.xx.xxx:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Permission denied on server. You are restricted to your account.'. For details, contact your FTP server vendor.
Things checked:
1> Our Firewall is configured to send the file from our system to 3rd party.
2> I could logon to 3rd party FTP server from web browser.
FYI, 3rd party FTP server is hosted on Yahoo.
Any ideas, why I am not able to FTP the file to 3rd party system?
Thanks
BhavenBhaven Shah wrote:>
> 2> I could logon to 3rd party FTP server from web browser.
It does not mean that XI will be able to access the FTP server.
You have to grant access for Adapter Engine user which is used for FTP communication.
Regards,
Jakub -
I am trying to re-install Photoshop CS6. The files have downloaded but I get and error message that the Adobe Support Advisor is required to determine what the installation probIem is. I click on the link that says "get the Support Advisor here only to be told the Support Advisor no longer exists!! A blind loop. I need to have Photoshop CS6 installed...what do I do from here??
The CC Cleaner Tool assumes the Akamai Download Manager is activated and it has not. It seems to be the missing file that triggers the error message. \in a previous re-install I was prompted to download & install the Akamai Download Manger, but not this time. Is there somewhere on the Adobe website that I can download it??
-
Transaction and Error handling in Mediator 11g
Hi Experts/Gurus/All,
We have following scenario in Mediators :-
For Inbound Interfaces :-
M1-->M2-->M3
M1 calls M2 and M2 calls M3
There are 3 mediators, Mediator#1(M1),Mediator#2(M2) and Mediator#3(M3)
M1 performs a FIle Read and do a ABO-->OAGIS conversion
M2 performs routing
M3 performs a OAGIS -->ABO(JDE E1) conversion.
Now,we are in middle to decide the Fault Handling Mechanism for this case.
M1 is Asynchronous , M2 is Synchronous and M3 is also Synchronous.
Question is :
1. M1 will start a new Transaction,Do M1 will propogate the same transaction to M2 which,as being Synch,propogates the same transaction to M3 ?
2. How will the commit and Roll back will be taken care of?
3. What if M1 errors out?
4. Whatif M2 errors out?
5. What if M3 errors out?
In question 3,4 and 5:
What will happen will the Full Transaction ? If M3 erros out,would the Entire Transaction Propogated by M1 will be roll back?
Also ,How about Error handling in this case:
Do I need to create seperate fault-policy.xml and fault-binding.xml for M1,M2 and M3 ?
Another Scenario is of OUTBOUND interfaces :-
M1-->M2-->M3
M1 calls M2 and M2 calls M3
However , M1,M2 and M3 are all Asynchronous.
In this scenarios how would I handle following :-
1. If M2 Errors out,I need the entire Interface which comprises of M1-->M2-->M3 to roll back?
2. If M3 Errors out,I need the entire Interface which comprises of M1-->M2-->M3 to roll back?
3. Seperate Transactions means I have to create seperate fault-policy.xml and fault-mapping.xml to handle errors?Hi,
You could create a package, and use the OdiSqlUnload to export the data into a flat file (csv) from snp_check_tab, then amend it. Then create an interface to load the data from the flat file to your tables, either via external tables or SQL Loader.
Question is, why are you amending data going from source to target? there surely has to be something wrong with the Architecture (especially if you are getting errors in production). If you amend data, so that it is different in source as it is in target, then when it comes to regression testing, this will never match.
The errors should go be fixed at source, and either you, or the business should have access to do so.
Cheers
Bos -
IDOC : error message 20 : Error triggering EDI subsystem
Hi,
I am creating an extended idoc for WP_PLU message type . I am sending the data from my LS to KU(Customer).
In WE20, I have configured the message type for that KU. I am using an XML port .
The problem is that the Idoc file is getting created properly but it is thowing this message : Error 20 : Error triggering EDI Subsystem.
In WE21 , I have ticked the Start subsytem radiobutton. I am not using any Middleware.It is simple data transfer .
Same thing is working file when I am assigning a File port instead of XML port.
Please help me on this urgently.Dear All,
Many thanks for all suggestions. Very appreciated it guys.
My problem solved, the issue was actually from the Functional configuration.
After debugging i found out that there's a option to generate a trigger file (related to POS Outbound). If you tick this option then maybe you have to maintain the download path somewhere.
My case is the option was ticked but system can't find the path.
SAP put as error message 20 in the IDOC status.
This maybe can explain also why i still can see my IDOC reached XI and file generated. Since the issue is not really related to any setting in IDOC but more to business configuration.
Best Regards,
Victor. -
Error in idoc with status 20 "Error triggering EDI Subsystem"
Dear All,
I have query related to IDOC Status 20.
I am tirggering IDOC with standard t-code from IS-Retail system. I have created two ports a) TRFC port and b)File port .
<b>We are having sending and receiveing application on two different OS i.e one XI on Windows and IS Retail on AIX(Unix). I am not able to send idoc to another system. I am getting these IDOC status in WE05 (STATUS 01 , 30 , 03 , 20 )</b>
Keeping the above fatcs in mind could you please tell me how to remove the <b>error with status 20 "Error triggering EDI Subsystem".</b>Hi prabhat,
You should have checked the automatic triggering possible at the file port level and the partner profile setting could be 'start subsytem'.
Go to WE21 and do the access test for the file port.
Once you done and find no issues then go to SM59 and test the connection for the RFC destination assigned to the ports.Possibly it has to do with the RFC destination.
Other reasons could be yours is a test client and got refreshed recently.so the production client settings might be causing this error.Check with your basis to get it working.
other reason could be the logical system assigned to the client should be having production client's name.
Check these.
I am sure you should be able to solve this issue.
Thank you.
regards,
karun.M -
Commit and rollback on session level
Hi All,
I am calling one stored procedure and I am doing some dml operation in that sp. there after I calling another sp which contain some ddl operations. if process may be fail in somewhere I wanted to rollback all dml transactions.
So I wanted to commit and rollback on session level. Is such kind of concept available in oracle.
Prashant.Prashant,
Not sure what you are talking about.
Commit and rollback is always on session level!!!!
Also all DDL statements are automatically committed, and rollback in case of errors is always statement level rollback.
So let's assume
begin
insert into foo...;
update foo...;
execute immediate 'alter table foo add (last_update date)';
end;
exit
and the alter table fails:
1 alter table is rolled back
2 insert and updates are not rolled back.
If the alter table succeeds
all statements are committed and you can't roll them back anymore.
This is why issuing DDL in stored procedures has unwanted side effects and should be conisdered pure evil.
Sybrand Bakker
Senior Oracle DBA
Experts: those who did read the documentation. -
Is this a bug? create view lost a comma and succeeded
Is this a bug? create view lost a comma and succeeded.
oracle 10.2.0.1.0
try the following sql.
create table test
id int,
dataa varchar2(20),
datab varchar2(20)
insert into test values(1,'a1','a2');
insert into test values(2,'b1','b2');
insert into test values(3,'c1','c2');
create view vtest
as
select id,dataa
datab
from test;
--it should be error but successed
select * from vtest;
--and dataa gone!
drop view vtest;
drop table test purge;No it's not a bug, Oracle will treat "datab" as alias to "dataa" if comma left out.
Doesn't your view has two columns id and datab, but datab column showing dataa data? -
Error triggering EDI subsystem
Hi ,
I am getting error - Error triggering EDI subsystem- while posting Idocs in R/3 to XI.
<b><u>But messages are reaching XI and final XML files also getting generated in outbound location, no issues</u></b>.
I AM USING PARTNER PROFILE OF TYPE - KU(CUSTOMER)
Following are the status messages i could see in R/3 (tran code-WE05):
20 Error triggering EDI subsystem
03 Data passed to port OK
IDoc sent to SAP system or external program
30 IDoc ready for dispatch (ALE service)
Receiver exists , No filters , No conversion , Version conversion
01 IDoc generated
Please suggest me how to get rid of this error.Hi Rajesh,
Check the ports (we21), RFC destinations, Partner profiles are defined correctly or not.
Regards
Kannaiah -
Error triggering EDI subsystem : Error#20
Getting error 20: Error triggering EDI subsystem while triggering IDOC for XI. <u><i><b>But, messages are getting posted into XI and final XML files also getting generated in outbound location.</b></i></u>
I am using partner profile of type customer in R/3.
Following are the status messages I could see in WE05.
20 Error triggering EDI subsystem
03 Data passed to port OK
IDoc sent to SAP system or external program
30 IDoc ready for dispatch (ALE service)
Receiver exists , No filters , No conversion , Version conversion
01 IDoc generatedRajesh,
While creating the Partner Profile, have you added something in the EDI Standard tab?
By default if the requirement is only to post an idoc to Xi, you need not add anything to the EDI standard tab for your outbound Idoc entry in We20.
Regards
Bhavesh -
ERROR TRIGGERING DEFAULT METHOD FOR OBJECT (INCOMING INVOICE).
When trying to open invoices in my ERP inbox to authorise I get the following message.
ERROR TRIGGERING DEFAULT METHOD FOR OBJECT (INCOMING INVOICE).
. There might be an authorisation issue. but i am not confirm.
I have checked the authorisation in SU53 also.
is it possible that there is some other reason for it.
If so then what are they?
please help.Hi Naval,
Is it a custom business object....make sure that the status of all object components are set to Implemented or released..and regenerate the Object...
Thanks
Srinivas
Maybe you are looking for
-
Hi there, Hope someone can help me. I recently upgraded to LV 8.5 and am having a problem building a .exe which has a subvi in it that opens in a new dialog window. When I try to build this I get the following error: Error 8 occurred at Invoke Node
-
Hi All I have done a simple file_2_file and SOAP_RFC scenario. Both of them are perfectly working fine. Now I did a simple file_2_file scenario using BPM and this doesn't work. When I go the transaction SXI_CACHE, it shows as "Cache contents are o
-
Arabic characters.URGENT
hi all i am trying to read arabic characters from an html page, store into mysql database then retrieve them. my broblem is that i retrieve them as english characters although i have set my encoding scheme to Cp1256 (arabic windows).Please help me. h
-
Reverse geocoding suggestions data invisible for filename templates and plugins
Hi, Reverse geocoding are amazing, saves me a lot of work, but filename template I use seems don't work well with that feature. With file naming scheme like this: "Country-City-Sequence # (001)" the result is "--001.jpg" instead of "France-Paris-001.
-
Example VI attached. I aquire an image from a fingerprint reader, extract the template (digital way of uniquely identifying people), and save the template to disk. Later, I acquire a new image, extract the template, and use the appropriate ActiveX m