This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190166 - The schema on the Database could not be changed or set as default schema
Summary: The schema on the Database could not be changed or set as default schema
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-05 22:39 UTC by kelvin_ng
Modified: 2010-10-21 16:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kelvin_ng 2010-09-05 22:39:35 UTC
The java database (jdbc) derby with GlassFish 3.0.1 is used in the project. The problem occur when the default schema APP is set to default on service panel but the properties of database is remain unchanged.

The following steps could be done to reproduce the problem:

1. Create Java DB under service panel, and set database name as test, username and password as ADMIN.
2. Right click the "test" database under Java DB and choose connect.
3. Under the Databases, double click the newly created jdbc:derby://localhost:1527/test [admin on ADMIN].
4. Right click on APP and set as Default Schema.
5. Right click the database file jdbc:derby://localhost:1527/test [admin on ADMIN] and the schema is remained ADMIN.

When the schema remained as ADMIN, I've tried to go on my project and create a new entity class from database. Database Connection is chose correctly and there is no Available Tables in the list (Note that I have created few tables).

If, on the creation of database, the username is set as APP, then the database created will be using APP schema by default. Then create a new entity class from a project and choose the database with schema APP and the tables under Available Tables list is shown correctly.

This bug seems like the scheme of database is depend solely on the username, and the option to set another schema as default is not worked (can be seen from the properties of the database under "Schema")

And another bug is that, schema is depend on the username, i.e, ADMIN, the schema list under database do not have ADMIN as the new schema. So another question come, we are not possible to create a new schema? Only the schema listed can be used?
Comment 1 Jiri Rechtacek 2010-10-20 10:42:09 UTC
Confirmed bug in NB7.0M2, I'm starting to fix it.
Comment 2 Jiri Rechtacek 2010-10-21 16:25:17 UTC
Changeset: 913ae1a747c8
Author:    Jiri Rechtacek <jrechtacek@netbeans.org>
Date:      2010-10-21 18:21
Message:   #190166: The schema on the Database could not be changed or set as default schema
Issue #190166 - The schema on the Database could not be changed or set as default schema