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 109163 - Component Error-page can appear after opening of project, related to existing DB connection
Summary: Component Error-page can appear after opening of project, related to existing...
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: John Baker
URL:
Keywords:
Depends on:
Blocks: 123537
  Show dependency tree
 
Reported: 2007-07-09 18:43 UTC by _ alexpetrov
Modified: 2008-01-15 10:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE-screenshot (163.14 KB, image/jpeg)
2007-07-09 18:44 UTC, _ alexpetrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ alexpetrov 2007-07-09 18:43:17 UTC
Product Version: NetBeans IDE Dev (Build 200707090000) 
Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

1. Connect to Derby DB Travel (jdbc:derby://localhost:1527/travel) and Oracle DB
(jdbc:oracle:thin:@jbrave-pc1.sfbay.sun.com:1521:ora10g)
2. Create 2 new VWP projects and DnD JSF component Table on Design View for each project.
3. For the 1st project DnD any Oracle DB table on its JSF Table, 
for the 2nd project DnD any Derby DB table on its JSF Table.
4. Disconnect and delete Derby DB connection.
Click "Close" in the appeared dialog.
5. Close both projects.
6. Reopen both projects.

Result:
- Component Error-pages will appear for BOTH projects (see the attached screenshot), 
though when "Continue" is clicked, for the 1st project, related to existing Oracle DB connection, 
correct Design View with JSF Table will be displayed.

P.S.
Inherited from 
http://www.netbeans.org/issues/show_bug.cgi?id=100725
Comment 1 _ alexpetrov 2007-07-09 18:44:33 UTC
Created attachment 44841 [details]
IDE-screenshot
Comment 2 John Baker 2007-07-17 22:00:01 UTC
105321 might be the same issue
it appears the current project is not set for this use case
Comment 3 John Baker 2007-08-25 00:13:22 UTC
won't have time to get to this for beta1
Comment 4 John Baker 2007-10-17 03:18:42 UTC
I may have a fix, but I'm unable to test because of parser errors http://www.netbeans.org/issues/show_bug.cgi?id=118646
Comment 5 John Baker 2007-11-01 00:31:44 UTC
Found the API to use but now it's a matter of timing.  It's getting called before a connection has been established

RefreshService.getDefault().refresh(CurrentProject.getInstance().getOpenedProject()) ;
Comment 6 John Baker 2007-11-01 19:41:27 UTC
Fix available for just one project at a time.

Working on enabling for all pages from all open projects
Comment 7 John Baker 2007-11-03 01:47:40 UTC
Seems to be a risky fix.
My latest attempt makes things worse

I have another fix if just one project and one page are opened.
The connection is made and the page refreshes correctly.

However, the fix won't work for multiple projects.
Comment 8 John Baker 2007-12-14 02:24:48 UTC
Fixed
Checking in visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/datasource/CurrentProject.java;
/cvs/visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/datasource/CurrentProject.java,v 
<--  CurrentProject.java
new revision: 1.23; previous revision: 1.22
done
Checking in
visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/project/datasource/ProjectDataSourceTracker.java;
/cvs/visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/project/datasource/ProjectDataSourceTracker.java,v
 <--  Pr
taSourceTracker.java
new revision: 1.17; previous revision: 1.16
done
Comment 9 Roman Mostyka 2008-01-15 10:44:28 UTC
Verified with NetBeans IDE Dev (Build 200801140000). Tried with NetBeans IDE 6.0.1 dev (Build 200801140000), but not
successful.