春季启动optaplanner期间出现奇怪的警告

问题描述 投票:0回答:1

我的optaplanner项目可以正常工作,可以执行我想要的操作,但是在执行过程中,它会向日志文件写入很多警告-因此,在完成全部任务后,我得到了1Gb日志文件。例如:

2019-12-03 16:47:00,334 WARN [org.reflections.Reflections](默认任务1)无法从任何类加载器获取名称为org.springframework.security.web.util.matcher.RequestMatcher的类型: org.reflections.ReflectionsException:无法获取名称为org.springframework.security.web.util.matcher.RequestMatcher的类型

2019-12-03 16:47:00,288 WARN [org.reflections.Reflections](默认任务1)无法从任何类加载器org获取名称为org.apache.tiles.extras.complete.CompleteAutoloadTilesInitializer的类型。 Reflections.ReflectionsException:无法获取名称为org.apache.tiles.extras.complete.CompleteAutoloadTilesInitializer的类型

完整警告:

2019-12-03 16:47:00,287 WARN [org.reflections.Reflections](默认任务1)无法从任何类加载器获取名称为org.jooq.Transaction的类型:org.reflections.ReflectionsException:无法获取名称类型org.jooq.Transaction的类型在部署时.OPForecast.war // org.reflections.ReflectionUtils.forName(ReflectionUtils.java:390)在部署时.OPForecast.war // org.reflections.Reflections.expandSuperTypes(Reflections.java:381)在部署时.OPForecast.war // org.reflections.Reflections。(Reflections.java:126)在部署时.OPForecast.war // org.optaplanner.core.config.domain.ScanAnnotatedClassesConfig.buildSolutionDescriptor(ScanAnnotatedClassesConfig.java:84)在部署时.OPForecast.war // org.optaplanner.core.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:341)部署时.OPForecast.war // org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:251)部署时.OPForecast.war // org.optaplanner.core.impl.solver.AbstractSolverFactory.buildSolver( AbstractSolverFactory.java:61)在部署时.OPForecast.war // OPForecast.dataprocessing.OPForecastDataProcessing.ExecForecast(OPForecastDataProcessing.java:45)在部署时.OPForecast.war // OPForecast.contollers.OPForecastController.getForecast(OPForecastController.java:102)在java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(本机方法)在java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)在java.base / jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)在java.base / java.lang.reflect.Method.invoke(Method.java:564)在部署时.OPForecast.war // org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)在部署时.OPForecast.war // org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)在部署时.OPForecast.war // org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)在部署时.OPForecast.war // org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)在部署时.OPForecast.war // org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)在部署时.OPForecast.war // org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)在部署时.OPForecast.war // org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)在部署时.OPForecast.war // org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)在部署时.OPForecast.war // org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)在部署时.OPForecast.war // org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)在[email protected]//javax.servlet.http.HttpServlet.service( HttpServlet.java:706)在部署时.OPForecast.war // org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)在[email protected]//javax.servlet.http.HttpServlet.service(HttpServlet.java:791)在[email protected]//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)在[email protected]//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)在[email protected]//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)在[email protected]//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)在[email protected]//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)在[email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)在[email protected]//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)在[email protected]//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)在[email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)在[email protected]//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)在[email protected]//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)在[email protected]//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)在[email protected]//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)在[email protected]//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)在[email protected]//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)在[email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)在[email protected]//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)在[email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)在[email protected]//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)在[email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)在[email protected]//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)在[email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)在[email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)在[email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)在[email protected]//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)在[email protected]//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)在[email protected]//org.wildfly.extension.undertow.security.SecurityContextSecuritySetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)在[email protected] /// org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502)在[email protected] /// org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502)在[email protected] /// org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502)在[email protected] /// org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502)在[email protected] /// org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502)在[email protected]//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)在[email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)在[email protected]//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)在[email protected]//io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)在[email protected]//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)在[email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)在[email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)在[email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)在[email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)在java.base / java.lang.Thread.run(Thread.java:844)原因:java.lang.ClassNotFoundException:org.jooq.Transaction,来自[Service Module Loader中的模块“ deployment.OPForecast.war”]在org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)在org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)在org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)在org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)在部署时.OPForecast.war // org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388)... 67更多

我真的需要摆脱这些警告。请帮助!

java spring-boot optaplanner
1个回答
1
投票

摆脱您的求解器配置XML中的<scanAnnotatedClasses/>,以避免在弹簧引导中使用org.reflections。您至少现在需要设置planningEntityClass等,因为:

optaplanner-spring-boot-starter发布后,您一定会爱上它!它快要完成了(请参阅optaplanner上的PR)。

© www.soinside.com 2019 - 2024. All rights reserved.