JDBC driver not capable exception
As a disclaimer, I understand it is not suggested to use Hibernate with Vertica - I understand but I'm short on options.
I am trying to save a record in vertica using hibernate, it results in an attempts to do a stored procedure for the insert, the response is 'Driver not capable.'
The last calls on the driver is com.vertica.jdbc.common.SConnection.prepareStatement then the ExceptionConverter.toSQLException().
The insert is a simple insert, no attempted use of sequence or the like - just insert into public.person (person_id, name) values(?,?);
Any clues on how to get around this?
I am trying to save a record in vertica using hibernate, it results in an attempts to do a stored procedure for the insert, the response is 'Driver not capable.'
The last calls on the driver is com.vertica.jdbc.common.SConnection.prepareStatement then the ExceptionConverter.toSQLException().
The insert is a simple insert, no attempted use of sequence or the like - just insert into public.person (person_id, name) values(?,?);
Any clues on how to get around this?
0
Comments
Vertica doesn't supports in SP (and no work around, if its not supported, its not supported), so you should ask in JBoss Hibernate forums how to change this setting and not Vertica. My be dynamic INSERT will work?
Probably Hibernate trying to create a SP for INSERT, so for work around ask in Hibernate forums.
It's true that Vertica doesn't support stored procedures. But this actually looks like a prepared statement, which we do support.
If it really is a stored procedure, could you post the procedure definition? (I don't know that I can help, but I'm curious.)
Also -- what version of our driver (and what version of Java) are you using? Do you see this issue with the latest version? If it really is a prepared statement, then we probably haven't identified the issue yet, and newer drivers might help.
Thanks,
Adam
Now its your turn.
Good Luck!
I've read the rest of this stack trace and found it's not failing on the insert per se - it's an identity generator strategy and it's trying GetGeneratedKeysDelegate.prepare() on org.hibernate.id.IdentityGenerator.
The table is using identity(1,1) for the PK.
This seems to make more sense - still haven't figured out a working configuration.