RulesRepositoryException: Unable to checkin with Oracle DB (Works with MySQL)
by Barry K
I receive a RulesRepositoryException: Unable to checkin when trying to create
a rule using an oracle database. If I switch out my repository.xml and
connect to MySQL, then I can successfully create DRL rules. I was able to
create packages, fact models and categories in both. Only adding rules when
connected to Oracle throws the error. Anybody else seeing the same or have
a solution??
Thanks for any help,
Barry
Drools Version : 5.0 M2
Database : Oracle 10g
Fact Model is in rules, not jar (awesome feature!)
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public
abstract java.lang.String
org.drools.guvnor.client.rpc.RepositoryService.checkinVersion(org.drools.guvnor.client.rpc.RuleAsset)
throws com.google.gwt.user.client.rpc.SerializableException' threw an
unexpected exception: org.drools.repository.RulesRepositoryException: Unable
to checkin.
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Unknown Source)
Caused by: org.drools.repository.RulesRepositoryException: Unable to
checkin.
at org.drools.repository.VersionableItem.checkin(VersionableItem.java:522)
at
org.drools.guvnor.server.ServiceImplementation.checkinVersion(ServiceImplementation.java:597)
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.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:39)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:138)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
at
org.drools.guvnor.server.ServiceImplementation_$$_javassist_6.checkinVersion(ServiceImplementation_$$_javassist_6.java)
at
org.drools.guvnor.server.RepositoryServiceServlet.checkinVersion(RepositoryServiceServlet.java:108)
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 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
... 27 more
Caused by: javax.jcr.RepositoryException: /: unable to update item.:
9ae431e9-b7fa-4db6-a170-37d6f1d69245: 9ae431e9-b7fa-4db6-a170-37d6f1d69245
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1255)
at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:897)
at org.drools.repository.VersionableItem.checkin(VersionableItem.java:519)
... 53 more
Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException:
9ae431e9-b7fa-4db6-a170-37d6f1d69245
at
org.apache.jackrabbit.core.state.SharedItemStateManager.getNodeReferences(SharedItemStateManager.java:330)
at
org.apache.jackrabbit.core.state.SharedItemStateManager.updateReferences(SharedItemStateManager.java:1288)
at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:551)
at
org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:843)
at
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:873)
at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:334)
at
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:337)
at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:310)
at
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:317)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1247)
... 55 more
REPOSITORY XML
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1.2//EN"
"http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
<!-- Example Repository Configuration File -->
<Repository>
<!--
virtual file system where the repository stores global state
(e.g. registered namespaces, custom node types, etc.)
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
</FileSystem>
-->
<FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
</FileSystem>
<!--
security configuration
-->
<Security appName="Jackrabbit">
<!--
access manager:
class: FQN of class implementing the AccessManager interface
-->
<AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
<!-- -->
</AccessManager>
<LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<!-- anonymous user name ('anonymous' is the default value) -->
<!--
default user name to be used instead of the anonymous user
when no login credentials are provided (unset by default)
-->
<!-- -->
</LoginModule>
</Security>
<!--
location of workspaces root directory and name of default workspace
-->
<Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="RAILINC"/>
<!--
workspace configuration template:
used to create the initial workspace if there's no workspace yet
-->
<Workspace name="${wsp.name}">
<!--
virtual file system of the workspace:
class: FQN of class implementing the FileSystem interface
-->
<FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
</FileSystem>
<!--
persistence manager of the workspace:
class: FQN of class implementing the PersistenceManager
interface
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
</PersistenceManager>
<!--
Search index and the file system it uses.
class: FQN of class implementing the QueryHandler interface
-->
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
</SearchIndex>
</Workspace>
<!--
Configures the versioning
-->
<Versioning rootPath="${rep.home}/version">
<!--
Configures the filesystem to use for versioning for the
respective
persistence manager
-->
<FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
</FileSystem>
<!--
Configures the persistence manager to be used for persisting
version state.
Please note that the current versioning implementation is based
on
a 'normal' persistence manager, but this could change in future
implementations.
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
</PersistenceManager>
</Versioning>
<!--
Search index for content that is shared repository wide
(/jcr:system tree, contains mainly versions)
-->
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
</SearchIndex>
</Repository>
--
View this message in context: http://www.nabble.com/RulesRepositoryException%3A-Unable-to-checkin-with-...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 1 month
Use of "update" with activation-group set.
by Nimesh Muley
Hi,
In a DRL I have activation-group for certain rules along with ruleflow-group. I also need to "update" the object as I need the updated value in some other ruleflow-group. Since the updated object is part of the condition, the other rules in the same activation group get fired once a rule in that activation group has been fired.
Is there a way out for this? If more information is needed to understand this then I can send it across.
Thanks.
Regards,
- Nimesh
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, 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. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 years, 1 month
Serialization in Drools 5.0 M2
by Siddhartha Banik
Hi Drools Team,
I am trying out new Serialization technique introduced in Drools 5.0 using
"org.drools.marshalling.DefaultMarshaller".
The use case I am trying, is:
Create a Stateful session.
Then Serialize that.
Try to load the the serialized session
back.
Loading of serialized session is working good if, I try that in same java
program & same object of DefaultMarshaller is used during serialization & de
serialization of the Stateful session.
But, when I tried a different instance of DefaultMarshaller to read back the
saved session, that is not working anymore. I am getting a exception :
java.lang.NullPointerException
at org.drools.common.DefaultFactHandle.(DefaultFactHandle.java:78)
at
org.drools.marshalling.InputMarshaller.readFactHandle(InputMarshaller.java:331)
at
org.drools.marshalling.InputMarshaller.readFactHandles(InputMarshaller.java:277)
at
org.drools.marshalling.InputMarshaller.readSession(InputMarshaller.java:179)
at org.drools.marshalling.DefaultMarshaller.read(DefaultMarshaller.java:58)
at org.drools.marshalling.DefaultMarshaller.read(DefaultMarshaller.java:15)
at
org.drools.reteoo.ReteooRuleBase.readStatefulSession(ReteooRuleBase.java:277)
at
org.drools.common.AbstractRuleBase.readStatefulSession(AbstractRuleBase.java:321)
at
com.sample.test.NewMarshallingTest.testSerializationInFile_1(NewMarshallingTest.java:79)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
With Drools 4.0.7 ... I can serialize a Stateful session & at later point of
time I can deserialize that back. For our usecase, the feature is very
critical.
Does Drools 5.0 support that ? DefaultMarshaller is not serializable. So
once a Stateful session is serialized. At Later point of time, I am not
able to read that back.
I have attached my test files.
Best Regards!
Siddhartha
http://www.nabble.com/file/p20309577/TestFiles.zip TestFiles.zip
--
View this message in context: http://www.nabble.com/Serialization-in-Drools-5.0-M2-tp20309577p20309577....
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 1 month
no-loop usage question
by Bryan Hansen
I have been reading through the documentation and trying some of the
tutorials and have a question about the no-loop attribute.
Not really relevant to the post, but I figured I would mention it, I have
been following this post and updating it to use the current version of
Drools. http://www.onjava.com/pub/a/onjava/2005/08/03/drools.html?page=7
I have written my rules as such:
package org.drools.examples
import org.drools.examples.StockOffer;
rule PriceBelow100
dialect "java"
when
s: StockOffer( stockPrice < 100 && recommendPurchase == null )
then
modify( s ) {
setRecommendPurchase(StockOffer.YES)
}
end
rule NegativeStockPrice
dialect "java"
no-loop true
when
s: StockOffer( stockPrice < 0 )
then
modify( s ) {
setRecommendPurchase(StockOffer.NO)
}
end
rule DontBuyXYZStock
dialect "java"
no-loop true
when
s: StockOffer(stockName == "XYZ" && stockPrice < 10 )
then
modify( s ) {
setRecommendPurchase(StockOffer.YES)
}
end
rule BuyXYZStock
dialect "java"
no-loop true
when
s: StockOffer(stockName == "XYZ" && stockPrice > 10 )
then
modify( s ) {
setRecommendPurchase(StockOffer.NO)
}
end
My question is, why do I have to put no-loop on every rule (except for the
first). After the first time through the rules, it shouldn't be modifying to
where the rules would fire it again. Am I doing something wrong with how my
rules are written? My sample data is this:
package org.drools.examples;
import org.drools.examples.BusinessLayer;
import org.drools.examples.StockOffer;
import junit.framework.TestCase;
/*
* JUnit test for the business rules in the
* application.
*
* This also acts a 'simulator' for the business
* rules - allowing us to specify the inputs,
* examine the outputs and see if they match our
* expectations before letting the code loose in
* the real world.
*/
public class BusinessRuleTest extends TestCase {
/**
* Tests the purchase of a stock
*/
public void testStockBuy() throws Exception {
// Create a Stock with simulated values
StockOffer testOffer = new StockOffer();
testOffer.setStockName("MEGACORP");
testOffer.setStockPrice(22);
testOffer.setStockQuantity(1000);
// Run the rules on it
BusinessLayer.evaluateStockPurchase(testOffer);
// Is it what we expected?
assertTrue(testOffer.getRecommendPurchase() != null);
assertTrue("YES".equals(testOffer.getRecommendPurchase()));
}
/**
* Tests the purchase of a stock makes sure the system will not accept
* negative numbers.
*/
public void testNegativeStockBuy() throws Exception {
// Create a Stock with our simulated values
StockOffer testOffer = new StockOffer();
testOffer.setStockName("MEGACORP");
testOffer.setStockPrice(-22);
testOffer.setStockQuantity(1000);
// Run the rules on it
BusinessLayer.evaluateStockPurchase(testOffer);
// Is it what we expected?
assertTrue("NO".equals(testOffer.getRecommendPurchase()));
}
/**
* Makes sure the system will buy stocks of XYZ corp only if it really
cheap
*/
public void testXYZStockBuy() throws Exception {
// Create a Stock with our simulated values
StockOffer testOfferLow = new StockOffer();
StockOffer testOfferHigh = new StockOffer();
testOfferLow.setStockName("XYZ");
testOfferLow.setStockPrice(9);
testOfferLow.setStockQuantity(1000);
testOfferHigh.setStockName("XYZ");
testOfferHigh.setStockPrice(11);
testOfferHigh.setStockQuantity(1000);
// Run the rules on it and test
BusinessLayer.evaluateStockPurchase(testOfferLow);
assertTrue("YES".equals(testOfferLow.getRecommendPurchase()));
BusinessLayer.evaluateStockPurchase(testOfferHigh);
assertTrue("NO".equals(testOfferHigh.getRecommendPurchase()));
}
}
I can post up all the code if this isn't enough to answer the question.
Thanks!
16 years, 1 month
deploying rules in to BRMS
by Mallareddy
Hi
I am new to Rule Engine.
I have been reading through the documentation and trying some of the
tutorials.
And I am trying to use BRMS with rule agent the sample application insurance
demo.
My problem is how to upload model classes.
I tried in many ways but, I was uploaded class file and also uploaded jar
files but still I am getting the following error:
1. I found the following error message. logfile
An error occurred executing the action.
Details
java.lang.RuntimeException: SNO: Conversion failed
at org.codehaus.janino.UnitCompiler.numericPromotion(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler.binaryNumericPromotion(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler.binaryNumericPromotion(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler.compileArithmeticOperation(UnitCompiler.jav
a)
at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$44(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$9.visitBinaryOperation(UnitCompiler.java)
at org.codehaus.janino.Java$BinaryOperation.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$51(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$9.visitMethodInvocation(UnitCompiler.java)
at org.codehaus.janino.Java$MethodInvocation.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$25(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$6.visitMethodInvocation(UnitCompiler.java)
at org.codehaus.janino.Java$MethodInvocation.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$8(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$4.visitExpressionStatement(UnitCompiler.jav
a)
at org.codehaus.janino.Java$ExpressionStatement.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$7(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler$4.visitBlock(UnitCompiler.java)
at org.codehaus.janino.Java$Block.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCo
mpiler.java)
at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
at org.codehaus.janino.Compiler.compile(Compiler.java)
at
org.drools.commons.jci.compilers.JaninoJavaCompiler.compile(JaninoJavaCompil
er.java:174)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCo
mpiler.java:51)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java
:342)
at org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:60)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:308)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167
)
at
org.drools.brms.server.contenthandler.DRLFileContentHandler.compile(DRLFileC
ontentHandler.java:32)
at
org.drools.brms.server.builder.ContentPackageAssembler.buildAsset(ContentPac
kageAssembler.java:139)
at
org.drools.brms.server.builder.ContentPackageAssembler.buildPackage(ContentP
ackageAssembler.java:127)
at
org.drools.brms.server.builder.ContentPackageAssembler.<init>(ContentPackage
Assembler.java:84)
at
org.drools.brms.server.builder.ContentPackageAssembler.<init>(ContentPackage
Assembler.java:92)
at
org.drools.brms.server.ServiceImplementation.buildPackage(ServiceImplementat
ion.java:781)
at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackIntercep
tor.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.j
ava:46)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInter
ceptor.java:42)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:68)
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor
.java:40)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:155)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java
:91)
at
org.drools.brms.server.ServiceImplementation_$$_javassist_3.buildPackage(Ser
viceImplementation_$$_javassist_3.java)
at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:74)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:290)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:172)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:9
90)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:9
31)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.
java:145)
at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServle
tRequest.java:46)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstance
Wrapper.java:190)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.
java:130)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain
.java:87)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterMana
ger.java:768)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterMana
ger.java:676)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.
java:499)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrappe
r.java:473)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServl
etWrapper.java:90)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht
tpInboundLink.java:454)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht
tpInboundLink.java:383)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLRea
dCallback.java:102)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioRea
dCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java
:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture
.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743
)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
2.Some times I am got error like this manner also
Format
Name
Message
package
com.acme.insurance.base
com.acme.insurance.base.Rejection
package
com.acme.insurance.base
com.acme.insurance.base.Policy
Here one more question with the above web application I am trying to
deploy it using Rule Agent.
To deploy using Rule Agent is it compulsory that related rules and model
should be deployed first in BRMS?????????
Thanks
Mallareddy
16 years, 1 month
Loading rules
by Chris Chen
I have a simple beginners question about using rules.
Say that I have a set of rules that are static and exist in drl files
to deal with product pricing. But then I also have a set of dynamic
rules stored in the database for different promotions. Depending on
the promotion entered or selected, the dynamic rule is retrieved from
the promotion db row.
Based on this criteria, I have some quick questions that I hope
someone can help give me answers:
1) Is it good practice to be loading rules, add them to packages,
compile, and create the RuleBase for every incoming request? I take
it that's not a very efficient way to load the rules. It's probably
better to keep the compiled rule engine available and simply create
the RuleBase for every incoming request instead.
2) Would it be better then to create two rules engine - 1 for the
static drl files that do not change and one for the dynamic rules that
gets refreshed and loaded every time?
3) Another alternative is to load ALL the promotions rules in the DB
into one rule engine and make sure to check promotion codes on each
run. This seems to be efficient. however, how would I know when the
DB promotions have changed so that I can reload the rules? I can
think of a couple ways. One is to do periodic cache flushing which
will refresh the rules engine every once in a while. The other way is
to query modification dates and see if any promotions were modified
since the last time the rules engine was loaded. There could be a
third way, which combines the previous two ways together.
I'd like to know if there is some best practice when it comes to
dynamic rule reloading and what is an efficient and scalable way to do
this.
Thanks for any thoughts or suggestions!
-Chris
16 years, 1 month
Re: [rules-users] controling rule execution
by Greg Barton
Well, that solves it, then. :)
GreG
On Nov 1, 2008, at 9:37, "Edson Tirelli" <tirelli(a)post.com> wrote:
activation-group allows you to define mutually exclusive groups of rules where when one fire, it cancel the others.
[]s
Edson
2008/10/31 Greg Barton <greg_barton(a)yahoo.com>
Yep, it would affect all rules that could match on those facts.
You could have a control fact per child rule that could potentially match. The child rule would include an existence check for that fact in it's conditions. The parent rule would retract the fact to prevent the child rule from firing.
A bit more clunky than the custom agenda filter approach, but:
1) I haven't tested the custom agenda filter thing, so I'm just guessing it'd work. (I'm pretty sure it would, though.)
2) It would be more portable across other rule engines. (If that's important to you.)
--- On Fri, 10/31/08, techy <techluver007(a)gmail.com> wrote:
> From: techy <techluver007(a)gmail.com>
> Subject: Re: [rules-users] controling rule execution
> To: rules-users(a)lists.jboss.org
> Date: Friday, October 31, 2008, 2:44 PM
> Thanks Greg and Joe.
> I think i should have mentioned this before.
> I can also have other parent rule node in the tree
> structure which tests
> against same fact. Each parent rule node should only
> control its child rule
> nodes, but not other parent rule node and child rule node.
>
> If I do retract, won't it affect other parent rule
> node?
>
>
> Greg Barton wrote:
> >
> > You may consider the other suggestion of retracting
> the fact(s) that would
> > trigger the child rule. It's the more
> "natural" way of going about it.
> >
> > What's driving this design choice?
> >
> > --- On Fri, 10/31/08, techy
> <techluver007(a)gmail.com> wrote:
> >
> >> From: techy <techluver007(a)gmail.com>
> >> Subject: Re: [rules-users] controling rule
> execution
> >> To: rules-users(a)lists.jboss.org
> >> Date: Friday, October 31, 2008, 8:24 AM
> >> Thanks Greg.
> >> child rule should be reactivated if parent's
> conditions
> >> for some other fact
> >> are false.
> >> this should happen for each fact. Parent's
> condition
> >> should decide whether
> >> child rule should be executed or not for each
> fact. If
> >> parent's conditions
> >> are true, then don't execute child rule and
> vice versa.
> >>
> >>
> >> Greg Barton wrote:
> >> >
> >> > A combination of higher priority parent rules
> with a
> >> custom agenda filter,
> >> > activated when the parent rule fires, that
> prevents
> >> the child rule from
> >> > firing.
> >> >
> >> > Just a guess.
> >> >
> >> > So, after the child rule is initially
> prevented from
> >> firing, can it be
> >> > reactivated? If so, when and under what
> conditions?
> >> >
> >> > --- On Thu, 10/30/08, techy
> >> <techluver007(a)gmail.com> wrote:
> >> >
> >> >> From: techy
> <techluver007(a)gmail.com>
> >> >> Subject: [rules-users] controling rule
> execution
> >> >> To: rules-users(a)lists.jboss.org
> >> >> Date: Thursday, October 30, 2008, 11:18
> PM
> >> >> Hello,
> >> >>
> >> >> I would like to have the rules
> parent/child
> >> structure. I
> >> >> don't want the
> >> >> child rules to be executed when
> parent's
> >> conditions
> >> >> are true(i.e
> >> >> consequence is executed) even if
> child's
> >> conditions
> >> >> are true. How Can I
> >> >> achieve that in drools?
> >> >> Please clarify.
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/controling-rule-execution-tp20260028p20260028.html
> >> >> Sent from the drools - user mailing list
> archive
> >> at
> >> >> Nabble.com.
> >> >>
> >> >>
> _______________________________________________
> >> >> rules-users mailing list
> >> >> rules-users(a)lists.jboss.org
> >> >>
> >>
> https://lists.jboss.org/mailman/listinfo/rules-users
> >> >
> >> >
> >> >
> >> >
> _______________________________________________
> >> > rules-users mailing list
> >> > rules-users(a)lists.jboss.org
> >> >
> https://lists.jboss.org/mailman/listinfo/rules-users
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/controling-rule-execution-tp20260028p20265921.html
> >> Sent from the drools - user mailing list archive
> at
> >> Nabble.com.
> >>
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users(a)lists.jboss.org
> >>
> https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/controling-rule-execution-tp20260028p20272962.html
> Sent from the drools - user mailing list archive at
> Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com
16 years, 1 month