Calling oracle package from mulesoft - mule-studio

I have a requirement where I need to call a oracle stored procedure that is inside a package. I found lot of samples which explains about calling the procedure and successfully tried that.
But when I try to do the same with a procedure that is inside a package, I am getting ORA-06576 : Not a valid function or procedure name as error.
Any suggestions appreciated.

Related

SAP Cloud Application Programming Model Integration

I try to integrate already implemented SAPUI5 application with CAP in order to use SQLite database. In my models I have a property called Order and as you may know, Order is a reserved keyword in SQLite.
entity MyEntity{
key ID : Integer;
Name: localized String(111);
Order: Integer;
}
When I try to use the following command to generate the database:
cds deploy --to sqlite:db/mydb.db
I get the syntax error:
[ERROR] SQLITE_ERROR: near "Order": syntax error
When I use the quotation in my defined entity, then I get an error which regards to SAP HANA database:
[ERROR] cds compile failed due to these errors...
at db\schema.cds:23:3-10: Quoted identifiers are not allowed in plain mode of toHana: "Order"
I just wanted to know is there anyway to solve the issue?
PS: I do not want to use HANA database, so please let me know if there is anyway to disable it, because I could not find any information in this regards.
I appreciate any help or advice :)
In the package.json of your application's root folder, you might have mentioned HANA as the productive DB 'kind'. Try changing it to SQLite.

ERROR: cannot execute CREATE TABLE in a read-only transaction - Jasper reporting

I'm facing this annoying problem in Jasper. I have created a report based on a PostgreSQL function. When I watch the preview, I do not have any problem with the results. However, when I publish the report and try to execute it, I get this error:
org.postgresql.util.PSQLException: ERROR: cannot execute CREATE TABLE in a read-only transaction
I've checked on the internet for a possible solution, so far this is the only thing that I have found with a similar problem:
https://community.jaspersoft.com/questions/814793/report-execution-fails-due-read-only-transaction-mode
However, adding the property to the URL does not work, or I'm not so sure if I have to write it in this way:
jdbc:postgresql://server:5432/data_base?defaultReadOnly="false"
In Jasper, what else can I do? I only can query the function, and requiring any change in it is an HUGE bureaucratic issue.
Jasper Studio 6.3.0
According to the documentation the JDBC connection parameter would be readOnly=false.
Have you verified that you are not connecting to a streaming replication standby server?

Can I use JSON_EXTRACT in a Domo SQL DataFlow

Domo calls one of the DataFlow types a "MySQL DataFlow". MySQL has a function called JSON_EXTRACT. How can I use this on a field that contains some JSON encoded data? I receive back the error:
The database reported a syntax error. FUNCTION json_extract does not exist
I know this is a somewhat old question, but I think the answer is that Domo uses an older version of MySQL (5.6) that does not support the JSON_EXTRACT function (5.7 and later).
You can check the version by running this statement in a MySQL DataFlow transformation step:
SELECT VERSION();
When I run that on the Domo instance I use at work I see 5.6.28-76.1-56
If you go to the JSON Functions page of the MySQL documentation and try to select any version before 5.7 from the dropdown in the upper right of the page you will see a message saying "The page you are viewing does not exist in version X.X"

Using JDBCBatchItemWriter for calling an Oracle Procedure gets EmptyResultDataAccessException

I am using Java based configuration for my Spring Batch. I am calling a stored procedure "writer.setSql("call proc (:_name)");"
The data is getting inserted through the procedure. However, I am getting exception " <<<<<<<<<
Thanks
Note: I am skipping "Exception.class" in my step.
The issue is due to the assertion of updates from the JDBCBatchItemWriter. The proc does not return the no.of rows affected like a sql statement. The java code throws the Exception of the count of updates is 0. The solution to the problem stated above is to setAssertUpdates to False " writer.setAssertUpdates(false)".
However, the question still remains on the best writer to use to execute DB objects like procedure or functions and how transactions should be managed.
Refer to the source code from the url below:
http://grepcode.com/file/repo1.maven.org/maven2/org.springframework.batch/spring-batch-infrastructure/3.0.0.RELEASE/org/springframework/batch/item/database/JdbcBatchItemWriter.java
I use Java Configuration. Set the writer to avoid 'assert updates' does the job.
writer.setAssertUpdates(false);

Db2 error : SQL0901N, SQLSTATE=58004

Can i use Atomic in the parrent procedure as well as in the procedure which the mail procedure calls.
My procedure compiles perfectly, but sometimes when I execute it. I receive following error:
DB2 Database Error: ERROR [58004] [IBM][DB2/NT64] SQL0901N The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed. (Reason "Sdir len bad: 1542!=1520+14".) SQLSTATE=58004
However, surprisingly when i commented the "ATOMIC" keyword in the main procedure and ran again it ran perfectly. But when I ran it again after uncommenting it still did not give any errors and ran perfectly.
So the error that I recieve is not something that I recive everytime.Could some one please let me know what could be the issue and what needs to be done to resolve this. As on goolgeing I did not find any leads on this.
Thanks,
Harveer
Found the following statement from an IBM employee on DeveloperWorks. Not sure if this helps.
3 In running rebind of all packages , I get an error
"SQL0901N The SQL statement failed because of a non-severe system
error.
Subsequent SQL statements can be processed. (Reason "Sdir len bad:
1171!=1160+9".) SQLSTATE=58004"
SQLSTATE 58004: A system error (that does not necessarily preclude the
successful execution of subsequent SQL statements) occurred."
How do we identify which stored procedure,function is creating this
error?
SQL0901 means: call IBM. There is
nothing you can do about this (only
work around it, possibly).