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 96638 - Bpel module duplication occurs when import is added in a schema file.
Summary: Bpel module duplication occurs when import is added in a schema file.
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Catalog Support (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-27 00:37 UTC by htt
Modified: 2007-09-25 01:34 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 htt 2007-02-27 00:37:10 UTC
Create a Web App
  File > New Project > Web > Web Application; accept all defaults (JEE5, AS9,
SL1.5); Finish (WebApplication1).

In Projects,
  right-click WebApplication1 > Web Service; Package = q; Finish (NewWebService)
  expand Web Services
  right-click NewWebService > Add Operation; accept defaults; OK
  right-click WebApplication1 > Deploy Project
  right-click NewWebService > Test Web Service
=> in broswer, note:
   http://localhost:8080/WebApplication2/NewWebServiceService?Tester

Create a Bpel module
  File > New Project > SOA > BPEL Module; Finish
In Projects,
  expand BpelModule1
  right-click Process Files > New > File/Folder > XML > XML Schema; Finish
(newXmlSchema.xsd)
=> at this point, in Files, expand BpelModule1 and note:
        BpelModule1
          nbproject
            private

Open newXmlSchema.xsd
In the Source view of newXmlSchema.xsd, add an import as follow:
  <?xml version="1.0" encoding="UTF-8"?>

  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/schema/newXMLSchema"
            xmlns:tns="http://xml.netbeans.org/schema/newXMLSchema"
            elementFormDefault="qualified">
    <xsd:import
schemaLocation="http://localhost:8080/WebApplication2/NewWebServiceService?xsd=1"
namespace="http://q/" />
  </xsd:schema>

=> in Files, expand BpelModule1 and observe:
        BpelModule1
          BpelModule1
            nbproject
              private
          nbproject
            private

   Seems as soon as the import statement is added to the source, the IDE added a
duplicate Bpel module within the Bpel module.
Comment 1 htt 2007-02-27 01:16:21 UTC
Not considered Beta showstopper.
Comment 2 Sergey Lunegov 2007-02-27 06:23:33 UTC
Not stopper for Beta
Comment 3 Alexei Mokeev 2007-03-05 17:20:58 UTC
Removed Beta EP551_WAIVER_APPROVED keyword - we are going forward to FCS.
Comment 4 htt 2007-03-07 19:49:21 UTC
Looks like this issue applies to a JavaApp project as well, not just specific to
BPEL, i.e. it might be an issue in retriever as nnguyen had suggested.
Comment 5 Nam Nguyen 2007-03-08 01:19:33 UTC
This is issue of retriever Utilities.relativize() return relative path value
start with project directory name.  The relative path should not start with
project directory name.  

Even though retriever functionality still works, the project directory structure
get messed up and also the cached temporary files will be version controlled.  

Probably this is a show-stopper.

Comment 6 Samaresh Panda 2007-03-08 19:12:52 UTC
Looking into it.
Comment 7 Samaresh Panda 2007-03-08 23:03:57 UTC
I have a fix, I've sent it for review. The fix is in retriever module.

Here is the diff:
Index: org/netbeans/modules/xml/retriever/catalog/Utilities.java
===================================================================
RCS file: /cvs/xml/retriever/src/org/netbeans/modules/xml/retriever/catalog/Util
ities.java,v
retrieving revision 1.1.2.14.12.2
diff -r1.1.2.14.12.2 Utilities.java
227c227,228
<         StringBuilder slaveResult = new StringBuilder(slaveLast);
---
>         StringBuilder slaveResult = masterLast.equals(slaveLast)?
>             new StringBuilder():new StringBuilder(slaveLast);
228a230
>             if(slaveResult.length() != 0)
831c833,834
<                 if(pubcatURI != null){
---
>                 if(pubcatURI != null){
>

Note that the we have passed the code-freeze date/time for this module.
Comment 8 Nam Nguyen 2007-03-08 23:39:24 UTC
Fix looks goods.  Please make sure we also have unit test for this issue
directly on the problem Utilities.relativize() method.
Comment 9 Samaresh Panda 2007-03-12 16:47:20 UTC
Fix integrated with unit test.
/cvs/xml/retriever/src/org/netbeans/modules/xml/retriever/catalog/Utilities.java 
new revision: 1.4; previous revision: 1.3
/cvs/xml/retriever/test/unit/src/org/netbeans/modules/xml/retriever/RetrieverTest.java
RetrieverTest.java
new revision: 1.3; previous revision: 1.2
Comment 10 tonybeckham 2007-03-29 22:36:05 UTC
Because Beta has been put in the freezer the fix is VERIFIED in Hula build
200703271800.