UnifiedViews / Core

UnifiedViews
https://www.poolparty.biz/agile-data-integration
Other
30 stars 7 forks source link

Unexpected error occurred in scheduled task: Config is missing property: exec.log.history #585

Closed hanecak closed 8 years ago

hanecak commented 8 years ago

Following stack trace is observer on several ODN instances (where UnifiedViews is included):

2016-06-20 00:00:00,001 [taskScheduler-3] ERROR exec: dpu: o.s.s.support.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task.
cz.cuni.mff.xrg.odcs.commons.app.conf.MissingConfigPropertyException: Config is missing property: exec.log.history.
        at cz.cuni.mff.xrg.odcs.commons.app.conf.AppConfig.getString(AppConfig.java:143) ~[commons-app-2.2.0.jar:na]
        at cz.cuni.mff.xrg.odcs.commons.app.conf.AppConfig.getInteger(AppConfig.java:155) ~[commons-app-2.2.0.jar:na]
        at cz.cuni.mff.xrg.odcs.backend.pruning.Log.execute(Log.java:56) ~[backend-2.2.0.jar:na]
        at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_101]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_101]
        at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) ~[spring-context-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) ~[spring-context-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-3.1.4.RELEASE.jar:3.1.4.RELEASE]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_101]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_101]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_101]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_101]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_101]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_101]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_101]

Based on code review, this should mean that null is taken as default and not log pruning takes place. While that is OK, the error message may scare users.

Fix suggestion: Add following into backend/conf/config.sample.properties and also to newly created default configuration files:

exec.log.history = -1

@tomas-knap , please advice. If you're OK with that, we'll send pull-request.

tomas-knap commented 8 years ago

Yes, you are right. Please put it there by tomorrow if possible if that should be included in the release.

tomas-knap commented 8 years ago

pull request is fine

hanecak commented 8 years ago

OK, we'll provide pull request.

But right now too busy, so this will go to next bugfix release.

hanecak commented 8 years ago

Sorry for delay. I've prepared a pull request: https://github.com/UnifiedViews/Core/pull/595