org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[
by bhavindalal
Hello,
I am new to Drools. On starting to execute a simple program, eclipse gives
the following stacktrace as error. I even included the org.eclipse.jdt that
comes with eclipse, but it is still giving me error. Anybody please suggest
the problem. I am using Drools 5.0 and its dependencies and Eclipse Helios
java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;
at
org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(EclipseJavaCompiler.java:321)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:351)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:51)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:389)
at
org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:56)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:74)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:690)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:653)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:290)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:40)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/org-eclipse-jdt-internal-compiler-Compi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
a newbi question
by wutongjoe
hello all,
I am a newbi on Drools and started my test work with a modified exapmle
included in drools v4.0.7.The compiled drl from a very simple modified xls
file is like the follwing :
----------------------code-----------------------
package org.drools.examples.decisiontable;
#generated from Decision Table
import org.apache.commons.lang.time.DateUtils;
import java.util.Date;
#From row number: 11
rule "Pricing bracket_11"
when
DateUtils.SEMI_MONTH==1001
then
policy.setBasePrice(9999999);
end
-------------------------code---------------------
but I got an exception stack when trying to addPackage after compile :
--------------stack----------------
Exception in thread "Main Thread" org.drools.rule.InvalidRulePackage:
[9,22]: unknown:9:22 mismatched token: [@46,221:222='==',<76>,9:22];
expecting type LEFT_PAREN
at org.drools.rule.Package.checkValidity(Package.java:424)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:394)
at
org.drools.examples.PricingRuleDTExample.buildRuleBase(PricingRuleDTExample.java:67)
at
org.drools.examples.PricingRuleDTExample.executeExample(PricingRuleDTExample.java:38)
at
org.drools.examples.PricingRuleDTExample.main(PricingRuleDTExample.java:26)
--------------stack----------------
yes,I was trying to test the usage of org.apache.commons.lang.time.DateUtils
inside a xls file,but it seemed something went wrong.Can someone tell me
what caused the exception? thanks a lot
--
View this message in context: http://drools.46999.n3.nabble.com/a-newbi-question-tp3234838p3234838.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
Re: [rules-users] Help needed
by Mattias Nilsson Grip
prasad.pbc wrote:
>
> Hi Guys,
> Iam using Eclipse tool for writing drl , i have written drl .
> Then i have written an ant script to convert this drl to PKG .
> i have used drools5.1.1.jars. i was sucessfully convert drl to pkg.
>
> knowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add( ResourceFactory.newFileResource(
> "c:/Sample.pkg" ),
> ResourceType.PKG );
> iam getting below error:
>
> java.lang.ClassCastException: org.drools.reteoo.ReteooRuleBase cannot be
> cast to org.drools.rule.Package
> at
> org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:487)
> at
> org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
> at com.test.rules.MyRulesEngine.<init>(MyRulesEngine.java:51)
> at com.test.rules.MyRulesEngine.getInstance(MyRulesEngine.java:39)
> at com.test.rules.MyRulesExecuter.main(MyRulesExecuter.java:38)
>
>
> Can anybody help resolving my problem..
>
> Thanks
> prasad
>
Based on the stack trace I would guess that the file Sample.pkg contains a
serialized KnowledgeBase and not a serialized KnowledgePackage. Maybe you
could try to do your export like this:
KnowledgeBase kbase = ...;
KnowledgePackage kpackage = kbase.getKnowledgePackages().iterator().next();
FileOutputStream fos = new FileOutputStream(new File("c:/Sample.pkg"));
DroolsStreamUtils.streamOut(fos, kpackage);
/Mattias
--
View this message in context: http://drools.46999.n3.nabble.com/Help-needed-tp3224168p3234832.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
Regd Drools compatibility with Jboss version
by Dibya Ranjan
Hi
We have a requirement to implement Drools in an application ,which is
hosting the application server in Jboss with version as 3.2.7.
It further uses java 1.4 version with the application being build and
deployed with Ant 1.6.2.
Could anyone help me in providing the Drools version that is compatible with
above .
--
With Warm Regards
Dibya Ranjan
14 years, 7 months
installing oryx designer with guvnor 5.2 (on win2003, tomcat6)
by itchupe
hello
i am trying to use drools on a windows 2003 server... (not my choice, but
hey :)
on on tomcat 6 i deployed drools 5.2 and oryx designer.
1. the oryx designer does not work properly (i can put objects on the
drawarea but i can not use any other functionality, see example)
2. and integration in guvnor does not work.
(1.) When for example i try to do "show BPMN 2.0 DI XML" in designer it
displays the error:
Oryx: An error occurred while generating the BPMN 2.0 DI XML Serialization.
==> INFO 05-08 11:27:02,426 (NilAuthenticator.java:authenticate:35)
All users are guests.
javax.xml.bind.PropertyException: name:
com.sun.xml.bind.namespacePrefixMapper value:
de.hpi.bpmn2_0.transformation.BPMN
PrefixMapper@11f5ff9
at
javax.xml.bind.helpers.AbstractMarshallerImpl.setProperty(AbstractMarshallerImpl.java:338)
at
com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.setProperty(MarshallerImpl.java:532)
at
org.oryxeditor.server.Bpmn2_0Servlet.performTransformationToDi(Bpmn2_0Servlet.java:127)
at
org.oryxeditor.server.Bpmn2_0Servlet.doPost(Bpmn2_0Servlet.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
(2.) Knowledge Bases -> Create New -> New BPMN2 Process
-------------------
HTTP Status 404 - /designer/editor/
type Status report
message /designer/editor/
description The requested resource (/designer/editor/) is not available.
Apache Tomcat/6.0.32
-------------------
urls are: http://localhost:8080/drools/org.drools.guvnor.Guvnor/Guvnor.html
http://localhost:8080/designer/editor
any help would be appreciated. cheers.
itchupe
--
View this message in context: http://drools.46999.n3.nabble.com/installing-oryx-designer-with-guvnor-5-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
when should we the not operator.
by arun1979
Below is the code
declare EventX
@role( event )
@timestamp( eventDate )
@expires( 2m )
end
rule "test rule"
no-loop
when
event : EventX(eventType == 'XYZ', $oId :Id)
not ( EventY(eventType == 'ABC', Id == $oId, this after[0s,8s] event))
then
//fire the rule. code never reaches here if EventY does not occur at all
end
Can someone help me in understanding what i am doing wrong. I tried removing
the not and inserting EventY and it works fine. The eventDate is also
populated for both events.
Thanks
Arun
--
View this message in context: http://drools.46999.n3.nabble.com/when-should-we-the-not-operator-tp32259...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months