You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Ryan McFall <mc...@hope.edu> on 2011/07/07 17:12:12 UTC

getMajorVersionNumber returning -1

I am using Derby with Hibernate, and am trying to get Hibernate to use
sequences for its identifier generation strategy.

When the DerbyDialect class is asked whether it supports sequences, it is
returning false.  Digging through the source indicates that this is because
the call to getMajorVersionNumber and getMinorVersionNumber are returning
-1.

I'm not sure why this is happening - I've taken a look at the derby source,
and am not sure why this might happen.  Does anyone know what might cause
this?

Thanks for pointers - it seems this used to work but doesn't now.  I think
it might have something to do with the JAR files I have on my classpath,
based on a comment in the derby sources, but I don't see anything amiss.  I
have derbyclient on the classpath, and I'm pretty sure the driver is version
10.7.

Ryan

-- 
Ryan McFall
Associate Professor of Computer Science
Hope College
Holland, MI  49423
Email: mcfall@hope.edu
Phone: 616-395-7952
Fax: 616-395-7123
http://www.hope.edu/cs/mcfall/

Re: getMajorVersionNumber returning -1

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Ryan McFall <mc...@hope.edu> writes:

> I am using Derby with Hibernate, and am trying to get Hibernate to use
> sequences for its identifier generation strategy.
>
> When the DerbyDialect class is asked whether it supports sequences, it
> is returning false.  Digging through the source indicates that this is
> because the call to getMajorVersionNumber and getMinorVersionNumber
> are returning -1.
>
> I'm not sure why this is happening - I've taken a look at the derby
> source, and am not sure why this might happen.  Does anyone know what
> might cause this?  
>
> Thanks for pointers - it seems this used to work but doesn't now.  I
> think it might have something to do with the JAR files I have on my
> classpath, based on a comment in the derby sources, but I don't see
> anything amiss.  I have derbyclient on the classpath, and I'm pretty
> sure the driver is version 10.7.

Hi Ryan,

It sounds like you're seeing the issue discussed here:
https://issues.apache.org/jira/browse/DERBY-4961

-- 
Knut Anders