[JBoss JIRA] Created: (JBRULES-867) Can't load classes from expanded class dir on windows
by Dan Lipofsky (JIRA)
Can't load classes from expanded class dir on windows
-----------------------------------------------------
Key: JBRULES-867
URL: http://jira.jboss.com/jira/browse/JBRULES-867
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 3.0.6
Environment: Windows XP SP2 (problem not reproducable on Linux), JDK 1.5.0_11-b03, Ant 1.7.0, Eclipse 3.2.2
Reporter: Dan Lipofsky
Assigned To: Mark Proctor
Priority: Minor
When running some JUnit tests of our rules from an Ant task or from
Eclipse, we got the following rule compile errors:
org.drools.rule.InvalidRulePackage: Rule Compilation error
The import com.bricsnet.core.util.constants cannot be resolved
UserGroup cannot be resolved
The same rules compile perfectly on the server.
On the server the class is question is only available from a JAR file.
In Eclipse it in an expanded class dir. In the Ant task both the
expanded class dir and the JAR file were in the classpath, but the
expanded class dir was first. Putting the JAR first on the classpath
solved the problem for the ant task (but this is not possible for
eclipse since the JAR is not available). Therefore we believe the
problem is specifically related to loading from an expanded class dir.
The problem seems to occur on Windows but not Linux.
Finally the problem only seems to occur for some classes.
All 3 of the classes in the sample rule file below are
in the same boat, but for some reason only UserGroup
is a problem (it might be the
Example 1 (fails):
package com.foobar.rules;
import com.foobar.core.util.constants.UserGroup;
import com.foobar.core.util.security.principal.UserPrincipal;
import com.foobar.core.util.security.auth.RuleAuthorization;
rule "test_rule"
when
r: RuleAuthorization()
u: UserPrincipal()
eval(u.hasGroup(123))
then
r.setLevel(RuleAuthorization.READ);
end
Example 2 (works):
package com.foobar.rules;
import com.foobar.core.util.security.principal.UserPrincipal;
import com.foobar.core.util.security.auth.RuleAuthorization;
rule "test_rule"
when
r: RuleAuthorization()
u: UserPrincipal()
eval(u.hasGroup(123))
then
r.setLevel(RuleAuthorization.READ);
end
--
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
18 years
[JBoss JIRA] Created: (JBRULES-1521) ClassNotFound when deserializing rulebase
by Edson Tirelli (JIRA)
ClassNotFound when deserializing rulebase
-----------------------------------------
Key: JBRULES-1521
URL: http://jira.jboss.com/jira/browse/JBRULES-1521
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder, Reteoo
Affects Versions: 4.0.5
Reporter: Edson Tirelli
Assigned To: Edson Tirelli
Fix For: 4.0.6, 5.0.0-M1
Hi Group Members,
In Drools 4.0.5 release most of the bugs with "Working Memory serialization" are fixed. But still the feature has few bugs.
The bug scenario :
1. Create a rule Base & Working Memory (Stateful Session).
2. Assert some objects in Working Memory & call fireAll()
3. Serialize both Rule Base & Working Memory.
4. De Serialize Rule Base & Working Memory.
5. Remove Pkg/rule from Rule Base.
6. Serialize both Rule Base & Working Memory.
7. De Serialize Rule Base & Working Memory. ---------> In this step Working Memory De Serialization fails with java.lang.ClassNotFoundException.
8. Assert some more objects in Working Memory & call fireAll()
I have tested the scenario using "MarshallingTest.java" from Drools Codebase. In the MarshallingTest.testSerializeAddRemove_NoClassDefFoundError() test case,
I have appended bellow mentioned code snippet at end:
ruleBase = (RuleBase) serializeIn( serializedRulebase );
session = ruleBase.newStatefulSession( new ByteArrayInputStream( serializedSession ) ); // throws java.lang.ClassNotFoundException Exception
results = (List) session.getGlobal( "results" );
InternalFactHandle stilton5 = (InternalFactHandle) session.insert( new Cheese( "stilton", 30 ) );
InternalFactHandle brie5 = (InternalFactHandle) session.insert( new Cheese( "brie", 30 ) );
InternalFactHandle bob7 = (InternalFactHandle) session.insert( new Person( "bob", 30 ) );
InternalFactHandle bob8 = (InternalFactHandle) session.insert( new Person( "bob", 40 ) );
session.fireAllRules();
assertEquals( 8,
results.size() );
assertEquals( bob7.getObject(),
results.get( 6 ) );
assertEquals( bob8.getObject(),
results.get( 7 ) );
serializedSession = null;
serializedRulebase = null;
serializedSession = serializeOut( session );
serializedRulebase = serializeOut( ruleBase );
session.dispose();
One more bug is: Can not serialize Working Memory if Rule contains Accumulate or Collect Conditional element. Because, both of them have nested static class "AccumulateMemory" & "CollectMemory" respectively, which are not serializable.
We want to use Drools in our project with its "Working Memory serialization" feature to maintain state of Rule Engine between executions. So Fix of All bugs related to "Working Memory serialization" feature is very important for us.
Thanks
Siddhartha
--
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
18 years
[JBoss JIRA] Created: (JBRULES-1594) Collect result pattern no constrained by bounded variables
by Ming Fang (JIRA)
Collect result pattern no constrained by bounded variables
----------------------------------------------------------
Key: JBRULES-1594
URL: http://jira.jboss.com/jira/browse/JBRULES-1594
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.0.0-M1
Reporter: Ming Fang
Assigned To: Mark Proctor
For a rule like this
rule "example"
when
Integer(count:intValue)
doubles: ArrayList(size == count) from collect(Double())
then
System.out.println(doubles);
end
If I insert an Integer(2), I expect to have to insert 2 Doubles for the rule to fire.
But this rule fires even with only one Double.
However this rule behaves correctly.
rule "example"
when
Integer(count:intValue)
doubles: ArrayList(size == 2) from collect(Double())
then
System.out.println(doubles);
end
--
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
18 years
[JBoss JIRA] Created: (JBPORTAL-1997) Couple of CMS Security issues
by Sohil Shah (JIRA)
Couple of CMS Security issues
-----------------------------
Key: JBPORTAL-1997
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1997
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal CMS
Affects Versions: 2.6.4 Final
Reporter: Sohil Shah
Assigned To: Sohil Shah
Fix For: 2.6.5 Final
The logic issue lies in the isPortletAccessible check in the CMSAdminPortlet. Side effects are:
because of this check, the Portlet itself is unavailable even if the resources in the CMS are accessible as per the permissions set on the CMS. Behavior contradicts its setup
usecases affected are:
1/ The CmsRootUser cannot access the CMS Admin tool. This completely defeats the purpose of the RootUser who should have all privileges to go in and fix things
2/ The CMSAdmin tool cannot be setup for access by Anonymous users
--
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
18 years
[JBoss JIRA] Created: (JBAOP-568) Avoid extra info from being kept in the generated jp cache
by Flavia Rainone (JIRA)
Avoid extra info from being kept in the generated jp cache
----------------------------------------------------------
Key: JBAOP-568
URL: http://jira.jboss.com/jira/browse/JBAOP-568
Project: JBoss AOP
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 2.0.0.CR8
Reporter: Flavia Rainone
Assigned To: Flavia Rainone
Fix For: 2.0.0.CR9
GeneratedClassInfo, object used to keep the generated JoinPoint cache in JoinPointGenerator instances, keeps references to AdviceMethodProperties.
However, the single information that is really required from AdviceMethodProperties during generated JoinPoint instantiation are the around cflow field names and initialization expressions.
If we stop from keeping references to AdviceMethodProperties inside this cache, we will make it available for garbage collection.
--
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
18 years
[JBoss JIRA] Created: (JBAOP-565) SuperClassesFirstWeavingStrategy instruments classes already loaded
by Flavia Rainone (JIRA)
SuperClassesFirstWeavingStrategy instruments classes already loaded
-------------------------------------------------------------------
Key: JBAOP-565
URL: http://jira.jboss.com/jira/browse/JBAOP-565
Project: JBoss AOP
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.0.0.CR8
Reporter: Flavia Rainone
Assigned To: Flavia Rainone
Fix For: 2.0.0.GA
The method SuperClassesFirstWeavingStrategy tries to transform super classes that have already been loaded.
As a result, on load time weaving we can see inconsistent transformations if there are aspects added/removed between two transformations of the same class.
This bug can be seen when running the regression test jbaop484superproxyadvised.SuperClassIsAdvisedByProxyTestCase.testClassAdvisorAndNotInstanceAdvisor():
java.lang.RuntimeException: java.lang.NullPointerException
at org.jboss.aop.proxy.container.GeneratedAOPProxyFactory.getProxy(GeneratedAOPProxyFactory.java:124)
at org.jboss.aop.proxy.container.GeneratedAOPProxyFactory.createAdvisedProxy(GeneratedAOPProxyFactory.java:85)
at org.jboss.test.aop.regression.jbaop484superproxyadvised.SuperClassIsAdvisedByProxyTestCase.createProxy(SuperClassIsAdvisedByProxyTestCase.java:196)
at org.jboss.test.aop.regression.jbaop484superproxyadvised.SuperClassIsAdvisedByProxyTestCase.testClassAdvisorAndNotInstanceAdvisor(SuperClassIsAdvisedByProxyTestCase.java:137)
Caused by: java.lang.NullPointerException
at org.jboss.aop.proxy.container.ContainerProxyFactory.createProxyMethods(ContainerProxyFactory.java:631)
at org.jboss.aop.proxy.container.ContainerProxyFactory.addMethodsAndMixins(ContainerProxyFactory.java:523)
at org.jboss.aop.proxy.container.ContainerProxyFactory.createProxyCtClass(ContainerProxyFactory.java:215)
at org.jboss.aop.proxy.container.ContainerProxyFactory.createProxyCtClass(ContainerProxyFactory.java:187)
at org.jboss.aop.proxy.container.ContainerProxyFactory.generateProxy(ContainerProxyFactory.java:154)
at org.jboss.aop.proxy.container.ContainerProxyFactory.getProxyClass(ContainerProxyFactory.java:144)
at org.jboss.aop.proxy.container.ContainerProxyFactory.getProxyClass(ContainerProxyFactory.java:118)
at org.jboss.aop.proxy.container.GeneratedAOPProxyFactory.generateProxy(GeneratedAOPProxyFactory.java:130)
at org.jboss.aop.proxy.container.GeneratedAOPProxyFactory.getProxy(GeneratedAOPProxyFactory.java:116)
... 20 more
--
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
18 years