Options

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?

Comments

  • Options
    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.
  • Options
    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
  • Options
    Ok :)))
    Now its your turn.
    Good Luck!
  • Options
    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file