HTTP Status 500 ? Internal Server Error
Asked by kannan raja:

*** ** * ** ***

**Type** Exception Report

**Message** Servlet.init() for servlet \[action\] threw exception

**Description** The server encountered an unexpected condition that prevented it from fulfilling the request.

**Exception**

```
javax.servlet.ServletException: Servlet.init() for servlet [action] threw exception	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)	java.lang.Thread.run(Thread.java:748)
```

**Root Cause**

```
java.lang.NullPointerException	com.atlassian.confluence.setup.webwork.ConfluenceWebWorkConfiguration.getImpl(ConfluenceWebWorkConfiguration.java:68)	com.opensymphony.webwork.config.DelegatingConfiguration.getImpl(DelegatingConfiguration.java:81)	com.atlassian.confluence.setup.webwork.ConfluenceWebWorkConfigLoader.lambda$new$0(ConfluenceWebWorkConfigLoader.java:24)	com.atlassian.confluence.setup.webwork.ConfluenceWebWorkConfigLoader.getImpl(ConfluenceWebWorkConfigLoader.java:41)	com.opensymphony.webwork.config.Configuration.get(Configuration.java:139)	com.opensymphony.webwork.config.Configuration.getString(Configuration.java:125)	com.opensymphony.webwork.dispatcher.ServletDispatcher.init(ServletDispatcher.java:166)	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)	java.lang.Thread.run(Thread.java:748)
```

**Note** The full stack trace of the root cause is available in the server logs.

*** ** * ** ***

### Apache Tomcat/9.0.12 {#toc-hId-1652374385}


Answers:
author: Shannon S
body: Kannan,

Can you confirm, this is for Confluence Cloud, or are you running Confluence on your own server?

Could you tell us a bit about what you were doing when you ran into this error? What have you tried so far?

Regards,

Shannon

comments: author: kannan raja
body: Hi Shannon,

I am running on my own server

Thanks,

Kannan


author: Shannon S
body: Kannan,

Thank you for confirming. Could you please let me know your Confluence Server version?

If you can also follow-up on my other questions, it will help. Right now we only see a 500 error which could be caused by numerous things, so we need to know exactly what you were doing and what you tried so far.

Shannon


author: kannan raja
body: Hi Shannon,

I have tried with centOs 6.6 and 7.6

Linux one old version and new one as well

Thanks,

Manikandan M


author: Shannon S
body: Manikandan,

Thank you, but actually I need to know your Confluence version, not your Linux version.

Could you please let us know what version of Confluence you're running?

Additionally, we have no context about this error, which tells us nothing about what's occurring. Please list everything you've done so far with Confluence (is this an upgrade, an install, were you just using Confluence normally and this error showed up?)

You'll also need to go into the Server logs, as recommended in the message. You will want to open the logs, tail them (see [Confluence server logs](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html) for more details), and then trigger the error so you can obtain the full error message.

Shannon


author: kannan raja
body: Confluence had problems starting up  

This page is for Confluence administrators. If you're seeing this page, your Confluence administrator is probably working to restore the service.  

DescriptionTimeLevelException  
Could not load bootstrap from environment 2019-02-11 23:17:13 fatal BootstrapException: Unable to bootstrap application: The database driver (com.mysql.jdbc.Driver) was not found in the class path.\<br/\>This Confluence installation cannot be upgraded automatically. Please see Confluence documentation:\<br/\><https://confluence.atlassian.com/display/DOC/Database+Setup+For+MySQL>  

<br />


author: Shannon S
body: Kannan,

Thank you for providing those details! It looks like you were able to find the cause of the issue:
> The database driver (com.mysql.jdbc.Driver) was not found in the class path.

Have a look at the linked document [Database Setup for MySQL](https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html?_ga=2.137241648.1648675182.1549884197-130830184.1549884197) for further details on how to add the driver:
> Due to licensing restrictions, we're not able to bundle the MySQL driver with Confluence. To make your database driver available to Confluence:

1.
   > Stop Confluence.
2.
   > Head to [Database JDBC Drivers](https://confluence.atlassian.com/doc/database-jdbc-drivers-171742.html) and download the appropriate driver. The driver file will be called something like `mysql-connector-java-5.1.xx-bin.jar`
3.
   > Drop the .jar file in your `<installation-directory>/confluence/WEB-INF/lib` directory.
4.
   > Restart Confluence then go to [http://localhost:<port](https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html?_ga=2.137241648.1648675182.1549884197-130830184.1549884197)`>` in your browser to continue the setup process.

Please make sure to read the article in its entirety, and make sure MySQL is set up properly, including the driver.

It will also help me to know your Confluence version, which I asked for previously. I would still be interested in that information if you continue to have issues.

Shannon


author: kannan raja
body: Confluence had problems starting up  

This page is for Confluence administrators. If you're seeing this page, your Confluence administrator is probably working to restore the service.  
Confluence encountered the following problems during startup. You need to fix any errors before you start Confluence again.  
License Inconsistency: Confluence support and upgrades for your current license have expired.  

You'll need to supply a valid license key. Confluence can't start without this.  
If you have a new license, please enter it on this page and restart.  
Learn more  
Database: Your database connection pool allows 60 connections, which is not enough to support the 60 HTTP threads in your Tomcat configuration. Either increase the pool size to at least 75 connections or reduce the maximum number of HTTP threads to 48 or fewer.  

Learn more  
Description Time Level Exception  
Unable to start up Confluence. Fatal error during startup sequence: confluence.lifecycle.core:mananagedjobs (Start and stop the Managed Scheduled Jobs)  
2019-02-13 01:09:30 fatal could not extract ResultSet; SQL \[n/a\]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet  

If you're unable to fix the problems and need to contact support, we can respond faster if you provide the logs of your instance.


author: Diego
body: Hello there Kannan!

Please, allow me ask a few questions:
> 1. Are you trying to **upgrade Confluence** to a newer version?
> 2. Was this instance active at **some point in the past**?
> 3. Which **version of Confluence** are you currently running?
> 4. Is this a **production instance**?

The first error excerpt you posted tells us that **the license being used is currently expired** . The error suggests that an upgrade attempt was executed. Usually, this happens when the **version being upgraded to** was released **after** the license expiry date. You can try to:
> * upgrade to a previous version
> * Apply a **evaluation key** and try the upgrade again

You can also take a look here:

**[Upgrade fails due to expired license](https://confluence.atlassian.com/confkb/upgrade-fails-due-to-expired-license-284366215.html)**

The second one shows that the maxThreads and hibernate.c3p0.max_size parameters are not set as needed. For this, you can do one of the following:

**change the value of c3p0**
> 1. Make sure that Confluence is not running
> 2. Check your `confluence.cfg.xml` file, found in your \<confluence-home\> directory
> 3. Find the line that has hibernate.c3p0.max_size
> 4. Change the value from 60 to **75**
> 5. **Save**the file

**change the value of maxThreads**
> 1. Make sure that Confluence is not running
> 2. Check your `server.xml` file, found in your \<confluence-install\> directory
> 3. Find the line that has maxThreads=60
> 4. Change the value from 60 to **48**
> 5. Save the file

**Remember to always backup your files before changing them. The same goes for databases.**

Let us know your thoughts on this Kannan