The title sums the setup.
I know the Error means the Java versions does not match, between the one tomcat is using and the one Jenkins is compiled.
If I run java -version
I get: java version "1.7.0_80"
If I run javac -version
I get: 1.7.0_80
I do have other Java installation on the system which are there for other projects so I can't remove them, like Java 6, and 8.
My Environment variables:
JAVA_HOME == /usr/lib/jvm/java-7-oracle
CATALINA_HOME == EMPTY
JENKINS_HOME == ~/.jenkins
=== UPDATE ===
I've removed the openjdk6 that was previously installed, and now I get another Error:
java.lang.NullPointerException
at jenkins.util.groovy.GroovyHookScript.run(GroovyHookScript.java:63)
at hudson.util.BootFailure.publish(BootFailure.java:43)
at hudson.WebAppMain.contextInitialized(WebAppMain.java:247)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
=== UPDATE ===
When checking in the sources I find this at line 63, and then this lines 682 & 762, it seems that Jenkins or j.servletContext is not initialized...
What am I doing wrong?
If there are missing details, let me know I'll add to the question.