ReteOO, KnowledgeBase and KnowledgeSession relation
by Harpreet Singh
Hi,
I understand that the ReteOO network is built when a KnowledgeBase is created. Can you please tell me:
- if any modifications are made to this network after a session (say StatefulKnowledgeSession) has been created from this KnowledgeBase?
- any optimizations made at the session level? (such that time taken to fire rules decreases when certain set of facts are re-inserted and rules re-executed)
I could not find any explanation in Drools Expert documentation regarding the above two points. Any pointers explaining the relation between ReteOO, KnowledgeBase and KnowledgeSession will be helpful.
Thanks.
10 years, 11 months
java dialect and declared types
by pmander
If I declare a type in a drl and reference the attributes in a rule then all
is fine for either dialect. But, if one of the attributes is a java class
that has been compiled and inserted then under the java dialect only I get a
compilation error: rule compilation error the field ... is not visible
for example
declare DroolsTransaction
ORG : String
PRODUCT : String
raw : Transaction
end
rule "create classes"
salience 100
when
$t : Transaction()
then
insert(new DroolsTransaction((String)$t.fieldFor("ORG"),
(String)$t.fieldFor("PRODUCT"), $t));
end
I insert Transaction objects in the session and this works fine for the
following rule if I have the dialect set to mvel.
rule "1"
when
$t : DroolsTransaction(ORG == "A" , PRODUCT == "001", raw.complicated())
then
do something
end
but when I switch dialects to java, the compilation complains that raw is
not visible.
I guess drools is dynamically creating the DroolsTransaction object with
private fields... and I need public accessors - how to define them?
--
View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp40278...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
Re: [rules-users] Drools, slf4j and Eclipse Error on DroolsTest.Java
by Inastrol
This isn't my code. It's created when a Drools project is created in
Eclipse. I guess that's why this is so frustrating. It's supposed to
demonstrate a very simple Drools program and I can't get it to work.
It's hard to debug someone else's code when you don't know the language yet.
Code is kSession.insert(message);
Thanks
sdjoe [via Drools] wrote:
> Hard to say without seeing your code. Can you post it here and point
> out where the NPE is happening on line 23?
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-Drool...
>
> To unsubscribe from Drools, slf4j and Eclipse Error on
> DroolsTest.Java, click here
> <http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscr...>.
> NAML
> <http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_vi...>
>
package com.sample;
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;
/**
* This is a sample class to launch a rule.
*/
public class DroolsTest {
public static final void main(String[] args) {
try {
// load up the knowledge base
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession("ksession-rules");
// go !
Message message = new Message();
message.setMessage("Hello World");
message.setStatus(Message.HELLO);
kSession.insert(message);
kSession.fireAllRules();
} catch (Throwable t) {
t.printStackTrace();
}
}
public static class Message {
public static final int HELLO = 0;
public static final int GOODBYE = 1;
private String message;
private int status;
public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public int getStatus() {
return this.status;
}
public void setStatus(int status) {
this.status = status;
}
}
}
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-Drool...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
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.
10 years, 11 months
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.
10 years, 11 months
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.
10 years, 11 months
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.
10 years, 11 months
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.
10 years, 11 months
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.
10 years, 11 months