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 118106 - Unable to deploy Composite Application after rename/undo referenced schema.
Summary: Unable to deploy Composite Application after rename/undo referenced schema.
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-08 14:43 UTC by Michael Nazarov
Modified: 2007-10-15 19:01 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Server log on linux (374.12 KB, application/octet-stream)
2007-10-08 23:10 UTC, tonybeckham
Details
"Refactor Undo" did not save all affected files (69.01 KB, application/octet-stream)
2007-10-10 19:33 UTC, Jun Qian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nazarov 2007-10-08 14:43:49 UTC
Product Version: NetBeans IDE Dev (Build 200710080000)
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

Steps to reproduce:

1. Create BluePrint1 sample (Sample) and BPEL module (Module).
2. Add to Module sample loan application xml schema.
3. Add to Sample reference to Module.
4. Import to purchaseOrder reference to newLoanApplication.
5. Build Sample.
6. Rename newLoanApplication using refactor rename.
7. Undo rename.
8. Cleanup and Build Sample.
9. Deploy Sample Composite Application to GF.
10. Error will come.

...Service assembly deployment failed.
BUILD FAILED (total time: 1 minute 0 seconds)

See also 117674
Comment 1 Sonali Kochar 2007-10-08 19:26:43 UTC
I have never deployed an application to GlassFish. I did the refactor rename/undo and then did deploy..This was the output

run-jbi-deploy:
[deploy-service-assembly]
    Deploying a service assembly...
        host=localhost
        port=4848
        file=C:\Documents and Settings\Sonali\My
Documents\NetBeansProjects\BluePrint11\BluePrint11Application/dist/BluePrint11Application.zip
[start-service-assembly]
    Starting a service assembly...
        host=localhost
        port=4848
        name=BluePrint11Application
run:
BUILD SUCCESSFUL (total time: 13 seconds)


Does this mean the application deployed successfully? I'll need help here to be sure I am doing the right steps.

I am using JDK 150_12..

Tony,

Can you see if this works for you ?
Comment 2 Sonali Kochar 2007-10-08 20:20:25 UTC
ok. I logged into the Admin console and see the BluePrint1 application listed under JBI -> Service Assemblies - >
BluePrint1 Application

I guess this does mean my application deployed successfully. I deployed it after refactor rename/undo..

I'll now test it with JDK 1.6

Tony, Misha

Can you also please take a look?
Comment 3 Sonali Kochar 2007-10-08 22:22:36 UTC
Tested with JDK 1.6 and it works for me

Operating System        = Windows XP version 5.1 running on x86
Java; VM; Vendor        = 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06; Sun Microsystems Inc.
Comment 4 Michael Nazarov 2007-10-08 22:34:22 UTC
Did you see failed notification in log as well?
Comment 5 Sonali Kochar 2007-10-08 22:52:26 UTC
I am sorry but I didn't understand ur last comment. I am able to deploy the application successfully. I don't see any
failed notifications.  Which log? Since I have never done a lot of work with Glassfish, you will have to give me
detailed instructions. The Glassfish V2 output tab in Netbeans IDE says deployed successfully. I then logged into the
admin console and see the application under JBI

Are you seeing any errors? Can you please attach the stacktrace/errors? Also, let me know which log file you are seeing
the errors.
Comment 6 tonybeckham 2007-10-08 22:57:09 UTC
I can reproduce this on the following system:

Product Version: NetBeans IDE Dev (Build 200710071200)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)


The server output is:
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
init-deploy:
deps-jar:
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init-taskdefs:
init:
pre-dist:
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init-taskdefs:
init:
deps-sub-project:
Duplicated project name in import. Project -impl defined first in
/home/tony/NetBeansProjects/BluePrint1/BluePrint1/nbproject/build-impl.xml and again in
/home/tony/NetBeansProjects/BpelModule1/nbproject/build-impl.xml
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init-taskdefs:
init:
pre-dist:
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init-taskdefs:
init:
deps-sub-project:
PackageRetrievedFiles:
Deleting directory /home/tony/NetBeansProjects/BpelModule1/build/dependentProjectFiles
Created dir: /home/tony/NetBeansProjects/BpelModule1/build/dependentProjectFiles
dist_se:
Building jar: /home/tony/NetBeansProjects/BpelModule1/build/SEDeployment.jar
Expanding: /home/tony/NetBeansProjects/BpelModule1/build/SEDeployment.jar into
/home/tony/NetBeansProjects/BluePrint1/BluePrint1/build/BpelModule1
Warning: /home/tony/NetBeansProjects/BluePrint1/BluePrint1/build/BpelModule1/WEB-INF/classes not found.
PackageRetrievedFiles:
Deleting directory /home/tony/NetBeansProjects/BluePrint1/BluePrint1/build/dependentProjectFiles
Created dir: /home/tony/NetBeansProjects/BluePrint1/BluePrint1/build/dependentProjectFiles
dist_se:
Building jar: /home/tony/NetBeansProjects/BluePrint1/BluePrint1/build/SEDeployment.jar
Expanding: /home/tony/NetBeansProjects/BluePrint1/BluePrint1/build/SEDeployment.jar into
/home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/src/jbiServiceUnits/BluePrint1
Moving 1 file to /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/src/jbiServiceUnits/BluePrint1
deps-javaee-jar:
jbi-build:
Copying 1 file to /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/src/jbiServiceUnits
Building jar: /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/build/BCDeployment.jar
 copying Sub-Assembly: /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/build/BluePrint1.jar
Create /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/build/sun-http-binding.jar for binding component
sun-http-binding
Writing out to file:
/home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/src/jbiServiceUnits/sun-http-binding/jbi.xml
Deleting: /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/build/BCDeployment.jar
Building jar: /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/dist/BluePrint1Application.zip
run-jbi-deploy:
[deploy-service-assembly]
    Deploying a service assembly...
        host=localhost
        port=4848
        file=/home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/dist/BluePrint1Application.zip
Successful execution of Deploy: /home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/dist/BluePrint1Application.zip
WARNING: (JBIMA0404) Deployment of service assembly BluePrint1Application succeeded partially; some service units failed
to deploy.
    * Component: sun-http-binding
      ERROR: (SOAPBC_DEPLOY_2) Failed to deploy: javax.wsdl.WSDLException: WSDLException (at
/definitions/types/xsd:schema/xs:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced
at ''BpelModule1/XXX.xsd'', relative to
''file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-sun-http-binding/sun-http-binding/BluePrint1/purchaseOrder.xsd''.:
java.io.FileNotFoundException: This file was not found:
file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-sun-http-binding/sun-http-binding/BluePrint1/BpelModule1/XXX.xsd
[start-service-assembly]
    Starting a service assembly...
        host=localhost
        port=4848
        name=BluePrint1Application
Failed execution of Start: BluePrint1Application
    * Component: sun-bpel-engine
      ERROR: () <component-task-result>
  <component-name>sun-bpel-engine</component-name>
  <component-task-result-details xmlns="http://java.sun.com/xml/ns/jbi/management-message">
    <task-result-details>
      <task-id>Init</task-id>
      <task-result>FAILED</task-result>
      <message-type>ERROR</message-type>
      <exception-info>
        <nesting-level>1</nesting-level>
        <msg-loc-info>
          <loc-token>BPELSE</loc-token>
          <loc-message>Service unit BluePrint1Application-BluePrint1 failed to load deployment
/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine
:Error while loading BPEL file
/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.bpel,
Exception details are Cannot parse BPEL (see below):
==> Cannot load imported document com.sun.bpel.model.impl.ImportImpl@832ce5={<?xml version="1.0" encoding="utf-8" ?>
<import namespace="http://manufacturing.org/wsdl/inventory/bp1"
        location="InventoryService.wsdl"
        importType="http://schemas.xmlsoap.org/wsdl/"></import>} (see below):
==> Unable to import wsdl document for import com.sun.bpel.model.impl.ImportImpl@832ce5={<?xml version="1.0"
encoding="utf-8" ?>
<import namespace="http://manufacturing.org/wsdl/inventory/bp1"
        location="InventoryService.wsdl"
        importType="http://schemas.xmlsoap.org/wsdl/"></import>} (see below):
==> Failed to resolve publicId http://manufacturing.org/wsdl/inventory/bp1 and systemId InventoryService.wsdl to a
WSDLDocument. (see below):
==> Failed to parser xsd document
file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.wsdl
(see below):
==> Cannot load WSDL
file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.wsdl
(see below):
==> Error parsing wsdl
file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.wsdl
(see below):
==> Cannot parse WSDL (see below):
==> Cannot parse inline schema(see below): 
 ==> Error reading import file
'file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/BpelModule1/XXX.xsd':
java.io.FileNotFoundException:
/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/BpelModule1/XXX.xsd
(No such file or directory) </loc-message>
        </msg-loc-info>
        <stack-trace>com.sun.jbi.engine.bpel.impl.BPELSEException: Error while loading BPEL file
/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.bpel,
Exception details are Cannot parse BPEL (see below):
==> Cannot load imported document com.sun.bpel.model.impl.ImportImpl@832ce5={<?xml version="1.0" encoding="utf-8" ?>
<import namespace="http://manufacturing.org/wsdl/inventory/bp1"
        location="InventoryService.wsdl"
        importType="http://schemas.xmlsoap.org/wsdl/"></import>} (see below):
==> Unable to import wsdl document for import com.sun.bpel.model.impl.ImportImpl@832ce5={<?xml version="1.0"
encoding="utf-8" ?>
<import namespace="http://manufacturing.org/wsdl/inventory/bp1"
        location="InventoryService.wsdl"
        importType="http://schemas.xmlsoap.org/wsdl/"></import>} (see below):
==> Failed to resolve publicId http://manufacturing.org/wsdl/inventory/bp1 and systemId InventoryService.wsdl to a
WSDLDocument. (see below):
==> Failed to parser xsd document
file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.wsdl
(see below):
==> Cannot load WSDL
file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.wsdl
(see below):
==> Error parsing wsdl
file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/InventoryService.wsdl
(see below):
==> Cannot parse WSDL (see below):
==> Cannot parse inline schema(see below): 
 ==> Error reading import file
'file:/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/BpelModule1/XXX.xsd':
java.io.FileNotFoundException:
/home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies/BluePrint1Application/BluePrint1Application-BluePrint1/sun-bpel-engine/BpelModule1/XXX.xsd
(No such file or directory) </stack-trace>
      </exception-info>
    </task-result-details>
  </component-task-result-details>
</component-task-result>
/home/tony/NetBeansProjects/BluePrint1/BluePrint1Application/nbproject/build-impl.xml:239: Service assembly deployment
failed.
BUILD FAILED (total time: 7 seconds)
Comment 7 tonybeckham 2007-10-08 23:03:39 UTC
Same result on Windows w/ JDK 1.6.0_03 as on Linux.
Comment 8 tonybeckham 2007-10-08 23:08:13 UTC
In the IDE make sure that the output window is open.
Goto the menu item Window->Output->Output

Also you can get the server log by switching to the services tab, expand the Servers node, rt click GF->view server log.
Comment 9 tonybeckham 2007-10-08 23:10:29 UTC
Created attachment 50445 [details]
Server log on linux
Comment 10 Sonali Kochar 2007-10-08 23:44:44 UTC
I looked at Tony's system and the log says that the purchaseOrder.xsd imports XXX.xsd that it cant find. This is the
name to which the loanApplication was refactor -> renamed and undone. Alhtough we did a clean build and the projects in
netbeans shows that purchaseOrder.xsd imports newLoanApplication not sure why the build application has the wrong
purchaseOrder.xsd

I looked at /home/tony/Desktop/NetBeans/Nightly/glassfish-v2-b58g/domains/domain1/jbi/service-assemblies

Here the BluePrint1 application has purchaseOrder that still refers to  XXX.xsd whereas the BpelModule1 under this dir
has loanApplication.xsd

We again did a clean build and deployed. Now it worked fine..

Not sure whats going on with the build process..Investigating..
Comment 11 _ hong_lin 2007-10-09 00:02:24 UTC
Maybe it is an issue in Runtime side. I am ccing Jun and Tien. Hopefully they can take a look at the issue.
Comment 12 Jun Qian 2007-10-10 03:18:24 UTC
Is this a Linux-only issue?

If the project works fine with a clean & build, then it's probably OK. I can look into it if someone could attach the
loan application.

Also, what is "refactor rename" of a CompApp project name in step 6?
Comment 13 Michael Nazarov 2007-10-10 10:05:16 UTC
>> System: Windows XP
> Is this a Linux-only issue?

No.

As for refactor -- you should right click on specified file and choose Refactor / Rename menu item. Then specify new
name and Rename.
Comment 14 Jun Qian 2007-10-10 19:32:23 UTC
Yes, I could reproduce the problem. This seems to be a refactoring related issue.

After I got the deployment error, I did a search for the refactored new name ("XXX") in step 6. The search result
indicated that the PurchaseOrder.xsd under BluePrint1/src still used the refactored new name. After I double click in
the search result window to open this file, the "Save All" button in the toolbar became enabled, indicating there's some
unsaved file during refactor undo. See attached snapshot.
Comment 15 Jun Qian 2007-10-10 19:33:55 UTC
Created attachment 50620 [details]
"Refactor Undo" did not save all affected files
Comment 16 Sonali Kochar 2007-10-11 08:19:34 UTC
Fixed
Checking in RefactoringUtil.java;
/cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/spi/RefactoringUtil.java,v  <--  RefactoringUtil.java
new revision: 1.7; previous revision: 1.6
done
Comment 17 tonybeckham 2007-10-15 19:01:54 UTC
Fix Verified in 6.0 Beta2 Build 200710151100.