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 91380 - New validator needed: when assign is not defined with copy elements error is not clear
Summary: New validator needed: when assign is not defined with copy elements error is ...
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Validation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
: 96877 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-21 00:45 UTC by Murali Pottlapelli
Modified: 2008-03-04 17:16 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Murali Pottlapelli 2006-12-21 00:45:20 UTC
Error message copied here is correct technically, but does not serve any
purpose. No clue what to do.

cvc-complex-type.2.4.b: The content of element 'bpws:assign' is not complete.
One of
'{"http://schemas.xmlsoap.org/ws/2004/03/business-process/":documentation,
WC[##other:"http://schemas.xmlsoap.org/ws/2004/03/business-process/"],
"http://schemas.xmlsoap.org/ws/2004/03/business-process/":targets,
"http://schemas.xmlsoap.org/ws/2004/03/business-process/":sources,
"http://schemas.xmlsoap.org/ws/2004/03/business-process/":copy,
"http://schemas.xmlsoap.org/ws/2004/03/business-process/":extensibleAssign}' is
expected.
Comment 1 Sergey Lunegov 2007-03-02 09:33:36 UTC
Related to validation ?
Comment 2 kiran_bhumana 2007-03-06 20:14:17 UTC
refer to my comments on http://www.netbeans.org/issues/show_bug.cgi?id=96877

One idea is that you can suggest that the file is invalid, because it has this.
Typically validation errors have two aspects. 
1) What is wrong in the current file?
2) What is correct and/or suggesting How it can be corrected?

Again here the most likely thing to suggest is to have a copy.
Comment 3 Vladimir Yaroslavskiy 2007-03-12 13:42:04 UTC
Marked as INCOMPLETE. Please provide detailed steps to reproduce:

1. open BPEL project
2. create BPEL process
3. ...
4. ...

Please provide build number.
Please try to reproduce with the latest *Hula* build.
Comment 4 Murali Pottlapelli 2007-03-12 17:28:38 UTC
This can be reproduced with 200703050600.
1. open BPEL project
2. create BPEL process
3. Add assign to it
4. validate the business process.
5. It reports two errors.
one on Receive/createInstance, second one on Assign. This bug is reported on 
Assign error. Only part I understand in this error is "Assign" is incomplete, 
but do not understand rest of the error. Can this be made more helpful to user? 

Comment 5 Vladimir Yaroslavskiy 2007-03-15 14:10:34 UTC
The validation message is pretty clear, is says that "The content of element
'bpws:assign' is not complete. One of
'{"http://docs.oasis-open.org/wsbpel/2.0/process/executable":documentation,
WC[##other:"http://docs.oasis-open.org/wsbpel/2.0/process/executable"],
"http://docs.oasis-open.org/wsbpel/2.0/process/executable":targets,
"http://docs.oasis-open.org/wsbpel/2.0/process/executable":sources 
"http://docs.oasis-open.org/wsbpel/2.0/process/executable":copy,
"http://docs.oasis-open.org/wsbpel/2.0/process/executable":extensionAssignOperation}'

is expected.

So user has to setup one of the missed elements, for example "copy".
This message is generated based on schema description and provides detailed
information.
Comment 6 Murali Pottlapelli 2007-03-22 17:13:33 UTC
The reason I opened this bug is usability.

You are right error message is accurate, not easy to reade, needs to scroll 
horizontally to read it.

Our tool does not support support creation of any other child node other than 
copy, why error canot be explicit?
OR
Alternatively word it such that missing COPY node indicated first. 
Comment 7 Vladimir Yaroslavskiy 2007-03-23 10:25:51 UTC
Denis,

Could you please provide information if usability of output message can be
improved? Where and how is the message generated? What module/subsystem
generates it?
Comment 8 Vladimir Yaroslavskiy 2007-03-23 10:32:27 UTC
The problem is that standard validator from jdk is used for validation. We can't
modify message from it or improve the validator.
Comment 9 Vladimir Yaroslavskiy 2007-03-23 10:33:31 UTC
Can't be fixed because we use standard validator from jdk.
Comment 10 Murali Pottlapelli 2007-03-26 19:07:18 UTC
What is the purpose of the validation message if is is not helping the user?
Comment 11 Vladimir Yaroslavskiy 2007-03-27 08:40:27 UTC
Why do you think that the validation message is not helping the user? This
message is generated by *standard validator from JDK*, not from bpel. Validator
is based on the definition of bpel document, so it provides as much information
as possible. I agree that this message is not pretty convenient for user, but
*we can not change* the situation (we can not modify the validator from jdk). If
you want that messages from the validator would be more clear, please, file bug
against *jdk*, not bpel.
Comment 12 Ritesh Adval 2007-03-30 18:33:25 UTC
The validation message shown above is cominog from bpel schema validation.

So as such JDK validation api (which internally using xercers parser for 
validation) is used which validates bpel file with bpel schema and it reports 
these generic message based on what is wrong after validating against a schema.

Although the argument that the errors message are not very useful is true and 
I have seen people complain about this but this not an easy problem to solve.

Only solution which I can think of is write our own schema based validation on 
top of netbeans schema model, and provide more meaninful error messages.
We need to see if we can register this netbeans schema model based validator 
as a standard jdk validator provider.

This is not an easy task in itself. Hope this helps.

 




Comment 13 Murali Pottlapelli 2007-03-30 18:39:31 UTC
Thanks for the info. I understand the issue now. Can we change this to
enhancement? We definitely need this, it should be high priority.
Comment 14 Sergey Lunegov 2007-04-02 13:31:33 UTC
Need to evaluate it more
Comment 15 Vladimir Yaroslavskiy 2007-04-02 14:36:40 UTC
As it was written we should develop own schema based validator such it was done
 in xerces. For example, xerces library is about 1.1 Mb, so we need enough
resources to implement it.

NetBeans schema API module has hard-coded registration of internal xerces
validator. We can register any extra validators but can't unregister xerces
validator or replace it.

Writing of new xml validator is not bpel specific (bpel specific is schema
definition only whcich has been already done), so I reassign the issue to xml
module.

I agree that this is not an easy task.
Comment 16 Vladimir Yaroslavskiy 2007-04-03 11:47:17 UTC
*** Issue 96877 has been marked as a duplicate of this issue. ***
Comment 17 kiran_bhumana 2008-03-04 17:16:39 UTC
There are other bugs I filed similar to this one, which are being marked as duplicate of this directly or indirectly.
Instead of filing duplicates, if they are referred from here, who ever fixes this one will fix them as well. Otherwise,
when this bug is fixed, even though the underlying code might be there, the exact issues which are filed would go
un-addressed. I hope you don't close those other bugs marking them duplicate.

One thing to note on implementation, re-implementing the jdk validator is not the only solution. You can probably extend
it or provide your own listeners (Error handlers, content handlers) to enhance the error messages.