Java J2ME JSP J2EE Servlet Android

ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML

Cause:
=====
DML operations like create, drop etc. and rollback/commit can not be performed in a SQL statement

Example:
=======
The most general case where this error occurs is calling a function as
SELECT myFunc(.. .. ..) FROM dual..
Something like this or the like, Where myFunc contains DML operations, rollback or commit statements.

Solution:
==========
You have to ensure that DML operations and rollback/commit operations must be autonomous instead of inside a query.

For the case described above you can execute the function myFunc as
var:=myFunc(.. .. ..);

Or redefine the function as
CREATE OR REPLACE function myFunc(.. .. ..) RETURN ..
AS
....
....
PRAGMA AUTONOMOUS_TRANSACTION
begin
.....
.....
.....
end;