[jboss-jira] [JBoss JIRA] (DROOLS-2457) CamelEndpointWith* tests failing with IBM JAVA (SAXNotRecognizedException)

Mario Fusco (JIRA) issues at jboss.org
Wed Aug 29 06:29:00 EDT 2018


    [ https://issues.jboss.org/browse/DROOLS-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625630#comment-13625630 ] 

Mario Fusco commented on DROOLS-2457:
-------------------------------------

In the IBM JDK the class com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory is implemented as it follows

{code:java}
public final class XMLSchemaFactory extends SchemaFactory {
    private final SchemaFactory fSchemaFactory = new org.apache.xerces.jaxp.validation.XMLSchemaFactory();

    public XMLSchemaFactory() {
    }

    public ErrorHandler getErrorHandler() {
        return this.fSchemaFactory.getErrorHandler();
    }

    public LSResourceResolver getResourceResolver() {
        return this.fSchemaFactory.getResourceResolver();
    }

    public boolean isSchemaLanguageSupported(String var1) {
        return this.fSchemaFactory.isSchemaLanguageSupported(var1);
    }

    public Schema newSchema() throws SAXException {
        return this.fSchemaFactory.newSchema();
    }

    public Schema newSchema(Source[] var1) throws SAXException {
        return this.fSchemaFactory.newSchema(var1);
    }

    public void setErrorHandler(ErrorHandler var1) {
        this.fSchemaFactory.setErrorHandler(var1);
    }

    public void setResourceResolver(LSResourceResolver var1) {
        this.fSchemaFactory.setResourceResolver(var1);
    }
}
{code}

The problem is that this class doesn't override the method setFeature() that by default is implemented in the SchemaFactory parent class as it follows

{code:java}
    public void setFeature(String var1, boolean var2) throws SAXNotRecognizedException, SAXNotSupportedException {
        if (var1 == null) {
            throw new NullPointerException();
        } else {
            throw new SAXNotRecognizedException(var1);
        }
    }
{code}

Conversely that method is correctly overridden and implemented by the standard openjdk version and that's why it works there. At the moment I don't know if this issue will be fixable, keep investigating.

> CamelEndpointWith* tests failing with IBM JAVA (SAXNotRecognizedException)
> --------------------------------------------------------------------------
>
>                 Key: DROOLS-2457
>                 URL: https://issues.jboss.org/browse/DROOLS-2457
>             Project: Drools
>          Issue Type: Bug
>          Components: integration
>    Affects Versions: 7.7.0.Final
>         Environment: RHEL 7.4 || Fedora 27
> IBM Java 1.8 ibm-java-x86_64-sdk-8.0.5.10
>            Reporter: Martin Cimbalek
>            Assignee: Mario Fusco
>
> {{org.kie.camel.embedded.camel.component.CamelEndpointWith*}} tests fail with 
> {{org.xml.sax.SAXNotRecognizedException: http://javax.xml.XMLConstants/feature/secure-processing}} with IBM JAVA 1.8 (ibm-java-x86_64-sdk-8.0.5.10)
> +List of tests failing:+
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxWrapperCollectionTest.testWorkingSetGlobalTestSessionSetAndGetGlobal
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbTest.testQuery
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbTest.testProcess
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbTest.testInsertElements
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbTest.testSessionInsert
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbTest.testProcessInstanceSignalEvent
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbTest.testSessionGetObject
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbTest.testSessionRetractObject
> * org.kie.camel.embedded.camel.component.CamelEndpointWithJaxbXSDModelTest.testSessionInsert
> +Stacktrace (similar for other tests in fail):+
>  java.lang.IllegalStateException: org.xml.sax.SAXNotRecognizedException: http://javax.xml.XMLConstants/feature/secure-processing
> 	at javax.xml.validation.SchemaFactory.setFeature(Unknown Source)
>  	at com.sun.xml.bind.v2.util.XmlFactory.createSchemaFactory(XmlFactory.java:102)
>  	at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:86)
>  	at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:360)
>  	at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:174)
>  	at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:119)
>  	at org.drools.compiler.runtime.pipeline.impl.DroolsJaxbHelperProviderImpl.addXsdModel(DroolsJaxbHelperProviderImpl.java:121)
>  	at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromXSD(KnowledgeBuilderImpl.java:918)
> 	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$ResourceBuilder.lambda$static$2(CompositeKnowledgeBuilderImpl.java:283)
> 	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$ResourceBuilder$$Lambda$21.000000002566C640.build(Unknown Source)
>  	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResourceType(CompositeKnowledgeBuilderImpl.java:131)
>  	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResources(CompositeKnowledgeBuilderImpl.java:121)
>  	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:98)
>  	at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:247)
>  	at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:74)
>  	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:353)
>  	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:265)
>  	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:209)
>  	at org.kie.camel.embedded.camel.component.CamelEndpointWithJaxWrapperCollectionTest.registerKnowledgeRuntime(CamelEndpointWithJaxWrapperCollectionTest.java:139)
>  	at org.kie.camel.embedded.camel.component.CamelEndpointWithJaxWrapperCollectionTest.configureDroolsContext(CamelEndpointWithJaxWrapperCollectionTest.java:112) 



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list