Error in Guvnor - Incompatible magic value
by sunkara007
I created new JAR file using my domain Objects in Eclipse().
When I upload my JAR file in Guvnor and then If I click on Save and Validate
Configuration I am getting the following ERROR.
ERROR [STDERR] Caused by: java.lang.ClassFormatError: Incompatible magic
value 1885430635 in class file com/otx/eag/
I felt its Version incompatible so I created JAR with JDK-6.0,5.0,1.4, but
it is showing same ERROR for all the versions.
I can not able to create the Rules using my domain Objects.
Please Help me, How to resolve this.
Thanks in Advance.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-in-Guvnor-Incom...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
using complex evaluate expressions with DSL
by maverik j
Hi,
We are planning to use DSL/DSRL approach with generic DSL template like say
[condition][]The {object} has valid {field}={object}({field} != null )
[condition][]there is object {*obj*} that = {*obj*}()
[condition][]- has {*attr*} equal {*val*} = {*attr*} == {*val*}
[condition][]- has valid {*attr*} = {*attr*} != null
[condition][]- and has {*attr*} equal {value}= && {*attr*} == {value}
But there are quite few of requirements like to have DSL rules that can
generate expression as follows:
exists Employee(
attribute name not equals "xxx"
&& the attribute subOrdinate is not null
&& eval(
the attribute $dept.getId() is not null
&& attribute $dept.getId() follows pattern "I"
&& ( ! (the attribute $dept.getHeadOfDpt() equals name)
)
)
I am not sure if this is possible with DSL. Using '-' operator we cannot
really add '&&', '||' conditions it by-default expands to ',' separated and
conditions. And wirtting generic rules with and/or is not really dynamic to
allow any number of expressions in evaluation.
i am struggling to get this run since long time so any help/thoughts on this
would be highly appriciable !!!
Thanks & Regards,
-Maverik
15 years
Guvnor - No function but rule containing it still validates
by Rob Fisher
Using Guvnor 5.1.1....
I've written a rule utilizing a function that does not exist within the
same package. However, the rule still validates ok. How is this
possible?
Rob Fisher
Systems Analyst, Agency Awards
Desk 309-735-4136
Cell 309-660-4957
15 years
KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
by John Peterson
This is sort of a repost of an error I've been getting, but I thought
with the new year, I'd give it another shot.
I've been getting the following exception in my code:
[2010:12:361 09:12:910:debug] KnowledgeAgent rebuilding KnowledgeBase
using ChangeSet
[2010:12:361 09:12:972:exception]
***java.lang.RuntimeException*: KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(***Kn
owledgeAgentImpl.java:664*)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(***
KnowledgeAgentImpl.java:889*)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(***KnowledgeAg
entImpl.java:704*)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(***Knowledge
AgentImpl.java:584*)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(***KnowledgeAgen
tImpl.java:185*)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(***KnowledgeAgen
tImpl.java:168*)
at
com.agencyawards2.RuleSessionProviderFactory.getSessionFactory(***RuleSe
ssionProviderFactory.java:95*)
at
com.agencyawards2.RuleSessionProviderFactory.getProvider(***RuleSessionP
roviderFactory.java:35*)
at com.agencyawards2.RunRules.runRules(***RunRules.java:27*)
at com.agencyawards2.DroolsTest.main(***DroolsTest.java:40*)
Caused by:*** java.io.StreamCorruptedException*: invalid stream header:
7061636B
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at
org.drools.common.DroolsObjectInputStream.<init>(***DroolsObjectInputStr
eam.java:71*)
at
org.drools.core.util.DroolsStreamUtils.streamIn(***DroolsStreamUtils.jav
a:205*)
at
org.drools.core.util.DroolsStreamUtils.streamIn(***DroolsStreamUtils.jav
a:174*)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(***Kn
owledgeAgentImpl.java:653*)
... 9 more
I'm running Drools 5.1.1 on my workstation in Eclipse. When I run it
against Guvnor locally using version 5.1.1 installed as the "Guvnor
Standalone" downloaded at the same time as Drools 5.1.1 was downloaded
from the JBoss.org site, it works fine.
When I run it against the server, which was from the 5.0.1 "Guvnor
Standalone" installation, but I updated the drools-guvnor.war file to
use the new 5.1.1 version, I get the error listed above. Based on my
research into the "KnowledgeAgent exception while trying to deserialize
KnowledgeDefinitionsPackage" error, it seems to stem from an
incompatibility between versions of Drools.
Do I need to install the 5.1.1 Guvnor Standalone to my server to bring
the versions into synch, or am I experiencing some other sort of
problem?
15 years
Does Drools Fusion support "Group By" clause ?
by Kiran Ananthpur Bacche (kbacche)
Hi,
I have a event processing rule as follows
declare Sale
@role(event)
end
rule "StoreABC"
when
#conditions
Number( $TotalSalesAmount : intValue,
intValue > 100)
from accumulate ( Sale($amount : amount,
$quantity : quantity)
from entry-point StoreABC,sum($amount *
$quantity))
then
System.out.println("StoreABC sale
exceeds 100...");
End
The POJO Sale has a attribute "String type;". The above rule actually
ignores the type, and does the accumulation for all types put together.
Now I want the rule to fire successfully only when the TotalSalesAmount
for _any_ given type exceeds 100.
And is it possible to access the "type" of Sale whose sales exceeded
100, in the "Then" clause ?
Example:
Lets say the input events are as below (Triplets - Type, Quantity and
Amount)
1. Apple , 10, 5
2. Orange, 10, 6
3. Banana, 20, 4
4. Orange, 10, 5
5. Apple, 2, 5
Now in the above rule, the event fires after Event 2 since the total
sales is > 100. However I want the rule to fire after Event 4 since at
that point the sale of one particular item, viz. "Orange" exceeds 100 in
this store. In the "THEN" clause of the rules, I also want access to a
variable that indicates that it was "Orange" whose sale exceeded 100 in
this store.
Is this possible in Drools Fusion ? If yes, can you please let me know
the changes to be made to the above rule ?
Thanks
Kiran
15 years
Drools Flow within Stateless Session in Drools 5.1
by JeffMax
I am seeing some odd behavior where it seems that inference is not working
when trying to use a flow process within a stateless knowledge session. I
have tried to do the same thing in both stateful and stateless, and the
behavior is different. It appears that if one rule inserts a fact in its
right hand side that causes another rule in a different flow-group to become
activated, the rule-flow (which should progress to the next flow group) will
not allow that rule to fire if the session is stateless. It is possible I am
confused about how a rule-flow evaluates or the order in which it evaluates
with respect to inference, but it is working as I expected in a stateful
session.
An example:
I have a simple rule flow with two flow-groups, group1 and group2. They are
connected one after the other
in a file with id TestFlow
start->group1 -> group2 -> end
I then have a simple rules file:
declare Fact1
num: int
end
declare Fact2
num: int
end
rule "Rule1"
ruleflow-group "group1"
when
Fact1()
then
System.out.print("FIRING 1");
insert(new Fact2());
end
rule "Your Second Rule"
ruleflow-group "group2"
when
Fact2()
then
System.out.print("FIRING 2");
end
When used in a stateful session, both rules will fire and print their
respective output. In a stateless, the second rule will never fire. To
execute this test, I am using the same code against both a stateless and
stateful session:
FactType fact = kbase.getFactType("org.test", "Fact1");
Object one = fact.newInstance();
List cmds = new ArrayList();
cmds.add(CommandFactory.newInsert(one));
cmds.add(CommandFactory.newStartProcess("TestFlow"));
cmds.add(CommandFactory.newFireAllRules()); // Only need this in stateful
ksession.execute(CommandFactory.newBatchExecution(cmds));
Does anyone have any suggestions?
Thanks,
Jeff
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-within-St...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
Writting generic DSL to have complex evaluate expression on exists
by maverik
Hi,
We are planning to use DSL/DSRL approach with generic DSL template like say
[condition][]The {object} has valid {field}={object}({field} != null )
[condition][]there is object {obj} that = {obj}()
[condition][]- has {attr} equal {val} = {attr} == {val}
[condition][]- has valid {attr} = {attr} != null
[condition][]- and has {attr} equal {value}= && {attr} == {value}
But there are quite few of requirements like to have DSL rules that can
generate expression as follows:
exists Employee(
attribute name not equals "xxx"
&& the attribute subOrdinate is not null
&& eval(
the attribute $dept.getId() is not null
&& attribute $dept.getId() follows pattern "I"
&& ( ! (the attribute $dept.getHeadOfDpt() equals name)
)
)
I am not sure if this is possible with DSL. Using '-' operator we cannot
really add '&&', '||' conditions it by-default expands to ',' separated and
conditions. And wirtting generic rules with and/or is not really dynamic to
allow any number of expressions in evaluation.
i am struggling to get this run since long time so any help/thoughts on this
would be highly appriciable !!!
Thanks & Regards,
-Maverik
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Writting-generic-DSL-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
QA features in BRMS
by Benson Fung
Hi,
Can anyone know whether QA features can provide the rule conflict checks?
Thanks
15 years
Re: [rules-users] JESS: Hello To Jess User Group and How Is Jess Doing?
by James Owen
Ernest et al:
Sorry for the confusion on my part - which is why I included all of the email lists. However, at one time (unless I have a really faulty memory chip) programmers outside of the USA used to complain because they could not get the source code (and sometimes the binary) because of the BATF regulations that considered computer source code as some kind of "munitions."
Also, I personally did have to pay $100 for the source code way back when (about 2001 or 2002) unless I just wanted the binary version. But, I have been allowed to download all of the upgrades since that time for free.
However, thanks for clarifying today's pricing options and showing that Jess is available world-wide, even with source. That's great news! Thanks,
Rose Bowl Results
TCU Horned Frogs, 21
Michigan Badgers, 19
TCU, a small private university, is located in little old Fort Worth, Texas - where the West begins. :-)
SDG
jco
jco(a)kbsc.com
CoFounder DRG 2000
CoFounder ORF-2008/ORF-2009
CoFounder and Speaker (O)RF 2010
http://www.DallasRulesGroup.org
http://www.RulesFest.org
On Jan 2, 2011, at 5:45 PM, Ernest Friedman-Hill wrote:
>
> Jess is available under one of four main licensing agreements. Three of these options are available worldwide -- it is not true that Jess is unavailable outside the US. Source code is indeed available as part of many agreements, but in no case is it specifically available for $100.
15 years