You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ioan Eugen Stan <st...@gmail.com> on 2013/05/20 00:39:25 UTC

sax parser issues with camel validator component

Hello,

I'm using Camel 2.11.0 on Karaf 2.3.1 with validator component and an
XSD file to validate XML's. I'm getting an exception message:

"Caused by: org.xml.sax.SAXParseException: Current configuration of
the parser doesn't allow a maxOccurs attribute value to be set greater
than the value 5.000. "

because of maxOccurs="9999" lines in my XSD. The problem is described
here [1] and it seems I need to disable a JAXP feature called
FEATURE_SECURE_PROCESSING .

Another solution is to change the XSD maxOccurs line to "unbound", but
it seems I can't since we need to follow a business constraint that
limit the number to 9999.

Any suggestions on how can I set
XMLConstants.FEATURE_SECURE_PROCESSING to false on the validator
component?

[1] https://jaxp.java.net/1.4/JAXP-Compatibility.html

Cheers,
--
Ioan Eugen Stan
0720 898 747

Re: sax parser issues with camel validator component

Posted by Christian Müller <ch...@gmail.com>.
Yeah, feel free to log an JIRA.

Best,
Christian

Sent from a mobile device
Am 22.05.2013 15:43 schrieb "Aki Yoshida" <el...@gmail.com>:

> I think there is currently no way in camel to set the parser features for
> the validator. And also for other xml parsers factories.
>
> If that is the case, we should add a mechanism to set these properties.
> Maybe some system properties or/and component properties to overwrite the
> default values.
>
> any comments?
>
>
>
>
> 2013/5/20 Ioan Eugen Stan <st...@gmail.com>
>
> > Hello,
> >
> > I'm using Camel 2.11.0 on Karaf 2.3.1 with validator component and an
> > XSD file to validate XML's. I'm getting an exception message:
> >
> > "Caused by: org.xml.sax.SAXParseException: Current configuration of
> > the parser doesn't allow a maxOccurs attribute value to be set greater
> > than the value 5.000. "
> >
> > because of maxOccurs="9999" lines in my XSD. The problem is described
> > here [1] and it seems I need to disable a JAXP feature called
> > FEATURE_SECURE_PROCESSING .
> >
> > Another solution is to change the XSD maxOccurs line to "unbound", but
> > it seems I can't since we need to follow a business constraint that
> > limit the number to 9999.
> >
> > Any suggestions on how can I set
> > XMLConstants.FEATURE_SECURE_PROCESSING to false on the validator
> > component?
> >
> > [1] https://jaxp.java.net/1.4/JAXP-Compatibility.html
> >
> > Cheers,
> > --
> > Ioan Eugen Stan
> > 0720 898 747
> >
>

Re: sax parser issues with camel validator component

Posted by Aki Yoshida <el...@gmail.com>.
I think there is currently no way in camel to set the parser features for
the validator. And also for other xml parsers factories.

If that is the case, we should add a mechanism to set these properties.
Maybe some system properties or/and component properties to overwrite the
default values.

any comments?




2013/5/20 Ioan Eugen Stan <st...@gmail.com>

> Hello,
>
> I'm using Camel 2.11.0 on Karaf 2.3.1 with validator component and an
> XSD file to validate XML's. I'm getting an exception message:
>
> "Caused by: org.xml.sax.SAXParseException: Current configuration of
> the parser doesn't allow a maxOccurs attribute value to be set greater
> than the value 5.000. "
>
> because of maxOccurs="9999" lines in my XSD. The problem is described
> here [1] and it seems I need to disable a JAXP feature called
> FEATURE_SECURE_PROCESSING .
>
> Another solution is to change the XSD maxOccurs line to "unbound", but
> it seems I can't since we need to follow a business constraint that
> limit the number to 9999.
>
> Any suggestions on how can I set
> XMLConstants.FEATURE_SECURE_PROCESSING to false on the validator
> component?
>
> [1] https://jaxp.java.net/1.4/JAXP-Compatibility.html
>
> Cheers,
> --
> Ioan Eugen Stan
> 0720 898 747
>