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 "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2011/01/04 19:06:45 UTC

[jira] Commented: (DERBY-4957) describe and show commands failed to execute in Eclipse Plugin

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

Myrna van Lunteren commented on DERBY-4957:
-------------------------------------------

I just tested the following steps:
- in an eclipse installation with 10.7 derby core plugin and 1.1.2 ui/doc plugin installed
- create a new project
- add derby nature
- run ij from the project and issue the following:
   connect 'jdbc:derby:d4957db;create=true';
   disconnect;
- create a file in eclipse (d4957.sql) with following contents:
------------------------------------------
connect 'jdbc:derby:d4957db';
show schemas;
describe sys.systables;
disconnect;
------------------------------------------
- right click on the file, select Apache Derby, and 'Run SQL script using 'ij'.
it all worked fine.

Here's the theory:
The ui plugin is on top of the core plugin. The core plugin contains the derby.jar, derbytools.jar, derbynet.jar and derbyclient.jar. So, if the core is correct and in the classpath in eclipse, then there cannot be a difference between the stand-alone version (i.e. outside of eclipse) and how it works in eclipse.
Apart from reasoning that your eclipse installation is not picking up the correct derby*.jar files, I cannot explain the behavior you're seeing.

derby.log will be created when connections are made to a database. The derby.log will be in your project's workspace, unless you're using an absolute path in the url.

>From comments in this thread:
http://old.nabble.com/commands-describe-and-show-failed-in-eclipse-derby-plugin-SQL-editor-td30572157.html
I gather that you obtained "the plugin" from http://db.apache.org/derby/releases/release-10.7.1.1.cgi. You didn't say you installed two plugins, so perhaps you only installed the ui plugin?

I believe certain builds/packagings of the eclipse product have a derby.jar in it, and perhaps you have one of those packages...
So, that's the other theory, you did install both plugins, but you are seeing a problem because eclipse is picking up an older version derby.jar than what's from the core plugin.

To figure out what's happening, please provide answers to the following:
- please specify exactly which package from eclipse you installed
- please confirm you installed 2 plugins. You should have installed:
  http://db.apache.org/derby/releases/release-10.7.1.1.cgi:
  derby_ui_doc_plugin_1.1.2.zip 
*and*
  derby_core_plugin_10.7.1.zip
- please check the version when you run the plugin's sysinfo command.
 (on a project that has derby nature added, highlight the project, richt-click to Apache Derby, select sysinfo). It should show lines something like:
C:\eclipse107plugintst\eclipse\plugins\org.apache.derby.core_10.7.1\derby.jar] 10.7.1.1 - (1040133)
 [C:\eclipse107plugintst\eclipse\plugins\org.apache.derby.core_10.7.1\derbytools.jar] 10.7.1.1 - (1040133)
[C:\eclipse107plugintst\eclipse\plugins\org.apache.derby.core_10.7.1\derbynet.jar] 10.7.1.1 - (1040133)
[C:\eclipse107plugintst\eclipse\plugins\org.apache.derby.core_10.7.1\derbyclient.jar] 10.7.1.1 - (1040133)

- Did you create a new database, or was there an existing database? (Perhaps the database was not upgraded? Although I would have expected even then the new commands to work.)

- if you issue an operating system search for 'derby.jar' (and 'derbytools.jar') starting from your eclipse top directory, is there only one derby.jar?


> describe and show commands failed to execute in Eclipse Plugin
> --------------------------------------------------------------
>
>                 Key: DERBY-4957
>                 URL: https://issues.apache.org/jira/browse/DERBY-4957
>             Project: Derby
>          Issue Type: Bug
>          Components: Eclipse Plug-in
>         Environment: Eclipse Ganymede (3.4) - Eclipse IDE for Java EE Developers
> Build id: I20080617-2000
> Windows XP Professional
> Dell OPTIPLEX 755
>            Reporter: Bruce Wen
>
> Reproduce Steps:
> 1. Install Derby plugin to Eclipse
> 2. Connect to Derby database 
> 3. Create a SQL file
> 4. Execute "show schemas;" statement --- Execution failed and syntax error message "Encountered "show" at line 1, column 1." showed in status panel.
> 5. Execute "describe task;" statement --- Execution failed and syntax error message "Encountered "describe" at line 1, column 1." showed in status panel. Note: task is the table name.
> Note:
> 1. It seems that show and describe commands can not be recognize by the SQL Engine of Eclipse Derby plugin.
> 2. commands create, drop, select, update, delete, insert work well

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