Drools 6.0.1: Pushing changes back to Workbench GIT using SSH
by dotrc
I am using workbench for managing my rules maven projects within the embedded
GIT repository. I am aware that using git:// protocol, I can clone an
existing rule repository; I can do this successfully.
For authoring rules, I want to use Eclipse (using EGit). I want to push my
commits back to the GIT repo. I understand that I'll have to use ssh
protocol instead of git for specifying the repo, something like this:
ssh://{userName}@localhost:8001/{repoName}
When we use a standard GIT repo like stash, it gives us an option to set our
public key on the stash server, but I'm not able to find a way to do that
with the embedded ssh server within workbench. Hence, I'm not able to
authenticate myself and perform a push.
We tried creating a private-public key pair using ssh-keygen and put that
within c:\users\<username>\.ssh and added the public key to
'authorized_keys(2) (though I know this may not be the right place) and then
used the private key as the identity file with ssh client directly from
cygwin, again to no avail.
Any pointers will be really appreciated.
Also, should the username be 'admin' or any other specific one for pushing?
Will the existing Windows username work?
Thanks,
Rishi
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Pushing-changes-back-to-Wo...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
Drools 5.6.0.Final PKG vs DRL infinite loop
by gboro54
We are using drools 5.6.0.Final and the same version of Guvnor. When we run
the source file of a package from Guvnor everything works as expected. When
we take the same rules and create a package we get stuck in an infinite loop
of rules firing(I have a listener logging every time a rule is
created/fired). Why would there be a difference if the rules don't change
between the source and the pkg?
We build the kbase as follows:
KnowledgeBuilderConfiguration config = KnowledgeBuilderFactory
.newKnowledgeBuilderConfiguration();
config.setOption(PropertySpecificOption.ALWAYS);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder(config);
for (ResourcePair pair : pairs) {
/* kbuilder.add(
ResourceFactory.newClassPathResource("rule-sets/2014/feb/"+pair.resourceName),
ResourceType.getResourceType(pair.resourceType));*/
kbuilder.add(
ResourceFactory.newClassPathResource(pair.resourceName),
ResourceType.getResourceType(pair.resourceType));
}
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if (errors.size() > 0) {
StringBuilder sb = new StringBuilder();
for (KnowledgeBuilderError error : errors) {
sb.append(error + "\n");
System.out.println(sb);
}
throw new IllegalArgumentException("Could not parse knowledge.
\n"
+ sb);
}
this.knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase();
this.knowledgeBase
.addKnowledgePackages(kbuilder.getKnowledgePackages());
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
How to read XML using XMLPackageReader-Drools-compiler.5.2.1.final?
by Praveen
Hi,
I am using Drools-compiler.5.2.1.final.
I am trying to convert an drl to xml and vice versa using DrlParser,
DrlDumper, XMLPackageReader and XML Dumper.
Drl to XML conversion works fine but XML to Drl throws NPE.
I have placed the XML file under a folder called sample.
NPE is thrown at line 5..
Also attached is the exception.
Please suggest.
TIA.
Reader source = new InputStreamReader(
DroolsConversionHelper.class.getResourceAsStream(xmlFileName));
PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
XmlPackageReader reader = new
XmlPackageReader(conf.getSemanticModules());
DrlDumper dumper = new DrlDumper();
//line 5 reader.read(source);
PackageDescr descr = reader.getPackageDescr();
String test = dumper.dump(descr);
System.out.println(test);
java.lang.NullPointerException
at
org.drools.xml.ExtensibleXmlParser.resolveSchema(ExtensibleXmlParser.java:696)
at
org.drools.xml.ExtensibleXmlParser.resolveEntity(ExtensibleXmlParser.java:622)
at
com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
Regards,
Praveen.
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-read-XML-using-XMLPackageReader-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
kie-drools-wb-6.0.1 : view "artifact repository" is empty
by jps
Hello,
The artifact repository view in drools-wb is suddenly empty :( after having
uploaded a new jar. Before this operation, I had 3 artifacts that were
listed ..
I try to redeploy the app, restart jboss, delete JBOSS_HOME/bin/repository
and start again ... but still the list of artifact in the repository is
empty, although i can see it's not empty on the disk in
JBOSS_HOME/bin/repository/kie/...
Something has been corrupted somewhere. But I'm stuck. Any idea or
suggestions ?
What can prevent drools-wb from getting the repo data ?
Thanks
jps
--
View this message in context: http://drools.46999.n3.nabble.com/kie-drools-wb-6-0-1-view-artifact-repos...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 8 months
Rules not picked when packaged inside the JAR
by ash316
I am working on DROOLS 6.0.1 application. I have my rule files (*.drl)
packaged inside a separate project which is included as a jar file as a
maven dependency. When I deploy my project, KIEModule is not able to find
the rules files (which are packaged inside the jar above). I am not getting
an error though but rules are not getting fired.If I manually place the
rules files under classpath say WEB-INF/rules/*.drl they are detected and
rules are executed.I was under impression that KIEmodules are auto
discovered from anywhere in classpath.Any pointers are appreciated. This is
general question hence I have not included the comprehensive code files.
Everything start working once I place the *.drl files in the classpath (take
them outside of jar).I have opened the JIRA issue @ Link
<https://issues.jboss.org/browse/DROOLS-466> Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Rules-not-picked-when-packaged-inside-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 8 months
Drools Planner: Vehicle routing problems
by davidglassborow
Hi,
as discussed the other day with Ge0ffrey on IRC, I've been trying to
get some vehicle routing done using the new TSP / chaining functionality in
drools planner.
I've written an example, but am having problems with the chaining of jobs
together. After pulling my hair out, I've put together an example into my
fork of planner, showing a simplified example of how I am approaching it,
and the problem that can be replicated.
https://github.com/davidglassborow/drools-planner/tree/vehicle_routing
It is a very simple console app along the same lines as the hello world
example for NQueens.
On running it will print out the chains, and you will see the some Jobs
appear more than once in the same list.
On the planning variable it seems to be get assigned in front of itself,
I've put some notes in the source, and checked that the same doesn't occur
in your TSP example.
I'm not sure if its a bug in the way I've setup things, or whether its an
issue in the chain move code.
Greatly appreciated if anybody in the know gets a chance to have a look.
Thanks,
David
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-routing-problems...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
"Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE instead of explicit version number (eg: 0.0.1)
by Matteo Mortari
Hello,
in the hope this could save time if someone has been experiencing same
issue. Drools 6.0.1.Final
I had message "Cannot find KieModule" with kieServices.newKieContainer()
with LATEST or RELEASE , instead of explicit version number (eg: 0.0.1) on
a application where the KIE module Rule artifact project kjar has been
locally-installed from remote Maven repository, that is the right hand side
of this diagram:
http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/...
Meaning that before launching Application, I performed
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get
-Dartifact=com.acme:X:LATEST -DrepoUrl=
http://nexus-hostname/nexus/content/repositories/releases/
Then:
kieServices.newKieContainer() with LATEST,
kieServices.newKieContainer() with RELEASE,
failed with stack trace:
Exception in thread "main" java.lang.RuntimeException: Cannot find
KieModule: com.acme:X:RELEASE
at
org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)
at (...)
But kieServices.newKieContainer() with a fixed version, eg.: 0.0.2 did
indeed worked OK, if installed in the local .m2 repository.
To avoid this issue, I found only 3 possible workarounds
1 use mvn maven-dependency-plugin:go-offline but did not work all of the
time
2 manually ensure maven-metadata-local.xml file is generate in local .m2
repository
3 just download manually .jar and .pom of the remote maven repo, and then
install with mvn install:install-file
In this case, of workaround kieServices.newKieContainer() works OK with
all the version LATEST, RELEASE, and fixed version number.
Raise jira DROOLS-419 with more details and example projects, please don't
hate me if was just me missing something or not-Drools issue actually
=P
In my defense I had good intentions saving somebody's else time in case
same strange behavior, which is really strange because to me it worked only
with explicit fixed version number, and that was really bizarre ;)
Hope this helps,
Ciao
MM
11 years, 9 months
Upgrade to protobuf 2.5 - Prevents Upgrading to Drools 6.x
by mikerod
Note: I originally tried posting this as a reply to this
<http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-and-how-to-work...>
, before I realized it was the wrong mailing list.
_____
It looks like moving from protobuf-java v.2.4.1 to v.2.5.0 has non-passive
changes that are causing more troubles preventing an upgrade to Drools
v.6.x.
Explained here <https://code.google.com/p/protobuf/issues/detail?id=493>
Our Drools rules are ran in an environment that must share a classpath with
Hadoop libs. These libs are still using protobuf-java v.2.4.1 and cannot
easily be upgraded.
The problem comes down to a runtime error:
```
2014-03-11 06:39:25,229 FATAL org.apache.hadoop.mapred.Child: Error running
child : java.lang.VerifyError: class
org.drools.compiler.kie.builder.impl.KieModuleCache$KModuleCache overrides
final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.createCacheBuilder(KieBuilderImpl.java:269)
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:224)
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194)
<... application level omitted ...>
```
This error makes sense given the changes in protobuf-java v.2.5.
I do not believe that our use-case of the Drools rules engine involves the
use of any of the features of the `KieModuleCache` and
marshalling/unmarshalling libs associated with it.
However, I do not see any sort of configuration that would avoid this error.
I tried to simply use the "legacy" Drools knowledge-api when upgrading to
Drools v.6.x, but this has failed us since there are several unimplemented
methods in the `org.drools.impl.adapters.KnowledgeRuntimeAdapter`, such as
`org.drools.impl.adapters.KnowledgeRuntimeAdapter#getQueryResults`.
Side note: I expected the knowledge-api to be fully-functional and
implemented in Drools v6.x for backwards compatibility and for tooling
integration
<http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/...>
.
However, this does not seem to be the case at this point.
We are eager to move to Drools v6.x to avoid some performance issues we are
facing due to performance issues with eagerly evaluating `AccumulateNode`
results that are accumulating large collections
<http://drools.46999.n3.nabble.com/Object-size-impact-on-session-insertion...>
.
Do you have any suggestions?
--
View this message in context: http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-Prevents-Upgrad...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months