0

I am currently trying to get NiFi up and running, it now is initializing itself, but I'm not quite sure how to resolve these exceptions. My first guess is I do not have the PATH variable set up properly and NiFi can't access all of java. I know that the second exception is only because of the first, but I'm still not sure what argument is causing the flag.

First Exception:

2016-05-26 09:07:54,029 WARN [main] org.eclipse.jetty.webapp.WebAppContext Failed startup of context o.e.j.w.WebAppContext@6dcc40f5{/nifi,file:/home/devin/example-nifi-deploy/nifi-1.0.0-SNAPSHOT/work/jetty/nifi-web-ui-1.0.0-SNAPSHOT.war/webapp/,STARTING}{./work/nar/framework/nifi-framework-nar-1.0.0-SNAPSHOT.nar-unpacked/META-INF/bundled-dependencies/nifi-web-ui-1.0.0-SNAPSHOT.war}
java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:866) ~[na:1.8.0_91]
    at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:483) ~[na:1.8.0_91]
    at java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:422) ~[na:1.8.0_91]
    at java.util.ComparableTimSort.sort(ComparableTimSort.java:222) ~[na:1.8.0_91]
    at java.util.Arrays.sort(Arrays.java:1246) ~[na:1.8.0_91]
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:865) ~[jetty-servlet-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) ~[jetty-servlet-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.Server.start(Server.java:387) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.Server.doStart(Server.java:354) [jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:662) [nifi-jetty-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at org.apache.nifi.NiFi.<init>(NiFi.java:137) [nifi-runtime-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at org.apache.nifi.NiFi.main(NiFi.java:227) [nifi-runtime-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]

Second Exception:

2016-05-26 09:08:07,693 WARN [main] org.apache.nifi.web.server.JettyServer Failed to start web server... shutting down.
java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:866) ~[na:1.8.0_91]
    at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:483) ~[na:1.8.0_91]
    at java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:422) ~[na:1.8.0_91]
    at java.util.ComparableTimSort.sort(ComparableTimSort.java:222) ~[na:1.8.0_91]
    at java.util.Arrays.sort(Arrays.java:1246) ~[na:1.8.0_91]
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:865) ~[jetty-servlet-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) ~[jetty-servlet-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) ~[jetty-webapp-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.Server.start(Server.java:387) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.server.Server.doStart(Server.java:354) ~[jetty-server-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.11.v20150529.jar:9.2.11.v20150529]
    at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:662) ~[nifi-jetty-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at org.apache.nifi.NiFi.<init>(NiFi.java:137) [nifi-runtime-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
    at org.apache.nifi.NiFi.main(NiFi.java:227) [nifi-runtime-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
Dennis Jaheruddin
  • 21,208
  • 8
  • 66
  • 122
  • 2
    Welcome to Stack Overflow! Please use the formatting tools at the top of the edit box or indent code/exception samples with four spaces so that they are rendered as code. Otherwise no-one can read what the content is. Also, make sure you ask an answerable question including what debugging you have done. – AlBlue May 26 '16 at 13:30
  • for the first exception - http://stackoverflow.com/questions/8327514/comparison-method-violates-its-general-contract ofc, this only applies if it's your code that's implementing compare – Jeutnarg Jul 25 '16 at 22:14
  • When you are looking for coding help online, it's often best to try Googling the first two lines of a stack trace separately: the SO question I found was found by looking at the second line of your stack trace, not the first one. – Jeutnarg Jul 25 '16 at 22:16
  • I'm not trying to spam, but you could also try looking at this question: http://stackoverflow.com/questions/7849539/comparison-method-violates-its-general-contract-java-7-only and this question: http://stackoverflow.com/questions/11441666/java-error-comparison-method-violates-its-general-contract , since they both seem related to your question – Jeutnarg Jul 25 '16 at 22:18

1 Answers1

0

It looks like you are running a version of NiFi library that is not compatible with yours (newer, at least 1.7) version of the Java runtime. Try using a more recent version of NiFi or put -Djava.util.Arrays.useLegacyMergeSort=true after java in the NiFi startup script to reconfigure the runtime in a way that will support a version of NiFi that you already have.

fx8
  • 1
  • 1