# Exception during saving data to CouchBase could not execute query; nested exception is org.hibernate.exception.GenericJDBCException: could not execute query

**URL:** <https://discourse.hibernate.org/t/exception-during-saving-data-to-couchbase-could-not-execute-query-nested-exception-is-org-hibernate-exception-genericjdbcexception-could-not-execute-query/3904>\
**Category:** Hibernate ORM\
**Created:** [March 17, 2020, 6:52pm UTC](https://discourse.hibernate.org/t/exception-during-saving-data-to-couchbase-could-not-execute-query-nested-exception-is-org-hibernate-exception-genericjdbcexception-could-not-execute-query/3904 "2020-03-17T18:52:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob\_johnson](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/bob_johnson/32/996_2.png) [@bob\_johnson](https://discourse.hibernate.org/u/bob_johnson)\
**Post date:** [March 17, 2020, 6:52pm UTC](https://discourse.hibernate.org/t/exception-during-saving-data-to-couchbase-could-not-execute-query-nested-exception-is-org-hibernate-exception-genericjdbcexception-could-not-execute-query/3904/1 "2020-03-17T18:52:42Z")

</div>

Hi All,

I have the following stored procedure:  
@NamedNativeQuery(  
name = “getLangName”,  
query = “SELECT lan.language\_name” +  
" FROM language lan, locale l" +  
" WHERE lan.iso\_lang\_mnemonic = l.iso\_lang\_mnemonic" +  
" AND UPPER(l.variant) = UPPER(:iv\_iso\_lang\_locale\_list)" ,  
resultClass = LanguageNameEntity.class  
)

Getting the following error when executing the jar file compiled:  
Exception during saving data to CouchBase could not execute query; nested exception is org.hibernate.exception.GenericJDBCException: could not execute query  
SqlExceptionHelper - SQL Error: 17006, SQLState: 99999  
[ERROR] 2020-03-17 12:37:31.215 [http-nio-8181-exec-1] SqlExceptionHelper - Invalid column name  
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:4146)  
at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:300)  
at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:1460)  
at com.zaxxer.hikari.pool.HikariProxyResultSet.getString(HikariProxyResultSet.java)  
at org.hibernate.type.descriptor.sql.VarcharTypeDescriptor$2.doExtract(VarcharTypeDescriptor.java:62)  
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47)  
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)  
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)  
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243)  
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329)  
at org.hibernate.loader.Loader.extractKeysFromResultSet(Loader.java:808)  
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:732)  
at org.hibernate.loader.Loader.processResultSet(Loader.java:1008)  
at org.hibernate.loader.Loader.doQuery(Loader.java:964)  
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)  
at org.hibernate.loader.Loader.doList(Loader.java:2815)

I tried upgrading/downgrading the specific hibernate versions to see if it was a versioning issue to start off with, but it did not correct the issue. I’m wondering if this is a technical issue or there is a component in the Named Native Query that Hibernate does not like?

Please let me know if I am missing something or if somebody has dealt with a similar issue. Thanks!
