Schema validation does not register the exception with the Problem, yet Problem 
looks for it and finds it to be not-null
------------------------------------------------------------------------------------------------------------------------

                 Key: TUSCANY-2325
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2325
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Problem Determination
         Environment: All
            Reporter: Hasan Muhammad
            Priority: Critical


The following code exists in ValidatingXMLStreamReader
    
    /**
     * Report a error.
     * 
     * @param problems
     * @param message
     * @param model
     */
    private void error(String message, Object model, Object... 
messageParameters) {
        Problem problem = new ProblemImpl(this.getClass().getName(), 
"contribution-validation-messages", Severity.ERROR, model, message, 
(Object[])messageParameters);
        monitor.problem(problem);
    }

In this case, it does not register the exception with the problem. In the 
monitor code, we have this

else if (problem.getSeverity() == Severity.ERROR) {
            if (problem.getCause() != null) {
                problemLogger.log(Level.SEVERE, problem.getMessageId(), 
problem.getCause());
            } else {
                problemLogger.log(Level.SEVERE, problem.getMessageId(), 
problem.getMessageParams());
            }

It finds the cause to be not null, and simply logs the error like this

ValidatingXML E   SchemaError

So either, the Reader should register the exception with problem, or the cause 
be explicitely initalized to null in the ProblemImpl

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to