Integrate Optaplanner in Jira plugin

那年仲夏 提交于 2020-01-06 08:06:08

问题


I'm trying to integrate optaplanner into my jira plugin.

I first want to get optaplanner running, using the following solverConfig.xml

<?xml version="1.0" encoding="UTF-8"?>
<solver>
  <solutionClass>com.mycompany.planner.domain.VersionPlanning</solutionClass>
  <entityClass>com.mycompany.planner.domain.PlanningIssue</entityClass>

  <scoreDirectorFactory>
    <scoreDrl>planner/solver/scoreRules.drl</scoreDrl>
  </scoreDirectorFactory>
  <termination>
    <secondsSpentLimit>290</secondsSpentLimit>
  </termination>
</solver>

POM Snippet of my jira plugin

<dependency>
          <groupId>org.optaplanner</groupId>
          <artifactId>optaplanner-core</artifactId>
          <version>7.7.0.Final</version>
</dependency>

Executing:

Line 47: SolverFactory solverFactory = SolverFactory.createFromXmlResource("planner/solver/taskSchedulingSolverConfig.xml", getClass().getClassLoader());
Line 48: this.solver = solverFactory.buildSolver();

As I get always

java.lang.NoSuchMethodError: com.thoughtworks.xstream.XStream.setupDefaultSecurity(Lcom/thoughtworks/xstream/XStream;)V

As this error seems to be a version problem of XStream using the dependcy decleration above, I changed my POM to:

<dependency>
      <groupId>org.optaplanner</groupId>
      <artifactId>optaplanner-core</artifactId>
      <version>7.7.0.Final</version>
      <exclusions>
        <exclusion>
          <groupId>com.thoughtworks.xstream</groupId>
          <artifactId>xstream</artifactId>
        </exclusion>
      </exclusions>
 </dependency>
 <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.4.10</version>
 </dependency>

With the above POM dependency I run in following error...

[INFO] [talledLocalContainer] INFORMATION: Initiating Jersey application,  version 'Jersey: 1.19 02/11/2015 03:25 AM'
[INFO] [talledLocalContainer] com.thoughtworks.xstream.io.StreamException: Cannot create XmlPullParser
[INFO] [talledLocalContainer]   at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:56)
[INFO] [talledLocalContainer]   at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1337)
[INFO] [talledLocalContainer]   at org.optaplanner.core.impl.solver.XStreamXmlSolverFactory.configure(XStreamXmlSolverFactory.java:150)
[INFO] [talledLocalContainer]   at org.optaplanner.core.impl.solver.XStreamXmlSolverFactory.configure(XStreamXmlSolverFactory.java:141)
[INFO] [talledLocalContainer]   at org.optaplanner.core.impl.solver.XStreamXmlSolverFactory.configure(XStreamXmlSolverFactory.java:116)
[INFO] [talledLocalContainer]   at org.optaplanner.core.api.solver.SolverFactory.createFromXmlResource(SolverFactory.java:103)
[INFO] [talledLocalContainer]   at com.mycompany.planner.app.App.buildSolver(App.java:47)
[INFO] [talledLocalContainer]   at com.mycompany.planner.app.App.<init>(App.java:32)
[INFO] [talledLocalContainer]   at com.mycompany.planner.app.AppRestRessource.all(AppRestRessource.java:108)
[INFO] [talledLocalContainer]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer]   at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:34)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:110)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:190)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
[INFO] [talledLocalContainer]   at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
[INFO] [talledLocalContainer]   at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
[INFO] [talledLocalContainer]   at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
[INFO] [talledLocalContainer]   at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:829)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.module.servlet.RestServletUtilsUpdaterFilter.doFilterInternal(RestServletUtilsUpdaterFilter.java:22)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.module.servlet.RestServletUtilsUpdaterFilter.doFilter(RestServletUtilsUpdaterFilter.java:34)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(ServingRequestsFilter.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter.doFilter(PrettyUrlsSiteMeshFixupFilter.java:36)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:60)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:92)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:56)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.labs.httpservice.resource.ResourceFilter.doFilter(ResourceFilter.java:59)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.executeRequest(AccessLogFilter.java:92)
[INFO] [talledLocalContainer]   at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.doFilter(AccessLogFilter.java:78)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter.doFilter(XsrfTokenAdditionRequestFilter.java:49)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.jira.web.filters.pagebuilder.PageBuilderFilter.doFilter(PageBuilderFilter.java:81)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.jira.web.filters.CommittedResponseHtmlErrorRecoveryFilter.doFilter(CommittedResponseHtmlErrorRecoveryFilter.java:55)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.jira.web.filters.MauEventFilter.doFilter(MauEventFilter.java:52)
[INFO] [talledLocalContainer]   at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:242)
[INFO] [talledLocalContainer]   at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:103)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)
[INFO] [talledLocalContainer]   at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:77)
[INFO] [talledLocalContainer]   at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:79)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:59)
[INFO] [talledLocalContainer]   at com.atlassian.jira.web.filters.johnson.JiraJohnson503Filter.doFilter(JiraJohnson503Filter.java:24)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
[INFO] [talledLocalContainer]   at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
[INFO] [talledLocalContainer]   at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
[INFO] [talledLocalContainer]   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
[INFO] [talledLocalContainer]   at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)
[INFO] [talledLocalContainer]   ...
[INFO] [talledLocalContainer]   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
[INFO] [talledLocalContainer]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[INFO] [talledLocalContainer]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[INFO] [talledLocalContainer]   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[INFO] [talledLocalContainer]   at java.lang.Thread.run(Thread.java:748)
[INFO] [talledLocalContainer] Caused by: org.xmlpull.v1.XmlPullParserException: No valid parser classes found in resource /META-INF/services/org.xmlpull.v1.XmlPullParserFactory that contained 'org.xmlpull.mxp1.MXParserFactory'
[INFO] [talledLocalContainer]   at org.xmlpull.v1.XmlPullParserFactory.newPullParser(XmlPullParserFactory.java:175)
[INFO] [talledLocalContainer]   at com.thoughtworks.xstream.io.xml.XppDriver.createParser(XppDriver.java:59)
[INFO] [talledLocalContainer]   at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)
[INFO] [talledLocalContainer]   ... 219 more

This seems also to be a dependency problem? Any suggestions whats wrong in my implementation?

Thank you

Kind Regards

Update:

Snippet of my mvn dependency:tree

[INFO] +- org.optaplanner:optaplanner-core:jar:7.7.0.Final:compile
[INFO] |  +- org.kie:kie-api:jar:7.7.0.Final:compile
[INFO] |  |  +- org.kie.soup:kie-soup-maven-support:jar:7.7.0.Final:compile
[INFO] |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for conflict with 1.6.6)
[INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for conflict with 1.6.6)
[INFO] |  +- org.kie:kie-internal:jar:7.7.0.Final:compile
[INFO] |  |  +- (org.kie:kie-api:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for conflict with 1.6.6)
[INFO] |  +- org.drools:drools-core:jar:7.7.0.Final:compile
[INFO] |  |  +- org.mvel:mvel2:jar:2.4.0.Final:compile
[INFO] |  |  +- (org.kie:kie-api:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- (org.kie:kie-internal:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- org.kie.soup:kie-soup-commons:jar:7.7.0.Final:compile
[INFO] |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for conflict with 1.6.6)
[INFO] |  |  +- org.kie.soup:kie-soup-project-datamodel-commons:jar:7.7.0.Final:compile
[INFO] |  |  |  +- (org.kie.soup:kie-soup-commons:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  |  +- org.kie.soup:kie-soup-project-datamodel-api:jar:7.7.0.Final:compile
[INFO] |  |  |  |  \- (org.kie.soup:kie-soup-commons:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.mvel:mvel2:jar:2.3.2.Final:compile - omitted for conflict with 2.4.0.Final)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for conflict with 1.6.6)
[INFO] |  |  \- commons-codec:commons-codec:jar:1.9:compile
[INFO] |  +- org.drools:drools-compiler:jar:7.7.0.Final:compile
[INFO] |  |  +- (org.drools:drools-core:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- (org.kie:kie-api:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- (org.kie:kie-internal:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- (org.kie.soup:kie-soup-maven-support:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- (org.kie.soup:kie-soup-commons:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- (org.kie.soup:kie-soup-project-datamodel-commons:jar:7.7.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- org.antlr:antlr-runtime:jar:3.5.2:compile
[INFO] |  |  +- org.eclipse.jdt.core.compiler:ecj:jar:4.4.2:compile
[INFO] |  |  +- (org.mvel:mvel2:jar:2.4.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- com.google.protobuf:protobuf-java:jar:2.6.0:compile
[INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for conflict with 1.6.6)
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] |  +- org.apache.commons:commons-math3:jar:3.4.1:compile
[INFO] |  +- com.google.guava:guava:jar:18.0:compile
[INFO] |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for conflict with 1.6.6)
[INFO] |  \- org.reflections:reflections:jar:0.9.11:compile
[INFO] |     +- (com.google.guava:guava:jar:20.0:compile - omitted for conflict with 18.0)
[INFO] |     \- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] \- com.thoughtworks.xstream:xstream:jar:1.4.10:compile
[INFO]    +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO]    \- xpp3:xpp3_min:jar:1.1.4c:compile

回答1:


At runtime, you're not using the minimal XStream version that OptaPlanner requires. That explains the NoSuchMethodError on one of the new security methods.

Put a breakpoint at runtime (use a remote debugger) and XStream.class.getPackage().getImplementationVersion() will tell you what XStream version you're using and how it's lower from the one that optaplanner-core needs.

  • Maybe JIRA has a parent class loader that already loads xstream.
  • Maybe your plugin has a parent bom that overrides the version. Run mvn dependency:tree -Dverbose.


来源:https://stackoverflow.com/questions/49664990/integrate-optaplanner-in-jira-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!