db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Haase (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-159) When Derby runs in Network Server mode, client does not receive warnings generated by Derby - should get documented
Date Tue, 14 Jul 2009 18:31:15 GMT

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

Kim Haase commented on DERBY-159:
---------------------------------

Let me see if I understand this first ...

It's only warnings from the server that don't get to the client, right? Not outright errors.

And this happens whether you're getting the connection programmatically or using the command
line (ij)? This seems to be the case when I try it on the command line too.

The Reference Manual documentation on create=true (http://db.apache.org/derby/docs/dev/ref/rrefattrib26867.html)
says,

"If the database already exists, creates a connection to the existing database and an SQLWarning
is issued."

And further down, rather redundantly, 

"Note: If you specify create=true and the database already exists, an SQLWarning is raised."

It would probably be helpful to mention that if you are running in client mode, you don't
see the warning.

The Reference Manual does not document the retrieveMessageText or retrieveMessagesFromServerOnGetMessage
attributes. The retrieveMessageText attribute is listed in the Admin Guide, in Table 2 of
http://db.apache.org/derby/docs/dev/adminguide/cadminappsclient.html; all the other DataSource
properties in that table are documented as connection URL attributes in the Reference Manual.
The retrieveMessagesFromServerOnGetMessage attribute is mentioned in the issue description
but is shown only in two of the demo programs described in the Admin Guide in http://db.apache.org/derby/docs/dev/adminguide/radminsampleprograms.html.
(BTW, the paths for all these programs are incorrect.) Are there two attributes or only one?
If two, what's the difference? If one, which is the correct name? Should the attribute(s)
be documented in the Reference Manual? If so, it should probably be with the notation that
only errors are retrieved from the server, not warnings.

So, action items, the last two of which could be separate issues --

1) Document warning situation for create=true attribute (Ref Man).
2) Mention in cadminappsclient topic that retrieveMessageText or whatever it's called retrieves
only errors, not warnings.
3) Document retrieveMessageText or whatever it's called in the Ref Man.
4) Fix sample program paths in radminsampleprograms topic.

> When Derby runs in Network Server mode, client does not receive warnings generated by
Derby - should get documented
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-159
>                 URL: https://issues.apache.org/jira/browse/DERBY-159
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation, Network Server
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1
>            Reporter: Mamta A. Satoor
>            Assignee: Kim Haase
>         Attachments: d159.java
>
>
> A simple code below will demonstrate that warnings generated by Derby running in Server
mode do not make their way to client. The client code below is trying to create the database
db1drda which already exsits. Server generates a warning for that but the client cde below
does not print it.
> con = DriverManager.getConnection("jdbc:derby:net://localhost:1527/db1drda;create=true:retrieveMessagesFromServerOnGetMessage=true;",
"app", "app");
> SQLWarning warnings1 = con.getWarnings();
> System.out.println("database exists, should get warning");
> while (warnings1 != null)
> {
> 	System.out.println("warnings on connection = " + warnings1);
> 	warnings1 = warnings1.getNextWarning();
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message