Not able to get the knowledgeBase from web application
by jilani
Hi,
I am working with Drools 5.2.0 final and Guvnor also the same version.
application server: GateIn-3.1.0-FINAL-jbossas
I have uploaded a java model and defined a rule using that model. I did
validation of the package and build also.
After that in my web application, when I am trying to access the
knowledgebase I am getting error in server console as mentioned below.
21:22:28,450 INFO [STDOUT] 1
21:22:28,629 INFO [STDOUT] 2
21:22:28,638 INFO [STDOUT] 3
21:22:28,834 INFO [STDOUT] 4
21:22:28,840 INFO [STDOUT] 5
21:22:28,844 INFO [STDOUT] 6
21:22:28,886 INFO [STDOUT] 7
21:22:28,890 INFO [STDOUT] 8
21:22:28,891 INFO [STDOUT] kbase:org.drools.impl.KnowledgeBaseImpl@66c790c9
kag
ent: org.drools.agent.impl.KnowledgeAgentImpl@37f2b0d6
21:22:29,158 INFO [STDOUT] INFO 26-07 21:22:29,157
(NilAuthenticator.java:auth
enticate:35) All users are guests.
21:22:29,163 INFO [STDOUT] INFO 26-07 21:22:29,163
(RepositoryServlet.java:all
owUser:114) null authenticated for rest api
21:22:29,164 INFO [STDOUT] INFO 26-07 21:22:29,164
(PackageDeploymentServlet.j
ava:execute:141) PackageName: sam
21:22:29,164 INFO [STDOUT] INFO 26-07 21:22:29,164
(PackageDeploymentServlet.j
ava:execute:142) PackageVersion: LATEST
21:22:29,165 INFO [STDOUT] INFO 26-07 21:22:29,165
(PackageDeploymentServlet.j
ava:execute:143) PackageIsLatest: true
21:22:29,165 INFO [STDOUT] INFO 26-07 21:22:29,165
(PackageDeploymentServlet.j
ava:execute:144) PackageIsSource: false
21:22:29,172 INFO [STDOUT] error...
21:22:29,173 ERROR [STDERR] java.lang.NullPointerException
21:22:29,174 ERROR [STDERR] at
org.drools.agent.impl.KnowledgeAgentImpl.proc
essChangeSet(KnowledgeAgentImpl.java:223)
21:22:29,175 ERROR [STDERR] at
org.drools.agent.impl.KnowledgeAgentImpl.appl
yChangeSet(KnowledgeAgentImpl.java:189)
21:22:29,175 ERROR [STDERR] at
org.drools.agent.impl.KnowledgeAgentImpl.appl
yChangeSet(KnowledgeAgentImpl.java:174)
21:22:29,175 ERROR [STDERR] at
org.apache.jsp.index1_jsp._jspService(index1_
jsp.java:124)
21:22:29,175 ERROR [STDERR] at
org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:70)
21:22:29,175 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:717)
21:22:29,176 ERROR [STDERR] at
org.apache.jasper.servlet.JspServletWrapper.s
ervice(JspServletWrapper.java:369)
21:22:29,176 ERROR [STDERR] at
org.apache.jasper.servlet.JspServlet.serviceJ
spFile(JspServlet.java:322)
21:22:29,176 ERROR [STDERR] at
org.apache.jasper.servlet.JspServlet.service(
JspServlet.java:249)
21:22:29,176 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:717)
21:22:29,176 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:290)
21:22:29,176 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:206)
21:22:29,177 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilte
r.doFilter(ReplyHeaderFilter.java:96)
21:22:29,180 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:235)
21:22:29,180 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:206)
21:22:29,180 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve
.invoke(StandardWrapperValve.java:235)
21:22:29,180 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve
.invoke(StandardContextValve.java:191)
21:22:29,180 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssocia
tionValve.invoke(SecurityAssociationValve.java:190)
21:22:29,181 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValv
e.invoke(JaccContextValve.java:92)
21:22:29,181 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityContext
EstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
21:22:29,181 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityContext
EstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
21:22:29,181 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.in
voke(StandardHostValve.java:127)
21:22:29,181 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.i
nvoke(ErrorReportValve.java:102)
21:22:29,182 ERROR [STDERR] at
org.jboss.web.tomcat.service.jca.CachedConnec
tionValve.invoke(CachedConnectionValve.java:158)
21:22:29,182 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.
invoke(StandardEngineValve.java:109)
21:22:29,182 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.s
ervice(CoyoteAdapter.java:330)
21:22:29,182 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.proc
ess(Http11Processor.java:829)
21:22:29,182 ERROR [STDERR] at
org.apache.coyote.http11.Http11Protocol$Http1
1ConnectionHandler.process(Http11Protocol.java:598)
21:22:29,183 ERROR [STDERR] at
org.apache.tomcat.util.net.JIoEndpoint$Worker
.run(JIoEndpoint.java:447)
21:22:29,183 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662)
-------------
the code snippet for above exception
System.out.println("1");
// knowledge base configuration
KnowledgeBaseConfiguration kbaseConf = KnowledgeBaseFactory
.newKnowledgeBaseConfiguration();
System.out.println("2");
kbaseConf.setOption(EventProcessingOption.STREAM);
System.out.println("3");
// knowledge base
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(kbaseConf);
System.out.println("4");
KnowledgeAgentConfiguration kagentConf = KnowledgeAgentFactory
.newKnowledgeAgentConfiguration();
System.out.println("5");
// enable incremental knowledge base build
kagentConf.setProperty("drools.agent.newInstance", "false");
System.out.println("6");
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(
"demoAgent", kbase, kagentConf);
System.out.println("7");
Resource changeset = null;
changeset =
ResourceFactory.newUrlResource("http://127.0.0.1:8080/guvnor/org.drools.guvnor.Guvnor/package/demo/LATEST...");
System.out.println("8");
System.out.println("kbase:"+kbase+" kagent: "+kagent);
*kagent.applyChangeSet(changeset);*
System.out.println("9");
System.out.println("kbase:"+kbase+" kagent: "+kagent);
kagent.dispose();
System.out.println("readKnowledgeBase() at end............");
------
changeset file content
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...'
>
<add>
<resource
source='http://127.0.0.1:8080/guvnor/org.drools.guvnor.Guvnor/package/demo/LATEST'
type='PKG' basicAuthentication='enabled' username='admin' password='admin'
/>
</add>
</change-set>
----------
I am able to get the knowledgebase using java application, but I am not able
to get the knowledgebase from web application.
please suggest me, what could be the reason for this and how to resolve
this.
--
View this message in context: http://drools.46999.n3.nabble.com/Not-able-to-get-the-knowledgeBase-from-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months
Query in stateless knowledge session returns no results
by Heijink, Hank
Hi all,
I'm new to Drools, so please excuse me if I'm asking about the obvious--it's certainly not obvious to me. The problem is this: I use a stateless knowledge session where a list of facts is inserted. The rules that fire create new facts, and after all the rules have fired, I'd like to obtain a list of all the facts (the old and the new). The best way seemed to use a query. I'm using Drools 5.1 on Linux.
This is part of my .drl file (without the imports):
rule "create badge"
when
Event ( eventType == EventType.SOME_EVENT_TYPE )
not BadgeState ( identifier == "badge" )
then
insert( new BadgeState("badge") );
end
query "all badges"
aBadge : BadgeState()
end
This is the Java code:
StatelessKnowledgeSession ksession = StatsKnowledgeBase.getKnowledgeBase().newStatelessKnowledgeSession();
// Create a list of share events
ArrayList<Event> events = new ArrayList<Event>();
Date now = new Date();
MobileDevice aDevice = new MobileDevice("uniqueId", "deviceType");
for (int i = 0; i < 5; i++) {
Event anEvent = new Event.Builder(now, aDevice, "aCustomer", EventType.SOME_EVENT_TYPE).build();
events.add(anEvent);
}
// Create the query for the badges
List<Command> commands = new ArrayList<Command>();
commands.add(CommandFactory.newInsertElements(events));
commands.add(CommandFactory.newQuery("all badges", "all badges"));
// Feed the events into Drools
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);
ExecutionResults results = ksession.execute( CommandFactory.newBatchExecution(commands) );
NativeQueryResults queryResults = (NativeQueryResults)results.getValue("all badges");
// At this point, queryResults is empty.
logger.close();
// Get a list of badges
List<BadgeState> badges = new ArrayList<BadgeState>();
for (Iterator<QueryResultsRow> i = queryResults.iterator(); i.hasNext(); ) {
QueryResultsRow result = i.next();
BadgeState obj = (BadgeState)result.get("aBadge");
badges.add(obj);
}
The logger shows me that the BadgeState object is created, but the query returns an empty list. I've searched the documentation, which suggests that I'm doing it right (http://drools.herod.net/drools-expert/html/ch03.html#d0e1956, example 3.37), the archives of this mailinglist, and the web, so far without success.
Clearly, I'm missing something, and I have the nagging feeling that it's something simple...
Any help is much appreciated!
Best,
Hank
13 years, 4 months
CFP: 4th International Workshop on Semantic Web Applications and Tools for the Life Sciences (SWAT4LS 2011)
by Adrian Paschke
Call for Papers
4th International Workshop on Semantic Web Applications and Tools for the
Life Sciences (SWAT4LS 2011)
http://www.swat4ls.org/2011/
Overview
Since 2008, SWAT4LS is a workshop that has provided a platform for the
presentation and discussion of the benefits and limits of applying web-based
information systems and semantic technologies in Biomedical Informatics and
Computational Biology.
Growing steadily each year as Semantic Web applications become more
widespread, SWAT4LS has been in Edinburgh 2008, Amsterdam 2009, and Berlin
2010, with London planned for 2011. The last edition of SWAT4LS was held in
Berlin, on December 10th, 2010. It was preceded by two days of tutorials and
other associated events.
We are confident that the next edition of SWAT4LS will provide the same open
and stimulating environment that brought together researchers, both
developers and users, from the various fields of Biology, Bioinformatics and
Computer Science, to discuss goals, current limits and real experiences in
the use of Semantic Web technologies in Life Sciences.
________________________________________
Rationale
The web is a key medium for information publishing, and web-based
information systems play a key role in biomedical information exchange and
integration. At the same time, the variety and complexity of biomedical
information call for the adoption of semantic-based solutions. The Semantic
Web provides a set of technologies and standards that are key to support
semantic markup, ontology development, distributed information resources and
collaborative social environments. Altogether the adoption of the web-based
semantic-enabled technologies in the Life Sciences has potential impact on
the future of publishing, biological research and medecine. This workshop
will provide a venue to present and discuss benefits and limits of the
adoption of these technologies and tools in biomedical informatics and
computational biology. It will showcase experiences, information resources,
tools development and applications. It will bring together researchers, both
developers and users, from the various fields of Biology, Bioinformatics and
Computer Science, to discuss goals, current limits and some real use cases
for Semantic Web technologies in Life Sciences.
________________________________________
Topics
Topics of interest include, but are not limited to:
. Standards, Technologies, Tools for the Semantic Web
o Semantic Web standards and new proposals (e.g.: RDF, OWL, SKOS, SPIN,
RuleML)
o Tools for ontology management, editing and versioning
o RDF stores, Reasoners, query and visualization systems
o Formal approaches to large biomedical knowledge bases
o Tools for semantic-enabled web publication
o Alternative approaches to integrate semantic representations and web based
solutions
. Systems for a Semantic Web for Bioinformatics
o Biomedical knowledge bases on the Semantic Web
o Semantic biomedical Web Services
o Semantics aware Biological Data Integration Systems
o Semantic-enabled biomedical information systems and solutions
o Linked Data for biomedical research
. Existing and prospective applications of the Semantic Web for
Bioinformatics
o Semantic Wikis
o Semantic collaborative research environments
o Semantic crowdsourcing and collective intelligence
o Alternative approaches to biomedical metadata generation and management
o Case studies, use cases, and scenarios
________________________________________
Type of contributions
The following possible contributions are sought:
. Research papers
. Position papers
. Posters
. Software demos
________________________________________
Proceedings
All accepted communications will be published in the proceedings (under
definition, proceedings of SWAT4LS have appeared in the past in CEUR
proceedings and Nature precedings).
________________________________________
Special issue
Authors of accepted contributions to the upcoming edition of SWAT4LS will be
invited to submit an extended and revised version of their contributions for
a special issue of an internation peer-reviewed scientific journal (under
definition, special issues of SWAT4LS have appeared in the past in BMC
Bioinformatics and in the BMC Journal of Biomedical Semantics.)
________________________________________
Deadlines
. Expression of interest for turorials: 10 June 2011
. Submission openinig: 12 September 2011
. Papers submission deadline: 7 October 2011
. Posters and demo submission deadline: 31 October 2011
. Communication of acceptance: 7 November 2011
. Camera ready: 21 November 2011
________________________________________
Instructions
All papers and posters must be in English, formatted according to LNCS
format (http://www.springer.de/comp/lncs/authors.html) and submitted in pdf
format.
. Submissions for papers should report orginal research, and should be
between 8 and 15 pages.
. Submissions for position papers should report qualified opinions,
recommendations or conclusions, and should be between 3 and 6 pages.
. Submissions for posters should be between 2 and 4 pages.
. Submissions for software demo proposals should also be between 2 and 4
pages.
________________________________________
Submission
All submissions will be handled via the EasyChair submission system (to be
opened in August).
To ensure high quality, submitted papers will be carefully peer-reviewed by
at least three members of the Scientific Committee.
13 years, 4 months
Error with MVEL2 Using Smooks 1.4 and Drools 5.2
by Lavoisier Farias
Hi guys,
I am newbie in this kind of things, but I am facing some difficults to use
Smooks 1.4 an d Drools 5.2. It seams that MVEL2 present in the drools 5.2
distribution is not compatible with Smooks 1.4.
Did anybody have similar problems ?
If a have a separate project, which uses Smooks 1.4, my program is able to
read a CSV file and convert it to Java Bean List, in fact, a Java List.
However, If I use the same structure to read information from a CSV file and
insert hem into a Drools Rule Engine, I got the error right below: Does
anybody know how I can fix that ?
This is my smooks configuration file:
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.3.xsd"
xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.3.xsd">
<params>
<param name="stream.filter.type">SAX</param>
</params>
<csv:reader
fields="alarmName,Ne,board,serialNumber,slot,subrack,startDate,startTime,endDate,endTime"
skipLines="1"/>
<jb:bean beanId="transformedProps" class="java.util.HashMap"
createOnElement="csv-record">
<jb:value property="@alarmName" data="csv-record/alarmName" />
<jb:value property="@Ne" data="csv-record/Ne" />
<jb:value property="@board" data="csv-record/board"/>
<jb:value property="@serialNumber"
data="csv-record/serialNumber"/>
<jb:value property="@slot" data="csv-record/slot"/>
<jb:value property="@subrack" data="csv-record/subrack"/>
<jb:value property="@startDate" data="csv-record/startDate"/>
<jb:value property="@startTime" data="csv-record/startTime"/>
<jb:value property="@endDate" data="csv-record/endDate"/>
<jb:value property="@endTime" data="csv-record/endTime"/>
</jb:bean>
<jb:bean beanId="ListOfalarms" class="java.util.ArrayList"
createOnElement="csv-set">
<jb:wiring beanIdRef="alarms" />
</jb:bean>
<jb:bean beanId="alarms"
class="br.com.lavoisierfarias.correlator.model.Alarm"
createOnElement="csv-record">
<jb:value property="alarmName" data="csv-record/alarmName"/>
<jb:value property="Ne" data="csv-record/ne"/>
<jb:value property="board" data="csv-record/board"/>
<jb:value property="serialNumber" data="csv-record/serialNumber"/>
<jb:value property="slot" data="csv-record/slot"/>
<jb:value property="subrack" data="csv-record/subrack"/>
<jb:wiring property="alarm" beanIdRef="Alarm" />
<jb:expression property="startDate" execOnElement="csv-record">
startDate = transformedProps["startDate"] + " " +
transformedProps["startTime"];
new java.text.SimpleDateFormat("dd/MM/yyyy
HH:mm:ss").parse(startDate)
</jb:expression>
<jb:value property="endDate" decoder="Date"
data="csv-record/endDate">
<jb:decodeParam name="format">dd/MM/yyyy</jb:decodeParam>
</jb:value>
<jb:value property="endTime" decoder="Date"
data="csv-record/endTime">
<jb:decodeParam name="format">HH:mm:ss</jb:decodeParam>
</jb:value>
</jb:bean>
</smooks-resource-list>
This is an example of the file that has to bew parsed:
*
alarmName,Ne,board,serialNumber,slot,subrack,startDate,startTime,endDate,endTime
*
Tempo de resposta excedido
(sc),SCSBS_SBSDWDM012,SPVL-4#2702,SPVL-4#2702,11,1,01/05/2011,09:01:43,01/05/2011,09:02:29
Tempo de resposta excedido
(sc),SCSBS_SBSDWDM012,SPVL-4#2702,SPVL-4#2702,11,1,01/05/2011,09:01:43,01/05/2011,09:02:29
Tempo de resposta excedido
(sc),SCSBS_SBSDWDM012,SPVL-4#2702,SPVL-4#2702,11,1,01/05/2011,09:01:43,01/05/2011,09:02:29
Erro that I got:
org.milyn.cdr.SmooksConfigurationException: Error invoking @Initialize
method 'initialize' on class 'org.milyn.javabean.BeanInstancePopulator'.
at org.milyn.cdr.annotation.Configurator.invoke(Configurator.java:457)
at
org.milyn.cdr.annotation.Configurator.initialise(Configurator.java:439)
at org.milyn.cdr.annotation.Configurator.configure(Configurator.java:91)
at org.milyn.cdr.annotation.Configurator.configure(Configurator.java:66)
at
org.milyn.delivery.JavaContentHandlerFactory.create(JavaContentHandlerFactory.java:63)
at
org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.addCDU(ContentDeliveryConfigBuilder.java:623)
at
org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyCDUStrategy(ContentDeliveryConfigBuilder.java:548)
at
org.milyn.delivery.ContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyStrategy(ContentDeliveryConfigBuilder.java:536)
at
org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.iterate(ContentDeliveryConfigBuilder.java:711)
at
org.milyn.delivery.ContentDeliveryConfigBuilder$SmooksResourceConfigurationTableIterator.access$300(ContentDeliveryConfigBuilder.java:690)
at
org.milyn.delivery.ContentDeliveryConfigBuilder.extractContentHandlers(ContentDeliveryConfigBuilder.java:484)
at
org.milyn.delivery.ContentDeliveryConfigBuilder.load(ContentDeliveryConfigBuilder.java:349)
at
org.milyn.delivery.ContentDeliveryConfigBuilder.getConfig(ContentDeliveryConfigBuilder.java:146)
at
org.milyn.container.standalone.StandaloneExecutionContext.<init>(StandaloneExecutionContext.java:91)
at
org.milyn.container.standalone.StandaloneExecutionContext.<init>(StandaloneExecutionContext.java:65)
at org.milyn.Smooks.createExecutionContext(Smooks.java:411)
at org.milyn.Smooks.createExecutionContext(Smooks.java:374)
at
br.com.lavoisierfarias.correlator.readers.CSVSmookReader.runSmooksTransform(CSVSmookReader.java:52)
at
br.com.lavoisierfarias.correlator.readers.CSVSmookReader.getAlarmList(CSVSmookReader.java:99)
at
br.com.lavoisierfarias.correlator.AlarmTest.testLoadAlarmsFromSmookFile(AlarmTest.java:277)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: [Error: unterminated '[']
[Near : {... startDate = transformedProps["startDate"] ....}]
^
[Line: 1, Column: 13]
at
org.mvel2.compiler.PropertyVerifier.getCollectionProperty(PropertyVerifier.java:361)
at
org.mvel2.compiler.PropertyVerifier.analyze(PropertyVerifier.java:123)
at
org.mvel2.compiler.ExpressionCompiler.verify(ExpressionCompiler.java:390)
at
org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:283)
at org.mvel2.util.ParseTools.subCompileExpression(ParseTools.java:2137)
at org.mvel2.ast.AssignmentNode.<init>(AssignmentNode.java:66)
at org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:797)
at
org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:135)
at
org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:69)
at org.mvel2.MVEL.compileExpression(MVEL.java:808)
at org.mvel2.MVEL.compileExpression(MVEL.java:818)
at org.mvel2.MVEL.compileExpression(MVEL.java:721)
at
org.milyn.expression.MVELExpressionEvaluator.setExpression(MVELExpressionEvaluator.java:55)
at
org.milyn.javabean.BeanInstancePopulator.initialize(BeanInstancePopulator.java:240)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.milyn.cdr.annotation.Configurator.invoke(Configurator.java:453)
... 45 more
Unhandled Exception
--
*Abraços,
Lavoisier José Leite Farias*
Skype: lavoisierfarias
Celular: 019-8122-1177
Twitter: http://twitter.com/LavoisierFarias
13 years, 4 months
How to add application data via StatefulKnowledgeSession
by Matthew Erler
Can someone please show me an example where application data is added to
workingMemory as described here:
http://docs.codehaus.org/display/DROOLS/Application+Data using
StatefulKnowledgeSession?
I have a need to populate an object from a rules file and I don't want that
object itself to be treated as a rule. All the examples I can find refer to
the use of ruleBase to get workingMemory. My code utilizes
StatefulKnowledgeSession to fire rules and I don't see how to get ruleBase
or workingMemory from it. Thanks.
13 years, 4 months
Using Rule Templates
by David Godfrey
Can someone point me in the direction of documentation or examples for using
Rule Templates together with data held in a database (or source other than
XLS / CSV which seems to be what all the examples show)?
Many thanks,
David
13 years, 4 months
Possibly stupid question... but I have to ask
by Eugenia Carcel
Hi,
Is it possible to insert and modify a fact in the same rule consequence ?
>From what I've read in the docs... it isn't...
If I could do that it would be great for me. This is the reason why I post
this question.
I hope someone will anwer.
13 years, 4 months
Rule not compiling in IDE after migration to 5.2
by Jamie
This rule used to compile in the IDE under Drools 5.1.1:
when
$order: OrderFact(numberOfCreditCardDeclines >
FraudCCDeclines.find().getCreditCardDeclinesThreshold())
then
//do something
but it's breaking since I moved to 5.2, although it runs fine when I deploy
it to the server. Any idea why?
If I make the > comparison static, like this:
when
$order: OrderFact(numberOfCreditCardDeclines > 5)
then
//do something
It also works fine. What's wrong?
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-not-compiling-in-IDE-after-migrati...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months