[rules-users] Drools 6 - Trouble with newReaderResource(Reader reader)

2013-10-01 Thread Markus Schneider
Hi list,

try to make my first experiences with Drools 6. For that purpose I've
modified slightly the 'KieFileSystemExample'
(
https://github.com/droolsjbpm/drools/blob/6.0.0.CR3/drools-examples-api/kiefilesystem-example/src/main/java/org/drools/example/api/kiefilesystem/KieFileSystemExample.java
)
as the code below shows. I try to use the newReaderResource(Reader reader)
but when I run maven test I get
the following error:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.33 sec
 FAILURE! - in
org.drools.example.api.kiefilesystem.KieFileSystemExampleTest
testGo(org.drools.example.api.kiefilesystem.KieFileSystemExampleTest)  Time
elapsed: 0.263 sec   ERROR!
java.lang.RuntimeException: Unable to fetch module from resource
:[ReaderResource resource=java.io.StringReader@6a5714de encoding='null']
at java.io.ByteArrayInputStream.init(ByteArrayInputStream.java:106)
at
org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:192)
at
org.drools.compiler.kie.builder.impl.KieRepositoryImpl.addKieModule(KieRepositoryImpl.java:157)
at
org.drools.example.api.kiefilesystem.KieFileSystemExample.go(KieFileSystemExample.java:39)
at
org.drools.example.api.kiefilesystem.KieFileSystemExampleTest.testGo(KieFileSystemExampleTest.java:16)

public class KieFileSystemExample {

public String getRule() {
String s =  +
   package org.drools.example.api.kiefilesystem \n\n +
   import org.drools.example.api.kiefilesystem.Message
\n\n +
   global java.io.PrintStream out \n\n +
   rule \rule 1\ when \n +
m : Message( ) \n +
   then \n +
out.println( m.getName() + \: \ + m.getText() ); \n
+
   end \n +
   rule \rule 2\ when \n +
Message( text == \Hello, HAL. Do you read me, HAL?\
) \n +
   then \n +
insert( new Message(\HAL\, \Dave. I read you.\ )
); \n +
   end;
return s;
}

public void go(PrintStream out) {

KieServices ks = KieServices.Factory.get();
KieRepository kr = ks.getRepository();

KieModule kModule =
kr.addKieModule(ks.getResources().newReaderResource( (Reader) new
StringReader(getRule()) ));

KieContainer kContainer =
ks.newKieContainer(kModule.getReleaseId());
KieSession kSession = kContainer.newKieSession();
kSession.setGlobal(out, out);

kSession.insert(new Message(Dave, Hello, HAL. Do you read me,
HAL?));
kSession.fireAllRules();
}

public static void main(String[] args) {
new KieFileSystemExample().go(System.out);
}
}

Any Idea?

Thanks in advance.

Regards,

-markus
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Guvnor in Cluster mode with Oracle DB failing

2013-10-01 Thread san_hegde
Hi,
I am trying to deploy Guvnor in Clustered Node, using Oracle 11
I am getting Caused By: java.sql.SQLSyntaxErrorException: ORA-00902: invalid
datatype
I am able to deploy in Non-cluster respository..
 Any idea on why it is throwing that exception in cluster..

Below is my cluster configuration in repository xml..

Cluster id=node1 syncDelay=2000
  Journal
class=org.apache.jackrabbit.core.journal.OracleDatabaseJournal










  /Journal
/Cluster




--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-in-Cluster-mode-with-Oracle-DB-failing-tp4026213.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] --Guvnor in Cluster mode with Oracle DB failing

2013-10-01 Thread san_hegde
Hi,
I am trying to deploy Guvnor in Clustered Node, using Oracle 11
I am getting Caused By: java.sql.SQLSyntaxErrorException: ORA-00902: invalid
datatype
I am able to deploy in Non-cluster respository..
 Any idea on why it is throwing that exception in cluster..

Below is my cluster configuration in repository xml..

Cluster id=node1 syncDelay=2000
  Journal
class=org.apache.jackrabbit.core.journal.OracleDatabaseJournal
param name=revision value=${rep.home}/revision.log /

param name=driver
value=oracle.jdbc.xa.client.OracleXADataSource /

param name=url
value=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=yes)(ADDRESS=(PROTOCOL=TCP)(HOST=gvu0513.austin.hp.com)(PORT=1525))(ADDRESS=(PROTOCOL=TCP)(HOST=gvu0514.austin.hp.com)(PORT=1525)))(CONNECT_DATA=(SERVICE_NAME
= BDDBD))) /

param name=user value=abc/

param name=password value=abc/

  /Journal
/Cluster




--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-in-Cluster-mode-with-Oracle-DB-failing-tp4026214.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Finalizing Drools 5.6

2013-10-01 Thread Mario Fusco
Hi all,

we are about to finalize Drools 5.6 and we would like to complete this
process as soon as possible.

However we would also like to be sure that we are not leaving any important
fix out, so please, if you want to signal any outstanding issue, report it
with a proper reproducer within one week from today.

Moreover, before to file a new jira ticket, try to be reasonably sure that
you are not just duplicating an already existing reported issues: we fixed
lots of bugs in the last months, and I believe (or better I hope) that it
is quite improbable that there could be many problems still waiting to be
discovered and resolved.

Thanks for you help,
Mario
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Finalizing Drools 5.6

2013-10-01 Thread Davide Sottara
For quick reference, this is the list of known issues that were patched
in 5.6.

https://issues.jboss.org/browse/DROOLS-2
https://issues.jboss.org/browse/DROOLS-10
https://issues.jboss.org/browse/DROOLS-18
https://issues.jboss.org/browse/DROOLS-31
https://issues.jboss.org/browse/DROOLS-41
https://issues.jboss.org/browse/DROOLS-43
https://issues.jboss.org/browse/DROOLS-47
https://issues.jboss.org/browse/DROOLS-70
https://issues.jboss.org/browse/DROOLS-87
https://issues.jboss.org/browse/DROOLS-102
https://issues.jboss.org/browse/DROOLS-117
https://issues.jboss.org/browse/DROOLS-126
https://issues.jboss.org/browse/DROOLS-130
https://issues.jboss.org/browse/DROOLS-134
https://issues.jboss.org/browse/DROOLS-138
https://issues.jboss.org/browse/DROOLS-144
https://issues.jboss.org/browse/DROOLS-154
https://issues.jboss.org/browse/DROOLS-156
https://issues.jboss.org/browse/DROOLS-160
https://issues.jboss.org/browse/DROOLS-164
https://issues.jboss.org/browse/DROOLS-172
https://issues.jboss.org/browse/DROOLS-175
https://issues.jboss.org/browse/DROOLS-178
https://issues.jboss.org/browse/DROOLS-182
https://issues.jboss.org/browse/DROOLS-189
https://issues.jboss.org/browse/DROOLS-190
https://issues.jboss.org/browse/DROOLS-195
https://issues.jboss.org/browse/DROOLS-196
https://issues.jboss.org/browse/DROOLS-197
https://issues.jboss.org/browse/DROOLS-211
https://issues.jboss.org/browse/DROOLS-216
https://issues.jboss.org/browse/DROOLS-217
https://issues.jboss.org/browse/DROOLS-218
https://issues.jboss.org/browse/DROOLS-219
https://issues.jboss.org/browse/DROOLS-223
https://issues.jboss.org/browse/DROOLS-238
https://issues.jboss.org/browse/DROOLS-239
https://issues.jboss.org/browse/DROOLS-240
https://issues.jboss.org/browse/DROOLS-243
https://issues.jboss.org/browse/DROOLS-244
https://issues.jboss.org/browse/DROOLS-246
https://issues.jboss.org/browse/DROOLS-247
https://issues.jboss.org/browse/DROOLS-248
https://issues.jboss.org/browse/DROOLS-249
https://issues.jboss.org/browse/DROOLS-250
https://issues.jboss.org/browse/DROOLS-251
https://issues.jboss.org/browse/DROOLS-252
https://issues.jboss.org/browse/DROOLS-253
https://issues.jboss.org/browse/DROOLS-254
https://issues.jboss.org/browse/DROOLS-255
https://issues.jboss.org/browse/DROOLS-256
https://issues.jboss.org/browse/DROOLS-257
https://issues.jboss.org/browse/DROOLS-260
https://issues.jboss.org/browse/DROOLS-261
https://issues.jboss.org/browse/DROOLS-262
https://issues.jboss.org/browse/DROOLS-265
https://issues.jboss.org/browse/DROOLS-268
https://issues.jboss.org/browse/DROOLS-269
https://issues.jboss.org/browse/DROOLS-270
https://issues.jboss.org/browse/DROOLS-264
https://issues.jboss.org/browse/DROOLS-273
https://issues.jboss.org/browse/DROOLS-274
https://issues.jboss.org/browse/DROOLS-277


On 10/01/2013 10:20 AM, Mario Fusco wrote:
 Hi all,

 we are about to finalize Drools 5.6 and we would like to complete this
 process as soon as possible.

 However we would also like to be sure that we are not leaving any
 important fix out, so please, if you want to signal any outstanding
 issue, report it with a proper reproducer within one week from today.

 Moreover, before to file a new jira ticket, try to be reasonably sure
 that you are not just duplicating an already existing reported issues:
 we fixed lots of bugs in the last months, and I believe (or better I
 hope) that it is quite improbable that there could be many problems
 still waiting to be discovered and resolved.

 Thanks for you help,
 Mario


 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Guvnor 5.5 bug - when the advanced enum feature is used, the selected value is not saved in special condition

2013-10-01 Thread Sean Su
created: https://issues.jboss.org/browse/GUVNOR-2052

Sean


On Wed, Sep 25, 2013 at 12:48 PM, Michael Anstis
michael.ans...@gmail.comwrote:

 Well fix in 6.x to be honest; so unless your repository is a git one the
 JCR (for =5.5) would be less helpful.

 Just be sure to include details of the model, enum definitions and rules.

 Thanks,


 On 25 September 2013 17:25, Sean Su sean.x...@gmail.com wrote:

 Do you need a guvnor repository to reproduce this or just some
 description of the issue? I think I can build a simple version of rules for
 the case.

 Sean


 On Tue, Sep 24, 2013 at 1:54 PM, Michael Anstis michael.ans...@gmail.com
  wrote:

 Can you please raise a JIRA at https://issues.jboss.org/browse/GUVNOR

 Thanks


 On 24 September 2013 18:29, Sean Su sean.x...@gmail.com wrote:

 Also just tested and confirmed that this is happening when I save the
 rule twice in the row - first save seems fine; do nothing and save the rule
 one more time, the selection in the last drop down is gone!


 On Tue, Sep 24, 2013 at 1:23 PM, Sean Su sean.x...@gmail.com wrote:

 When there are 3 drop downs, one determines the values of the other,
 the selection in the last drop down is not saved when changing the rules
 twice in the row.

 For example: I have the following statement:

 in fact [field1] [field2][field3]

 each of the field is presented as a drop down by using the advanced
 ENUM feature - 1 determines the values in 2 and the selection of 2
 determines the value of 3.

 After the value in field3 is selected, I can move on and make the
 changes in the rule. When the first change occurred, Guvnor remembers the
 values being selected in all 3 fields. But when another change is make, 
 the
 selected value in the last field (field3) will be forgotten. Please note
 this is only happening to the last field. I did not go further and make 
 the
 statement contain more than 3 drop downs.

 I have tested this several times and am confident this is a bug in the
 5.5 final version.

 Thanks

 Sean



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Suggestion/Feedback for DSL

2013-10-01 Thread Sean Su
If we are not changing how the DSL is working, I would like to provide some
feedback to the development team here.

Currently the DSL definition file is like a key value property file where
the key being the DSL and value being the DRL part of that DSL statement.
This is nice as we can change the DRL without impacting the DSL.

However when we update the DSL part, even as simple as the wording to be
displayed on the web page, which happens often, the rules using the DSL
statement will be broken.

Proposal: if possible, Drools/Guvnor should maintain a key (like name of
that statement) independent from the context that used for the Display.
Users should be allowed to update DSL without rebuilding the rules using
it, as long as the independent key is maintained.

Sean
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] --Guvnor in Cluster mode with Oracle DB failing

2013-10-01 Thread Zahid Ahmed
Hi,

Attached is my repository configuration with Oracle11. Its working perfectly 
fine for me. I have two nodes in cluster and its working perfectly great. I 
have followed the steps mentioned in 

http://wiki.apache.org/jackrabbit/Clustering 

Easily add new cluster nodes
*Shutdown one of your instances
*Get the current revision number that instance was from your database 
*Copy your whole Jackrabbit repository directory to another server/location 
*Start your original Jackrabbit again 
*Change the copied repository.xml with a new nodename in your clusterconfig 
*Add that nodename to your DB in JOURNAL_LOCAL_REVISIONS with the number from 
the original instance 
*Start your new Jackrabbit instance (or keep it for backup purposes)


Regards,
Zahid Ahmed
Zaid_ahmmedHotmail.com

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of san_hegde
Sent: 01 October 2013 18:12
To: rules-users@lists.jboss.org
Subject: [rules-users] --Guvnor in Cluster mode with Oracle DB failing

Hi,
I am trying to deploy Guvnor in Clustered Node, using Oracle 11 I am getting 
Caused By: java.sql.SQLSyntaxErrorException: ORA-00902: invalid datatype I am 
able to deploy in Non-cluster respository..
 Any idea on why it is throwing that exception in cluster..

Below is my cluster configuration in repository xml..

Cluster id=node1 syncDelay=2000
  Journal
class=org.apache.jackrabbit.core.journal.OracleDatabaseJournal
param name=revision value=${rep.home}/revision.log /

param name=driver
value=oracle.jdbc.xa.client.OracleXADataSource /

param name=url
value=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=yes)(ADDRESS=(PROTOCOL=TCP)(HOST=gvu0513.austin.hp.com)(PORT=1525))(ADDRESS=(PROTOCOL=TCP)(HOST=gvu0514.austin.hp.com)(PORT=1525)))(CONNECT_DATA=(SERVICE_NAME
= BDDBD))) /

param name=user value=abc/

param name=password value=abc/

  /Journal
/Cluster




--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-in-Cluster-mode-with-Oracle-DB-failing-tp4026214.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
?xml version=1.0?
!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the License); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an AS IS BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
--
!DOCTYPE Repository PUBLIC -//The Apache Software Foundation//DTD Jackrabbit 1.4//EN
http://jackrabbit.apache.org/dtd/repository-1.4.dtd;
!-- Example Repository Configuration File --
Repository
!--
virtual file system where the repository stores global state
(e.g. registered namespaces, custom node types, etc.)
--

FileSystem class=org.apache.jackrabbit.core.fs.db.OracleFileSystem
	param name=driver value=javax.naming.InitialContext/
	param name=url value=java:jboss/datasources/jdbc/jbpmStagingRWDS/
	param name=schema value=oracle/
	param name=schemaObjectPrefix value=FS_/
/FileSystem
!--
security configuration
--
Security appName=Jackrabbit
!--
access manager:
class: FQN of class implementing the AccessManager interface
--
AccessManager class=org.apache.jackrabbit.core.security.simple.SimpleAccessManager
!-- param name=config value=${rep.home}/access.xml/ --
/AccessManager

LoginModule class=org.apache.jackrabbit.core.security.simple.SimpleLoginModule
   !-- param name=defaultUserId value=superuser/ --
/LoginModule
/Security

!--
location of workspaces root directory and name of default workspace
--
Workspaces rootPath=${rep.home}/workspaces defaultWorkspace=default/
!--
workspace configuration template:
used to create the initial workspace if there's no workspace yet
--
Workspace name=${wsp.name}
!--
virtual file system of the workspace:
class: FQN of class implementing the FileSystem interface
--
FileSystem class=org.apache.jackrabbit.core.fs.db.OracleFileSystem
  param name=driver