运行 optaplanner .jar 为什么会出现这个错误?
Why appear this error when run optaplanner .jar?
我有一个 optaplanner 应用程序,我想将其导出为 运行 可用的 jar,但是当我 运行 jar 时,出现错误,我不知道为什么。
我正在使用 Vehicle Routing 示例,我想在没有 eclipse 的情况下使用 GUI 界面。
Exception in thread "main" java.lang.NullPointerException
at org.kie.internal.io.ResourceFactory.newByteArrayResource(ResourceFactory.java:66)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.getResource(AbstractKieModule.java:308)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.addResourceToCompiler(AbstractKieModule.java:273)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.addResourceToCompiler(AbstractKieModule.java:268)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:253)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:74)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:267)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:235)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:184)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildDroolsScoreDirectorFactory(ScoreDirectorFactoryConfig.java:544)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildScoreDirectorFactory(ScoreDirectorFactoryConfig.java:351)
at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:255)
at org.optaplanner.core.impl.solver.AbstractSolverFactory.buildSolver(AbstractSolverFactory.java:61)
at org.optaplanner.examples.common.app.CommonApp.createSolver(CommonApp.java:136)
at org.optaplanner.examples.common.app.CommonApp.createSolutionBusiness(CommonApp.java:124)
at org.optaplanner.examples.common.app.CommonApp.init(CommonApp.java:115)
at org.optaplanner.examples.common.app.CommonApp.init(CommonApp.java:111)
at org.optaplanner.examples.pmrouting.app.PMRoutingAPP.main(PMRoutingAPP.java:39)
因为 Drools 与 uber jar 不兼容。
如果您真的想 运行 使用超级罐子,请使用其他分数计算器之一...
我有一个 optaplanner 应用程序,我想将其导出为 运行 可用的 jar,但是当我 运行 jar 时,出现错误,我不知道为什么。
我正在使用 Vehicle Routing 示例,我想在没有 eclipse 的情况下使用 GUI 界面。
Exception in thread "main" java.lang.NullPointerException
at org.kie.internal.io.ResourceFactory.newByteArrayResource(ResourceFactory.java:66)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.getResource(AbstractKieModule.java:308)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.addResourceToCompiler(AbstractKieModule.java:273)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.addResourceToCompiler(AbstractKieModule.java:268)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:253)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:74)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:267)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:235)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:184)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildDroolsScoreDirectorFactory(ScoreDirectorFactoryConfig.java:544)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildScoreDirectorFactory(ScoreDirectorFactoryConfig.java:351)
at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:255)
at org.optaplanner.core.impl.solver.AbstractSolverFactory.buildSolver(AbstractSolverFactory.java:61)
at org.optaplanner.examples.common.app.CommonApp.createSolver(CommonApp.java:136)
at org.optaplanner.examples.common.app.CommonApp.createSolutionBusiness(CommonApp.java:124)
at org.optaplanner.examples.common.app.CommonApp.init(CommonApp.java:115)
at org.optaplanner.examples.common.app.CommonApp.init(CommonApp.java:111)
at org.optaplanner.examples.pmrouting.app.PMRoutingAPP.main(PMRoutingAPP.java:39)
因为 Drools 与 uber jar 不兼容。 如果您真的想 运行 使用超级罐子,请使用其他分数计算器之一...