InvocationTargetException in KnowledgeStoreServiceImpl
by odelyaholiday
Hi!
I get InvocationTargetException after the following:
return constructor.newInstance( kbase, conf, env );
in KnowledgeStoreServiceImpl.
I see that in return (T) constructorAccessor.newInstance(initargs) of
Constructor class it throws the InvocationTargetException.
The exception is null so I can't see what it the problem!
I call the code from this:
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null,
env);
I define the transaction manager in my spring beans like this:
username
username
myurl
oracle.jdbc.OracleDriver
I see that bitronix is up via the debugging messages. (2011-03-16
12:14:53,399 DEBUG ( PoolingDataSource.java:84) - building XA
pool for java/DS1 with 0 connection(s) etc..)
in persistence.xml I have:
org.hibernate.ejb.HibernatePersistence
java/DS1
persistenceorm.xml
org.drools.persistence.info.SessionInfo
org.jbpm.persistence.processinstance.ProcessInstanceInfo
org.drools.persistence.info.WorkItemInfo
true
What could cause the problem?
When I defined the btm with tomcat and not with spring - it worked fine.
(but I had context reloading problems). when I define it only with spring -
it get this weird exception.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/InvocationTargetExcep...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
.drl(rule)file creation
by kedar vyawahare
Hi All,
I want to create .drl(rule)file through my U.I.
means for each new application my proj should generate a new rule file and
user can also create its own rule through U.I.
so for each new application ,it should generate new (.drl)rule file with new
rules.
Is there any intelligent way to solve this problem?
Thanks in advance.
Kedar
15 years
Importing existing .dslr + .dsl to Guvnor
by wantastic
Hello everyone,
I am a newbie to Guvnor. I have a set of .dslr files with .dsl to translate
them.
I know I can just copy and paste .dslr file and .dsl file. However, the
problem is that
I call external function within .dsl file and when I try to validate the
dsl, it complains for not having the method.
ex)
[condition][Trade]xpathMatch "{xpath}"=trade : Trade( type ==
Trade.TRADE_TYPE ) and eval( DslHelper.xmlContentMatches(trade, "{xpath}") )
This is my condition and it has all models like Trade. However, it complains
about not having DslHelper function. This function has so many dependencies
that I cannot upload through POJO jar.
Is there any elegant way to solve this problem?
Thanks in advance :)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Importing-existing-ds...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
alert via email
by kedar vyawahare
Hi all,
I want to send an alert via e-mail through my .drl (rule) file.
Does *Drool* *engine * support for sending the *emails*.
Thanks in Advance.
Kedar
15 years
A question about using "lane" in Drools-flow
by Wen Yao
Hi,
When I was working on a project using Drools-flow, I had some problems with
the "lane" and "laneset".
1. In eclipse, I used the Flow editor to create a process and add some
swimlanes. When I tried to run it, it always had this error:
org.xml.sax.SAXParseException: <lane> is after an invalid element:
org.drools.xml.Handler
Then I looked into the XML file and changed the following code:
<laneSet>
<lane name="Patient" >
</lane>
<lane name="Doctor" >
</lane>
</laneSet>
to:
<laneSet>
<lane name="Patient" >
</lane>
</laneSet>
<laneSet>
<lane name="Doctor" >
</lane>
</laneSet>
It worked. Could you explain why?
2. I created a process in the web-based oryx designer with a pool that
contains several lanes. Then I imported this file in Eclipse, which cannot
open it correctly because of the lane issue, since the format in oryx
exported file is like this:
<laneSet id="XXX">
<lane name="Patient" >
</lane>
<lane name="Doctor" >
</lane>
</laneSet>
3. The bpmn file I created in Eclipse, although validated to be correct,
cannot be imported in Oryx. I am wondering whether it can be done this way.
Could you kindly address my concerns?
Thank you very much!
Best regards,
----
Wen
15 years
[Announce] EulerGUI 1.8
by Jean-Marc Vanel
Hi
Reminder
The EulerGUI Integrated Development Environment (IDE) allows one to
develop and run rules in N3 logic language, applied to data and models
in various formats converted in N3 (Notation 3).
N3 is a convergence language that allows to express data (facts),
classes and properties, and rules. It is the main language for the
Semantic Web, being much more readable and concise than RDF (Resource
Description Format). Compared to pure point-and-click tools like
Protégé, EulerGUI is centered on textual editor for N3 source.
EulerGUI is Open Source, written in Java Swing.
SWRL rules are executed by a translator into N3 rules.
One of the 4 rules engines in EulerGUI is based on a translation of N3
rules onto Drools' DRL language. So Drools in this case is used as a
pure rule engine.
The main new feature is a 2 clicks tool to add all referred ontologies
to current project.
This plays particularly well with other features.
You can refer to an ontology or vocabulary by using its common prefix
in the editor, e.g. :
:p a foaf:Person .
Then, upon saving the corresponding prefix declaration will be added
by looking up the http://prefix.cc web service :
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
Then with the new feature, you can actually add the URI of the FOAF
prefix to the project, which downloads the FOAF ontology as N3. You
can then consult the FOAF ontology in the N3 editor, to discover all
available properties and classes. These properties' label and RDF
comments are also visible in the editor as tooltips. You can also
launch the OWL reasoner, which shows a tree view of classes in FOAF
and in all N3 sources in project.
The second new feature is a button to stop the current inference
engine. This is useful when a bad rule base goes into an infinite
loop.
As a side dish, there is a rule base that acts as a helper for
documenting a rule base. That is, every non declared property
generates a skeleton declaration; the same for undeclared classes.
Here is a how-to:
http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/d...
Download from
https://sourceforge.net/projects/eulergui
EulerGUI Manual here:
http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/html/d...
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+33 (0)6 89 16 29 52 -- +33 (0)1 39 55 58 16
( we rarely listen to voice messages, please send a mail instead )
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+33 (0)6 89 16 29 52 -- +33 (0)1 39 55 58 16
( we rarely listen to voice messages, please send a mail instead )
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+33 (0)6 89 16 29 52 -- +33 (0)1 39 55 58 16
( we rarely listen to voice messages, please send a mail instead )
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+33 (0)6 89 16 29 52 -- +33 (0)1 39 55 58 16
( we rarely listen to voice messages, please send a mail instead )
15 years
Drools server link to Guvnor repository
by SebRR
Hi all,
I would like to connect to drools-server with HTTPClient with the following
config:
where my changeset.xml is adding a snapshot deployed with Guvnor.
But I am not able to trig the rule with the following client:
BatchExecutionCommandImpl command = new BatchExecutionCommandImpl();
command.setLookup("ksession1");
InsertObjectCommand insertObjectCommand = new InsertObjectCommand("TEST");
FireAllRulesCommand fireAllRulesCommand = new FireAllRulesCommand();
command.getCommands().add(insertObjectCommand);
command.getCommands().add(fireAllRulesCommand);
String xml = BatchExecutionHelper.newXStreamMarshaller().toXML(command);
HttpClient httpClient = new HttpClient();
httpClient.getHostConfiguration().setHost("host", 8080);
PostMethod postMethod = new
PostMethod("/drools-5.1.1-server/kservice/rest/execute");
postMethod.setRequestEntity(new StringRequestEntity(xml, null, null));
try {
httpClient.executeMethod(postMethod);
int code = postMethod.getStatusCode();
System.out.println(code);
String rep = postMethod.getResponseBodyAsString();
System.out.println(rep);
} catch(Exception e) {...}
Do someone have any idea how to achieve this?
Thanks
Sebastien
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-server-link-to...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
Test Scenario and function problem in Guvnor
by Eddy Hautot
Hi,
I have in my package 4 Pojo and i can create rules with them. if i do a
validate, it's ok.
But if i add a new function, even a simple one, i have compilation error, it
says it cannot compile because the function cannot resolve the class of the
pojo. All is well in the import in the package. When i remove the function
all is ok.
Second question i have rules but in the "then" clause, i will have query in
db, call to method through beans.. How can i do to be able to use the test
scenario only to test the when clause and not executing the then clause?
Is it possible the Validate function, validate only the when clause and not
the then clause?
Thanks
15 years
drools-server - resource change scanner/notifier
by Ross H
There have been previous posts on this problem:
http://drools-java-rules-engine.46999.n3.nabble.com/Starting-resource-cha...
but I was unable to find a resolution, or issue in Jira.
Looking at the code in 5.1.1 (and trunk), I could not find where the polling
and notifier services are started. To overcome the problem I have modified
the following:
drools-spring-1.0.0.xsd (added a start attribute to resource-change-scanner)
xsd:attribute name="start" use="optional" type="xsd:boolean"
ResourceChangeScannerBeanFactory (started service in afterPropertiesSet())
if (isStart()) {
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
}
ResourceChangeScannerDefinitionParser (added start attribute)
factory.addPropertyValue( START,
element.getAttribute( START ) );
It seems to be working quite nicely.
Just wondering if this is the right way to go about it, or whether there is
a better method.
Regards RossH
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-server-resourc...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years