Cannot change transaction isolation during distributed transaction
Hi All,
When ever the IPortalComponent session expires my application is throwing Null pointer exception. So I am catching the NullPointer exception and then reloading the page again. It is working in frontend without any issues.
But in the error log monitor(nwa) I can see the below error when reloading the page after component session expires.
Cannot change transaction isolation during distributed transaction and when the connection is shared. DataSource name: "PRODB2
As per my knowledge I understood that this is happening beacuse application is trying to recreate a new connection pool while one pool instance is alive.
If this is correct can any one tell me how to destory the pool of current session when reloading the page.
Thanks in Advance,
Chinna.
What was the solution to the problem ?
Similar Messages
-
Need help on ORA-02074: cannot SET NLS in a distributed transaction
Hi All,
I am Writing a plsql Code like this
DECLARE
op_job_id NUMBER;
op_object_version_number NUMBER;
x_job_definition_id NUMBER;
op_name VARCHAR2(1000);
L_VERIFY_FLAG VARCHAR2(1);
l_error_message VARCHAR2(2000);
BG_ID NUMBER;
lv_job_group_id APPS.per_job_groups.job_group_id@SYSTEM_LINK_VISMA%TYPE;
CURSOR C1 IS SELECT * FROM EBS_PER_JOBS_STG;
BEGIN
FOR H1 IN C1
LOOP
BEGIN
IF H1.BUSINESS_GROUP_NAME IS NOT NULL THEN
SELECT BUSINESS_GROUP_ID,job_group_id INTO BG_ID,lv_job_group_id
FROM APPS.PER_JOB_GROUPS@SYSTEM_LINK_VISMA
WHERE DISPLAYED_NAME=H1.JOB_GROUP_NAME;
END IF;
EXCEPTION
WHEN OTHERS THEN
L_VERIFY_FLAG := 'E';
l_error_message := 'Entered Job Group Name is Wrong';
END;
-->> JOB GROUP ID <<--
APPS.hr_job_api.CREATE_JOB@SYSTEM_LINK_VISMA
(p_business_group_id => BG_ID
,p_date_from => H1.DATE_FROM
,p_approval_authority => H1.APPROVAL_AUTHORITY
,p_emp_rights_flag => H1.EMP_RIGHTS_FLAG
,p_benchmark_job_flag => H1.BENCHMARK_JOB_FLAG
,p_job_group_id => lv_job_group_id
,p_job_information1 => H1.JOB_INFORMATION1
,p_job_information2 => H1.JOB_INFORMATION2
,p_job_information3 => H1.JOB_INFORMATION3
,p_job_information4 => H1.JOB_INFORMATION4
,p_job_information5 => H1.JOB_INFORMATION5
,p_job_information6 => H1.JOB_INFORMATION6
,p_job_information7 => H1.JOB_INFORMATION7
,p_segment3 => H1.JOB_CODE --JOB_CODE
,p_segment6 => H1.JOB_NAME --JOB_NAME
,p_job_id => op_job_id
,p_object_version_number => op_object_version_number
,p_job_definition_id => x_job_definition_id
,p_name => op_name);
dbms_output.PUT_LINE('OUTPUT JOB NAME CREATED : '||op_name);
END LOOP;
EXCEPTION
WHEN OTHERS THEN
dbms_output.PUT_LINE('Error Message Is: '||SQLERRM);
END;
i am running it in Another database Using database link connecting to Apps.
when i am running it am getting the following Error:
Error Message Is: ORA-02074: cannot SET NLS in a distributed transaction
ORA-06512: at "APPS.HR_KFLEX_UTILITY", line 2423
ORA-06512: at "APPS.HR_KFLEX_UTILITY", line 2380
ORA-06512: at "APPS.PER_JBT_UPD", line 468
ORA-02074: cannot SET NLS in a distributed transaction
ORA-06512: at "APPS.HR_JOB_API", line 878
Please help me on this, this is quite urgent to me.
thanks
sriPlease see these docs.
ORA-02074: Cannot SET NLS in a Distributed Transaction [ID 556391.1]
Portal Used To Call PO_CHANGE_API1_S: ORA-20001: ORA-02074: Cannot SET NLS In A Distributed Transaction [ID 561246.1]Why are Concurrent Programs Calling FND_GLOBAL.APPS_INITIALIZE Using DBLinks Failing? [ID 466800.1]
ORA-02074 when Executing set_nls over a DB Link [ID 132679.1]
Thanks,
Hussein -
ORA-00164: autonomous transaction disallowed within distributed transaction
I have been trying to solve this problem for weeks now, I have posted this question everywhere I can think of, but I havent really received and answer that has helped, so now I am going to post it here hoping for an answer.
We are running 9iAS on Solaris and when the following stuff is run we are getting ORA-00164 errors. If you refresh the page a bunch of time the problem goes away. But it comes back the next time you try to execute the procedure again. Here are the cases when the problem shows up.
Editing the style:
PROCEDURE : PORTAL30.wwpob_app_style.edit_style
Saving changes to the banner for a page
PROCEDURE : PORTAL30.wwptl_banner.savecustom
Logging out
PROCEDURE : PORTAL30.wwsec_app_priv.logout
After setting the default user group and applying the changes:
PROCEDURE : PORTAL30.wwsec_app_user_mgr.edit_user
Creating a new group:
PROCEDURE : PORTAL30.wwsec_app_group_mgr.create_group
Opening the add portlet screen:
PROCEDURE : PORTAL30.wwv_main.main
There are a few other places but I don't have them documented. In ALL cases the problem goes away once we start and stop the Apache using the following comands:
/app/oracle/n_portal/Apache/Apache/bin/apachectl stop
ps -ef | grep httpd | grep n_portal
/app/oracle/n_portal/Apache/Apache/bin/apachectl start
After starting and stopping Apache the problem is gone for a little while (20-30 mins) then it starts coming back slowly (sometimes the problem is there then it is not). Once the problem is back if you continually press refresh on the browser (5-10 times) the page might appear, if the page does not appear you will see the
ORA-00164: autonomous transaction disallowed within distributed transaction
The following error appears in apache log (50% of the time) when Autonomous Transaction error shows up on the screen:-
DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = 5225534324468880950975536484
215 PortalSession id = 521335001720MERAJ
DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = -638034231325135430097553725
8001 PortalSession id = 992335001711JDALGLIESH
These errors might be related to dynamic services but we were had the problem long before Dynamic services was installed.
We want to start pre-production user testing as we have just had 11 developers building portlets for the company, but we cant do much with this error popping up every time a user wants to test it. We have one of the Oracle consultants here and he has asked the oracle developer group what the problem could be, and they seem to think it might be related to our use of DB links however, we never get the problem when we try to run a portlet that uses a database link.
Please help.
Jeff Dalgliesh
nullJay,
My name is Craig McCauley. I'm an Oracle Technical Manager working onsite at Unocal Indonesia. I'm with the Portal group in ATS.
When I got here the first thing we did was bump up init.ora parameters and apache confif parameters as suggested by the iPlatform group. We have thes sessions parameter (in init.ora) bumped up from 100 to 700. I'm watching v$session and the get these AT messages with as few as 70 total db sessions. Any help your group can give will be greatly appreciated.
Unocal is planning on implementing Oracle Portal globally - as a common interface. They have similar installs in Thailand and Houston and thus far have not seen the AT messages (although there has not been much development going on at those sites).
Thanks,
Craig -
Cannot change destination bin during confirmation
Dear SAP experts,
We are in SAP ECC 5.0. We read that we can change the destination bin during confirmation of TO. We have done the pre-requisite:
1. In relevant storage type (001) we input '1' for dst bin ch during confrm field
2. Untick physical inventory during placement to bin
Then we do GR to PO, which generate TR. We create TR into TO and specifying bin INTERIM in storage type 001. During confirmation in tcode LT12, I cannot change the destination bin. What else do I miss in here?
Best regards,
JohnHello John,
Even though config mentions change of destination bin, there are quite a few limitations.
Have a look at below documentation from SAP
http://help.sap.com/saphelp_47x200/helpdata/en/c6/f83e5a4afa11d182b90000e829fbfe/frameset.htm
Snapshot of some imp content.
No destination bin can be entered during confirmation for
dynamic coordinates
transfer orders with return subitems
Lean WM (if the destination bin is defined in the movement type)
posting change TOs
inventory based on putaway
additions to existing stock in storage units
stock removal from or putaway into bulk storage
two-step confirmation
transaction Confirm single item
the case where you are using a putaway strategy
all other items in a TO with storage units, if you have already confirmed the first item for the storage unit. The system changes the destination storage bin for all dependent items during confirmation of the first item.
stock removals from a bulk storage managed with storage units
Check if your putaway falls in any of the criteria.
Cheers,
Nag -
ORA-02074: cannot ROLLBACK in a distributed transaction
I have a stored procedure that successfully creates a portal user when I run it with SQLPLUS.
However when I call the same procedure through ODP.Net, I get the following error.
"ORA-20001: ORA-02074: cannot ROLLBACK in a distributed transaction\nORA-06512: at \"PORTAL30.WWSEC_API\", line 1915\nORA-02074: cannot SET SAVEPOINT in a distributed transaction\nORA-06512: at \"PORTAL30.PRO_CREATE_WEB_USER\", line 28\nORA-06512: at line 1"
The portal version is 3.0.9.8.2 The stored proc is in the portal30 schema and I am connecting as portal30 user.
Any help is greatly appreciated...
Thanks.
The following is the code for the stored procedure:-
CREATE OR REPLACE PROCEDURE PORTAL30.PRO_CREATE_WEB_USER (
puser IN varchar2,
puser_last_name IN varchar2,
puser_first_name IN varchar2,
puser_group IN varchar2,
password IN varchar2
) AS
l_group_id number;
l_id number;
e_code number;
begin
l_id := wwsec_api.add_portal_user(p_User_Name => puser,p_Last_Name => puser_last_name,p_First_Name => puser_first_name,p_Portal_User => 'Y');
wwsec_api.activate_portal_user(puser);
portal30_sso.WWSSO_API_USER_ADMIN.CREATE_USER(P_USERNAME=> puser,P_PASSWORD=>password,p_error_code=> e_code);
wwsec_api.add_user_to_list(p_person_id => l_id,p_to_group_id => wwsec_api.group_id (p_name => puser_group),p_is_owner => wwsec_api.NOT_OWNER);
wwsec_api.set_defaultgroup(p_groupid => wwsec_api.group_id (p_name => puser_group),p_username => puser);
commit;
exception
when others then
raise_application_error(-20001,substr(sqlerrm,1,200));
end;
The foll is the code I am using to call the stored proc.
private void createUser()
string retval ;
OracleConnection oraconn = new OracleConnection(Data Source=testdb;User ID=portal30;Password=portal30" );
OracleCommand cmd = new OracleCommand("PRO_CREATE_WEB_USER", oraconn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter a_uid = new OracleParameter("puser" ,OracleDbType.Varchar2,20);
a_uid.Direction = ParameterDirection.Input ;
a_uid.Value = (txtUserId.Text).Trim() ;
cmd.Parameters.Add(a_uid);
OracleParameter a_last_name = new OracleParameter("puser_last_name" ,OracleDbType.Varchar2,20);
a_last_name.Direction = ParameterDirection.Input ;
if (( txtLName.Text).Trim() != "" )
a_last_name.Value = (txtLName.Text).Trim() ;
else
a_last_name.Value = " ";
cmd.Parameters.Add(a_last_name);
OracleParameter a_first_name = new OracleParameter("puser_first_name" ,OracleDbType.Varchar2,20);
a_first_name.Direction = ParameterDirection.Input ;
if ((txtFName.Text).Trim() != "")
a_first_name.Value = (txtFName.Text).Trim() ;
else
a_first_name.Value = " ";
cmd.Parameters.Add(a_first_name);
OracleParameter a_type = new OracleParameter("puser_group" ,OracleDbType.Varchar2,20);
a_type.Direction = ParameterDirection.Input ;
a_type.Value = (lstUserType.SelectedValue).Trim() ;
cmd.Parameters.Add(a_type);
OracleParameter a_passwd = new OracleParameter("password" ,OracleDbType.Varchar2,20);
a_passwd.Direction = ParameterDirection.Input ;
a_passwd.Value = (txtPassword.Text).Trim() ;
cmd.Parameters.Add(a_passwd);
try
oraconn.Open();
cmd.ExecuteNonQuery();
lblMsg.ForeColor = System.Drawing.Color.FromName("blue");
lblMsg.Text = "User Created.";
catch(OracleException e)
{ retval = e.Message ;
lblMsg.ForeColor = System.Drawing.Color.FromName("red");
lblMsg.Text = "Error Creating user" ;
finally
oraconn.Close();Also note that remote procedure/function calls (e.g. from ODP.NET), do not support distributed transactions (i.e. a SAVEPOINT/ROLLBACK block within the PL/SQL procedure/function) before database version Oracle 9i.
So if you are using say Oracle 817 you must use the "OracleTransaction" object in ODP.NET instead.
See:
http://www.dotnet247.com/247reference/msgs/39/197274.aspx -
Concurrent transaction isolation
Hello,
I am building a multithreaded application that uses the Semantic Jena APIs that relies on the transactions of the different threads to be isolated before a commit but I'm not quite getting this behavior. Here's a simple example (the full example source is available upon request).
<h1>Thread 1</h1>
Open a connection
Get a GraphOracleSem from the connection
call GraphOracleSem.getTransactionHandler.begin()
Add Triple A
Add Triple B
Add Triple C
call GraphOracleSem.getTransactionHandler.commit()
Close the GraphOracleSem
Dispose the connection
Open a connection
Get a GraphOracleSem from the connection
call GraphOracleSem.getTransactionHandler.begin()
Add Triple A
Add Triple B
Add Triple C
call GraphOracleSem.getTransactionHandler.commit()
Close the GraphOracleSem
Dispose the connection
<h1>Thread 2</h1>
Open a connection
Get a GraphOracleSem from the connection
call GraphOracleSem.getTransactionHandler.begin()
CheckA = true if Triple A Exists
CheckB = true if Triple B Exists
CheckC = true if Triple C Exists
Throw Exception unless CheckA == CheckB == CheckC
call GraphOracleSem.getTransactionHandler.abort() //no write is necessary here
Close the GraphOracleSem
Dispose the connection
Now if the effects of the two threads were isolated from each other, CheckA and CheckB and CheckC would always be equivalent (sometimes, true, sometimes false) but this does not seem to be the case (when my code at least...). I'm not sure if this requires a Serializeable transaction isolation level to be specified but quoting the GraphOracleSem performAdd method:
<h4>"Adds a triple into the graph. This change to this graph object will not be persisted until the transaction is committed. However, subsequent queries (using the same Oracle connection) can see this change."</h4>
Doesn't this mean that two connections making changes to GraphOracleSem should not see each-other's changes until a commit? Or is there something I'm missing here?
Also if this isn't the way to get something like this to work, how can it be done?
Edited by: alexi on Nov 11, 2010 12:22 PM - Whoops, cant attach anything to this forumHi,
I am afraid you cannot use it this way.
See this example using SQL inserts directly. Assume there are two concurrent sessions.
Session 1:
SQL> set transaction isolation level serializable;
Transaction set.
SQL> insert into basic_tpl values(sdo_rdf_triple_s('basic','<urn:a>','<urn:b>','<urn:c_123>'));
1 row created.
Session 2:
SQL> set transaction isolation level serializable;
Transaction set.
SQL> insert into basic_tpl values(sdo_rdf_triple_s('basic','<urn:a>','<urn:b>','<urn:c_567>'));
insert into basic_tpl values(sdo_rdf_triple_s('basic','<urn:a>','<urn:b>','<urn:c_567>'))
ERROR at line 1:
ORA-08177: can't serialize access for this transaction
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 7538
ORA-06512: at "MDSYS.BASIC_INS", line 37
ORA-04088: error during execution of trigger 'MDSYS.BASIC_INS'
SQL> rollback;
Rollback complete.
SQL> insert into basic_tpl values(sdo_rdf_triple_s('basic','<urn:a>','<urn:b>','<urn:c_567>'));
insert into basic_tpl values(sdo_rdf_triple_s('basic','<urn:a>','<urn:b>','<urn:c_567>'))
ERROR at line 1:
ORA-55303: SDO_RDF_TRIPLE_S constructor failed: BNode-non-reuse case:
SQLERRM=ORA-06519: active autonomous transaction detected and rolled back
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF_TRIPLE_S", line 64
If you want application level serialization, you can use dbms_lock package to acquire a lock before
performing updates. Another simple way is to create a simple table with one row and do a "select * from tabName for update." You can add a "nowait" if you don't want your session to be blocked.
Hope it helps,
Zhe Wu -
ORA-02042: too many distributed transactions
1. I have been working on a portal application for several weeks.
2. Portal is installed in 1 instance and my data is in another instance.
3. I've had no ora-02042 problems in the devt environment set up that way.
4. I've recently migrated the application/pages to a test environment set up that way.
5. I've been working in the test environment for several days with no problems.
6. For some portlets on some pages I'm now getting:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
Failed to parse query
Error:ORA-02042: too many distributed transactions
Error:ORA-02042: too many distributed transactions
ORA-02063: preceding line from
LINK_TO_TEST (WWV-11230) Failed to parse as PACID_SCHEMA -
select user_action.userid, action.name,
user_action.created_date,
user_action.created_by, action.action_id,
'del' del_link from user_action , action
where user_action.action_id =
action.action_id and user_action.userid
LIKE UPPER(:userid) order by USERID
ASC, NAME ASC, CREATED_DATE
ASC (WWV-08300)
<HR></BLOCKQUOTE>
7. I cannot find anything about this error in the db log files for either instance.
8. I've increased distributed transactions to 200 in the portal db and bounced
it. Still get the error.
9. No records in dba_2pc_pending or dba_2pc_neighbors in the portal instance.
10. I get the error in various reports and form LOVs at different times. Pages with a lot of portlets seem to be more prone to the error.
Here is a typical LOV error:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
COMBOBOX LOV ERROR:
LOV: "ASIMM_1022.TITLE_LOV"
Parse Message: Parse as pre-set global: "PACID_SCHEMA".
Find Message: LOV is of type DYNAMIC (LOV based on SQL query).
Query: "select code display_column, code return_column from codes where table_id = 'OFFICER_TITLE' order by code"
wwv_parse.parse_as_user: ORA-02042: too many distributed transactions ORA-02063: preceding line from LINK_TO_TEST wwv_parse.parse_as_user: Failed to parse as PACID_SCHEMA - select code display_column, code return_column from codes where table_id = 'OFFICER_TITLE' order by code wwv_security.check_comp_privilege: Insufficient privileges. wwpre_utl.get_path_id: The preference path does not exist: ORACLE.WEBVIEW.PARAMETERS.217_USER_INPUT_ASIMM_5423428
<HR></BLOCKQUOTE>
Why are these select statements being interpreted as distributed transactions? Note:1032658.6 suggests I "USE SET TRANSACTION READ ONLY". Is this necessary? If so how?
What puzzles me is that this set up has been working fine for several days. I don't know of any changes to my environment apart from me increasing distributed transactions.
nullHi,
this is information from metalink:
The ORA-2042 indicates that you should increase the parameter
distributed_transactions.
The ORA-2063 indicates that this must be done at the remote
database.
Explanation
If the distributed transaction table is full on either side of
the database link you get the error ORA-2042:
ORA-02042: "too many distributed transactions"
Cause: the distributed transaction table is full,
because too many distributed transactions are active.
Action: increase the INIT.ORA "distributed_transactions" or
run fewer transactions.
If you are sure you don't have too many concurrent
distributed transactions, this indicates an internal
error and support should be notified.
Instance shutdown/restart would be a workaround.
When the error is generated at the remote database it is
accompanied with an ORA-2063. In this case the parameter
distributed_transactions must be increased at the remote
database.
If there is no ORA-2063 the parameter distributed_transactions
must be increased at the local database. -
ORA-01591: lock held by in-doubt distributed transaction 206.77.12171
I am having this type of ORA error. I have tried to look at the PENDING_TRANS$ as said in most threads but there is no record found. I have asked our DBA team if there was any locked transactio but they said that there was none. I have also read from another thread that this is a bug and there is a patch available to fix this but that patch is not available for Orace10g. By the way, I have Oracle 10g as my database.
Anyone who have an idea to fix this? Thanks in advancethis scenario generally arises during distributed transactions.may be transaction at the local or distributed site is not committed or roll backed.Try to commit the transaction at your side and ask the DBA at remote site to commit the transaction or roll back the transaction
-
What logging implementation for distributed transaction on Oracle 8?
Hi,
I have a script running on Oracle 8 that accesses remote databases. I would like to create a transaction log that creates log entries in another table as the script progresses. I initially tried creating a logging procedure that used PRAGMA AUTONOMOUS_TRANSACTION but this failed because of this error message:
ORA-00164: autonomous transaction disallowed within distributed transaction
I can't set the transaction to read only as database updates are part of the script.
Is there another strategy that I could use to create the logs I need?
Cheers,
kjHi,
I have a script running on Oracle 8 that accesses remote databases. I would like to create a transaction log that creates log entries in another table as the script progresses. I initially tried creating a logging procedure that used PRAGMA AUTONOMOUS_TRANSACTION but this failed because of this error message:
ORA-00164: autonomous transaction disallowed within distributed transaction
I can't set the transaction to read only as database updates are part of the script.
Is there another strategy that I could use to create the logs I need?
Cheers,
kj -
Too many distributed transactions
I am programming an application with JDeveloper 10g and ADF Framework. It is a application that only queries data (no modifications). I created ViewObjects based on sql queries and an application module.
The problem is that is I execute that application for some time, I get the following error:
java.sql.SQLException: ORA-02042: too many distributed transactions
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2346)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2660)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:387)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:665)
As it is a query only program, i do not need transactions. How can fix this?
Thanks in advanceHi,
this is information from metalink:
The ORA-2042 indicates that you should increase the parameter
distributed_transactions.
The ORA-2063 indicates that this must be done at the remote
database.
Explanation
If the distributed transaction table is full on either side of
the database link you get the error ORA-2042:
ORA-02042: "too many distributed transactions"
Cause: the distributed transaction table is full,
because too many distributed transactions are active.
Action: increase the INIT.ORA "distributed_transactions" or
run fewer transactions.
If you are sure you don't have too many concurrent
distributed transactions, this indicates an internal
error and support should be notified.
Instance shutdown/restart would be a workaround.
When the error is generated at the remote database it is
accompanied with an ORA-2063. In this case the parameter
distributed_transactions must be increased at the remote
database.
If there is no ORA-2063 the parameter distributed_transactions
must be increased at the local database. -
Hi
1- Does SAP ECC-6.0 support XA transactions?
XA Transactions stand for (Distributed Transactions).
2- Does SAP ECC-6.0 Web services allow participation in WS-AT?
WS-AT Stands for is Web Services Atomic Transaction specification.
If so please provide the referral point where I can get the Documentation regarding this.
Any earlier reply will be rewarded.Hi
1. What is meant by XA ?? Please clarify.. I guess, ECC should support..
2. Yes...
SAP supports ATS... Atomic Transaction specification defines protocols that is recognized by SAP. This failure atomicity property is supported by atomic transactions, which have the following familiar ACID properties.
See useful pointers ->
http://specs.xmlsoap.org/ws/2004/10/wsat/wsat1104.pdf
http://soa.sys-con.com/read/39769.htm
http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci1282196,00.html
http://docs.oasis-open.org/ws-tx/wstx-wsat-1.1-spec-pr-01/wstx-wsat-1.1-spec-pr-01.html
Regards
- Atul -
Java.sql.SQLException: Cannot call rollback when using distributed transac
Hi all,
I am getting the below exception trace when I tried to rollback the data in WLI.I am getting the db connection Object from DBControl.
java.sql.SQLException: Cannot call rollback when using distributed transactions
at weblogic.jdbc.wrapper.JTAConnection.rollback(JTAConnection.java:313)
at controls.DailyFeedFileJavaImpl.excuteBatch(DailyFeedFileJavaImpl.jcs:
904)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:381)
at $Proxy59.excuteBatch(Unknown Source)
at QnbDailyFeedProcess.feedFileJavaObjExcuteBatch(QnbDailyFeedProcess.jp
d:274)
at QnbDailyFeedProcess_wf$ImplControlSend15.invoke(QnbDailyFeedProcess_w
f.java:146)
at com.bea.wli.bpm.runtime.Perform.execute(Perform.java:32)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:726)
at QnbDailyFeedProcess_wf$_ProcessState.executeInternalCallback(QnbDaily
FeedProcess_wf.java:311)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:685)
at com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration(Process
State.java:681)
at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wli.bpm.runtime.JpdInternalDispMethod.invoke(JpdInternalDispM
ethod.java:87)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:24shanmuga gomathi nayagam wrote:
Hi all,
I am getting the below exception trace when I tried to rollback the data in WLI.I am getting the db connection Object from DBControl.
java.sql.SQLException: Cannot call rollback when using distributed transactions
at weblogic.jdbc.wrapper.JTAConnection.rollback(JTAConnection.java:313)Hi, Ideally, you should obtain the Transaction object and roll it back/ set it
to rollback only.
Joe
at controls.DailyFeedFileJavaImpl.excuteBatch(DailyFeedFileJavaImpl.jcs:
904)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:381)
at $Proxy59.excuteBatch(Unknown Source)
at QnbDailyFeedProcess.feedFileJavaObjExcuteBatch(QnbDailyFeedProcess.jp
d:274)
at QnbDailyFeedProcess_wf$ImplControlSend15.invoke(QnbDailyFeedProcess_w
f.java:146)
at com.bea.wli.bpm.runtime.Perform.execute(Perform.java:32)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:726)
at QnbDailyFeedProcess_wf$_ProcessState.executeInternalCallback(QnbDaily
FeedProcess_wf.java:311)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:685)
at com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration(Process
State.java:681)
at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wli.bpm.runtime.JpdInternalDispMethod.invoke(JpdInternalDispM
ethod.java:87)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:24 -
Please helpme "Cannot change transaction isolation level in the middle of "
sorry my english helpme!!
i am trying to insert a registry n a table in postgresql throght JAVA STUDIO CREATOR and i got the next error
Cannot change transaction isolation level in the middle of a transaction
helpme thanks youDuplicate post. Answered in the other thread.
http://forum.java.sun.com/thread.jspa?threadID=5115855 -
Cannot change transaction isolation level in the middle of a transaction
por favor pido ayuda a quien sepa de la solucion de este problema, es q estoy trabajando con postgre, e intento realizar actualizaciones a la base de datos y me sale este error
Cannot change transaction isolation level in the middle of a transaction
graciassorry my english helpme!!
i am trying to insert a registry n a table in postgresql throght JAVA STUDIO CREATOR and i got the next error
Cannot change transaction isolation level in the middle of a transaction
helpme thanks you -
Changing Isolation Level Mid-Transaction
Hi,
I have a SS bean which, within a single container managed transaction, makes numerous
database accesses. Under high load, we start having serious contention issues
on our MS SQL server database. In order to reduce these issues, I would like
to reduce my isolation requirements in some of the steps of the transaction.
To my knowledge, there are two ways to achieve this: a) specify isolation at the
connection level, or b) use locking hints such as NOLOCK or ROWLOCK in the SQL
statements. My questions are:
1) If all db access is done within a single tx, can the isolation level be changed
back and forth?
2) Is it best to set the isolation level at the JDBC level or to use the MS SQL
locking hints?
Is there any other solution I'm missing?
Thanks,
SebastienGalen Boyer wrote:
On Sun, 28 Mar 2004, [email protected] wrote:
Galen Boyer wrote:
On Wed, 24 Mar 2004, [email protected] wrote:
Oracle's serializable isolation level doesn't offer what most
customers I've seen expect it to offer. They typically expect
that a serializable transaction will block any read-data from
being altered during the transaction, and oracle doesn't do
that.I haven't implemented WEB systems that employ anything but
the default concurrency control, because a web transaction is
usually very long running and therefore holding a connection
open during its life is unscalable. But, your statement did
make me curious. I tried a quick test case. IN ONE SQLPLUS
SESSION: SQL> alter session set isolation_level =
serializable; SQL> select * from t1; ID FL ---------- -- 1 AA
2 BB 3 CC NOW, IN ANOTHER SQLPLUS SESSION: SQL> update t1 set
fld = 'YY' where id = 1; 1 row updated. SQL> commit; Commit
complete. Now, back to the previous session. SQL> select *
from t1; ID FL ---------- -- 1 AA 2 BB 3 CC So, your
statement is incorrect.Hi, and thank you for the diligence to explore. No, actually
you proved my point. If you did that with SQLServer or Sybase,
your second session's update would have blocked until you
committed your first session's transaction. Yes, but this doesn't have anything to do with serializable.
This is the weak behaviour of those systems that say writers can
block readers.Weak or strong, depending on the customer point of view. It does guarantee
that the locking tx can continue, and read the real data, and eventually change
it, if necessary without fear of blockage by another tx etc.
In your example, you were able to change and commit the real
data out from under the first, serializable transaction. The
reason why your first transaction is still able to 'see the old
value' after the second tx committed, is not because it's
really the truth (else why did oracle allow you to commit the
other session?). What you're seeing in the first transaction's
repeat read is an obsolete copy of the data that the DBMS
made when you first read it. Yes, this is true.
Oracle copied that data at that time into the per-table,
statically defined space that Tom spoke about. Until you commit
that first transaction, some other session could drop the whole
table and you'd never know it.This is incorrect.Thanks. Point taken. It is true that you could have done a complete delete
of all rows in the table though..., correct?
That's the fast-and-loose way oracle implements
repeatable-read! My point is that almost everyone trying to
serialize transactions wants the real data not to
change. Okay, then you have to lock whatever you read, completely.
SELECT FOR UPDATE will do this for your customers, but
serializable won't. Is this the standard definition of
serializable of just customer expectation of it? AFAIU,
serializable protects you from overriding already committed
data.The definition of serializable is loose enough to allow
oracle's implementation, but non-changing relevant data is
a typically understood hope for serializable. Serializable
transactions typically involve reading and writing *only
already committed data*. Only DIRTY_READ allows any access to
pre-committed data. The point is that people assume that a
serializable transaction will not have any of it's data re
committed, ie: altered by some other tx, during the serializable
tx.
Oracle's rationale for allowing your example is the semantic
arguement that in spite of the fact that your first transaction
started first, and could continue indefinitely assuming it was
still reading AA, BB, CC from that table, because even though
the second transaction started later, the two transactions *so
far*, could have been serialized. I believe they rationalize it by saying that the state of the
data at the time the transaction started is the state throughout
the transaction.Yes, but the customer assumes that the data is the data. The customer
typically has no interest in a copy of the data staying the same
throughout the transaction.
Ie: If the second tx had started after your first had
committed, everything would have been the same. This is true!
However, depending on what your first tx goes on to do,
depending on what assumptions it makes about the supposedly
still current contents of that table, it may ether be wrong, or
eventually do something that makes the two transactions
inconsistent so they couldn't have been serialized. It is only
at this later point that the first long-running transaction
will be told "Oooops. This tx could not be serialized. Please
start all over again". Other DBMSes will completely prevent
that from happening. Their value is that when you say 'commit',
there is almost no possibility of the commit failing. But this isn't the argument against Oracle. The unable to
serialize doesn't happen at commit, it happens at write of
already changed data. You don't have to wait until issuing
commit, you just have to wait until you update the row already
changed. But, yes, that can be longer than you might wish it to
be. True. Unfortunately the typical application writer logic may
do stuff which never changes the read data directly, but makes
changes that are implicitly valid only when the read data is
as it was read. Sometimes the logic is conditional so it may never
write anything, but may depend on that read data staying the same.
The issue is that some logic wants truely serialized transactions,
which block each other on entry to the transaction, and with
lots of DBMSes, the serializable isolation level allows the
serialization to start with a read. Oracle provides "FOR UPDATE"
which can supply this. It is just that most people don't know
they need it.
With Oracle and serializable, 'you pay your money and take your
chances'. You don't lose your money, but you may lose a lot of
time because of the deferred checking of serializable
guarantees.
Other than that, the clunky way that oracle saves temporary
transaction-bookkeeping data in statically- defined per-table
space causes odd problems we have to explain, such as when a
complicated query requires more of this memory than has been
alloted to the table(s) the DBMS will throw an exception
saying it can't serialize the transaction. This can occur even
if there is only one user logged into the DBMS.This one I thought was probably solved by database settings,
so I did a quick search, and Tom Kyte was the first link I
clicked and he seems to have dealt with this issue before.
http://tinyurl.com/3xcb7 HE WRITES: serializable will give you
repeatable read. Make sure you test lots with this, playing
with the initrans on the objects to avoid the "cannot
serialize access" errors you will get otherwise (in other
databases, you will get "deadlocks", in Oracle "cannot
serialize access") I would bet working with some DBAs, you
could have gotten past the issues your client was having as
you described above.Oh, yes, the workaround every time this occurs with another
customer is to have them bump up the amount of that
statically-defined memory. Yes, this is what I'm saying.
This could be avoided if oracle implemented a dynamically
self-adjusting DBMS-wide pool of short-term memory, or used
more complex actual transaction logging. ? I think you are discounting just how complex their logging
is. Well, it's not the logging that is too complicated, but rather
too simple. The logging is just an alternative source of memory
to use for intra-transaction bookkeeping. I'm just criticising
the too-simpleminded fixed-per-table scratch memory for stale-
read-data-fake-repeatable-read stuff. Clearly they could grow and
release memory as needed for this.
This issue is more just a weakness in oracle, rather than a
deception, except that the error message becomes
laughable/puzzling that the DBMS "cannot serialize a
transaction" when there are no other transactions going on.Okay, the error message isn't all that great for this situation.
I'm sure there are all sorts of cases where other DBMS's have
laughable error messages. Have you submitted a TAR?Yes. Long ago! No one was interested in splitting the current
message into two alternative messages:
"This transaction has just become unserializable because
of data changes we allowed some other transaction to do"
or
"We ran out of a fixed amount of scratch memory we associated
with table XYZ during your transaction. There were no other
related transactions (or maybe even users of the DBMS) at this
time, so all you need to do to succeed in future is to have
your DBA reconfigure this scratch memory to accomodate as much
as we may need for this or any future transaction."
I am definitely not an Oracle expert. If you can describe for
me any application design that would benefit from Oracle's
implementation of serializable isolation level, I'd be
grateful. There may well be such.As I've said, I've been doing web apps for awhile now, and
I'm not sure these lend themselves to that isolation level.
Most web "transactions" involve client think-time which would
mean holding a database connection, which would be the death
of a web app.Oh absolutely. No transaction, even at default isolation,
should involve human time if you want a generically scaleable
system. But even with a to-think-time transaction, there is
definitely cases where read-data are required to stay as-is for
the duration. Typically DBMSes ensure this during
repeatable-read and serializable isolation levels. For those
demanding in-the-know customers, oracle provided the select
"FOR UPDATE" workaround.Yep. I concur here. I just think you are singing the praises of
other DBMS's, because of the way they implement serializable,
when their implementations are really based on something that the
Oracle corp believes is a fundamental weakness in their
architecture, "Writers block readers". In Oracle, this never
happens, and is probably one of the biggest reasons it is as
world-class as it is, but then its behaviour on serializable
makes you resort to SELECT FOR UPDATE. For me, the trade-off is
easily accepted.Well, yes and no. Other DBMSes certainly have their share of faults.
I am not critical only of oracle. If one starts with Oracle, and
works from the start with their performance arcthitecture, you can
certainly do well. I am only commenting on the common assumptions
of migrators to oracle from many other DBMSes, who typically share
assumptions of transactional integrity of read-data, and are surprised.
If you know Oracle, you can (mostly) do everything, and well. It is
not fundamentally worse, just different than most others. I have had
major beefs about the oracle approach. For years, there was TAR about
oracle's serializable isolation level *silently allowing partial
transactions to commit*. This had to do with tx's that inserted a row,
then updated it, all in the one tx. If you were just lucky enough
to have the insert cause a page split in the index, the DBMS would
use the old pre-split page to find the newly-inserted row for the
update, and needless to say, wouldn't find it, so the update merrily
updated zero rows! The support guy I talked to once said the developers
wouldn't fix it "because it'd be hard". The bug request was marked
internally as "must fix next release" and oracle updated this record
for 4 successive releases to set the "next release" field to the next
release! They then 'fixed' it to throw the 'cannot serialize' exception.
They have finally really fixed it.( bug #440317 ) in case you can
access the history. Back in 2000, Tom Kyte reproduced it in 7.3.4,
8.0.3, 8.0.6 and 8.1.5.
Now my beef is with their implementation of XA and what data they
lock for in-doubt transactions (those that have done the prepare, but
have not yet gotten a commit). Oracle's over-simple logging/locking is
currently locking pages instead of rows! This is almost like Sybase's
fatal failure of page-level locking. There can be logically unrelated data
on those pages, that is blocked indefinitely from other equally
unrelated transactions until the in-doubt tx is resolved. Our TAR has
gotten a "We would have to completely rewrite our locking/logging to
fix this, so it's your fault" response. They insist that the customer
should know to configure their tables so there is only one datarow per
page.
So for historical and current reasons, I believe Oracle is absolutely
the dominant DBMS, and a winner in the market, but got there by being first,
sold well, and by being good enough. I wish there were more real market
competition, and user pressure. Then oracle and other DBMS vendors would
be quicker to make the product better.
Joe
Maybe you are looking for
-
HP laptops come with a couple of extra drives for recovery and support purposes. I'm wondering if these drives actually need a drive letter assigned to them or if the drive letter can be changed. All and any comments greatly appreciated. WD This que
-
No Option To Install SNMP Service on Windows Server 2012 Standard
Hi, was wondering if someone could help me with the below issue. i am trying to install the SNMP service on our new 2012 server however the role doesn't even exist? could someone advice on how we can install this role? i have looked everywhere but am
-
I connect my i-pad mini to my wireless router and it says im connected but it wont let me do anything anybody know why ?
-
Never tried this before, never used iTunes for anything before. Have iTunes 10.5.1 Have a CD collection Have a CD player with optical out Have the TOSlink cable Plugged into the right ports The Sound control panel "level' meter indicates the audio is
-
The operation cannot be completed an item with the name "...already exists
Hello mac users, please help me... I can't copy to Applications any larger *.app file. I try drag Ableton (live.app ~120mb) or Mailplane.app (76mb) to Application dyr, but I saw message: "the operation cannot be completed an item with the name "..."