on 08-13-2015 1:59 PM
Hi,
I am using EclipseLink 2.5 trying to call a HANA stored procedure, like this:
1) describe it in the xml:
<named-stored-procedure-query
name="findAllStationsNamedProc"
result-class="com.domain.Station"
procedure-name="CC_TEST_READ_STATIONS">
</named-stored-procedure-query>
2) use it in code:
Query q = em.createNamedQuery("findAllStationsNamedProc");
List<Station> stationList = q.getResultList();
System.out.println("Loaded " + stationList.size() + " stations");
Although other calls that do not involve calling a stored procedure work fine through JDBC, this one doesn't. The generated SQL doesn't seem to be proper HANA SQL, having EXECUTE instead of CALL:
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "EXECUTE": line 1 col 1 (at pos 1)
Error Code: 257
Call: EXECUTE PROCEDURE CC_TEST_READ_STATIONS()
Query: ReadAllQuery(name="findAllStationsThroughAMDPNamedProc" referenceClass=Station )
Any ideas why it generates with EXECUTE and what would be any possible solutions?
Thank you,
Alex
Are you sure that EclipseLink would actually support SAP HANA?
Only lists SAP MaxDB as somewhat "similar" (from the SQL user interface point of view) DBMS.
Most likely it would make sense to ask this question in an EclipseLink forum, though...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In general EclipseLink does support HANA as of 2.5.x:
EclipseLink/Development/DatabasePlatform/HANAPlatform - Eclipsepedia
However if I look at the header of the EclipseLink library for HANA I found the following supported features list:
* <b>Database Platform for SAP HANA</b> <br>
*
* <p>
* <b>Feature Testing</b><br>
* ----------------------
* <ul>
* <li>DDL Generation - Succeeds
* <li>Outer Join - Succeeds
* <li>Subquery - Succeeds
* <li>Stored Procedure Calls - Not supported
* <li>Stored Procedure Generation - Not supported
* <li>Native Sequences/Identifier fields - Succeeds
* <li>JPA Bulk Update/Delete - Succeeds with Limitations
* <li>Batch Reading - Succeeds
* <li>Batch Writing - Succeeds
* <li>Pessimistic Locking - Succeeds with Limitations
* <li>First Result/Limit - Succeeds with Limitations
* <li>Expression Framework - Succeeds with Limitations
* <li>Delimiters - Succeeds
* <li>Auto Detection - Succeeds
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.