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 84652 - Validation works for wsdl and fails for BPEL project > build
Summary: Validation works for wsdl and fails for BPEL project > build
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Project (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Sreenivasan Genipudi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-11 22:25 UTC by Sherry Barkodar
Modified: 2006-10-17 16:29 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
the loanapplication, ejb project & BPEL project zip (37.26 KB, application/octet-stream)
2006-09-11 22:26 UTC, Sherry Barkodar
Details
new loanapp.zip that includes the partners (36.02 KB, application/octet-stream)
2006-09-11 23:52 UTC, Sherry Barkodar
Details
loan.zip attached (27.19 KB, application/octet-stream)
2006-10-03 22:57 UTC, Sherry Barkodar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sherry Barkodar 2006-09-11 22:25:04 UTC
Using Build 060908
Created a EJB Module named LoanProcessor
Create a WebService named LoanProcessor
Create a BPEL Project named LoanRequestor
Create a BPEL process named LoanRequestor1.bpel
D&D the webservice to the LoanRequestor1.bpel  Process:
The LoanProcessor.wsdl is added to the LoanRequestor project under
LoanRequestor > ProcessFiles > Partners > LoanProcessor > localhost_8080 >
LoanProcesorService > LoanProcessor.wsdl.
When I validate the LoanProcessor.wsdl it validates fine. No error.
But when I when I build the BPEL project(LoanRequestor project) It gives me the
following err message:
D:\sherrydev\SOA\delet\LoanRequestor\src\Partners\LoanProcessor\localhost_8080\LoanProcessorService\LoanProcessor.wsdl:14:
column:4 ERROR: In part "parameters", attribute element's value
"tns:processApplication" is not a valid xml schema element available in this
wsdl file. : Specify a valid schema element value for element attribute.
D:\sherrydev\SOA\delet\LoanRequestor\src\Partners\LoanProcessor\localhost_8080\LoanProcessorService\LoanProcessor.wsdl:17:
column:4 ERROR: In part "parameters", attribute element's value
"tns:processApplicationResponse" is not a valid xml schema element available in
this wsdl file. : Specify a valid schema element value for element attribute.
D:\sherrydev\SOA\delet\LoanRequestor\nbproject\build-impl.xml:152: Found
compilation errors.
Comment 1 Sherry Barkodar 2006-09-11 22:26:16 UTC
Created attachment 33793 [details]
the loanapplication, ejb project & BPEL project zip
Comment 2 Sherry Barkodar 2006-09-11 23:52:08 UTC
Created attachment 33796 [details]
new loanapp.zip that includes the partners
Comment 3 Praveen Savur 2006-09-12 01:42:38 UTC
I see the catalog file being deleted after 'Build' is invoked on the project.
The absence of catalog is possibly the reason for this bug.

I also see a new 'Populate Catalog' action on the project. Is this action related?

Somebody in bpelproject should investigate.

Example build output:

init:
deps-clean:
do-clean:
Deleting:
C:\temp2\to_delete\synchronous2a\SynchronousSample4\SynchronousSample4\catalog.xml
post-clean:
clean:
pre-init:
Comment 4 Sherry Barkodar 2006-09-12 18:30:03 UTC
The schema LoanProcessorService_schema1.xsd is located in:
http://arash.sfbay.sun.com:8080/LoanProcessorService/LoanProcessor/__container$publishing$subctx/META-INF/wsdl/LoanProcessorService_schema1.xsd
When I do Populate Catalog, it gives me the following error:
Error: File not found in the specified address :
http://arash.sfbay.sun.com:8080/loanprocessorservice/loanprocessor/__container$publishing$subctx/meta-inf/wsdl/loanprocessorservice_schema1.xsd
The two address are the same except since the URL is case sensitive, it cannot
find the second URL; some lowercase letters in the URL.
Comment 5 Sreenivasan Genipudi 2006-09-12 19:33:18 UTC
I imported the projects from 84652   in my enterprise pack build ( yesterdays ). 

1)	Populate Catalog will do nothing in this project as this project contains all
the WSDL and XSDs the bpel refers to. 
2)	When I do build , I am getting the following error 
Created dir: C:\Sreeni\alaska\projects\1\LoanRequestorBpel\build
C:\Sreeni\alaska\projects\1\LoanRequestorBpel\src\LoanRequestor1.bpel:65:
column:8 ERROR: cvc-complex-type.4: Attribute 'partnerLink' must appear on
element 'reply'.
C:\Sreeni\alaska\projects\1\LoanRequestorBpel\src\LoanRequestor1.bpel:65:
column:8 ERROR: cvc-complex-type.4: Attribute 'operation' must appear on element
'reply'.

This is the error I am getting when I open the Bpel (LoanRequestor1.bpel) and
click validate 

This seems to be a validation problem. 

I will fix the  deletion of catalog during project clean.

The schema LoanProcessorService_schema1.xsd is located in:
http://arash.sfbay.sun.com:8080/LoanProcessorService/LoanProcessor/__container$publishing$subctx/META-INF/wsdl/LoanProcessorService_schema1.xsd
When I do Populate Catalog, it gives me the following error:
Error: File not found in the specified address :
http://arash.sfbay.sun.com:8080/loanprocessorservice/loanprocessor/__container$publishing$subctx/meta-inf/wsdl/loanprocessorservice_schema1.xsd
The two address are the same except since the URL is case sensitive, it cannot
find the second URL; some lowercase letters in the URL.

Is the URL correct?. Did you try retrieveing this XSD using retriever wizard (
by creating new external XSD )?.

Retriever API is used to retrieve the XML resource.
Comment 6 Sreenivasan Genipudi 2006-09-12 19:56:25 UTC
I will also fix the lowercase problem in URL
Comment 7 Sherry Barkodar 2006-09-12 20:16:56 UTC
Make sure you use the loanapp.zip. Do not use the loan.zip.
Sherry
Comment 8 Sreenivasan Genipudi 2006-09-12 23:38:38 UTC
Fixed. Please try using the latest enterprise pack build
Comment 9 Sherry Barkodar 2006-09-13 20:51:01 UTC
I am using build 060913 and the bug is not fixed.
I can deploy the wsdl file but when I deploy the BPEL project I get the
following err:
pre-init:
netbeans.home: C:\ide060912-13_11\netbeans\platform6
netbeans.user: C:\Documents and Settings\Administrator\.netbeans\5.5dev
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init-taskdefs:
init:
pre-dist:
Created dir: C:\Documents and Settings\Administrator\BpelModule6\build
C:\Documents and
Settings\Administrator\BpelModule6\src\localhost_8080\LoanProcessorService\LoanProcessor.wsdl:8:
column:4 ERROR: In part "parameters", attribute element's value
"tns:processApplication" is not a valid xml schema element available in this
wsdl file. : Specify a valid schema element value for element attribute.
C:\Documents and
Settings\Administrator\BpelModule6\src\localhost_8080\LoanProcessorService\LoanProcessor.wsdl:11:
column:4 ERROR: In part "parameters", attribute element's value
"tns:processApplicationResponse" is not a valid xml schema element available in
this wsdl file. : Specify a valid schema element value for element attribute.
C:\Documents and
Settings\Administrator\BpelModule6\nbproject\build-impl.xml:153: Found
compilation errors.
BUILD FAILED (total time: 2 seconds)
Comment 10 Sherry Barkodar 2006-09-13 20:53:31 UTC
I meant I can validate the LoanProcessor.wsdl but the Project doesn't build and
it  shows the error on this line:
 <part name="parameters" element="tns:processApplication"/>
Comment 11 Sherry Barkodar 2006-09-14 00:23:28 UTC
This is a showstopper for endtoend tut.
Comment 12 Sreenivasan Genipudi 2006-09-14 00:53:26 UTC
If I build the Bpel Project , it doesn't throw any validation error.
But when a build is done from JBI project, validation error is found.

I tested just building the bpel project standalone.. 

I will look at this.
Comment 13 Sreenivasan Genipudi 2006-09-14 02:16:28 UTC
There are couple of problems. 
CAPS  Project is in 
C:\Sreeni\alaska\projects\LoanJBI

Bpel Project is in 
C:\Sreeni\alaska\projects\loanappzip\LoanRequestor

CAPS and JBI project are not in same folder level.

When a Bpel project is added to CAPS project, the entry for the Bpel project
1)  in CAPS project.propeties is incorrect.

Property file location -
C:\Sreeni\alaska\projects\LoanJBI\nbproject\project.properties

entry in project.properties 

project.LoanRequestor=../LoanRequestor

It seems to be assuming that JBI project and Bpel project lies in same folder.

It should be something like.. 

project.LoanRequestor=../loanappzip/LoanRequestor

2) private.properties has incorrect entry.
Location - C:\Sreeni\alaska\projects\LoanJBI\nbproject\private\private.properties

There is a wrong entry for bpel project in this file 
project.LoanRequestor=C:\\Sreeni\\alaska\\projects\\LoanRequestor
It should have been like 
project.LoanRequestor=C:\\Sreeni\\alaska\\projects\\loanappzip\\LoanRequestor

I am assigning this issue to Comp app project.

Comment 14 Jun Qian 2006-09-14 22:39:23 UTC
I don't see the JBI project in the two attachments from Sherry. Sreeni, did you
create the JBI project yourself?

I created my JBI project (in a different directory) and added the LoanRequestor
bpel project. I don't see the reference problem you described. Could you let me
know how you got into this state?
Comment 15 Sreenivasan Genipudi 2006-09-14 23:37:05 UTC
Jun, 
 I think there were 2 bpel projects with same name in my folder and it was my 
mistake that I chose the wrong bpel project in JBI project.


Sherry, 
Before building the project, you need to invoke "Populate Catalog" as
LoanProcessor.wsdl is importing an external XSD

  <types>
    <xsd:schema>
      <xsd:import namespace="http://loanprocessor.sun.com/"
schemaLocation="http://arash.sfbay.sun.com:8080/LoanProcessorService/LoanProcessor/__container$publishing$subctx/META-INF/wsdl/LoanProcessorService_schema1.xsd"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
    </xsd:schema>
  </types>

If Populate Catalog is invoked prior to build, the build on the project is going
on fine. 

If populate catalog is not invoked, then the build problem is seen.

Invoke Populate Catalog and try again.
If you still see the problem.. please describe the exact steps that you are doing.

Comment 16 jlautz 2006-09-22 16:40:18 UTC
I am closing this as verified with 060921_1. 

I am assuming that because I no longer see the error described by barkodar when
I opened the loanapp.zip projects and ran a build on the LoanRequestor project,
that this bug has been fixed.

If anyone feels that I need to go through the creation steps to verify the fix,
please provide a pointer to the tutorial text.
Comment 17 Sherry Barkodar 2006-10-03 22:57:26 UTC
Created attachment 34837 [details]
loan.zip attached
Comment 18 Sherry Barkodar 2006-10-03 23:04:34 UTC
This bug is some how related to bug #85837 but one should be able to reproduce
this bug even when the #85837 is fixed . 
Comment 19 Sreenivasan Genipudi 2006-10-04 04:24:07 UTC
WSDL validation in the Editor is differening with the validation during build.

In the editor, the validation is ignoring the invalid schema location and
picking only the valid ones and validating, where as during build it seems to be
checking the validity of schema location. 

LoanRequestor.wsdl has following imports.
       <xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/LoanRequestor"
xmlns:ns1="http://xml.netbeans.org/schema/LoanRequestor">
            <xsd:import namespace="http://xml.netbeans.org/schema/LoanRequestor"
schemaLocation="../../../../sherrydev/SOA/delet2/LoanRequestor/src/LoanRequestor.xsd"/>
            <xsd:import namespace="http://xml.netbeans.org/schema/LoanRequestor"
schemaLocation="LoanRequestor.xsd"/> 
        </xsd:schema>


If this is validated from editor, it looks like it is ignoring the invalid
schema import 

           <xsd:import namespace="http://xml.netbeans.org/schema/LoanRequestor"
schemaLocation="../../../../sherrydev/SOA/delet2/LoanRequestor/src/LoanRequestor.xsd"/>


when the same is done from build, it is failing on the invalid import.

Kini, 
 This looks like WSDL model problem. Can you please assign to appropriate person.

Comment 20 Chris Webster 2006-10-04 15:56:20 UTC
Please verify the following
Assertion : The validators used from the editor and ant are supposed to be the
same. 
Assertion : The model code should also be the same
Assertion : the CatalogModel support is different. 

The schema validator won't fail if the schema cannot be reached, only if
something from the unreachable schema is referenced will an error occur. I think
the best approach here is to start by verifying that the operation of the
CatalogModel is expected. The CatalogModel implementations are a known
difference and we should start by ruling this out from the project perspective. 
Comment 21 Sherry Barkodar 2006-10-04 20:26:56 UTC
I did spend some time and got the following observation:
Another difference between the editor and the build is that the editor validate,
when using absolute path for the schema location:
schemaLocation="../../../../sherrydev/SOA/delet2/LoanRequestor/src/LoanRequestor.xsd",
but the build dos validate only the relative path:
schemaLocation="LoanRequestor.xsd"
In fact the editor is even mistakingly, validates when I am not typing the
correct  number of slashes('../').  No matter how many slashes I put there it
still validates. As long as the directory is correct.
Comment 22 Shivanand Kini 2006-10-04 20:40:00 UTC
Observations from debugging both ways (Type 1. Using WSDL validator Type 2.
Using project ant task.

Type 2. Using BPELCatalogModel line 222. getDocument(file) returns null.
Creating the lookup causes null pointer exception, schema doesnt get resolved.
The next import is not processed for schemaModel.findSchemas(namespace)

Type1. Throws CatalogModelException is properly caught, and proceeds with the
next import, which is valid.

Moving to bpel project, assigning to sreeni for further resolution/assigment
Comment 23 Ritesh Adval 2006-10-04 21:10:56 UTC
Sreeni,

Please fix the null pointer exception as reported by kini in BPELCatalogModel.
Basically Throws CatalogModelException if file not a valid file.

getDocument(File) if file does not exist throw CatalogModelException 

Kini,
please create another enhancement bug to check in schema semantic validator, if 
the imported xsd exists, if not it should flag an error. This bug can be fixed 
later since NB is frozen.


Thanks.
Comment 24 Sreenivasan Genipudi 2006-10-05 08:36:32 UTC
The fix is checked into release55_dev.  The fix is to throw
CatalogModelException if the File is not found in BpelCatalogModel.java

project/antsrc/org/netbeans/modules/bpel/project/anttasks/BPELCatalogModel.java
Comment 25 Michael Frisino 2006-10-05 10:12:33 UTC
Who needs to catch this exception? Are they aware of the addition?
Comment 26 Sreenivasan Genipudi 2006-10-05 21:26:46 UTC
This is an internal method called by 
public ModelSource getModelSource(URI locationURI) throws CatalogModelException.


getDocument(File) is not visible to public.

Comment 27 Ritesh Adval 2006-10-06 04:46:55 UTC
This change looks fine to me.
Comment 28 Sreenivasan Genipudi 2006-10-07 06:41:31 UTC
Fixed. Please use next build to test.
Comment 29 Sreenivasan Genipudi 2006-10-07 06:43:46 UTC
I tried doing clean and build on Synchronous sample project/ any other bpel project
many number of times (100 )and didn't encounter out of memory error.
Comment 30 Sreenivasan Genipudi 2006-10-07 06:48:31 UTC
Build on LoanRequest bpel project is happening in recent build.
Comment 31 Mikhail Kondratyev 2006-10-17 16:29:28 UTC
With one obvious change (correcting one of the imports that was pointing to a
nonexistent file) the application executed successfully.
Marking issue as verified.