<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
But there are no books available for 6.,x, right? I'll just hope that
it hasn't changed that much so I can use these books to learn the
basics of the product.<br>
<br>
Mark Proctor wrote:<br>
<blockquote cite="midBFF8E43B-2C06-48C8-8B82-E83D1D3B2C65@codehaus.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html ">
The book will be older, than the 6.x series.
<div><br>
</div>
<div>Mark<br>
<div>
<div>On 29 Jan 2014, at 01:01, Inastrol <<a
href="mailto:terry@inastrol.com">terry@inastrol.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
Figured out the problem. Didn't have Maven installed as a plug-in
correctly. The book I'm using to learn Drools, didn't include that
step.<br>
<br>
<br>
Terry Moriarty wrote:<br>
<blockquote
style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;"
cite="x-msg://10/mid52E7FFE5.9080802@inastrol.com" type="cite">
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
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.<br>
<br>
Code is kSession.insert(message);<br>
<br>
Thanks<br>
<br>
sdjoe [via Drools] wrote:<br>
<blockquote
style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;"
cite="x-msg://10/mid1390925652690-4027888.post@n3.nabble.com"
type="cite"> Hard to say without seeing your code. Can you post it
here and point out where the NPE is happening on line 23? <br>
<br>
<hr noshade="noshade" size="1">
<div
style="color: rgb(68, 68, 68); font-family: tahoma,geneva,helvetica,arial,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div style="font-weight: bold;">If you reply to this email,
your
message will be added to the discussion below:</div>
<a
href="http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027888.html"
target="_top" rel="nofollow" link="external">http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027888.html</a>
</div>
<div
style="color: rgb(102, 102, 102); font-family: tahoma,geneva,helvetica,arial,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-size-adjust: none; font-stretch: normal; margin-top: 0.4em; line-height: 1.5em;">To
unsubscribe from Drools, slf4j and Eclipse Error on DroolsTest.Java, <a
href="" target="_top" rel="nofollow" link="external">click
here</a>.<br>
<a
href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
rel="nofollow"
style="font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 9px; line-height: normal; font-size-adjust: none; font-stretch: normal;"
target="_top" link="external">NAML</a> </div>
</blockquote>
<pre wrap=""><hr size="4" width="90%">
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;
}
}
}
</pre>
</blockquote>
<br>
<hr align="left" width="300">View this message in context: <a
href="http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027904.html">Re:
Drools, slf4j and Eclipse Error on DroolsTest.Java</a><br>
Sent from the <a
href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools:
User forum mailing list archive</a> at <a href="http://Nabble.com">Nabble.com</a>.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote>
</div>
<br>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
</blockquote>
</body>
</html>