You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Sai Zhang (JIRA)" <ji...@apache.org> on 2014/08/15 00:14:18 UTC

[jira] [Commented] (DERBY-6707) Inadequate error messages for configuration errors in Derby

    [ https://issues.apache.org/jira/browse/DERBY-6707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097779#comment-14097779 ] 

Sai Zhang commented on DERBY-6707:
----------------------------------

Simply, the same problem occurs if an invalid value is specified for the "derby.stream.error.field" option, like:

derby.stream.error.field=hello


Here is the error message after issuing a query:

ij> CONNECT 'jdbc:derby:firstdb';
JAVA ERROR: java.lang.ExceptionInInitializerError
ij> select * from COUNTRIES;
IJ ERROR: Unable to establish connection
ij> Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.EmbeddedDriver
	at org.apache.derby.jdbc.AutoloadedDriver.getDriverModule(Unknown Source)
	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
	at java.sql.DriverManager.getConnection(DriverManager.java:579)
	at java.sql.DriverManager.getConnection(DriverManager.java:243)
	at org.apache.derby.impl.tools.ij.utilMain.cleanupGo(Unknown Source)
	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
	at org.apache.derby.tools.ij.main(Unknown Source)
	at org.apache.derby.iapi.tools.run.main(Unknown Source)

> Inadequate error messages for configuration errors in Derby
> -----------------------------------------------------------
>
>                 Key: DERBY-6707
>                 URL: https://issues.apache.org/jira/browse/DERBY-6707
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.10.2.0
>         Environment: All
>            Reporter: Sai Zhang
>              Labels: configuration, invald
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Dear developers,
> Derby's error message for misconfiguration should be improved. Sometimes, the dumped error messages is very unclear, and costs users extra time to figure out a simple problem.
> Here is a reproducible example
> 1.  specify a wrong value for derby.stream.error.method option, and put the following line in the derby.properties file
> derby.stream.error.method=hello   (obvious it is wrong)
> 2. 
> connect to a derby db, and issue a selection query
> 3. 
> derby simply dumped the following error message, which is hard to be connected to the misconfigured option
> ij> CONNECT 'jdbc:derby:firstdb';
> JAVA ERROR: java.lang.ExceptionInInitializerError
> ij> select * from COUNTRIES;
> IJ ERROR: Unable to establish connection
> ij> Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.EmbeddedDriver
> 	at org.apache.derby.jdbc.AutoloadedDriver.getDriverModule(Unknown Source)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:579)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:243)
> 	at org.apache.derby.impl.tools.ij.utilMain.cleanupGo(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> I would sugget to fix this problem by checking invalid configuration option names, and improve error message (at least the error message should pinpoint the likely misconfigured options).
> Please let me know your thoughts.
> Thanks
> -Sai



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Re: [jira] [Commented] (DERBY-6707) Inadequate error messages for configuration errors in Derby

Posted by "Bergquist, Brett" <BB...@canoga.com>.
I am not speaking for the Derby developers but I do know that contributions are most welcome.   I have reported a few bugs and also recently decided that I wished (and others as well) that Derby had a rolling log file feature.  So with the help of the developers, I was able to implement such a feature and provide this back to the community.  The support from the developers was excellent and now a feature that I and others want will be available going forward.

So if this is something that you would like and you think you might be able to provide this functionality, I believe that the developers will be most helpful.

Brett


On Aug 14, 2014, at 6:14 PM, Sai Zhang (JIRA) <ji...@apache.org> wrote:

> 
>    [ https://issues.apache.org/jira/browse/DERBY-6707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097779#comment-14097779 ] 
> 
> Sai Zhang commented on DERBY-6707:
> ----------------------------------
> 
> Simply, the same problem occurs if an invalid value is specified for the "derby.stream.error.field" option, like:
> 
> derby.stream.error.field=hello
> 
> 
> Here is the error message after issuing a query:
> 
> ij> CONNECT 'jdbc:derby:firstdb';
> JAVA ERROR: java.lang.ExceptionInInitializerError
> ij> select * from COUNTRIES;
> IJ ERROR: Unable to establish connection
> ij> Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.EmbeddedDriver
> 	at org.apache.derby.jdbc.AutoloadedDriver.getDriverModule(Unknown Source)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:579)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:243)
> 	at org.apache.derby.impl.tools.ij.utilMain.cleanupGo(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> 	at org.apache.derby.iapi.tools.run.main(Unknown Source)
> 
>> Inadequate error messages for configuration errors in Derby
>> -----------------------------------------------------------
>> 
>>                Key: DERBY-6707
>>                URL: https://issues.apache.org/jira/browse/DERBY-6707
>>            Project: Derby
>>         Issue Type: Bug
>>   Affects Versions: 10.10.2.0
>>        Environment: All
>>           Reporter: Sai Zhang
>>             Labels: configuration, invald
>>  Original Estimate: 24h
>> Remaining Estimate: 24h
>> 
>> Dear developers,
>> Derby's error message for misconfiguration should be improved. Sometimes, the dumped error messages is very unclear, and costs users extra time to figure out a simple problem.
>> Here is a reproducible example
>> 1.  specify a wrong value for derby.stream.error.method option, and put the following line in the derby.properties file
>> derby.stream.error.method=hello   (obvious it is wrong)
>> 2. 
>> connect to a derby db, and issue a selection query
>> 3. 
>> derby simply dumped the following error message, which is hard to be connected to the misconfigured option
>> ij> CONNECT 'jdbc:derby:firstdb';
>> JAVA ERROR: java.lang.ExceptionInInitializerError
>> ij> select * from COUNTRIES;
>> IJ ERROR: Unable to establish connection
>> ij> Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.EmbeddedDriver
>> 	at org.apache.derby.jdbc.AutoloadedDriver.getDriverModule(Unknown Source)
>> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
>> 	at java.sql.DriverManager.getConnection(DriverManager.java:579)
>> 	at java.sql.DriverManager.getConnection(DriverManager.java:243)
>> 	at org.apache.derby.impl.tools.ij.utilMain.cleanupGo(Unknown Source)
>> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
>> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
>> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
>> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
>> I would sugget to fix this problem by checking invalid configuration option names, and improve error message (at least the error message should pinpoint the likely misconfigured options).
>> Please let me know your thoughts.
>> Thanks
>> -Sai
> 
> 
> 
> --
> This message was sent by Atlassian JIRA
> (v6.2#6252)