| Start |
|---|
| SimpleJdbcCall creation Typically, you will want to create your SimpleJdbcCalls in a Service. This example assumes your procedure has a single output parameter that is a cursor; you will need to adjust your declareParameters to match your procedure. There are many options you can use here:
|
| Oracle Databases There are a number of issues with Oracle. Here's how to resolve them. Assuming your procedure output parameter is java.sql.SQLException: Invalid column type: 2012 So change Supporting OracleTypes You may only need to do this if you have certain column types in your data. The next issue I encountered was that proprietary Types such as Invalid SQL type for column; nested exception is java.sql.SQLException: Invalid SQL type for column So we need to create a ResultSetExtractor that supports Oracle types. Certain Oracle types require a Connection to obtain the column value from a ResultSet.
TIMESTAMPTZ is one of these types. So when Caused by: java.sql.SQLException: One or more of the authenticating RowSet properties not set at oracle.jdbc.rowset.OracleCachedRowSet.getConnectionInternal(OracleCachedRowSet.java:560) at oracle.jdbc.rowset.OracleCachedRowSet.getTimestamp(OracleCachedRowSet.java:3717) at org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet.getTimestamp If you dig into this code, you will see that the OracleCachedRowSet needs the password or a JNDI DataSource name to get a Connection. If you prefer the JNDI lookup, just verify that OracleCachedRowSet has DataSourceName set. So in my Service, I Autowire in the password and declare the output parameter like this: |
Read Article
https://develop.horje.com/learn/1434/reference