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 96732 - [REGRESSION]Got warning when validate .xsd or .wsdl file which referenced a .xsd file in a referenced project
Summary: [REGRESSION]Got warning when validate .xsd or .wsdl file which referenced a ....
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: WSDL Model (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Ritesh Adval
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-28 01:28 UTC by _ hong_lin
Modified: 2007-03-13 07:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff (706 bytes, application/octet-stream)
2007-03-05 23:55 UTC, Ritesh Adval
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ hong_lin 2007-02-28 01:28:43 UTC
build: Gavotte milestone build 7b

This issue is not in Gavotte build 070220_8.

Steps to reproduce it:

1. In IDE, create a BluePrint1 sample.
2. Create a BpelModule1 project under BluePrint1.
3. Select BluePrint1, Add BpelModule1 as one of its "Project References".
4. Add LoanApplication sample schema into BpelModule1.
5. Open "purchaseOrder.xsd" under BluePrint1 into schema editor.
6. Right-click "Referenced Schemas", select "Add -> Import".
7. Import "newLoanApplication.xsd" under BpelModule1.
8. In the Schema Editor window, will see the file is imported.
9. Run "Clean and Build Project" for BluePrint1.

Will get the following warning message:

C:\Documents and Settings\HONG\BluePrint1\BluePrint1\src\purchaseOrder.xsd:27:
column:4 WARNING: schema_reference.4: Failed to read schema document
'BpelModule1/newLoanApplication.xsd', because 1) could not find the document; 2)
the document could not be read; 3) the root element of the document is not
<xsd:schema>.
C:\Documents and Settings\HONG\BluePrint1\BluePrint1\src\purchaseOrder.xsd:27:
column:4 WARNING: schema_reference.4: Failed to read schema document
'BpelModule1/newLoanApplication.xsd', because 1) could not find the document; 2)
the document could not be read; 3) the root element of the document is not
<xsd:schema>.
C:\Documents and Settings\HONG\BluePrint1\BluePrint1\src\purchaseOrder.xsd:27:
column:4 WARNING: schema_reference.4: Failed to read schema document
'BpelModule1/newLoanApplication.xsd', because 1) could not find the document; 2)
the document could not be read; 3) the root element of the document is not
<xsd:schema>.
Comment 1 bhate 2007-03-01 20:20:49 UTC
I am seeing warning with build 070220_8 as well. so Its not regression.
I am not sure if its project reference issue.
Also if you do just a build again there is no warning.
I guess the issue is that the bpel project validation is called before the ant
script can finish copying the referenced schema files.
Comment 2 Nam Nguyen 2007-03-01 21:22:13 UTC
This could be some change from bpel project ant task.  The validation should
happen on source files, not copied files.
Comment 3 Nam Nguyen 2007-03-02 05:39:45 UTC
The failure seems to be fixed by this patch:

RCS file:
/cvs/xml/wsdl/api/src/org/netbeans/modules/xml/wsdl/validator/WSDLInlineSchemaValidator.java,v
retrieving revision 1.1.2.4.10.5
diff -b -r1.1.2.4.10.5 WSDLInlineSchemaValidator.java
366c366
<              return null;                      
---
>              return lsi;                      

Assign to Ritesh for right fix.
Comment 4 Ritesh Adval 2007-03-03 03:58:12 UTC
There was a validation related problem which is already fixed this week.

Please test with latest.
Comment 5 Nam Nguyen 2007-03-04 19:12:01 UTC
Reopen because I refresh release551 xml/wsd/api code and still see the error.
Raise to P1 since it is regression and break Gavote cross-project reference feature.
Comment 6 Ritesh Adval 2007-03-05 18:55:55 UTC
I just tried with latest gavotte (clean and build BluePrint1 ). No error is
reported.
Comment 7 Ritesh Adval 2007-03-05 19:58:32 UTC
This is fixed already. The problem was because of iz
http://xml.netbeans.org/issues/show_bug.cgi?id=85615 with latest gavotte this
error is not reported.

open if you see this error.
Comment 8 Nam Nguyen 2007-03-05 22:17:30 UTC
The test case still missing one step to create an actual component reference:

8a. Create a new element in purchaseOrder.xsd select type 'CarType' from
newLoanApplication.xsd.

With this additional step, by specs the validator have to fail:

Created dir: C:\temp\ritesh\BluePrint1\BluePrint1\build
C:\temp\ritesh\BluePrint1\BluePrint1\src\purchaseOrder.xsd:27: column:4 WARNING:
schema_reference.4: Failed to read schema document
'BpelModule1/LoanApplication.xsd', because 1) could not find the document; 2)
the document could not be read; 3) the root element of the document is not
<xsd:schema>.
C:\temp\ritesh\BluePrint1\BluePrint1\src\purchaseOrder.xsd:32: column:16 ERROR:
src-resolve: Cannot resolve the name 'ns0:CarType' to a(n) 'type definition'
component.
Comment 9 Ritesh Adval 2007-03-05 23:55:17 UTC
Created attachment 39189 [details]
diff
Comment 10 Ritesh Adval 2007-03-05 23:59:01 UTC
This is now fixed in nb6.0
Comment 11 Nam Nguyen 2007-03-06 00:02:52 UTC
Fix is good and verified.  Ready for release551 integration.
Comment 12 Ritesh Adval 2007-03-06 00:10:35 UTC
This is now fixed in nb551.
Comment 13 _ hong_lin 2007-03-06 21:33:32 UTC
Fix is not in build 070305_25. Will check with a newer build later.
Comment 14 _ hong_lin 2007-03-13 07:16:59 UTC
Verified the bug is fixed in build 070312_1