External Jar/Pojo in Drools Workbench.
by Leonard93
Hello everyone, I have a small question/problem.
I have created a class (POJO) in Eclipse and I want to be able to write
rules over this class in the Drools Workbench, thus I exported the class and
the classes it depends on (1 other class) to a Jar and imported it in the
Drools workbench.
Now what I did next is I added the jar dependency to my workbench project,
created a new datamodel and set its super class to the external class from
the jar and left the rest empty.
When I then try to use this datamodel in a guided rule or anything I can
access the variables defined in the external class fine when using the rule
editor. But when I save I get various compiler errors.
Currently I tried to make a rule template and I got these errors (I am using
the standard example project to test it out):
Unable to create Field Extractor for *'Destination'Field/method
'destination'* not found for class '*org.mortgages.Test' *
Unable to Analyse Expression *Destination ==
GenericDataObject$Country.Germany*: [Error: unable to resolve method using
strict-mode: *org.mortgages.Test.GenericDataObject$Country()]* [Near : {...*
Destination == GenericDataObject$Country.Germ ....}]* ^ [Line: 9, Column: 2]
The class from the jar looks like this:
public class GenericDataObject {
public enum Country
{
Egypt,
Germany,
Turkey,
France,
Unknown
}
public GenericDataObject()
{
result = new Result();
}
public Result result;
public Country Destination;
public void setDiscount(int amount)
{
result.discount = amount;
}
}
public class Result
{
public int discount;
public Result()
{
discount = 0;
}
}
--
View this message in context: http://drools.46999.n3.nabble.com/External-Jar-Pojo-in-Drools-Workbench-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
kie-wb 6.0.2 Deployment error on WAS 8.5.5
by Shrinath Managuli
Hi,
Deployment on WAS 8.5.5 gives the following error:
com.ibm.ws.exception.RuntimeWarning: Error while processing references for
EJB-in-WAR: com.ibm.ejs.container.EJBConfigurationException: The
KieSessionRequesMessageBean message-driven bean (MDB) class does not define a
message listener interface.
Thanks,
Shrinath
[Aspire Systems]
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
10 years, 7 months
kie-workbench 6.0.2 on WAS 8.5.5 for developers(error in deployment)
by Shrinath Managuli
Hi,
I'm trying to deploy kie-wb 6.0.2 on WAS 8.5.5 for Developers version. Please guide me through this...
I'got the following stack trace:
SystemErr.log:
[9/4/14 17:21:56:982 IST] 0000004a SystemErr R SLF4J: Class path contains multiple SLF4J bindings.
[9/4/14 17:21:56:982 IST] 0000004a SystemErr R SLF4J: Found binding in [wsjar:file:/D:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/appNode01Cell/kie-wb-distribution-wars-6_0_2-20140401_190816-123-was8_war.ear/kie-wb-distribution-wars-6.0.2-20140401.190816-123-was8.war/WEB-INF/lib/slf4j-jdk14-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:21:56:983 IST] 0000004a SystemErr R SLF4J: Found binding in [bundleresource://267.fwk1016322233:1/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:21:56:983 IST] 0000004a SystemErr R SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[9/4/14 17:21:56:984 IST] 0000004a SystemErr R SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
[9/4/14 17:23:43:702 IST] 00000081 SystemErr R 122 [WebContainer : 3] INFO org.apache.bval.jsr303.ConfigurationImpl - ignoreXmlConfiguration == true
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: Class path contains multiple SLF4J bindings.
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: Found binding in [wsjar:file:/D:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/app934Node01Cell/kie-wb-distribution-wars-6_0_2-20140401_190816-123-was8_war.ear/kie-wb-distribution-wars-6.0.2-20140401.190816-123-was8.war/WEB-INF/lib/slf4j-jdk14-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: Found binding in [bundleresource://267.fwk1016322233:1/org/slf4j/impl/StaticLoggerBinder.class]
[9/4/14 17:23:44:057 IST] 00000081 SystemErr R SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[9/4/14 17:23:44:058 IST] 00000081 SystemErr R SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
[9/4/14 17:23:56:207 IST] 00000081 SystemErr R com.ibm.ws.exception.RuntimeWarning: Error while processing references for EJB-in-WAR: com.ibm.ejs.container.EJBConfigurationException: The KieSessionRequesMessageBean message-driven bean (MDB) class does not define a message listener interface.
SystemOut.log:
ERROR hbm2ddl.SchemaUpdate: HHH000299: Could not complete schema update
java.lang.NullPointerException
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:156)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:70)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:63)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:196)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178)
mbean exception: com.ibm.ws.exception.RuntimeWarning: Error while processing references for EJB-in-WAR: com.ibm.ejs.container.EJBConfigurationException: The KieSessionRequesMessageBean message-driven bean (MDB) class does not define a message listener interface.
[Aspire Systems]
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
10 years, 7 months
Identical Facts over rules, results being cached?
by Leonard93
Let's say I have 10 rules and I fire the same object over it multiple times.
This means the result that I would get back is the same every time, since it
is the same object over the same rules (In a stateless environment).
Does Drools cache the result internally for such cases? Knowing that when
the same object comes over the same rules it can give the result back right
away instead of going over the rules first.
Just something I want to know and couldn't really find in the documentation
easily.
--
View this message in context: http://drools.46999.n3.nabble.com/Identical-Facts-over-rules-results-bein...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
processing a database with many to many Relationships
by Dave Potts
Most of the drools examples that I seen, will for have an example that
process address, look for address with a given post/zip code etc on a
data source that is already loaded in the knowledge session, but it
include no description of how the data was loaded in the knowledge session.
I have a reference database of trading containers , the database
describes the source, destination, contents etc, relationships between
for example a container may have have many sources and many
destinations. Destinations and sources may be shared between different
containers.
The database is normalised to keep source/destination information as a
single place table, with link tables to define the relationship between
the different containers and places
Q. What is the best way of loading my information in to a knowledge
session?
Expand all the many to many relationship in to a single pojo objects
with multiple references to other pojos or is there a better way?
source destination
eg Container foo England,
England
England
France
England
Scotland
France
England
bar England
Germany
England
France
regards
Dave.
/*
*/
10 years, 7 months
Integration of Spring MVC 3.2.X and Drools 6.0.0.Final KIE issues ....
by profversaggi
I want to use a Stateful Drools 6 KIE KB on via a web interface using the
Spring API - which means using Spring 3.2.X MVC. I've read a lot of issues
all over the web trying to tackle the problem from many different angles and
I've yet to see a simple illustration of how it's properly integrated. Why
is this so difficult?
Some advocate starting w/a Drools project first, converting it to Maven and
then adding the Spring MVC to it. Some suggest the other way around. I've
seen more than a few piece meal approaches as well - yet everyone is
reporting problems. I've tried it Drools first - the spring MVC doesn't take
properly. I've tried the Spring First - the Drools doesn't take properly.
Why is this so hard with KIE and Spring 3.2.X MVC ?
Does anyone have a very simple Spring MVC 3.2.X and Drools 6.0.0.Final KIE
integration example that works which one could peruse for inspiration?
Many thanks in advance.... :-)
--
View this message in context: http://drools.46999.n3.nabble.com/Integration-of-Spring-MVC-3-2-X-and-Dro...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
METADATA in Decision Tables
by Andrei Ermicioi
Can somebody point me on some article, tutorial, etc where will be describe the work with METADATA from decision tables?
In documentation is just said how to set it, but how later reuse the value from METADAT no idea :(
--
Andrei Ermicioi aka erani,
Software Engineer at CaseNet
Phone: +420 776 424 143
Skype: aermicioi_casenet
________________________________
CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.
10 years, 7 months