Rajat
Rajat

Reputation: 19

Getting Error "Found: int64, expected: integer" while Migrating Java application with Hibernate from DB2 to BigQuery

I am trying to migrate a Java application backend from DB2 to BigQuery but getting a datatype mismatch error. In DB2 as well as BigQuery field type is defined as INTEGER, but behind the scene INTEGER is INT64 in BigQuery. So when the Java Application try to refer to this field it gives an error: org.hibernate.HibernateException error Found: int64, expected: integer

Java Application is build using Spring Roo and Hibernate and in order to connect this Java application to BigQuery I am using Simba driver.

So either there is a way in Google Cloud Bigquery or If I can convert INT64 to INTEGER, but how or if anyone can suggest any other approach.

Upvotes: 0

Views: 229

Answers (1)

Rajat
Rajat

Reputation: 19

There was a Hibernate configuration in my application which compares the backend datatype with the datatype of the field defined in Java code. Configuration/Property that does that is,

<property name="hibernate.hbm2ddl.auto" value="validate"/>

I commented that out. Here is a reference video, why i do not need it for my production environment. https://www.youtube.com/watch?v=WJGbbqu0wxw

Upvotes: 0

Related Questions