[JBoss JIRA] Created: (JBRULES-1307) Update and expand documentation for decision tables to show actual uses for all keywords
by John Scott (JIRA)
Update and expand documentation for decision tables to show actual uses for all keywords
----------------------------------------------------------------------------------------
Key: JBRULES-1307
URL: http://jira.jboss.com/jira/browse/JBRULES-1307
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 4.0.2
Environment: Drools 4.0.3, Rational Application Developer 7.0.0, XP SP2,
Reporter: John Scott
Priority: Minor
I'm trying to implement a decision table for implementing some very simple rules. Currently I apparently am getting into what I believe is an infinite loop as the call never comes back from the fireAllRules method. I had this happen when I implemented the same rules as a DRL, but reading the documentation for the UNLOOP keyword, this is the only description:
"Indicates that if there cell values in this column, the no-loop attribute should be set"
In addition to the missing words (i.e. "If there ??? cell values..."), this is not very descriptive. Which column? What values? The no-loop attribute SHOULD be set?
Would it be possible to show an example of where and how each of these keywords would be used? These keywords can exist at multiple levels of the XLS doc (i.e. the rule set, the rule, individual columns, etc.) so it's quite confusing as to the actual syntax of these. I haven't seen an example yet that uses UNLOOP, and the documentation (as stated above) is not very helpful as to how to implement this.
Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBRULES-1327) drools-ant task and java.lang.ClassCastException: org.drools.reteoo.ReteooRuleBase
by Brugger Antony (JIRA)
drools-ant task and java.lang.ClassCastException: org.drools.reteoo.ReteooRuleBase
------------------------------------------------------------------------------------
Key: JBRULES-1327
URL: http://jira.jboss.com/jira/browse/JBRULES-1327
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.3
Environment: Windows XP / Eclipse 3.2
Reporter: Brugger Antony
Priority: Blocker
I try to use the drools-ant task to generate a package file like this:
<target name="rules2" >
<rulebase
srcdir="../src/main/rules"
tofile="../rulePackage/bcpRules.rules"
classpathref="bcp.classpath" >
<include name="testRuleBcp.drl" />
</rulebase>
</target>
it is working.
But when I try to use it in my Java code with this code:
RuleAgent agent = RuleAgent.newRuleAgent("/ruleAgent.properties");
RuleBase ruleBase = agent.getRuleBase();
ruleAgent.properties file:
##
## RuleAgent configuration file
##
dir=./rulePackage
poll=30
name=MyBcpConfig
I have the following exception:
RuleAgent(MyBcpConfig) INFO (Thu Nov 15 16:16:20 CET 2007): Configuring with newInstance=false, secondsToRefresh=30
RuleAgent(MyBcpConfig) INFO (Thu Nov 15 16:16:20 CET 2007): Configuring package provider : DirectoryScanner scanning dir: .\rulePackage found 1 file(s).
java.lang.ClassCastException: org.drools.reteoo.ReteooRuleBase
at org.drools.agent.FileScanner.readPackage(FileScanner.java:109)
at org.drools.agent.FileScanner.getChangeSet(FileScanner.java:79)
at org.drools.agent.FileScanner.loadPackageChanges(FileScanner.java:57
Indeed when I look at the code:
- in the ant task org.drools.contrib.DroolsCompilerAntTask, this is a RuleBase object that is serialized:
private void serializeRulebase(RuleBase ruleBase)
throws FileNotFoundException, IOException {
ObjectOutputStream outstream = null;
try {
FileOutputStream fout = new FileOutputStream(toFile);
outstream = new ObjectOutputStream(fout);
outstream.writeObject(ruleBase);
} finally {
if (outstream != null) {
outstream.close();
}
}
}
- in the ruleAgent class org.drools.agent.FileScanner is expecting a Package object to deserialized at line 109:
p1_ = (Package) in.readObject();
hence the ClassCastException...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBREM-826) JBoss Remoting logs at ERROR and WARN in many places
by Tim Fox (JIRA)
JBoss Remoting logs at ERROR and WARN in many places
----------------------------------------------------
Key: JBREM-826
URL: http://jira.jboss.com/jira/browse/JBREM-826
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Tim Fox
Fix For: 2.4.0.Beta1 (Pinto)
In many places JBoss Remoting logs at ERROR or WARN which seem inappropriate.
JBR is a toolkit and should not log errors it does not handle. If every toolkit being used in the chain logged the same error then you end up with a complete mess in the logs every time an exeception occurs.
There is a general principle of you shouldn't log unless you handle the error. If you just pass it up, don't log. This principle is adhered to in JBoss AS for example, and IMHO should be used throughout all JBoss projectsd
Failover in JBoss Messaging is a good example.
In JBM we detect failure of the remoting connection via the connection listener, and transparently reconnect on a different node. In this case, from the users POV *no error* has occurred - the process should be completely seamless.
However JBoss Remoting spews a load of exceptions to the logs at ERROR and WARN, for example:
@main 08:01:30,648 INFO [ServerManagement] Waiting for server to die
@main 08:01:30,953 INFO [ServerManagement] server 1 killed and dead
@Timer-3 08:01:31,253 ERROR [SocketClientInvoker] Got marshalling exception, exiting
java.net.SocketException: end of file
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:577)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:413)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.ConnectionValidator.doCheckConnection(ConnectionValidator.java:133)
at org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:308)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
@Thread-9 08:01:31,277 WARN [ClientClusteredConnectionFactoryDelegate] org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://localhost:2117/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://localhost:2117/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:532)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:413)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.removeCallback(ClientClusteredConnectionFactoryDelegate.java:152)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.closeCallback(ClientClusteredConnectionFactoryDelegate.java:168)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.establishCallback(ClientClusteredConnectionFactoryDelegate.java:93)
at org.jboss.jms.client.remoting.ConnectionFactoryCallbackHandler$CallbackConnectionListener.handleConnectionException(ConnectionFactoryCallbackHandler.java:105)
at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:452)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:187)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.createSocket(BisocketClientInvoker.java:420)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:815)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:525)
... 9 more
@Thread-9 08:01:31,299 WARN [Client] unable to remove remote callback handler: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://localhost:2117/?clientLeasePeriod=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
SERVER 0 STDOUT: @Timer-4 08:01:31,301 ERROR [SocketClientInvoker] Got marshalling exception, exiting
SERVER 0 STDOUT: java.net.SocketException: end of file
SERVER 0 STDOUT: at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:577)
SERVER 0 STDOUT: at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:413)
SERVER 0 STDOUT: at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
@Thread-9 08:01:31,320 WARN [LeasePinger] LeasePinger[SocketClientInvoker[c0f1ec, bisocket://localhost:2117](3j001-bj8ucn-f8e4sbxc-1-f8e4sby7-3)] failed sending disconnect for client lease for client with session ID 3j001-bj8ucn-f8e4sbxc-1-f8e4sbxd-2
SERVER 0 STDOUT: at org.jboss.remoting.ConnectionValidator.doCheckConnection(ConnectionValidator.java:133)
SERVER 0 STDOUT: at org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:308)
SERVER 0 STDOUT: at java.util.TimerThread.mainLoop(Timer.java:512)
SERVER 0 STDOUT: at java.util.TimerThread.run(Timer.java:462)
@Thread-9 08:01:31,345 WARN [LeasePinger] LeasePinger[SocketClientInvoker[c0f1ec, bisocket://localhost:2117](3j001-bj8ucn-f8e4sbxc-1-f8e4sby7-3)] failed to ping to server: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://localhost:2117/?cli
This completely messes up the logs and the customer believes something has gone wrong, phones support and they waste a lot of time trying to work out what the problem is, when actually there is no problem and this is perfectly successful failover from one node to another, but to the customer they have a flawed experience.
If anything is to be logged in these cases it should be at DEBUG level at the highest, so it can be easily supressed in the standard log4j config.
In the mean-time if you could provide a log4j config which supresses these messages for the specific classes so they don't appear even on ERROR level that would be much appreciated.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBRULES-1286) Incorrect information in section 2.5.7.3. Agenda Filters
by Sergey Manukyan (JIRA)
Incorrect information in section 2.5.7.3. Agenda Filters
--------------------------------------------------------
Key: JBRULES-1286
URL: http://jira.jboss.com/jira/browse/JBRULES-1286
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Manual
Affects Versions: 4.0.2
Reporter: Sergey Manukyan
Assigned To: Mark Proctor
CORRECTION #1
Manual states :
To use a filter specify it while calling FireAllRules. The following example will filter out all rules ending with the text "Test":
workingMemory.fireAllRules( new RuleNameEndsWithAgendaFilter( "Test" ) );
Should be:
To use a filter specify it while calling FireAllRules. The following example will only allow activation of rules ending with the text "Test". All others will be filtered out.:
workingMemory.fireAllRules( new RuleNameEndsWithAgendaFilter( "Test" ) );
CORRECTION #2
Manual states :
RuleNameEndWithAgendaFilter
Should be :
RuleNameEndsWithAgendaFilter
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (EJBTHREE-1072) Ejb3TxPolicy does not rollback the transaction in case of an error
by Olaf Fricke (JIRA)
Ejb3TxPolicy does not rollback the transaction in case of an error
------------------------------------------------------------------
Key: EJBTHREE-1072
URL: http://jira.jboss.com/jira/browse/EJBTHREE-1072
Project: EJB 3.0
Issue Type: Bug
Affects Versions: HEAD
Reporter: Olaf Fricke
Priority: Blocker
The class Ejb3TxPolicy is used to rollback the transaction in the case of exceptions. According to the ejb 3.0 spec, the transaction is rolled back in case of ApplicationException with rollback() evaluating to true, in case of RuntimeExceptions or in case of EjbException.
All other exception will not lead to a rollback on the current transaction.
Unfortunately, the same is true in case of errors. If, for example, an AssertionError (or a ClassDefNotFoundError etc.) occurs, the current transaction will be committed and not rolled back. This behaviour is wrong with respect to the ejb 3.0 spec (see for example table 14 on page 360 of ejbcore.pdf)
A possible solution would be to wrap the error into a new RuntimeException after handling ApplicationException (in both methods handleExceptionInOurTx and handleInCallerTx):
<code>
if (t instanceof Error)
{
t = new RuntimeException(t);
}
if (!(t instanceof RuntimeException || t instanceof RemoteException))
{
throw t;
}
</code>
The wrapping is necessary, because both the EJBException and the EJBTransactionRolledbackException can only handle exceptions, but not errors.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months