Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] H2 support
[CDO] H2 support [message #659553] Mon, 14 March 2011 14:58 Go to next message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Hi,
I'm using CDO 4.0 with HSQLDB (1.8.0) as backend.

I want to move on H2 db as it seems to be the suggested reference from
CDO Team for Java Relational DB.
Hence, I've downloaded H2 latest version : 1.3.152. Nevertheless, I
can't connect to such a H2 server. It seems net4j H2 adapter only
supports 1.1.117 H2 product.
Is it right so far ?

I've updated the net4j H2 adapter to make it compatible with 1.3.152 H2
bundle, it is running so far...
How to make sure adaptation is really up-to-date ?
I can see some adaptations in H2Adapter class : getTypeName(...), it may
have changed between 1.1.x and 1.3.x.

Is it plan to move on H2 1.3.x versions officially ?

Stephane.
Re: [CDO] H2 support [message #659568 is a reply to message #659553] Mon, 14 March 2011 15:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 14.03.2011 15:58, schrieb Stephane Fournier:
> Hi,
> I'm using CDO 4.0 with HSQLDB (1.8.0) as backend.
>
> I want to move on H2 db as it seems to be the suggested reference from CDO Team for Java Relational DB.
> Hence, I've downloaded H2 latest version : 1.3.152. Nevertheless, I can't connect to such a H2 server. It seems net4j H2 adapter only supports 1.1.117 H2 product.
> Is it right so far ?
I didn't think so. What makes you think that?

>
> I've updated the net4j H2 adapter to make it compatible with 1.3.152 H2 bundle, it is running so far...
Can you attach a patch to a bugzilla? Maybe we can look at it after the EclipseCon.

Are your changes backward compatible or would they imply we had to maintain multiple versions of the adapter?


> How to make sure adaptation is really up-to-date ?
I don't understand this question ;-(

> I can see some adaptations in H2Adapter class : getTypeName(...), it may have changed between 1.1.x and 1.3.x.
What is an adaptation and where exactly are you seeing them?

>
> Is it plan to move on H2 1.3.x versions officially ?
Not yet, but we seem to get more and more complaints about the old driver. Stefan, what do you think?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] H2 support [message #659573 is a reply to message #659568] Mon, 14 March 2011 15:46 Go to previous messageGo to next message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
Hi,

the main reason we support 1.1.117 is that this is the version in Orbit.
If Orbit moves to a new revision, we can and should, too. Otherwise we
would need to either decouple from Orbit or manage multiple revisions.

Cheers,
Stefan

Am 14.03.11 16:26, schrieb Eike Stepper:
> Am 14.03.2011 15:58, schrieb Stephane Fournier:
>> Hi,
>> I'm using CDO 4.0 with HSQLDB (1.8.0) as backend.
>>
>> I want to move on H2 db as it seems to be the suggested reference from
>> CDO Team for Java Relational DB.
>> Hence, I've downloaded H2 latest version : 1.3.152. Nevertheless, I
>> can't connect to such a H2 server. It seems net4j H2 adapter only
>> supports 1.1.117 H2 product.
>> Is it right so far ?
> I didn't think so. What makes you think that?
>
>>
>> I've updated the net4j H2 adapter to make it compatible with 1.3.152
>> H2 bundle, it is running so far...
> Can you attach a patch to a bugzilla? Maybe we can look at it after the
> EclipseCon.
>
> Are your changes backward compatible or would they imply we had to
> maintain multiple versions of the adapter?
>
>
>> How to make sure adaptation is really up-to-date ?
> I don't understand this question ;-(
>
>> I can see some adaptations in H2Adapter class : getTypeName(...), it
>> may have changed between 1.1.x and 1.3.x.
> What is an adaptation and where exactly are you seeing them?
>
>>
>> Is it plan to move on H2 1.3.x versions officially ?
> Not yet, but we seem to get more and more complaints about the old
> driver. Stefan, what do you think?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Re: [CDO] H2 support [message #659575 is a reply to message #659568] Mon, 14 March 2011 15:56 Go to previous messageGo to next message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Hi Eike,

On 14/03/2011 16:26, Eike Stepper wrote:
> Am 14.03.2011 15:58, schrieb Stephane Fournier:
>> Hi,
>> I'm using CDO 4.0 with HSQLDB (1.8.0) as backend.
>>
>> I want to move on H2 db as it seems to be the suggested reference from
>> CDO Team for Java Relational DB.
>> Hence, I've downloaded H2 latest version : 1.3.152. Nevertheless, I
>> can't connect to such a H2 server. It seems net4j H2 adapter only
>> supports 1.1.117 H2 product.
>> Is it right so far ?
> I didn't think so. What makes you think that?
>
In org.eclipse.net4j.db.h2 plug-in, the dependencies to org.h2 refer to
[1.1.0,1.2.0)
Hence, when I tried to connect a cdo server to a Generic H2 Server
1.3.152, I got exceptions :
org.h2.jdbc.JdbcSQLException: Version mismatch, driver version
is "0" but server version is "6" [90047-152]
at org.h2.message.DbException.getJdbcSQLException(DbException.j ava:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:73)
at java.lang.Thread.run(Unknown Source)

org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: Version
mismatch, driver version is "0" but server version is "6" [90047-152]
at org.h2.message.DbException.getJdbcSQLException(DbException.j ava:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:73)
at java.lang.Thread.run(Unknown Source)

H2Adapter class has a constant String VERSION = "1.1.114". Does it mean
it only works with that version ?

>>
>> I've updated the net4j H2 adapter to make it compatible with 1.3.152
>> H2 bundle, it is running so far...
I only changed bundles dependencies from [1.1.0,1.2.0) to [1.1.0,1.4.0)
and I converted h2-1.3.152.jar into a bundle, deployed in my Target
platform.
I did not modify Java code.

> Can you attach a patch to a bugzilla? Maybe we can look at it after the
> EclipseCon.
>
Sure If the changes I made suit the CDO team, I can make a patch.

> Are your changes backward compatible or would they imply we had to
> maintain multiple versions of the adapter?
The changes about org.eclipse.net4j.db.h2 are backward compatible so far.

>
>
>> How to make sure adaptation is really up-to-date ?
> I don't understand this question ;-(

As getTypeName() method seems to convert types, it may have some new
switch cases to handle with the 1.3.x ?

What is the purpose of the constant VERSION referencing 1.1.114 ? Should
we change it to another version ?

>
>> I can see some adaptations in H2Adapter class : getTypeName(...), it
>> may have changed between 1.1.x and 1.3.x.
> What is an adaptation and where exactly are you seeing them?
>
>>
>> Is it plan to move on H2 1.3.x versions officially ?
> Not yet, but we seem to get more and more complaints about the old
> driver. Stefan, what do you think?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Re: [CDO] H2 support [message #659582 is a reply to message #659575] Mon, 14 March 2011 16:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 14.03.2011 16:56, schrieb Stephane Fournier:
> Hi Eike,
>
> On 14/03/2011 16:26, Eike Stepper wrote:
>> Am 14.03.2011 15:58, schrieb Stephane Fournier:
>>> Hi,
>>> I'm using CDO 4.0 with HSQLDB (1.8.0) as backend.
>>>
>>> I want to move on H2 db as it seems to be the suggested reference from
>>> CDO Team for Java Relational DB.
>>> Hence, I've downloaded H2 latest version : 1.3.152. Nevertheless, I
>>> can't connect to such a H2 server. It seems net4j H2 adapter only
>>> supports 1.1.117 H2 product.
>>> Is it right so far ?
>> I didn't think so. What makes you think that?
>>
> In org.eclipse.net4j.db.h2 plug-in, the dependencies to org.h2 refer to org.h2.jdbc.JdbcSQLException: Version mismatch, driver version is "0" but server version is "6" [90047-152]
> at org.h2.message.DbException.getJdbcSQLException(DbException.j ava:327)
> at org.h2.message.DbException.get(DbException.java:167)
> at org.h2.server.TcpServerThread.run(TcpServerThread.java:73)
> at java.lang.Thread.run(Unknown Source)
>
> org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: Version mismatch, driver version is "0" but server version is "6" [90047-152]
> at org.h2.message.DbException.getJdbcSQLException(DbException.j ava:327)
> at org.h2.message.DbException.get(DbException.java:167)
> at org.h2.server.TcpServerThread.run(TcpServerThread.java:73)
> at java.lang.Thread.run(Unknown Source)
>
> H2Adapter class has a constant String VERSION = "1.1.114". Does it mean it only works with that version ?
It's actually meaningless at the moment. We've added the version attribute to the extension point structure for the future when we might have to maintain multiple versions. Today I think, if it comes to that situation, we should better rely on OSGi's versioned dependency management ;-)

>
>>>
>>> I've updated the net4j H2 adapter to make it compatible with 1.3.152
>>> H2 bundle, it is running so far...
> I only changed bundles dependencies from [1.1.0,1.2.0) to [1.1.0,1.4.0) and I converted h2-1.3.152.jar into a bundle, deployed in my Target platform.
> I did not modify Java code.
Ok, that should no longer be necessary as soon as you switch to newer builds.

>
>> Can you attach a patch to a bugzilla? Maybe we can look at it after the
>> EclipseCon.
>>
> Sure If the changes I made suit the CDO team, I can make a patch.
Thanks, but not needed anymore, if it isn't more than the increase of the upper import version :P

>
>> Are your changes backward compatible or would they imply we had to
>> maintain multiple versions of the adapter?
> The changes about org.eclipse.net4j.db.h2 are backward compatible so far.
>
>>
>>
>>> How to make sure adaptation is really up-to-date ?
>> I don't understand this question ;-(
>
> As getTypeName() method seems to convert types, it may have some new switch cases to handle with the 1.3.x ?
That's something you could try to find out exactly, if you want to help us.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
> What is the purpose of the constant VERSION referencing 1.1.114 ? Should we change it to another version ?
>
>>
>>> I can see some adaptations in H2Adapter class : getTypeName(...), it
>>> may have changed between 1.1.x and 1.3.x.
>> What is an adaptation and where exactly are you seeing them?
>>
>>>
>>> Is it plan to move on H2 1.3.x versions officially ?
>> Not yet, but we seem to get more and more complaints about the old
>> driver. Stefan, what do you think?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>


Re: [CDO] H2 support [message #659583 is a reply to message #659573] Mon, 14 March 2011 16:27 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 14.03.2011 16:46, schrieb Stefan Winkler:
> Hi,
>
> the main reason we support 1.1.117 is that this is the version in Orbit.
> If Orbit moves to a new revision, we can and should, too. Otherwise we would need to either decouple from Orbit or manage multiple revisions.
Or we request Eclipse legal approval and maintain a newer version of H2 in Orbit ourselves. The deadline for Indigo CQs has past, though ;-(

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
> Cheers,
> Stefan
>
> Am 14.03.11 16:26, schrieb Eike Stepper:
>> Am 14.03.2011 15:58, schrieb Stephane Fournier:
>>> Hi,
>>> I'm using CDO 4.0 with HSQLDB (1.8.0) as backend.
>>>
>>> I want to move on H2 db as it seems to be the suggested reference from
>>> CDO Team for Java Relational DB.
>>> Hence, I've downloaded H2 latest version : 1.3.152. Nevertheless, I
>>> can't connect to such a H2 server. It seems net4j H2 adapter only
>>> supports 1.1.117 H2 product.
>>> Is it right so far ?
>> I didn't think so. What makes you think that?
>>
>>>
>>> I've updated the net4j H2 adapter to make it compatible with 1.3.152
>>> H2 bundle, it is running so far...
>> Can you attach a patch to a bugzilla? Maybe we can look at it after the
>> EclipseCon.
>>
>> Are your changes backward compatible or would they imply we had to
>> maintain multiple versions of the adapter?
>>
>>
>>> How to make sure adaptation is really up-to-date ?
>> I don't understand this question ;-(
>>
>>> I can see some adaptations in H2Adapter class : getTypeName(...), it
>>> may have changed between 1.1.x and 1.3.x.
>> What is an adaptation and where exactly are you seeing them?
>>
>>>
>>> Is it plan to move on H2 1.3.x versions officially ?
>> Not yet, but we seem to get more and more complaints about the old
>> driver. Stefan, what do you think?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>


Previous Topic:Save key value pairs
Next Topic:[CDO/Teneo] Data type error with H2 support
Goto Forum:
  


Current Time: Thu Apr 18 15:24:13 GMT 2024

Powered by FUDForum. Page generated in 0.02251 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top