javadoc says:
"An enumeration of |URL
<eclipse-javadoc:%E2%98%82=drools-api/C:%5C/java%5C/jdk1.6.0_18%5C/jre%5C/lib%5C/rt.jar%3Cjava.lang%28ClassLoader.class%E2%98%83ClassLoader%7EgetResources%7ELjava.lang.String;%E2%98%82java.net.URL>|
objects for the resource. If no resources could be found, the
enumeration will be empty. "
So that seems a reasonable request. I'll get it updated.
Mark
On 07/07/2011 12:35, Wolfgang Laun wrote:
Nobody from the "core team" acknowledged this as justified
- it looks
reasonable to me.
-W
---------- Forwarded message ----------
From: *Steven Williams* <stevearoonie(a)gmail.com
<mailto:stevearoonie@gmail.com>>
Date: 2011/7/6
Subject: Re: [rules-users] Classloading error with AspectJ and Drools
5.2.0.Final
To: Rules Users List <rules-users(a)lists.jboss.org
<mailto:rules-users@lists.jboss.org>>
Clarification to this - it does also happen when we run our server. So
this is preventing us from upgrading to 5.2
My guess is that getResources should return getParent().getResources()
rather than null.
regards
Steve
On Wed, Jul 6, 2011 at 1:42 PM, Steven Williams
<stevearoonie(a)gmail.com <mailto:stevearoonie@gmail.com>> wrote:
Hi,
I have just upgraded to Drools 5.2.0.Final and am getting a weird
error when running unit tests.
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. Interestingly the problem does
not occur when running our server, however we can't upgrade unless
our unit tests pass and we can't easily turn off aspectj for these.
regards
Steve
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev