Moves Defined from Current State
by jonathan.labin
I'm using Optaplanner 6.0.1 and I'm having trouble defining a type of move
that I'd like to define.
In my domain, there may be an opportunity to split the value assigned to one
entity across two entities. For example:
E1=5 could become E2=2, E3=3
The trouble is that in some cases this split can be performed more than one
way. The above example could also be split to become E2=1,E3=4, ...
At the time that the Moves is created (and initialized with entities) by the
MoveFactory, there are values assigned to the entities but those values may
change and shouldn't be part of the Move (am I right about that?).
So when Moves are executed, the values assigned could be considered to
create a set of Moves based on the current state but aren't Moves already
created long before then?
Is there a way to generate moves based on the current state? How do you
ensure they are not cached ore reused after that step?
Thanks,
Jon
--
View this message in context: http://drools.46999.n3.nabble.com/Moves-Defined-from-Current-State-tp4027...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Null Pointer Exception with 10K+ kBase objects
by jhusby
I'm trying to stress-test Drools to see what its limits are, and I stumbled
across a NPE when I have a large amount of facts in a stateful
knowledgebase:
java.lang.NullPointerException
at
org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuple(PhreakTimerNode.java:355)
at
org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuples(PhreakTimerNode.java:325)
at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:72)
at
org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357)
at
org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
at
org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:200)
at
org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67)
at
org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at
org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
I have a little program that creates, populates, fires, and destroys a
session repeatedly. With 10K objects in the knowledge base, I get the NPE
the first time I loop through my program, but not subsequently (probably
because by the subsequent executions things have been cached). With 100K
objects, I get the exception most times. With 1M objects, I get the NPE
every time.
Am I doing anything wrong or is it simply taking so long to execute all the
rules that something times out? Is there a timeout param I could set?
Thank you!
Joseph
--
View this message in context: http://drools.46999.n3.nabble.com/Null-Pointer-Exception-with-10K-kBase-o...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Drools as osgi bundle in Jboss AS
by km.sujeet
Hi,
I am trying to run "Hello World" using drools as osgi bundle in Jboss AS.
Deployed below jars to Jboss container :
drools-compiler-6.0.0.Beta1.jar
drools-core-6.0.0.Beta1.jar
drools-templates-6.0.0.Beta1.jar
kie-api-6.0.0.Beta1.jar
kie-internal-6.0.0.beta1.jar
While deploying my own bundle to Jboss which has "Hello World" Drools
application, I get below exception:
Caused by: org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:321)
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:307)
at
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:192)
at
org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:170)
at
org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactoryServiceImpl.java:22)
at
org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:74)
at
org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:80)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 34 more
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in
the classpath
at
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:100)
at
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:61)
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:317)
... 42 more
Then added "org.eclipse.jdt.core_3.8.3.v20130121-145325.jar" to classpath of
OSGI bundle (Hello World Bundle) and deployed again.
Above exception has got resolved, but application is not working.
Code below :
public void start(){
logger.info("started.");
System.out.println("Hello World in client!! ");
//droolsSession = createKnowledgeSession();
MessageTest message = new MessageTest();
message.setMessage("Testing Hello World");
message.setStatus(MessageTest.HELLO);
droolsSession.insert(message);
droolsSession.fireAllRules();
}
@SuppressWarnings("deprecation")
private StatefulKnowledgeSession createKnowledgeSession() {
System.out.println("Inside createKnowledgeSession!! ");
KnowledgeBuilderFactoryServiceImpl knowledgeBuilderFactoryServiceImpl =
new KnowledgeBuilderFactoryServiceImpl();
KnowledgeBuilder kbuilder =
knowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder();
kbuilder.add((Resource) new ClassPathResource("Sample.drl"),
ResourceType.DRL);
System.out.println("Completed createKnowledgeSession!! ");
if (kbuilder.hasErrors()) {
if (kbuilder.getErrors().size() > 0) {
for (KnowledgeBuilderError kerror : kbuilder.getErrors()) {
System.err.println(kerror);
}
}
}
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
return kbase.newStatefulKnowledgeSession();
//return kbase.newStatefulKnowledgeSession();
}
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-as-osgi-bundle-in-Jboss-AS-tp402...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
OptaPlanner vehicle routing problem with "multiple depots"
by milenko
Dear OptaPlanner users,
I am working for a small company located in Munich and have a software
problem, which I would like to solve with OptaPlnner.
In our case, we have multiple technicians which are starting their work each
day from different locations (e.g. their homes).
Each technician has to serve customers at different locations.
Each customers has his own time window for the visit (earliest arrival time,
wait time, planned start time, planned end time, real end time, …).
On one hand the route of each technician should be optimized.
Also the planned customer time window should be met optimally.
There should not be many empty gaps in the time schedule of single
technicians.
For me this looks somehow similar like the vehicle routing problem with time
window.
In our case we have the following similarities:
Customer= Customer
Vehicle = Technician
Time windows = Time windows + additional time windows
Depot = We have many Depots (Starting locations) for each single technician
I do not know how I could transfer the parameter capacity of the vehicle –
probably I don’t need it..
What I tried: I changed the parameters in the xml-input file to change the
location position of the customers and also the different time windows.
But I don’t succeed to add additional depots (customers)? Does somebody has
an idea how to realize that?
Best regards.
Milenko
--
View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-vehicle-routing-problem-wit...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!)
by SrjTx
This is long, but please hang in there, this is driving me nuts.
Keep and eye out for the /javax/jms/JMSException/
Any idea, hints, or solutions would be greatly appreciated!
So I need to access to snmp4j-1.10.1.jar in kie-wb, but it doesn't have a
pom file, so I rebuilt it to have the one at
http://repo1.maven.org/maven2/org/snmp4j/snmp4j/1.10.1/snmp4j-1.10.1.pom
<http://repo1.maven.org/maven2/org/snmp4j/snmp4j/1.10.1/snmp4j-1.10.1.pom>
So now it depends on a very old version of log4j:
<dependencies><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.9</version></dependency></dependencies>
log4j 1.2.9 doesn't have a pom, so I created the following pom that depends
on jboss-jms-api_1.1_spec-1.0.1.Final.jar - which has
/javax/jms/MessageListener.class/ as shown by:
jar tf
/opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jboss-jms-api_1.1_spec-1.0.1.Final.jar
| grep MessageListener
/javax/jms/MessageListener.class/
pom.xml for log4j
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
<repositories>
<repository>
<id>guvnor-m2-repo</id>
<name>Guvnor M2 Repo</name>
<url>http://localhost:8080/kie-drools-wb/maven2/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
</dependency>
</dependencies>
All of which results in the following errors in kie-wb
An error was found during external classes check. The external class
org.apache.log4j.net.JMSAppender did not pass the verification. Please check
the external .jar files configured as dependencies for this project. The low
level error is: : /javax/jms/JMSException/
<hr>
An error was found during external classes check. The external class
org.apache.log4j.net.SMTPAppender did not pass the verification. Please
check the external .jar files configured as dependencies for this project.
The low level error is: : javax/mail/Address
<hr>
An error was found during external classes check. The external class
com.securelogix.common.logging.NGPMailer did not pass the verification.
Please check the external .jar files configured as dependencies for this
project. The low level error is: : javax/mail/Address
<hr>
An error was found during external classes check. The external class
org.jboss.logging.Log4jLogger did not pass the verification. Please check
the external .jar files configured as dependencies for this project. The low
level error is: : org/apache/log4j/Priority
<hr>
An error was found during external classes check. The external class
org.jboss.logging.Slf4jLogger did not pass the verification. Please check
the external .jar files configured as dependencies for this project. The low
level error is: : org/slf4j/Logger
<hr>
An error was found during external classes check. The external class
org.jboss.logging.Slf4jLocationAwareLogger did not pass the verification.
Please check the external .jar files configured as dependencies for this
project. The low level error is: : org/slf4j/spi/LocationAwareLogger
and the following on jboss startup
17:53:51,124 WARN [org.jboss.modules] (http-/127.0.0.1:8080-4) Failed to
define class org.apache.log4j.net.JMSSink in Module
"org.jboss.log4j.logmanager:main" from local module loader @4f67c097
(finder: local module finder @2495223b (roots:
/opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base)):
java.lang.LinkageError: Failed to link org/apache/log4j/net/JMSSink (Module
"org.jboss.log4j.logmanager:main" from local module loader @4f67c097
(finder: local module finder @2495223b (roots:
/opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base)))
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:407)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:254)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
[jboss-modules.jar:1.2.0.CR1]
at org.jboss.modules.Module.loadModuleClass(Module.java:518)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
[jboss-modules.jar:1.2.0.CR1]
at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_10]
at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_10]
at
org.drools.core.common.ProjectClassLoader.internalLoadClass(ProjectClassLoader.java:95)
[drools-core-6.0.1.Final.jar:6.0.1.Final]
at
org.drools.core.common.ProjectClassLoader.loadClass(ProjectClassLoader.java:82)
[drools-core-6.0.1.Final.jar:6.0.1.Final]
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
[rt.jar:1.7.0_10]
at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_10]
at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_10]
at
org.kie.scanner.KieModuleMetaDataImpl.getClass(KieModuleMetaDataImpl.java:91)
[kie-ci-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.Builder.build(Builder.java:162)
[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.BuildServiceImpl.doBuild(BuildServiceImpl.java:122)
[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.BuildServiceImpl.build(BuildServiceImpl.java:77)
[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java)
[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.7.0_10]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_10]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_10]
at java.lang.reflect.Method.invoke(Method.java:601)
[rt.jar:1.7.0_10]
at
org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:499)
[errai-weld-integration-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at
org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140)
[errai-bus-2.4.3.Final.jar:2.4.3.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
[jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
[solder-impl-3.2.1.Final.jar:3.2.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
[solder-impl-3.2.1.Final.jar:3.2.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
[jbpm-designer-backend-6.0.1.Final.jar:6.0.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
[uberfire-security-server-0.3.1.Final.jar:0.3.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
[jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
[jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
[jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10]
Caused by: java.lang.NoClassDefFoundError:/ javax/jms/MessageListener/
at java.lang.ClassLoader.defineClass1(Native Method)
[rt.jar:1.7.0_10]
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
[rt.jar:1.7.0_10]
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[rt.jar:1.7.0_10]
at
org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:338)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:402)
[jboss-modules.jar:1.2.0.CR1]
... 64 more
Caused by: java.lang.ClassNotFoundException:/ javax.jms.MessageListener/
from [Module "org.jboss.log4j.logmanager:main" from local module loader
@4f67c097 (finder: local module finder @2495223b (roots:
/opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base))]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
[jboss-modules.jar:1.2.0.CR1]
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
[jboss-modules.jar:1.2.0.CR1]
... 69 more
--
View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Re: [rules-users] Unable to get LastModified for ClasspathResource
by tia
Hi,
I exactly get the same error:
java.lang.RuntimeException: Unable to get LastModified for ClasspathResource
...
...Caused by: java.io.FileNotFoundException: 'src/main/rules/changeset.xml'
cannot be opened because it does not exist
But none of the solutions above worked for me.
Here is my code:
private static String ruleXmlFile="src/main/rules/changeset.xml";
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(ruleXmlFile),
ResourceType.CHANGE_SET);
But when I test with this:
Scanner scanner=new Scanner(new FileReader(ruleXmlFile));
System.out.println(scanner.next());
It's OK, my file is well read !
If someone has an idea ;)
I'm using Drools 6.0.0 and Eclipse.
--
View this message in context: http://drools.46999.n3.nabble.com/Unable-to-get-LastModified-for-Classpat...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Scala-Drools Guvnor
by swaroop
Hi ,
Does Guvnor or RuleWorkbench support the scala object model(Exported as jar)
? When i tried with simple scala case classes, I was able to upload the
model(After adding the scala lib to Guvnor Lib directory) but was not able
to see the classes when iam composing a rule . Any pointers would be helpful
Regards
Oggu
--
View this message in context: http://drools.46999.n3.nabble.com/Scala-Drools-Guvnor-tp4027855.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
SwapMove for Entities with different Value ranges
by jonathan.labin
I'd like to implement something like a swap move but in my domain each
Planning Entity has it's own value range provider. The value ranges are
completely disjoint sets of value instances although two values from
separate ranges can be considered equivalent for the purposes of the swap.
I have started implementing my move using ShiftAssignmentSwapMove as a
template however I want to be correct and efficient about how and when the
work of searching for the value from the leftEntity's value range that is
equivalent to the rightEntity's current value.
The methods isMoveDoable and doMove must both have this identification made.
Can they share the answer with a class variable in a way that is safe under
caching configurations?
Is there a recommendation for minimizing the repeated effort to identify
these equivalent values?
Thanks,
Jon
--
View this message in context: http://drools.46999.n3.nabble.com/SwapMove-for-Entities-with-different-Va...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Dynamic rules in Drools 6
by jhusby
Looking at the test case from Edson, quoted below, it appears that there's no
way to reuse a current session when upgrading the kbase rules? I need to
add and remove rules on the fly, and so if I have a stateful session, does
this mean I need to dispose of the current session, upgrade the container,
create a new session, and repopulate it with all my objects?
I was hoping to simply rebuild the repository, call
kContainer.updateToVersion(), and have the the session (with all my objects
still populated) automatically use that new version of the rules repository.
Is this not possible?
Thanks,
Joseph
> Edson Tirelli-4 wrote
> Here is a code example of creating kie modules in memory and upgrading
> existing kbases/ksessions:
>
> https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test...
>
> It is a test case, but maybe it will be easier to follow. We are
> working
> on additional ways of doing similar things as well.
>
> Edson
--
View this message in context: http://drools.46999.n3.nabble.com/Dynamic-rules-in-Drools-6-tp4027833.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month