Margarita
Margarita

Reputation: 53

Strange warnings during optaplanner execution on spring-boot

My optaplanner project works correctly, does what I want, but during execution it writes a lot of warning to the log file - so after whole cicle of tasks I get 1Gb log file. For example:

2019-12-03 16:47:00,334 WARN [org.reflections.Reflections] (default task-1) could not get type for name org.springframework.security.web.util.matcher.RequestMatcher from any class loader: org.reflections.ReflectionsException: could not get type for name org.springframework.security.web.util.matcher.RequestMatcher

2019-12-03 16:47:00,288 WARN [org.reflections.Reflections] (default task-1) could not get type for name org.apache.tiles.extras.complete.CompleteAutoloadTilesInitializer from any class loader: org.reflections.ReflectionsException: could not get type for name org.apache.tiles.extras.complete.CompleteAutoloadTilesInitializer

full WARN:

2019-12-03 16:47:00,287 WARN [org.reflections.Reflections] (default task-1) could not get type for name org.jooq.Transaction from any class loader: org.reflections.ReflectionsException: could not get type for name org.jooq.Transaction at deployment.OPForecast.war//org.reflections.ReflectionUtils.forName(ReflectionUtils.java:390) at deployment.OPForecast.war//org.reflections.Reflections.expandSuperTypes(Reflections.java:381) at deployment.OPForecast.war//org.reflections.Reflections.(Reflections.java:126) at deployment.OPForecast.war//org.optaplanner.core.config.domain.ScanAnnotatedClassesConfig.buildSolutionDescriptor(ScanAnnotatedClassesConfig.java:84) at deployment.OPForecast.war//org.optaplanner.core.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:341) at deployment.OPForecast.war//org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:251) at deployment.OPForecast.war//org.optaplanner.core.impl.solver.AbstractSolverFactory.buildSolver(AbstractSolverFactory.java:61) at deployment.OPForecast.war//OPForecast.dataprocessing.OPForecastDataProcessing.ExecForecast(OPForecastDataProcessing.java:45) at deployment.OPForecast.war//OPForecast.contollers.OPForecastController.getForecast(OPForecastController.java:102) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at deployment.OPForecast.war//org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) at deployment.OPForecast.war//org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at deployment.OPForecast.war//org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) at deployment.OPForecast.war//org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) at deployment.OPForecast.war//org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) at deployment.OPForecast.war//org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at deployment.OPForecast.war//org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) at deployment.OPForecast.war//org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) at deployment.OPForecast.war//org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) at deployment.OPForecast.war//org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877) at [email protected]//javax.servlet.http.HttpServlet.service(HttpServlet.java:706) at deployment.OPForecast.war//org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) at [email protected]//javax.servlet.http.HttpServlet.service(HttpServlet.java:791) at [email protected]//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) at [email protected]//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at [email protected]//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) at [email protected]//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at [email protected]//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) at [email protected]//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at [email protected]//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at [email protected]//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at [email protected]//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at [email protected]//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) at [email protected]//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68) at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) at [email protected]//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at [email protected]//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at [email protected]//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) at [email protected]//io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) at [email protected]//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348) at java.base/java.lang.Thread.run(Thread.java:844) Caused by: java.lang.ClassNotFoundException: org.jooq.Transaction from [Module "deployment.OPForecast.war" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116) at deployment.OPForecast.war//org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388) ... 67 more

etc

I really need to get rid of these warnings. Please help!

Upvotes: 1

Views: 142

Answers (1)

Geoffrey De Smet
Geoffrey De Smet

Reputation: 27357

Get rid of <scanAnnotatedClasses/> in your solver config XML to avoid org.reflections in spring-boot. You 'll need to set planningEntityClass etc, at least for now, because:

You're going to love the optaplanner-spring-boot-starter when it's released! It's almost finished (see PR on optaplanner).

Upvotes: 1

Related Questions