cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "metatech (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6567) Allow alternate wildcard in Camel CXF Transport for Blueprint
Date Thu, 03 Sep 2015 09:17:45 GMT

    [ https://issues.apache.org/jira/browse/CXF-6567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14728738#comment-14728738
] 

metatech commented on CXF-6567:
-------------------------------

Hi Aki,
I understand what you means : defining a custom org.xml.sax.ErrorHandler in the method "org.apache.aries.blueprint.parser.Parser.validate(Schema)",
which ignores these errors. But can the error messages generated by the XML validating parser
be considered as a stable API ? It looks like string parsing would be needed to extract the
code from the exception message of class org.xml.sax.SAXParseException, because it contains
no "code" field, only a "message" field.  And are these errors using the same syntax with
an alternate parser implementation ?
Example : 
{code}
"cvc-datatype-valid.1.2.1: '*.camel-destination' is not a valid value for 'NCName'. "
{code}


> Allow alternate wildcard in Camel CXF Transport for Blueprint
> -------------------------------------------------------------
>
>                 Key: CXF-6567
>                 URL: https://issues.apache.org/jira/browse/CXF-6567
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.0.5
>         Environment: ServiceMix 5.4.1
>            Reporter: metatech
>            Assignee: Akitoshi Yoshida
>         Attachments: CXF_blueprint_alternate_wildcard.diff
>
>
> We are trying to use Camel CXF Transport within Blueprint. 
> We followed the intructions on this page : 
> http://camel.apache.org/camel-transport-for-cxf.html
> However, when defining a camel destination with an ID containing an asterisk and dot
: 
> <camel:destination id="*.camel-destination" camelContextId="camel1" />
> Blueprint XSD validation fails with the exception below [1]. 
> In Spring, an ID is defined as a "xs:string", whereas in Blueprint, an ID is defined
as "NCName" (non-colonized name), which disallows "asterisk". 
> Here is a patch to support an alternate wildcard which uses only characters allowed ("__WILDCARD__")
to replace the asterisk ("*").
> <camel:destination id="__WILDCARD__.camel-destination" camelContextId="camel1" />
> {code}
> 2015-08-11 17:10:16,014 [int Extender: 1] ERROR BlueprintContainerImpl         - Unable
to start blueprint container for bundle CxfTransportBlueprintTest 
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate
xml 
>         at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:288) 
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:313)

>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261)

>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
>         at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)

>         at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)

>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)

>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)

>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

>         at java.lang.Thread.run(Thread.java:744) 
> Caused by: org.xml.sax.SAXParseException; cvc-datatype-valid.1.2.1: '*.camel-destination'
is not a valid value for 'NCName'. 
>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)

>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)

>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)

>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)

>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)

>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:458)

>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3237)

>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(XMLSchemaValidator.java:2832)

>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2769)

>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2056)

>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:746)

>         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:277)

>         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:244)

>         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:190)

>         at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:109)

>         at javax.xml.validation.Validator.validate(Validator.java:124) 
>         at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:285) 
>         ... 13 more 
> {code}
> http://camel.465427.n5.nabble.com/Camel-CXF-Transport-works-within-Blueprint-only-when-XSD-validation-is-disabled-td5770593.html#a5771007



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message