cancel
Showing results for 
Search instead for 
Did you mean: 

How see SQL output in Eclipse?

0 Kudos
1,345

Hello,

I am using Eclipse Oxygen to build and test my Java code that accesses a SQL Anywhere server (a High Availability group). When I have an exception related to server access I often see the following in the exception dump:

Examine the SQLWarnings chained to this exception for the reasons(s).

Documentation for the -z option when starting a server @ the documentation says "The information appears in the database server messages window." The Eclipse Show View menu item offers various "SQL related" views but none that I can find show any Warnings info. Would some one please tell me:

1) How can Eclipse be configured to display SQLWarnings. 2) If the -z option is to be used, how does this affect launching servers in an HA group?

Thank you.

VolkerBarth
Contributor
0 Kudos

Hm, I do not fully understand your question:

In my very humble JDBC understanding, SQLWarnings should be available via the according JDBC methods like stmt.getWarnings(), and if you want to be informed about warnings (instead of errors, which will throw an exception), you would need to call thoses methods after an according database operation has been done.

So does your framework display no exceptions at all or no warnings?

0 Kudos

Hi Volker,

The Eclipse IDE has a "Console" pane in which the Java App server shows its log messages as well as all of my log messages. Sometimes a Java Exception is thrown that is displayed in the Console and, as I described above, it tells me to look at SQL Warnings for details. No (SQL) Warnings are in the Console so I'm thinking/hoping there is another Eclipse pane that picks up and Warnings being spun out of SQL Anywhere. The Warnings would have to be getting picked up by the Java app server for them to have any chance of getting back to the Console but I have no visibility into that. I'm hoping somebody here uses Eclipse for their Java dev and knows about this.

Thanks.

Vlad
Product and Topic Expert
Product and Topic Expert

I haven't found a way how to stream logs from dbsrv17 to Eclipse, but Internet said you can use ssh (or remote file access) to server's logs and a tail-like application that always displays the actual data.

VolkerBarth
Contributor

Can't tell on Eclipse, haven't used it lately. However, I guess the warnings displayed by dbrsvX -z relate to communication issues whereas a connection's warnings deal usually with positive SQLCODE messages, say 100 for "Row not found" and the like. I don't think the console log would contain those...

Accepted Solutions (0)

Answers (0)