[JBoss JIRA] (AS7-3061) Can't create periodic rotating file handler in CLI or console
by Stan Silvert (Created) (JIRA)
Can't create periodic rotating file handler in CLI or console
-------------------------------------------------------------
Key: AS7-3061
URL: https://issues.jboss.org/browse/AS7-3061
Project: Application Server 7
Issue Type: Bug
Components: Logging
Affects Versions: 7.1.0.Beta1b
Reporter: Stan Silvert
Assignee: James Perkins
CLI command:{noformat}
/subsystem=logging/periodic-rotating-file-handler=periodicrotating/:add(name=periodicrotating,level=INFO,file={"path" => "myfoo.log", "relative-to" => "jboss.server.log.dir"})
{noformat}
CLI error:{noformat}
[standalone@localhost:9999 /] /subsystem=logging/periodic-rotating-file-handler=periodicrotating/:add(name=periodicrotating,level=INFO,file={"path" => "myfoo.log", "relat
ive-to" => "jboss.server.log.dir"})
{
"outcome" => "failed",
"failure-description" => {"JBAS014671: Failed services" => {"jboss.logging.handler.periodicrotating" => "org.jboss.msc.service.StartException in service jboss.logging
.handler.periodicrotating: Failed to start service"}},
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}
{noformat}
In server console:{noformat}
15:04:29,303 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.logging.handler.periodicrotating: org.jboss.msc.service.S
tartException in service jboss.logging.handler.periodicrotating: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780) [jboss-msc-1.0.1.GA.jar:]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_29]
Caused by: java.lang.NullPointerException
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:493) [:1.6.0_29]
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:475) [:1.6.0_29]
at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setSuffix(PeriodicRotatingFileHandler.java:119) [jboss-logmanager-1.2.0.GA.jar:]
at org.jboss.as.logging.handlers.file.PeriodicRotatingFileHandlerService.start(PeriodicRotatingFileHandlerService.java:74)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]
... 3 more
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (JBRULES-3367) Planner: score calculation with plain old Java
by Geoffrey De Smet (JIRA)
Geoffrey De Smet created JBRULES-3367:
-----------------------------------------
Summary: Planner: score calculation with plain old Java
Key: JBRULES-3367
URL: https://issues.jboss.org/browse/JBRULES-3367
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-planner
Reporter: Geoffrey De Smet
Assignee: Geoffrey De Smet
Provide an plain old java alternative to score calculations, so the user has choice (= freedom):
- A) Drools score calculation (default). Does incremental calculation automatically, without extra code.
- B) Java non-incremental score calculation. Very easy to reuse existing score code, but not fast.
- C) Java incremental score calculation. Requires incremental boilerplate code, but experiments show that in some use cases (with little rules) it can be a 100 times faster than A) with drools 5.3. Note that undo-then and JIT compiling might change that number drastically in future drools versions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (JBRULES-3288) Sliding time window ignored when using @timestamp and pseudo clock
by Colin Webber (Created) (JIRA)
Sliding time window ignored when using @timestamp and pseudo clock
------------------------------------------------------------------
Key: JBRULES-3288
URL: https://issues.jboss.org/browse/JBRULES-3288
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (fusion)
Affects Versions: 5.3.0.Final
Environment: Mac OSX 10.6.8
Reporter: Colin Webber
Assignee: Mark Proctor
When using a custom @timestamp together with PSEUDO clock, all events are accumulated rather than just those within the window:time period. I have tried using long (millisecond) and java.util.Date without success.
==================================
declare SimpleObject
@role(event)
@timestamp(customTime)
@expires(10m)
end;
rule "honour custom timestamp"
when
$avgVal : Number (longValue > 0) from accumulate ( SimpleObject($valueLng : valueLong ) over window:time (10s) from entry-point "SimpleEP", average ( $valueLng ) )
then
System.out.println("avg: " + $avgVal);
end
---------------------------------------
import java.util.Date;
public class SimpleObject {
private long customTime;
public long valueLong;
public SimpleObject(Date customTime, long valueLong) {
this.customTime = customTime.getTime();
this.valueLong = valueLong;
}
public long getCustomTime() {
return customTime;
}
public void setCustomTime(long customTime) {
this.customTime = customTime;
}
public long getValueLong() {
return valueLong;
}
public void setValueLong(long valueLong) {
this.valueLong = valueLong;
}
}
------------ Trivial Spock/Groovy unit test ----------------
@IgnoreRest
def "should honour custom timestamp"() {
when:
use (TimeCategory) {
def now = new Date()
simpleEp.insert(new SimpleObject(now, 100))
ksession.fireAllRules()
clock.advanceTime( 5, TimeUnit.SECONDS );
ksession.fireAllRules()
simpleEp.insert(new SimpleObject(5.seconds.from.now, 90))
ksession.fireAllRules()
clock.advanceTime( 5, TimeUnit.SECONDS );
ksession.fireAllRules()
simpleEp.insert(new SimpleObject(10.seconds.from.now, 80))
ksession.fireAllRules()
clock.advanceTime( 5, TimeUnit.SECONDS );
ksession.fireAllRules()
simpleEp.insert(new SimpleObject(15.seconds.from.now, 70))
ksession.fireAllRules()
clock.advanceTime( 5, TimeUnit.SECONDS );
ksession.fireAllRules()
simpleEp.insert(new SimpleObject(20.seconds.from.now, 60))
ksession.fireAllRules()
clock.advanceTime( 5, TimeUnit.SECONDS );
ksession.fireAllRules()
simpleEp.insert(new SimpleObject(25.seconds.from.now, 50))
ksession.fireAllRules()
clock.advanceTime( 5, TimeUnit.SECONDS );
ksession.fireAllRules()
}
then:
1 == 1 // no assertions - we're examining the stdout.
}
==================================
OUTPUT (INCORRECT - all values are included for each evalutation):
avg: 100.0
avg: 95.0
avg: 90.0
avg: 85.0
avg: 80.0
avg: 75.0
Note that when commenting out the @timestamp tag the output changes to the following (correct) output:
avg: 100.0
avg: 95.0
avg: 90.0
avg: 85.0
avg: 80.0
avg: 75.0
avg: 70.0
avg: 65.0
avg: 60.0
avg: 55.0
avg: 50.0
Also note that when using the REALTIME clock with Thread.sleep the output is correct.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months