Confluence won't start; NullPointerException in LifecycleBase.start
Asked by Michael Schr?der:

I am trying to setup a server with Apache (as https proxy) Jira and Confluenece.

Currently Jira works like a charm, but Confluence refuses to work.

If I call confluence.mydomain.com I get an 503 Error.

Confluence error log shows an NullPointerException in org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) that stops concfluence to start.

apache confluence:

```
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName confluence.mydomain.com

ServerAdmin webmaster@localhost
ProxyPreserveHost On

<Proxy *>
Order allow,deny
Allow from all
</Proxy>

ProxyPass / http://localhost:8090/
ProxyPassReverse / http://localhost:8090/

ErrorLog ${APACHE_LOG_DIR}/confluence-error.log
CustomLog ${APACHE_LOG_DIR}/confluence-access.log combined

Include /etc/letsencrypt/options-ssl-apache.conf

SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
</VirtualHost>
</IfModule>
```

Confluence server.xml

```
 <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
maxThreads="48" minSpareThreads="10"
enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https" secure="true" proxyName="confluence.mydomain.com" proxyPort="443"/>
```

catalania.log

```
08-Jul-2019 11:28:25.475 WARNUNG [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server] failed to set property [debug] to [0]
08-Jul-2019 11:28:25.526 WARNUNG [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'debug' to '0' did not find a matching property.
08-Jul-2019 11:28:25.545 WARNUNG [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine] failed to set property [debug] to [0]
08-Jul-2019 11:28:25.551 WARNUNG [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host] failed to set property [debug] to [0]
08-Jul-2019 11:28:25.580 WARNUNG [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host/Context] failed to set property [debug] to [0]
08-Jul-2019 11:28:25.596 WARNUNG [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host/Context] failed to set property [debug] to [0]
08-Jul-2019 11:28:25.806 INFORMATION [main] org.apache.coyote.AbstractProtocol.init Initialisiere ProtocolHandler["http-nio-8090"]
08-Jul-2019 11:28:25.830 INFORMATION [main] org.apache.catalina.startup.Catalina.load Server initialization in [426] milliseconds
08-Jul-2019 11:28:25.835 INFORMATION [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat-Standalone]
08-Jul-2019 11:28:25.835 INFORMATION [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.19]
08-Jul-2019 11:28:26.450 SCHWERWIEGEND [main] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Standalone].StandardHost[localhost].StandardContext[]]


...

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:373)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:191)
at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1956)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1122)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5048)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 9 more

08-Jul-2019 11:28:27.889 INFORMATION [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8090"]
08-Jul-2019 11:28:27.889 INFORMATION [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat-Standalone]
08-Jul-2019 11:28:27.890 INFORMATION [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8090"]
08-Jul-2019 11:28:27.892 INFORMATION [Catalina-utility-3] org.apache.catalina.core.ApplicationContext.log Destroying Spring FrameworkServlet 'dispatcher'
08-Jul-2019 11:28:27.892 INFORMATION [Catalina-utility-3] org.springframework.web.context.support.AnnotationConfigWebApplicationContext.doClose Closing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Jul 08 11:28:27 CEST 2019]; root of context hierarchy
08-Jul-2019 11:28:27.893 INFORMATION [Catalina-utility-3] org.springframework.context.support.DefaultLifecycleProcessor.stop Stopping beans in phase 2147483647
08-Jul-2019 11:28:27.896 INFORMATION [Catalina-utility-3] org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.shutdown Shutting down ExecutorService 'defaultSockJsTaskScheduler'
```


Answers:
author: Alexis Robert
body: Hi [@Michael Schr?der](/t5/user/viewprofilepage/user-id/3448043) ,

did Confluence work fine before you tried to implement HTTPS ? What version of Java JRE are you using ?

comments: author: Michael Schr?der
body: It "worked" to a point where I could enter the licence key. I it did that with HTTPS enabled, I think. But not shure if I changed something or rebooted apache later.

It is running on Ubuntu 18.04 and I am not shure where it gets its Java from, but i don't think it is the openjdk version "11.0.3" of my system.


author: Michael Schr?der
body: So it did break during the setup process.


author: Alexis Robert
body: You should probably not rely on the default Ubuntu Java package as Confluence (and Jira too) need specific version to run.

Both sould use AdoptOpenJDK 8, that you can download here:: <https://adoptopenjdk.net/index.html>

Let me know if this helps,

--Alexis


author: Michael Schr?der
body: Doesn't it come with its own java? Because Jira is running even if OpenJDK is not installed (by me) and Confluence throwes the same Exception. Is there a way to check the java version used by Jira / Confluence?


author: Michael Schr?der
body: Jira tells me it is using Oracle Corporation Java(TM) SE Runtime Environment 1.8.0_181, I am pretty sure this comes from the Atlassian installation.


author: Alexis Robert
body: Yes you're right, when you use the installer it's bundled with the Java JDK already. I thought that maybe you didn't use that but looks like you're good on this !

What version of Confluence are you installing ?


author: Michael Schr?der
body: Ohh sorry, I should have provided that information earlyer.

I have used this:

<https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-6.15.6-x64.bin>


author: Alexis Robert
body: That's the latest version available so you should not have any issues with it.

What is the server you're using to install it ? Is it on a dedicated VM or Server, or on a laptop for example ?


author: Michael Schr?der
body: I've found the problem. I used the ubuntu JDBC driver not the atlassian one ?. Seems like this is not a problem for Jira, but for Confluence.


author: Michael Schr?der
body: Yeah now it works. It is eaven in the manual, that the current version is not supported by Confluence. Stupid me. Sorry for bother.


Tags: confluence-server

null-pointer-exception

server