Bug 1319742 - ClassCastException when creating KieBase using KieClasspathContainer and XSD type resource is present
Summary: ClassCastException when creating KieBase using KieClasspathContainer and XSD ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ER2
: 6.3.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-21 12:12 UTC by Marek Winkler
Modified: 2020-03-27 19:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:11:11 UTC
Type: Bug


Attachments (Terms of Use)

Description Marek Winkler 2016-03-21 12:12:04 UTC
Description of problem:

This issue is very similar to BZ 1120972, the only difference is that we get a ClassCastException instead of NPE:


java.lang.ClassCastException: org.drools.core.builder.conf.impl.ResourceConfigurationImpl cannot be cast to org.drools.core.builder.conf.impl.JaxbConfigurationImpl
	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$3.build(CompositeKnowledgeBuilderImpl.java:195)
	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResourceType(CompositeKnowledgeBuilderImpl.java:158)
	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResources(CompositeKnowledgeBuilderImpl.java:148)
	at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:104)
	at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:243)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:494)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:457)
	at org.drools.compiler.integrationtests.XSDResourceTest.testXSDResourceNotBreakingCompilation(XSDResourceTest.java:34)


The exception is thrown when you try to create a KieBase, containing a XSD resource, using KieClasspathContainer.

Since the original issue with NPE came from a customer, proposing blocker flag.

Version-Release number of selected component (if applicable):
BRMS 6.3.0 ER1

How reproducible:
always

Steps to Reproduce:
1. run XSDResourceTest from the PR (to be created)

Actual results:
The test throws CCE during constructing a KieBase.

Expected results:
The test passes.

Comment 1 Marek Winkler 2016-03-21 12:14:40 UTC
PR with reproducer: https://github.com/droolsjbpm/drools/pull/696

Comment 2 Mario Fusco 2016-03-22 14:33:06 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/5624ddf6a

Comment 3 Marek Winkler 2016-04-01 08:50:31 UTC
Verified in BRMS 6.3.0 ER2.


Note You need to log in before you can comment on or make changes to this bug.