[
https://issues.jboss.org/browse/JBRULES-3122?page=com.atlassian.jira.plug...
]
RH Bugzilla Integration updated JBRULES-3122:
---------------------------------------------
Bugzilla Update: Perform
Classloading error with AspectJ and Drools 5.2.0.Final
------------------------------------------------------
Key: JBRULES-3122
URL:
https://issues.jboss.org/browse/JBRULES-3122
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.2.0.Final
Reporter: stevearoonie
Assignee: Mark Proctor
NPE running Drools with AspectJ
java.lang.NullPointerException
at
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.parseDefinitions(ClassLoaderWeavingAdaptor.java:251)
at
org.aspectj.weaver.loadtime.DefaultWeavingContext.getDefinitions(DefaultWeavingContext.java:130)
at
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:161)
at
org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.initialize(Aj.java:271)
at
org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.getWeavingAdaptor(Aj.java:276)
at org.aspectj.weaver.loadtime.Aj$WeaverContainer.getWeaver(Aj.java:254)
at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:90)
at
org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:54)
at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:570)
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:258)
at
org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:241)
at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:405)
at org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:396)
at
org.drools.rule.JavaDialectRuntimeData.onBeforeExecute(JavaDialectRuntimeData.java:237)
at
org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:132)
at org.drools.compiler.PackageBuilder.reloadAll(PackageBuilder.java:796)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:751)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:360)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:538)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at
au.com.promedicus.rules.KnowledgeBaseBuilder.addPackagesFromList(KnowledgeBaseBuilder.java:108)
at au.com.promedicus.rules.KnowledgeBaseBuilder.build(KnowledgeBaseBuilder.java:69)
at au.com.promedicus.rules.KnowledgeBaseBuilder.build(KnowledgeBaseBuilder.java:54)
I have traced the problem to
org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.getResources. This returns null
whereas AspectJ expects it to at least return an empty enumeration - hence the NPE.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira