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 57171 - New column from updated db schema is not available in sun-ejb-jar/Cmp mappings
Summary: New column from updated db schema is not available in sun-ejb-jar/Cmp mappings
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-30 10:02 UTC by Jan Horvath
Modified: 2013-08-01 12:52 UTC (History)
2 users (show)

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 Jan Horvath 2005-03-30 10:02:14 UTC
build 200503291900

-create EJB module
-create CMP beans from database
-update database table, add column
-recapture schema from database
-open sun-ejb-jar editor /Cmp Mapping

---new column is not available for mapping!
Comment 1 Rochelle Raccah 2005-03-31 07:25:37 UTC
Part of the problem is that the newly captured dbschema has the wrong name and
is therefore put into the cache under a different name.  Petr J., I will send
you what I have found about this so far.

Unfortunately, even correcting that - it is still not showing up in the mapping
screens.  I propose that Petr try to fix the first part and I will look into it
some more after that.
Comment 2 Petr Jiricka 2005-03-31 16:06:01 UTC
Committed the part with wrong name of schema, contributed by Rochelle.

/cvs/db/model/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/RecaptureSchema.java,v
 <--  RecaptureSchema.java
new revision: 1.3; previous revision: 1.2
Comment 3 Rochelle Raccah 2005-03-31 23:49:07 UTC
I've spent the whole day investigating and found that this is still a dbschema
problem - the name being used to put it in the cache is almost the absolute path
the file instead of the relative path under the config/source root in the
project.  The problem is in SchemaElementUtil.forName:
forName(getPackageName(schemaFO, '/'), null);

This code used to work in NB 3.6, but produces the wrong result in project based
NB 4.x.  I'll send Petr J. more info on my investigation directly.
Comment 4 Petr Jiricka 2005-04-01 17:29:07 UTC
Setting TM to 4.1 - serious issue that must be fixed.
Comment 5 Petr Jiricka 2005-04-07 10:49:00 UTC
Partially fixed in trunk. The fix only addresses the case when the schema file
is directly in conf; I don't know how to fix for the subdirectories of conf.

Checking in src/org/netbeans/modules/dbschema/SchemaElementUtil.java;
/cvs/db/model/src/org/netbeans/modules/dbschema/SchemaElementUtil.java,v  <-- 
SchemaElementUtil.java
new revision: 1.5; previous revision: 1.4
done
Checking in src/org/netbeans/modules/dbschema/jdbcimpl/wizard/CaptureSchema.java;
/cvs/db/model/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/CaptureSchema.java,v
 <--  CaptureSchema.java
new revision: 1.2; previous revision: 1.1
done
Checking in RelatedCMPHelper.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ejb/wizard/cmp/RelatedCMPHelper.java,v
 <--  RelatedCMPHelper.java
new revision: 1.10; previous revision: 1.9
done

Diff for review:
http://db.netbeans.org/source/browse/db/model/src/org/netbeans/modules/dbschema/SchemaElementUtil.java?r1=1.4&r2=1.5
http://db.netbeans.org/source/browse/db/model/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/CaptureSchema.java?r1=1.1&r2=1.2
http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ejb/wizard/cmp/RelatedCMPHelper.java?r1=1.9&r2=1.10
Comment 6 _ ludo 2005-04-08 04:04:36 UTC
similar to http://www.netbeans.org/issues/show_bug.cgi?id=57460 ?
Comment 7 Rochelle Raccah 2005-04-08 04:07:01 UTC
No, they are not related
Comment 8 Jan Horvath 2005-04-08 12:22:07 UTC
verifyed in NB 20050408-0935 trunk
Comment 9 Petr Jiricka 2005-04-08 13:04:48 UTC
Partial fix is in trunk; not marking as fixed as this is not fixed completely.
Need to integrate the partial fix to 4.1 branch too.
Comment 10 Petr Jiricka 2005-04-08 13:07:42 UTC
reopen
Comment 11 Petr Jiricka 2005-04-11 12:55:04 UTC
Partial fix also put into the release41 branch. The rest of this issue is a P3,
downgrading.

Checking in SchemaElementUtil.java;
/cvs/db/model/src/org/netbeans/modules/dbschema/SchemaElementUtil.java,v  <-- 
SchemaElementUtil.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in jdbcimpl/wizard/CaptureSchema.java;
/cvs/db/model/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/CaptureSchema.java,v
 <--  CaptureSchema.java
new revision: 1.1.20.1; previous revision: 1.1
done
Checking in RelatedCMPHelper.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ejb/wizard/cmp/RelatedCMPHelper.java,v
 <--  RelatedCMPHelper.java
new revision: 1.9.4.1; previous revision: 1.9
done
Comment 12 Petr Jiricka 2005-11-07 16:19:04 UTC
Since it is not usual to put dbschema files outside of conf, and since there
were no user reports of this problem, this is probably not very serious.
Downgrading to P4.
Comment 13 Petr Blaha 2006-03-13 13:32:09 UTC
TM 5.0 -> TBD
Comment 14 Jiri Rechtacek 2009-07-01 07:57:06 UTC
Reassigned to new owner.