Trying to run the query using jdbcTemplete on oracle database where M_DB is the schema name and M_USER_DB is user for M_DB schema. M_USER_DB has certain tables on which I am trying to execute some queries like in springboot project
jdbcTemplate.query("SELECT * FROM M_USER_DB.C_USER_INFO", new ResultSetExtractor<HashMap<String, String>>()
However, while running the program its throwing below error:
No data read; nested exception is java.sql.SQLException: No data read
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
In the application.properties the database/datasource connection are for my primary Schema M_DB (not user M_USER_DB ). From SqlDeveloper, I can connect to M_DB and run the query like
select * from M_USER_DB.C_USER_INFO
without connecting to M_USER_INFO. I believe I need not to create primary and secondary jdbcTemplete here.
Any suggestion what could be the reason or anything I am missing? Thanks for help in advance.