[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1086) InitialFact should not be shadowed
Anh Vuong (JIRA)
jira-events at lists.jboss.org
Mon Aug 20 19:05:18 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1086?page=comments#action_12373031 ]
Anh Vuong commented on JBRULES-1086:
------------------------------------
if custom classs loader does not call definePackage, then Class.getPackage() may return null. Is it possible to put the following code in the place of the commented line:
//String pkgName = (pkg != null) ? pkg.getName() : "";
String pkgName = "";
if (pkg == null) {
int index = clazz.getName().lastIndexOf('.');
if (index != -1)
pkgName = clazz.getName().substring(0, index);
}
else
pkgName = pkg.getName();
> InitialFact should not be shadowed
> ----------------------------------
>
> Key: JBRULES-1086
> URL: http://jira.jboss.com/jira/browse/JBRULES-1086
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.0.GA
> Reporter: Anh Vuong
> Assigned To: Mark Proctor
> Fix For: 4.0.1
>
>
> If the app uses its own classLoader, Exception IllegalAccessError will be thrown when inserting fact. Here is the stack trace:
> 2007 Aug 15, 09:08:13:193 Exception IllegalAccessError
> java.lang.IllegalAccessError: class org.drools.reteoo.InitialFactImplShadowProxy cannot access its superclass org.drools.reteoo.Init
> ialFactImpl
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:60)
> at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:79)
> at java.lang.ClassLoader.loadClass (Unknown Source)
> at org.drools.reteoo.Rete$ObjectTypeConf.loadOrGenerateProxy(Rete.java:379)
> at org.drools.reteoo.Rete$ObjectTypeConf.defineShadowProxyData(Rete.java:344)
> at org.drools.reteoo.Rete$ObjectTypeConf .<init>(Rete.java:320)
> at org.drools.reteoo.Rete.assertObject(Rete.java:145)
> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
> at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:163)
> at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1241)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
> at org.drools.common.AbstractWorkingMemory.insert (AbstractWorkingMemory.java:623)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list