Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Piet Blok
Hi,
 
I noticed some different behaviour between Derby EmbeddedDriver and ClientDriver. This was a disappointment, because I wanted to develop a Derby application that may switch between the two drivers.
 
Differences I noticed are:
 
1) EmbeddedDriver accepts and uses a Properties object as the second parameter on the connect method. ClientDriver accepts, but does NOT USE the Properties object. A bug?
 
2) When an attempt is made to connect to a non-existing database (no attribute create=true) EmbeddedDerby throws an SQLException with SQLState "XJ004", ClientDriver "08004" (connection refused with additional text database does not exist). A bug?
 
3) ResultSet behaviour: When I execute, in this order, ResultSet.getMetaData(), then execute ResultSet. next() until it returns false, and then again execute ResultSet.getMetaData(), EmbeddedDriver does as requested, however, ClientDriver throws an SQLException at the last getMetaData() saying that the ResultSet has been closed. A bug or should this be expected?
 
 (The reason for this strange sequence is the following: I wanted to create a JTable as follows: new JTable(createColumnData(resultset), createHeaderData(resultset)). Apparently this was processed by java from left to right. For EmbeddedDriver no problem.)
 
I prepared a small (175 lines) piece of java code that demonstrates all three differences. If you wish I can send it.
 
(I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use Eclipse 3.1 to compile my classes. I have all the derby jar files in the EXT directory of the JRE)
 
A question about the Eclipse plugins: I read the warning that these plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there any chance that in the near future an official release of these plugins will be available for the official Eclipse 3.1 release? Yes, I also read the prescriptions on how to alter the plugins so they can be used with the official release but, having no experience at all with SubVersion, Ant, Plugin development and whatever needed to perform this alteration other than things working out opposite as expected, I decided to live without the plugin and wait.
 
Piet Blok
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Arda M
what is the eclipse plugin used for?
-marda


Piet Blok <[hidden email]> wrote:
Hi,
 
I noticed some different behaviour between Derby EmbeddedDriver and ClientDriver. This was a disappointment, because I wanted to develop a Derby application that may switch between the two drivers.
 
Differences I noticed are:
 
1) EmbeddedDriver accepts and uses a Properties object as the second parameter on the connect method. ClientDriver accepts, but does NOT USE the Properties object. A bug?
 
2) When an attempt is made to connect to a non-existing database (no attribute create=true) EmbeddedDerby throws an SQLException with SQLState "XJ004", ClientDriver "08004" (connection refused with additional text database does not exist). A bug?
 
3) ResultSet behaviour: When I execute, in this order, ResultSet.getMetaData(), then execute ResultSet. next() until it returns false, and then again execute ResultSet.getMetaData(), EmbeddedDriver does as requested, however, ClientDriver throws an SQLException at the last getMetaData() saying that the ResultSet has been closed. A bug or should this be expected?
 
 (The reason for this strange sequence is the following: I wanted to create a JTable as follows: new JTable(createColumnData(resultset), createHeaderData(resultset)). Apparently this was processed by java from left to right. For EmbeddedDriver no problem.)
 
I prepared a small (175 lines) piece of java code that demonstrates all three differences. If you wish I can send it.
 
(I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use Eclipse 3.1 to compile my classes. I have all the derby jar files in the EXT directory of the JRE)
 
A question about the Eclipse plugins: I read the warning that these plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there any chance that in the near future an official release of these plugins will be available for the official Eclipse 3.1 release? Yes, I also read the prescriptions on how to alter the plugins so they can be used with the official release but, having no experience at all with SubVersion, Ant, Plugin development and whatever needed to perform this alteration other than things working out opposite as expected, I decided to live without the plugin and wait.
 
Piet Blok

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Bernt M. Johnsen
In reply to this post by Piet Blok
>>>>>>>>>>>> Piet Blok wrote (2005-08-21 17:33:00):
> Hi,
>
> I noticed some different behaviour between Derby EmbeddedDriver and
> ClientDriver. This was a disappointment, because I wanted to develop
> a Derby application that may switch between the two drivers.

There are some differences between the drivers, and some of them are
logged already logged in Jira
(e.g. http://issues.apache.org/jira/browse/DERBY-371,
http://issues.apache.org/jira/browse/DERBY-517 and
http://issues.apache.org/jira/browse/DERBY-501). If you find
differences which are not already in Jira, it would be nice if you
reported them.

>
> Differences I noticed are:
>
> 1) EmbeddedDriver accepts and uses a Properties object as the second parameter on the connect method. ClientDriver accepts, but does NOT USE the Properties object. A bug?
>
> 2) When an attempt is made to connect to a non-existing database (no attribute create=true) EmbeddedDerby throws an SQLException with SQLState "XJ004", ClientDriver "08004" (connection refused with additional text database does not exist). A bug?
>
> 3) ResultSet behaviour: When I execute, in this order, ResultSet.getMetaData(), then execute ResultSet. next() until it returns false, and then again execute ResultSet.getMetaData(), EmbeddedDriver does as requested, however, ClientDriver throws an SQLException at the last getMetaData() saying that the ResultSet has been closed. A bug or should this be expected?
>
>  (The reason for this strange sequence is the following: I wanted to create a JTable as follows: new JTable(createColumnData(resultset), createHeaderData(resultset)). Apparently this was processed by java from left to right. For EmbeddedDriver no problem.)
>
> I prepared a small (175 lines) piece of java code that demonstrates all three differences. If you wish I can send it.
>
> (I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use Eclipse 3.1 to compile my classes. I have all the derby jar files in the EXT directory of the JRE)
>
> A question about the Eclipse plugins: I read the warning that these plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there any chance that in the near future an official release of these plugins will be available for the official Eclipse 3.1 release? Yes, I also read the prescriptions on how to alter the plugins so they can be used with the official release but, having no experience at all with SubVersion, Ant, Plugin development and whatever needed to perform this alteration other than things working out opposite as expected, I decided to live without the plugin and wait.
>
> Piet Blok
--
Bernt Marius Johnsen, Database Technology Group,
Sun Microsystems, Trondheim, Norway

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

bkbonner
In reply to this post by Arda M
Marda, I guess I'd characterize the plugin is a convenience tool for
developers.  The network server can be started and stopped with a
click.  The ij environment can be started with a click.  .sql scripts
can be executed against a db with a click.

Hth,
Brian
On Sun, 21 Aug 2005 8:16 pm, Arda M wrote:

> what is the eclipse plugin used for?
>
> -marda
>
> Piet Blok <[hidden email]> wrote:
>
>> Hi,
>
>> I noticed some different behaviour between Derby EmbeddedDriver and
>> ClientDriver. This was a disappointment, because I wanted to develop a
>> Derby application that may switch between the two drivers.
>
>> Differences I noticed are:
>
>> 1) EmbeddedDriver accepts and uses a Properties object as the second
>> parameter on the connect method. ClientDriver accepts, but does NOT
>> USE the Properties object. A bug?
>
>> 2) When an attempt is made to connect to a non-existing database (no
>> attribute create=true) EmbeddedDerby throws an SQLException with
>> SQLState "XJ004", ClientDriver "08004" (connection refused with
>> additional text database does not exist). A bug?
>
>> 3) ResultSet behaviour: When I execute, in this order,
>> ResultSet.getMetaData(), then execute ResultSet. next() until it
>> returns false, and then again execute ResultSet.getMetaData(),
>> EmbeddedDriver does as requested, however, ClientDriver throws an
>> SQLException at the last getMetaData() saying that the ResultSet has
>> been closed. A bug or should this be expected?
>
>> (The reason for this strange sequence is the following: I wanted
>> to create a JTable as follows: new JTable(createColumnData(resultset),
>> createHeaderData(resultset)). Apparently this was processed by java
>> from left to right. For EmbeddedDriver no problem.)
>
>> I prepared a small (175 lines) piece of java code that
>> demonstrates all three differences. If you wish I can send it.
>
>> (I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use
>> Eclipse 3.1 to compile my classes. I have all the derby jar files in
>> the EXT directory of the JRE)
>
>> A question about the Eclipse plugins: I read the warning that these
>> plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there
>> any chance that in the near future an official release of these
>> plugins will be available for the official Eclipse 3.1 release? Yes, I
>> also read the prescriptions on how to alter the plugins so they can be
>> used with the official release but, having no experience at all with
>> SubVersion, Ant, Plugin development and whatever needed to perform
>> this alteration other than things working out opposite as expected, I
>> decided to live without the plugin and wait.
>
> Piet Blok
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
- Brian (mobile)
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Susan Cline
In reply to this post by Piet Blok
Hi Piet,
 
I've filed a JIRA issue to update the Eclipse plug-ins information and will try to update it this week.  The current version of the plug-ins, available as of the 10.1.1 release of Derby,
are 10.1.1 for the core plug-in and 1.1.0 for the UI plug-in.
 
These *are* officially supported with version 3.1M6 and higher of Eclipse.  Early versions
of Eclipse are not supported.  So, to clarify this is what you should be using:
 
Eclipse 3.1M6 or higher, including Eclipse 3.1 'GA'
Derby Core plug-in, version 10.1.1, available as a zip, derby_core_plugin_10.1.1.zip
Derby UI plug-in, version 1.1.0, available as a zip, derby_ui_plugin_1.1.0.zip
 
The plug-in zip files are available on the 10.1.1 release page:
 
 
Let me know if this is unclear.
 
Susan
 

Piet Blok <[hidden email]> wrote:
(I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use Eclipse 3.1 to compile my classes. I have all the derby jar files in the EXT directory of the JRE)
 
A question about the Eclipse plugins: I read the warning that these plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there any chance that in the near future an official release of these plugins will be available for the official Eclipse 3.1 release? Yes, I also read the prescriptions on how to alter the plugins so they can be used with the official release but, having no experience at all with SubVersion, Ant, Plugin development and whatever needed to perform this alteration other than things working out opposite as expected, I decided to live without the plugin and wait.
 
Piet Blok
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

David Van Couvering
In reply to this post by Piet Blok
Hi, Piet.  We are working on recording and slowly resolving the
differences between the two drivers.  It would be *very* useful for you
to log these issues in JIRA.  Are you amenable to that?

Thanks,

David

Piet Blok wrote:

> Hi,
>  
> I noticed some different behaviour between Derby EmbeddedDriver and
> ClientDriver. This was a disappointment, because I wanted to develop a
> Derby application that may switch between the two drivers.
>  
> Differences I noticed are:
>  
> 1) EmbeddedDriver accepts and uses a Properties object as the second
> parameter on the connect method. ClientDriver accepts, but does NOT
> USE the Properties object. A bug?
>  
> 2) When an attempt is made to connect to a non-existing database (no
> attribute create=true) EmbeddedDerby throws an SQLException with
> SQLState "XJ004", ClientDriver "08004" (connection refused with
> additional text database does not exist). A bug?
>  
> 3) ResultSet behaviour: When I execute, in this order,
> ResultSet.getMetaData(), then execute ResultSet. next() until it
> returns false, and then again execute ResultSet.getMetaData(),
> EmbeddedDriver does as requested, however, ClientDriver throws an
> SQLException at the last getMetaData() saying that the ResultSet has
> been closed. A bug or should this be expected?
>  
>  (The reason for this strange sequence is the following: I wanted
> to create a JTable as follows: new JTable(createColumnData(resultset),
> createHeaderData(resultset)). Apparently this was processed by java
> from left to right. For EmbeddedDriver no problem.)
>  
> I prepared a small (175 lines) piece of java code that
> demonstrates all three differences. If you wish I can send it.
>  
> (I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use
> Eclipse 3.1 to compile my classes. I have all the derby jar files in
> the EXT directory of the JRE)
>  
> A question about the Eclipse plugins: I read the warning that these
> plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there
> any chance that in the near future an official release of these
> plugins will be available for the official Eclipse 3.1 release? Yes, I
> also read the prescriptions on how to alter the plugins so they can be
> used with the official release but, having no experience at all with
> SubVersion, Ant, Plugin development and whatever needed to perform
> this alteration other than things working out opposite as expected, I
> decided to live without the plugin and wait.
>  
> Piet Blok


david.vancouvering.vcf (288 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Piet Blok
In reply to this post by Susan Cline
Thank you Susan,
 
I re-downloaded (to be absolutely sure) the plugins and installed them into Eclipse 3.1 GA and indeed they seem to work. I added the Derby nature to an existing project and was able to start the Derby network driver. A relief it was just outdated information!
 
Piet Blok
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Piet Blok
In reply to this post by David Van Couvering
David,

Thanks for your reply,

From an earlier reply with links to already filed issues (Bernt M Johnson) I
found that my observation number two (different SQLStates) has been noticed
already. The other two I am not sure if they are documented yet. The first
one (Properties not being used by connect() method) is in my opinion
certainly a bug,. The third one I am not sure of: it is certainly a strange
sequence of actions (however, derby embedded does not mind).

I am certainly willing to create a Jira issue, but first I have to find out
exactly how to do this (sorry, I am not an experienced Open Source
Contributor, so certainly not this evening). If someone else, more
experienced than I, would do it, I appreciate it greatly. If anyone wants me
to send the java code that demontrates the behaviour, no problem at all, I
will send it right away.

The question about the derby plugins has, to my great relief, been answered
quite satisfactory by Susan Cline. Thanks.

Piet Blok

----- Original Message -----
From: "David Van Couvering" <[hidden email]>
To: "Derby Discussion" <[hidden email]>
Sent: Monday, August 22, 2005 6:39 PM
Subject: Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a
question about the Eclipse plugin


> Hi, Piet.  We are working on recording and slowly resolving the
> differences between the two drivers.  It would be *very* useful for you
> to log these issues in JIRA.  Are you amenable to that?
>
> Thanks,
>
> David
>
> Piet Blok wrote:
>
>> Hi,
>>
>> I noticed some different behaviour between Derby EmbeddedDriver and
>> ClientDriver. This was a disappointment, because I wanted to develop a
>> Derby application that may switch between the two drivers.
>>
>> Differences I noticed are:
>>
>> 1) EmbeddedDriver accepts and uses a Properties object as the second
>> parameter on the connect method. ClientDriver accepts, but does NOT
>> USE the Properties object. A bug?
>>
>> 2) When an attempt is made to connect to a non-existing database (no
>> attribute create=true) EmbeddedDerby throws an SQLException with
>> SQLState "XJ004", ClientDriver "08004" (connection refused with
>> additional text database does not exist). A bug?
>>
>> 3) ResultSet behaviour: When I execute, in this order,
>> ResultSet.getMetaData(), then execute ResultSet. next() until it
>> returns false, and then again execute ResultSet.getMetaData(),
>> EmbeddedDriver does as requested, however, ClientDriver throws an
>> SQLException at the last getMetaData() saying that the ResultSet has
>> been closed. A bug or should this be expected?
>>
>>  (The reason for this strange sequence is the following: I wanted
>> to create a JTable as follows: new JTable(createColumnData(resultset),
>> createHeaderData(resultset)). Apparently this was processed by java
>> from left to right. For EmbeddedDriver no problem.)
>>
>> I prepared a small (175 lines) piece of java code that
>> demonstrates all three differences. If you wish I can send it.
>>
>> (I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use
>> Eclipse 3.1 to compile my classes. I have all the derby jar files in
>> the EXT directory of the JRE)
>>
>> A question about the Eclipse plugins: I read the warning that these
>> plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there
>> any chance that in the near future an official release of these
>> plugins will be available for the official Eclipse 3.1 release? Yes, I
>> also read the prescriptions on how to alter the plugins so they can be
>> used with the official release but, having no experience at all with
>> SubVersion, Ant, Plugin development and whatever needed to perform
>> this alteration other than things working out opposite as expected, I
>> decided to live without the plugin and wait.
>>
>> Piet Blok
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Susan Cline
In reply to this post by Piet Blok
Thanks for posting so you could get the correct information!  Glad you perserved.
Like I said, I'll update that info later this week.
 
Susan

Piet Blok <[hidden email]> wrote:
Thank you Susan,
 
I re-downloaded (to be absolutely sure) the plugins and installed them into Eclipse 3.1 GA and indeed they seem to work. I added the Derby nature to an existing project and was able to start the Derby network driver. A relief it was just outdated information!
 
Piet Blok
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

David Van Couvering
In reply to this post by Piet Blok
Hi, Piet.  It's really quite easy to work with JIRA, just go to

http://issues.apache.org/jira/browse/DERBY

And click on "Create a new issue in project Derby".  The fields should
be pretty self-explanatory or have good defaults.

Thanks,

David

Piet Blok wrote:

> David,
>
> Thanks for your reply,
>
> From an earlier reply with links to already filed issues (Bernt M
> Johnson) I found that my observation number two (different SQLStates)
> has been noticed already. The other two I am not sure if they are
> documented yet. The first one (Properties not being used by connect()
> method) is in my opinion certainly a bug,. The third one I am not sure
> of: it is certainly a strange sequence of actions (however, derby
> embedded does not mind).
>
> I am certainly willing to create a Jira issue, but first I have to
> find out exactly how to do this (sorry, I am not an experienced Open
> Source Contributor, so certainly not this evening). If someone else,
> more experienced than I, would do it, I appreciate it greatly. If
> anyone wants me to send the java code that demontrates the behaviour,
> no problem at all, I will send it right away.
>
> The question about the derby plugins has, to my great relief, been
> answered quite satisfactory by Susan Cline. Thanks.
>
> Piet Blok
>
> ----- Original Message ----- From: "David Van Couvering"
> <[hidden email]>
> To: "Derby Discussion" <[hidden email]>
> Sent: Monday, August 22, 2005 6:39 PM
> Subject: Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a
> question about the Eclipse plugin
>
>
>> Hi, Piet.  We are working on recording and slowly resolving the
>> differences between the two drivers.  It would be *very* useful for you
>> to log these issues in JIRA.  Are you amenable to that?
>>
>> Thanks,
>>
>> David
>>
>> Piet Blok wrote:
>>
>>> Hi,
>>>
>>> I noticed some different behaviour between Derby EmbeddedDriver and
>>> ClientDriver. This was a disappointment, because I wanted to develop a
>>> Derby application that may switch between the two drivers.
>>>
>>> Differences I noticed are:
>>>
>>> 1) EmbeddedDriver accepts and uses a Properties object as the second
>>> parameter on the connect method. ClientDriver accepts, but does NOT
>>> USE the Properties object. A bug?
>>>
>>> 2) When an attempt is made to connect to a non-existing database (no
>>> attribute create=true) EmbeddedDerby throws an SQLException with
>>> SQLState "XJ004", ClientDriver "08004" (connection refused with
>>> additional text database does not exist). A bug?
>>>
>>> 3) ResultSet behaviour: When I execute, in this order,
>>> ResultSet.getMetaData(), then execute ResultSet. next() until it
>>> returns false, and then again execute ResultSet.getMetaData(),
>>> EmbeddedDriver does as requested, however, ClientDriver throws an
>>> SQLException at the last getMetaData() saying that the ResultSet has
>>> been closed. A bug or should this be expected?
>>>
>>>  (The reason for this strange sequence is the following: I wanted
>>> to create a JTable as follows: new JTable(createColumnData(resultset),
>>> createHeaderData(resultset)). Apparently this was processed by java
>>> from left to right. For EmbeddedDriver no problem.)
>>>
>>> I prepared a small (175 lines) piece of java code that
>>> demonstrates all three differences. If you wish I can send it.
>>>
>>> (I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use
>>> Eclipse 3.1 to compile my classes. I have all the derby jar files in
>>> the EXT directory of the JRE)
>>>
>>> A question about the Eclipse plugins: I read the warning that these
>>> plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there
>>> any chance that in the near future an official release of these
>>> plugins will be available for the official Eclipse 3.1 release? Yes, I
>>> also read the prescriptions on how to alter the plugins so they can be
>>> used with the official release but, having no experience at all with
>>> SubVersion, Ant, Plugin development and whatever needed to perform
>>> this alteration other than things working out opposite as expected, I
>>> decided to live without the plugin and wait.
>>>
>>> Piet Blok
>>
>>
>>
>
>

david.vancouvering.vcf (288 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

oysteing
In reply to this post by Piet Blok
>>>>> "PB" == Piet Blok <[hidden email]> writes:

    PB> Hi,
    PB> I noticed some different behaviour between Derby EmbeddedDriver and ClientDriver. This was a disappointment, because I wanted to develop a Derby application that may switch between the two drivers.

    PB> Differences I noticed are:

    PB> 1) EmbeddedDriver accepts and uses a Properties object as the second parameter on the connect method. ClientDriver accepts, but does NOT USE the Properties object. A bug?

I guess the problem here is that many of the properties has to be set
when the Derby is started.  In the embedded framework this is done on
the first connect.  In the client/server framework, I guess Derby is
started before the first connect.  Hence, it will be too late to set
the properties.  In my opinion, the ClientDriver should throw an
exception if it is not able to set a property.

--
?ystein

Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Piet Blok
In reply to this post by David Van Couvering
OK David,

Jira issues Derby-530 (Properties ignored) and Derby-531 (resultset closed
after next() return false) have been filed.

Thanks for your help.

Piet Blok

----- Original Message -----
From: "David Van Couvering" <[hidden email]>
To: "Derby Discussion" <[hidden email]>
Sent: Tuesday, August 23, 2005 12:58 AM
Subject: Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a
question about the Eclipse plugin


> Hi, Piet.  It's really quite easy to work with JIRA, just go to
>
> http://issues.apache.org/jira/browse/DERBY
>
> And click on "Create a new issue in project Derby".  The fields should
> be pretty self-explanatory or have good defaults.
>
> Thanks,
>
> David
>
> Piet Blok wrote:
>
>> David,
>>
>> Thanks for your reply,
>>
>> From an earlier reply with links to already filed issues (Bernt M
>> Johnson) I found that my observation number two (different SQLStates)
>> has been noticed already. The other two I am not sure if they are
>> documented yet. The first one (Properties not being used by connect()
>> method) is in my opinion certainly a bug,. The third one I am not sure
>> of: it is certainly a strange sequence of actions (however, derby
>> embedded does not mind).
>>
>> I am certainly willing to create a Jira issue, but first I have to
>> find out exactly how to do this (sorry, I am not an experienced Open
>> Source Contributor, so certainly not this evening). If someone else,
>> more experienced than I, would do it, I appreciate it greatly. If
>> anyone wants me to send the java code that demontrates the behaviour,
>> no problem at all, I will send it right away.
>>
>> The question about the derby plugins has, to my great relief, been
>> answered quite satisfactory by Susan Cline. Thanks.
>>
>> Piet Blok
>>
>> ----- Original Message ----- From: "David Van Couvering"
>> <[hidden email]>
>> To: "Derby Discussion" <[hidden email]>
>> Sent: Monday, August 22, 2005 6:39 PM
>> Subject: Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a
>> question about the Eclipse plugin
>>
>>
>>> Hi, Piet.  We are working on recording and slowly resolving the
>>> differences between the two drivers.  It would be *very* useful for you
>>> to log these issues in JIRA.  Are you amenable to that?
>>>
>>> Thanks,
>>>
>>> David
>>>
>>> Piet Blok wrote:
>>>
>>>> Hi,
>>>>
>>>> I noticed some different behaviour between Derby EmbeddedDriver and
>>>> ClientDriver. This was a disappointment, because I wanted to develop a
>>>> Derby application that may switch between the two drivers.
>>>>
>>>> Differences I noticed are:
>>>>
>>>> 1) EmbeddedDriver accepts and uses a Properties object as the second
>>>> parameter on the connect method. ClientDriver accepts, but does NOT
>>>> USE the Properties object. A bug?
>>>>
>>>> 2) When an attempt is made to connect to a non-existing database (no
>>>> attribute create=true) EmbeddedDerby throws an SQLException with
>>>> SQLState "XJ004", ClientDriver "08004" (connection refused with
>>>> additional text database does not exist). A bug?
>>>>
>>>> 3) ResultSet behaviour: When I execute, in this order,
>>>> ResultSet.getMetaData(), then execute ResultSet. next() until it
>>>> returns false, and then again execute ResultSet.getMetaData(),
>>>> EmbeddedDriver does as requested, however, ClientDriver throws an
>>>> SQLException at the last getMetaData() saying that the ResultSet has
>>>> been closed. A bug or should this be expected?
>>>>
>>>>  (The reason for this strange sequence is the following: I wanted
>>>> to create a JTable as follows: new JTable(createColumnData(resultset),
>>>> createHeaderData(resultset)). Apparently this was processed by java
>>>> from left to right. For EmbeddedDriver no problem.)
>>>>
>>>> I prepared a small (175 lines) piece of java code that
>>>> demonstrates all three differences. If you wish I can send it.
>>>>
>>>> (I use the official release of derby: 10.1.1.0, JRE 1.5.0_04, and use
>>>> Eclipse 3.1 to compile my classes. I have all the derby jar files in
>>>> the EXT directory of the JRE)
>>>>
>>>> A question about the Eclipse plugins: I read the warning that these
>>>> plugins can only be used in Eclipse 3.1 up to Milestone 6. Is there
>>>> any chance that in the near future an official release of these
>>>> plugins will be available for the official Eclipse 3.1 release? Yes, I
>>>> also read the prescriptions on how to alter the plugins so they can be
>>>> used with the official release but, having no experience at all with
>>>> SubVersion, Ant, Plugin development and whatever needed to perform
>>>> this alteration other than things working out opposite as expected, I
>>>> decided to live without the plugin and wait.
>>>>
>>>> Piet Blok
>>>
>>>
>>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

Piet Blok
In reply to this post by oysteing
Hi ?ystein

I filed a Jira issue (Derby-530) on the Properties issue. I included a code
fragment illustrating a workaround for the problem. I see no reason why the
ClientDriver cannot do the same internally.

However, there are some other issues: actually, I do not exactly understand
yet the difference between connection attributes and database or other
attributes. The manuals name a couple of connection attributes, but are
these the only attributes? I have to do a lot more studying the manuals and
experimenting before I feel comfortable to comment on your remarks.

Piet Blok

----- Original Message -----
From: ""?ystein Gr?vlen"" <[hidden email]>
To: "Derby Discussion" <[hidden email]>
Sent: Tuesday, August 23, 2005 2:00 PM
Subject: Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a
question about the Eclipse plugin


>>>>>> "PB" == Piet Blok <[hidden email]> writes:
>
>    PB> Hi,
>    PB> I noticed some different behaviour between Derby EmbeddedDriver and
> ClientDriver. This was a disappointment, because I wanted to develop a
> Derby application that may switch between the two drivers.
>
>    PB> Differences I noticed are:
>
>    PB> 1) EmbeddedDriver accepts and uses a Properties object as the
> second parameter on the connect method. ClientDriver accepts, but does NOT
> USE the Properties object. A bug?
>
> I guess the problem here is that many of the properties has to be set
> when the Derby is started.  In the embedded framework this is done on
> the first connect.  In the client/server framework, I guess Derby is
> started before the first connect.  Hence, it will be too late to set
> the properties.  In my opinion, the ClientDriver should throw an
> exception if it is not able to set a property.
>
> --
> ?ystein
>
>
>