Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getting Invalid column type: getInt not implemented for class oracle.jdbc.driver.T4CRowidAccessor

 
somashaker goud
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is my entity class. I tried to remove id from entity for which i got differenct error. I read in some forums that oracle wot support getid so what change do i need to change in my entity class



Below is the stacktrace

 
Tim Nachreiner
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
replace

with

 
somashaker goud
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even after replacing Integer with int issue remained same
 
Tim Nachreiner
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
change your getter to return "int" instead of "Integer"
 
Tim Nachreiner
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also replace it in your setter
 
somashaker goud
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim, Your suggestions worked.

Even my issue got resolved after changing generated annotation as below

@Id
@Column(name="ID", unique = true, nullable = false)
@GeneratedValue(strategy=GenerationType.SEQUENCE)
 
Stephan van Hulst
Bartender
Posts: 6646
90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a cow for your helpful post Tim!
 
Tim Nachreiner
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an example of what my oracle application needed for a sequence.  Thought it might be useful.

 
Dana Ucaed
Ranch Hand
Posts: 156
3
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Somashaker,

Do your code is autogenerated?

If yes, thus it is happen.

 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!