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 110993

Summary: Migrated app that uses datasources still starts modeling
Product: obsolete Reporter: Yousuf Haider <yousufh>
Component: visualwebAssignee: _ potingwu <potingwu>
Status: NEW ---    
Severity: blocker CC: cnguyencasj, jbaker
Priority: P4    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: Simple Project with button only
Project with data sources

Description Yousuf Haider 2007-07-25 18:05:30 UTC
jdk6u2
build:200707231200

Steps to reproduce:

1. Migrate a project that uses datasources created in Creator, 5.5 or 5.5.1
2. Update Data sources dialog will appear indicating that the project is a migrated one.
3. Update the data sources through the Update Data Sources Context menu item.
4. Once completed make some changes to the project like adding a variable to Page1 and save it. 

Upon clearing the user dir and then reopening the project it again shows the Update Data source dialog indicating that
it still thinks its an old project.
 

This only happens with projects that use data sources. A project without data sources will not show the Update Data
sources dialog when its reopened. 

I am attaching two projects. One is a Simple project with a button and the other is one that uses data sources. Only the
one with data sources will demonstrate this issue.
Comment 1 Yousuf Haider 2007-07-25 18:07:05 UTC
Created attachment 45696 [details]
Simple Project with button only
Comment 2 Yousuf Haider 2007-07-25 18:08:14 UTC
Created attachment 45697 [details]
Project with data sources
Comment 3 John Baker 2007-07-25 18:20:56 UTC
if nothing affecting the functionality then I think this should be lowered to a P3
Comment 4 Yousuf Haider 2007-07-26 17:13:12 UTC
The project version in in the nbproject/project.xml is listed as 2.0 but should be 4.0 once the project has been
imported, changed and saved in NB6.
Comment 5 _ potingwu 2007-07-31 22:08:48 UTC
The project version is used for 'the general project'. Individual components should maintain their own flag/version.

E.g., comp#1 update to new version but not comp#2, project version can't just upgrade then.
Comment 6 Jayashri Visvanathan 2007-08-02 18:48:36 UTC
Per guidelines, downgrading to a P3. But this should be fixed for FCS in my opinion
Comment 7 John Baker 2007-08-09 20:39:20 UTC
No, individual components should not have to maintain the version.

I was told the project module changes the version of the project.
This is a project issue.
Comment 8 John Baker 2007-08-09 20:40:23 UTC
*** Issue 112492 has been marked as a duplicate of this issue. ***
Comment 9 John Baker 2007-08-09 20:53:20 UTC
I had fixed the migration part for databases such that the Alert dialog no longer appears.
Also, I removed the actions on the Data Source Reference node.

Currently database migration process is done automatically without user action.

The remaining issue is that every time a legacy project is opened (and no page from the designer opens)
the database migration starts.

In most cases, the user will open a page of the project after opening a project so that the next time the project is
opened, migration won't occur.

I think the priortity could be reduced to a P4 
Comment 10 _ potingwu 2007-08-09 21:05:28 UTC
> The project version is used for 'the general project'. Individual components should maintain their own flag/version.
> E.g., comp#1 update to new version but not comp#2, project version can't just upgrade then.

As I said, you are using wrong API for checking migration. This API is for the 'the IDE that originally created this
project'. We need to design another kind of flag to indicate the task is done or not by individual component. Please
review again the above comment I put.
Comment 11 John Baker 2007-09-17 07:09:24 UTC
improved fix:

Checking in
visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/datasource/DataSourceResolver.java;
/cvs/visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/datasource/DataSourceResolver.java,v
 <--  DataSourceResolver.java

new revision: 1.19; previous revision: 1.18
done
Checking in
visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/explorer/ProjectDataSourceNode.java;
/cvs/visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/explorer/ProjectDataSourceNode.java,v
 <--  ProjectDataSourceNode.
java
new revision: 1.21; previous revision: 1.20
done