Skip to main content

JDBC driver not capable exception

  • February 24, 2014
  • 4 replies
  • 19 views

James_Pettyjohn
Forum|alt.badge.img
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?

4 replies

Daniel_Leybovic
Forum|alt.badge.img+1
  • Participating Frequently
  • February 24, 2014
Hi!

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.

Forum|alt.badge.img+2
  • Participating Frequently
  • February 24, 2014
Hi all,

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

Daniel_Leybovic
Forum|alt.badge.img+1
  • Participating Frequently
  • February 24, 2014
Ok :)))
Now its your turn.
Good Luck!

James_Pettyjohn
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • February 25, 2014
Ah, yes - mistook that - should have said prepared statement. I am using the vertica-jdbc-7.0.0-0.jar with openJDK 1.7.0_09-icedtiea on 64 fedora.

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.