Hi,
On IBM JDK there's no package like
com.sun.org.apache.xerces.internal.jaxp.validation, so you shouldn't use
javax.xml.validation.SchemaFactory:http\://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory
you should use
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=org.apache.xerces.jaxp.validation.XMLSchemaFactory
instead.
Also, you can add Package-Import org.apache.xerces.jaxp.validation to
your customer bundle to see if it helps.
Also, you can use
packages:exports |grep org.apache.xerces.jaxp.validation
from the SMX console to see if the package
org.apache.xerces.jaxp.validation is available from OSGi container.
Freeman
On 2012-7-9, at 下午4:43, PAC Kieffer Guillaume wrote:
Hi,
I am facing a problem using Servicemix with IBM JDK for XSD
validation.
The environment is the following: IBM JDK 1.6.0 64b; ServiceMix 4.4.1
The following exception is raised while trying to locate a xsd file
within a CAMEL route:
org.apache.camel.ResolveEndpointFailedException: Failed to resolve
endpoint: validator://myxsd-1.0.xsd due to: http://www.w3.org/2001/XMLSchema
..
Caused by: java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
at
javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:194)
I already had issues with the IBM default jaxp properties and
Servicemix; They were solved by updating the SMX etc/
system.properties with a new javax.xml.transform.TransformerFactory
value..
After some googling I saw a similar issue but only on Java 5 (:O)
that could be solved by updating the SchemaFactory property for the
XMLSchema namespace with the following:
javax.xml.validation.SchemaFactory:http\://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory
I tried this option, but no change, the exception is still there.
Note that the default property used by IBM JDK is:
javax.xml.validation.SchemaFactory:http\://www.w3.org/2001/XMLSchema=org.apache.xerces.jaxp.validation.XMLSchemaFactory
On my local environment (Windows and Oracle JDK) no issue at all...
Thanks to share your experience :)
Regards,
Guillaume.
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042