---
source_url: "https://docs.killbill.io/latest/getting_started"
title: Getting Started
mirrored_at: 2026-08-05T03:38:50.815Z
host: docs.killbill.io
cited_in_42a: true
mirror_canonical: "https://index.42a.ai/docs.killbill.io/latest/getting_started"
---

> **Original source:** https://docs.killbill.io/latest/getting_started

Users familiar with Java technologies can also install Kill Bill and Kaui directly in the Web container of their choice. We recommend using Tomcat version 9.0.x. This section covers the instructions for installing Kill Bill and Kaui in Tomcat. If this approach is followed, you will also need to configure the database manually as explained below.

### Tomcat Installation and configuration

The first step in installing Kill Bill in Tomcat is to download and install Tomcat. For this, you need to follow the steps given below:

1.  Download the Core binary distribution of the Tomcat container from [here](https://tomcat.apache.org/download-90.cgi) (At the time of writing, **9.0.91** is the latest version, however it can change in the future as newer versions are released.) The downloaded zip file contains a folder called **apache-tomcat-9.0.91**
    
2.  Extract **apache-tomcat-9.0.91** and place it on any location on your computer. This path will be refered to as **TOMCAT\_HOME** from now on. (For example, if you place **apache-tomcat-9.0.91** in a directory called `` `C:\Software` ``, **TOMCAT\_HOME** refers to `` `C:\Software\apache-tomcat-9.0.91` ``). It should look like this:
    
    ```
     $TOMCAT_HOME
         --bin
         --conf
         --lib
         --logs
         --temp
         --webapps
         --work
    ```
    
3.  Ensure that you have **JDK 11** installed ( [OpenJDK](https://jdk.java.net/archive) is the default requirement, though Kill Bill supports all JDKs/JVMs. Oracle JDK can be downloaded from [here](https://www.oracle.com/in/java/technologies/javase/jdk11-archive-downloads.html))
    
4.  Set the **JAVA\_HOME** environment variable to the path of your JDK installation (For example, if JDK is installed at `C:\Software\jdk11`, you need to set **JAVA\_HOME** to `C:\Software\jdk11`)
    
5.  Start Tomcat using the script **TOMCAT\_HOME/bin/startup.sh** or **TOMCAT\_HOME/bin/startup.bat** (Depending on your operating system)
    
6.  Open a browser and type http://localhost:8080/. If Tomcat is installed properly, it should display the following page:
    

![Tomcat home](https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/img/getting-started/Tomcat-home.png)

### Database Configuration (Kill Bill)

As mentioned above, you need to configure the Kill Bill database manually. For this, you need to follow the steps given below:

1.  Install your database (The Kill Bill core team uses **MySQL**, but we also run regression tests against **MariaDB 10** and **PostgreSQL 12**. Users have also successfully deployed Kill Bill with **Oracle**, **Percona**, **Aurora**, etc)
    
2.  If you are using MySQL, you need to do the following:
    
    1.  Create a Kill Bill user as follows:
        
        ```
          create user killbill identified by 'killbill';
        ```
        
    2.  Create a Kill Bill database as follows:
        
        ```
            create database killbill;
        ```
        
    3.  Run the Kill Bill DDL [here](https://docs.killbill.io/latest/ddl.sql).
        
    
3.  If you are using PostgreSQL, you can refer to the detailed instructions for PostgreSQL setup in our PostgreSQL Configuration document [here](https://docs.killbill.io/latest/PostgreSQL.html#_postgresql_configuration)
    
4.  You should have a database called **killbill** (Or whatever name you have specified) with the following tables:
    
    ```
     account_email_history
     account_emails
     account_history
     accounts
     audit_log
     blocking_state_history
     blocking_states
     bundle_history
     bundles
     bus_events
     bus_events_history
     bus_ext_events
     bus_ext_events_history
     catalog_override_block_definition
     catalog_override_phase_definition
     catalog_override_phase_usage
     catalog_override_plan_definition
     catalog_override_plan_phase
     catalog_override_tier_block
     catalog_override_tier_definition
     catalog_override_usage_definition
     catalog_override_usage_tier
     custom_field_history
     custom_fields
     invoice_billing_events
     invoice_history
     invoice_item_history
     invoice_items
     invoice_parent_children
     invoice_payment_control_plugin_auto_pay_off
     invoice_payment_history
     invoice_payments
     invoice_tracking_id_history
     invoice_tracking_ids
     invoices
     node_infos
     notifications
     notifications_history
     payment_attempt_history
     payment_attempts
     payment_history
     payment_method_history
     payment_methods
     payment_transaction_history
     payment_transactions
     payments
     roles_permissions
     rolled_up_usage
     service_broadcasts
     sessions
     subscription_event_history
     subscription_events
     subscription_history
     subscriptions
     tag_definition_history
     tag_definitions
     tag_history
     tags
     tenant_broadcasts
     tenant_kvs
     tenants
     user_roles
     users
    ```
    

### Kill Bill Configuration

The next step is to configure Kill Bill. For this, you need to follow the steps given below:

1.  Download the current stable version of the Kill Bill war from [Maven Central](https://central.sonatype.com/artifact/org.kill-bill.billing/killbill-profiles-killbill/versions) (Ensure that you download the `killbill-profiles-killbill-X.Y.Z.war` file and not the `jetty-console.war`, `jar-with-dependencies.war` or `jar-with-dependencies-sources.war`)
    
2.  Rename the `killbill-profiles-killbill-X.Y.Z.war` to `ROOT.war` (Ensure that **ROOT** is in uppercase)
    
3.  Ensure that Tomcat server is stopped
    
4.  Delete everything under **TOMCAT\_HOME/webapps**
    
5.  Place `ROOT.war` at **TOMCAT\_HOME/webapps**. So, **webapps** folder should look like this:
    
    ```
     $TOMCAT_HOME/webapps
         --ROOT.war
    ```
    
6.  Open **TOMCAT\_HOME/conf/catalina.properties file**.
    
    1.  Add the following database properties at the end of this file (Use appropriate values as per your database):
        
        ```
         org.killbill.dao.url=jdbc:mysql://127.0.0.1:3306/killbill
         org.killbill.dao.user=killbill
         org.killbill.dao.password=killbill
         org.killbill.billing.osgi.dao.url=jdbc:mysql://127.0.0.1:3306/killbill
         org.killbill.billing.osgi.dao.user=killbill
         org.killbill.billing.osgi.dao.password=killbill
        ```
        
    2.  Add the following property that specifies the Kill Bill URL for Kaui:
        
        ```
         kaui.url=http://127.0.0.1:8080
        ```
        
    
7.  Start Tomcat using the script **TOMCAT\_HOME/bin/startup.sh** or **TOMCAT\_HOME/bin/startup.bat** (Depending on your operating system)
    
8.  Verify that there are no errors in the Tomcat logs at **TOMCAT\_HOME/logs/catalina.log**
    
9.  Verify that there are no errors in the Kill Bill logs on the console and that the logs display a line which states that **Kill Bill server has started**
    
10.  Open a browser and type http://localhost:8080/index.html. If Kill Bill is configured properly, it should display the following page:
     

![killbill home](https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/img/getting-started/killbill-home.png)

### Database Configuration (Kaui)

In addition to the Kill Bill database, you will also need to configure the Kaui database. For this, you need to follow the steps given below. By default Kill Bill expects **MySQL**, but you can also use **PostgreSQL**.

#### MySQL Configuration

1.  Create a database. In MySQL, you can run the following commands to create a database called **kaui**:
    
    ```
        create database kaui;
    ```
    
2.  Run the Kaui DDL [here](https://github.com/killbill/killbill-admin-ui/blob/master/db/ddl.sql).
    
3.  If you are using PostgreSQL, you can refer to the detailed instructions for PostgreSQL setup in our PostgreSQL Configuration document [here](https://docs.killbill.io/latest/PostgreSQL.html#_postgresql_kaui_configuration)
    

You should have a database called **kaui** (Or whatever name you have specified in step 1) with the following tables:

```
 kaui_users
 kaui_tenants
 kaui_allowed_users
 kaui_allowed_user_tenants
```

### Kaui Configuration

Finally, Kaui needs to be configured. For this, you need to follow the steps given below:

1.  Download the latest Kaui WAR ( version `4.0.2` at the time of writing) from [Maven Central](https://central.sonatype.com/artifact/org.kill-bill.billing.kaui/kaui-standalone/versions).
    
2.  Rename the downloaded `war` to `ROOT.war` (Ensure that **ROOT** is in uppercase)
    
3.  Ensure that Tomcat server is stopped
    
4.  Create a folder called **TOMCAT\_HOME/webapps2**
    
5.  Place `ROOT.war` at **TOMCAT\_HOME/webapps2**. So, **webapps2** folder should look like this:
    
    ```
     $TOMCAT_HOME/webapps2
         --ROOT.war
    ```
    
6.  Open **TOMCAT\_HOME/conf/server.xml**. Add the following section below `</Service>` (specify a port other than `8080`. The snippet below specifies `9090`):
    
    ```
     <!-- KAUI -->
      <Service name="Catalina">
    
    
        <Connector port="9090"
                   protocol="HTTP/1.1"
                   connectionTimeout="20000" />
    
        <Engine name="Catalina" defaultHost="localhost">
          <Host name="localhost"
                appBase="webapps2"
                unpackWARs="true"
                autoDeploy="false"><!-- Disable autoDeploy to avoid restarts when running KPM install -->
    
            <Valve className="org.apache.catalina.valves.RemoteIpValve"
                   protocolHeader="x-forwarded-proto"
                   portHeader="x-forwarded-port" />
    
            <Valve className="org.apache.catalina.valves.AccessLogValve"
                   directory="logs"
                   prefix="localhost_kaui_log."
                   suffix=".txt"
                   pattern="%h %l %u %t &quot;%m %U&quot; %s %b %D %{X-Request-id}i" />
    
            <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
          </Host>
        </Engine>
      </Service>
    ```
    
7.  Open **TOMCAT\_HOME/conf/catalina.properties file**. Add the following database properties related to Kaui at the end of this file (Use appropriate values as per your database):
    
    ```
     kaui.db.url=jdbc:mysql://127.0.0.1:3306/kaui
     kaui.db.username=killbill
     kaui.db.password=killbill
    ```
    
8.  Add the following Kaui config property as well to **TOMCAT\_HOME/conf/catalina.properties file** (Use appropriate string as per your choice):
    
    ```
     kaui.secret_key_base=abcadtfsetdyghuiyhtyehfktgn
    ```
    
9.  Start Tomcat using the script **TOMCAT\_HOME/bin/startup.sh** or **TOMCAT\_HOME/bin/startup.bat** (Depending on your operating system)
    
10.  Verify that there are no errors in the Tomcat logs at **TOMCAT\_HOME/logs/catalina.log**
     
11.  Verify that there are no errors in the Kill Bill logs on the console and that the logs display a line which states that **Kill Bill server has started**
     
12.  Open a browser and type http://localhost:9090 This should display the following sign in page:
     
     ![kaui sign in](https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/img/getting-started/kaui_sign_in.png)
     
13.  Sign in with `admin/password`. This should display the following page:
     
     ![kaui after sign in](https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/img/getting-started/kaui_after_sign_in.png)
     

### Customizing Log File Path

The steps above configure the application so that the Kill Bill and Kaui logs are displayed on the console. You can however customise this to save the logs in a separate log file. In order to set this up, you need to follow the steps given below:

1.  Create a file called `logback.xml` as follows:
    
    ```
     <?xml version="1.0" encoding="UTF-8"?>
     <configuration scan="true" scanPeriod="30 seconds">
       <jmxConfigurator />
       <property name="LOGS_DIR" value="<log_file_path>" />
       <appender name="MAIN" class="ch.qos.logback.core.rolling.RollingFileAppender">
          <file>${LOGS_DIR:-./logs}/killbill.out</file>
          <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <!-- rollover daily -->
             <fileNamePattern>${LOGS_DIR:-./logs}/killbill-%d{yyyy-MM-dd}.%i.out.gz</fileNamePattern>
             <maxHistory>3</maxHistory>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
             <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                <!-- or whenever the file size reaches 100MB -->
                <maxFileSize>100MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
          </rollingPolicy>
          <encoder>
             <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSZ", UTC} lvl='%level', log='%logger{0}', th='%thread', xff='%X{req.xForwardedFor}', rId='%X{req.requestId}', tok='%X{kb.userToken}', aRId='%X{kb.accountRecordId}', tRId='%X{kb.tenantRecordId}', %msg%n</pattern>
          </encoder>
       </appender>
       <appender name="KAUI" class="ch.qos.logback.core.rolling.RollingFileAppender">
          <file>${LOGS_DIR:-./logs}/kaui.out</file>
          <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <!-- rollover daily -->
             <fileNamePattern>${LOGS_DIR:-./logs}/kaui-%d{yyyy-MM-dd}.%i.out.gz</fileNamePattern>
             <maxHistory>3</maxHistory>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
             <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                <!-- or whenever the file size reaches 100MB -->
                <maxFileSize>100MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
          </rollingPolicy>
          <encoder>
             <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSZ", UTC} lvl='%level', log='%X{rails.actionName}', th='%thread',
                    xff='%X{req.xForwardedFor}', rId='%X{req.requestId}', aId='%X{kb.accountId}', tId='%X{kb.tenantId}',
                    %msg%n</pattern>
          </encoder>
       </appender>
       <logger name="jdbc" level="OFF" />
       <root level="INFO">
          <appender-ref ref="MAIN" />
          <appender-ref ref="KAUI" />
       </root>
    </configuration>
    ```
    
2.  Replace `<log_file_path>` above with the path where you want the logs to be created. For example, if you’d like the logs to be in a directory called `c:/logs`, you need to replace `<log_file_path>` with `c:/logs`
    
3.  Open **TOMCAT\_HOME/conf/catalina.properties** file. Add the following property:
    
    ```
      logback.configurationFile=<path_of_logback.xml>
    ```
    
4.  Replace `<path_of_logback.xml>` above with the actual path of your `logback.xml`. For example, if `logback.xml` is placed at `c:/logbackpath`, you need to replace `<path_of_logback.xml>` with `c:/logbackpath/logback.xml`
    
5.  Restart Tomcat. Now, the logs will be created at the path specified in the `logback.xml` file. Separate log files will get created for Kill Bill and Kaui as follows:
    
    ```
      <log_file_path>/killbill.out
      <log_file_path>/kaui.out
    ```
    

### Masking Data in Logs

Sometimes, you may wish to mask some sensitive data in the logs. For this, you need to do the following:

1.  Set the following system properties (Refer [docs](https://docs.killbill.io/latest/userguide_configuration#_logging_properties)):
    
    ```
      killbill.server.log.obfuscate.keywords=xxx
      killbill.server.log.obfuscate.patterns=xxx
      killbill.server.log.obfuscate.patterns.separator=xxx
    ```
    
2.  In your `logback.xml`, configure the `ObfuscatorConverter` by adding the following line below `<jmxConfigurator />`:
    
    ```
     <conversionRule conversionWord="maskedMsg" converterClass="org.killbill.billing.server.log.obfuscators.ObfuscatorConverter" />
    ```
    
3.  Restart Kill Bill - Sensitive data in the logs (as configured by the system properties above) should now be masked.
    

Some key-value pattern examples that can be specified corresponding to the `killbill.server.log.obfuscate.patterns` property:

-   \\s\*=\\s\*'(\[^'\]+)' - Matches `key = 'value'`
    
-   \\s\*=\\s\*"(\[^"\]+)" - Matches `key = "value"`
    
-   \\s\*:\\s\*'(\[^'\]+)' - Matches `key: 'value'`
    
-   \\s\*=\\s\*(\[^ '",{}\]+) - Matches `name = value`
    
-   \\s\*:\\s\*'(\[^'",{}\]+)' - Matches `key: 'value'`
    

### Setting up KPM in Kaui

KPM stands for **Kill Bill Package Manager**. It can be used to manage [plugins](https://docs.killbill.io/latest/plugin_introduction.html). You can read [this](https://github.com/killbill/killbill-cloud/tree/master/kpm) article to know more about kpm.

Setting up `kpm` in Kaui is an optional step. It is required only for performing plugin-related actions like install, uninstall, restart plugins directly via Kaui.

In order to set up KPM in Kaui, you need to do the following:

1.  Ensure that you have kpm installed as per the instructions [here](https://github.com/killbill/killbill-cloud/tree/master/kpm).
    
2.  Open a command prompt/terminal window and run the following command (Replace `<kpm_bundles_path>` with the actual path where you would like to install the kpm bundles):
    
    ```
    kpm pull_defaultbundles --destination=<kpm_bundles_path>
    ```
    
3.  Ensure that this downloads the jar files corresponding to the kpm bundles. So, your `kpm_bundles_path` should look like this:
    
    ```
    $kpm_bundles_path
    --platform
    --platform/killbill-platform-osgi-bundles-kpm-0.40.4.jar
    --platform/killbill-platform-osgi-bundles-logger-0.40.4.jar
    --sha1.yml
    ```
    
4.  Add the following properties to the `TOMCAT_HOME/conf/catalina.properties` file:
    
    ```
    org.killbill.osgi.bundle.install.dir=<kpm_bundles_path>
    ```
    
5.  Replace `<kpm_bundles_path>` with the actual path where the kpm bundles are installed in Step 2 above.
    
6.  Restart Tomcat.
    
7.  Verify that there are no errors in the Kill Bill logs.
    
8.  Open a browser and type \`http://localhost:8080/kaui. Sign in using **admin/password**. This should now display a plug icon in Kaui as follows:
    
    ![kaui with kpm plug](https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/img/getting-started/kaui_with_kpm_plug.png)
    
9.  On Clicking **kpm**, you should see the following screen:
    
    ![kpm screen in kaui](https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/img/getting-started/kpm_screen_in_kaui.png)
    
10.  On clicking **Install New Plugin** you should see the following screen:
     
     ![kpm kaui install plugins](https://github.com/killbill/killbill-docs/raw/v3/userguide/assets/img/getting-started/kpm_kaui_install_plugins.png)
     

In order to know more about how to use kpm in kaui, you can refer to our [Kaui tutorial](https://docs.killbill.io/latest/userguide_kaui.html#_kpm).

### Other Notes

We recommend installing the **Apache Tomcat Native Library**. In order to do this, you need to follow the steps given below:

1.  Download the Tomcat Native Library from [here](https://tomcat.apache.org/download-native.cgi).
    
2.  Install the Tomcat Native Library as per the instructions given [here](http://tomcat.apache.org/native-doc/).
    

If you are unable to install the Tomcat Native Library on Windows, you may skip this step.

### Further Debugging

The [Debugging Tips](https://docs.killbill.io/latest/debugging.html) document includes some additional debugging tips for Kill Bill in general. You may also reach out to the Kill Bill [mailing list](https://groups.google.com/forum/#!forum/killbilling-users), with the `kpm diagnostic` output as explained in the [Seeking Help](https://docs.killbill.io/latest/debugging.html#_seeking_help) section.

### FAQ

This section lists some errors that are commonly encountered while setting up Kill Bill and Kaui with Tomcat and how you can fix these errors.

**Logs not created**

Sometimes, even after configuring your `logback.xml` file as specified in the [Customizing Log File Path](#_customizing_log_file_path) section, logs might not be created. This is most probably because your `logback.xml` is not a valid XML file. Some reasons for an XML file to be invalid are leading spaces, unclosed XML tags. In general, if you are able to open the XML file in a web browser without any errors, your XML file is valid.

**Application points to the default Database**

Sometimes, when the application is started, it may use the default H2 database and cause the following errors:

```
Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:file:/var/tmp/killbill;MODE=MYSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-200]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:622)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
        at org.h2.message.DbException.get(DbException.java:205)
        at org.h2.message.DbException.get(DbException.java:181)
        at org.h2.engine.ConnectionInfo.getName(ConnectionInfo.java:396)
        at org.h2.engine.Engine.openSession(Engine.java:50)
        at org.h2.engine.Engine.openSession(Engine.java:192)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:171)
        at org.h2.engine.Engine.createSession(Engine.java:166)
        at org.h2.engine.Engine.createSession(Engine.java:29)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:340)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:173)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:152)
        at org.h2.Driver.connect(Driver.java:69)
        at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:189)
        at org.h2.jdbcx.JdbcDataSource.getConnection(JdbcDataSource.java:178)
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
        at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71)
        at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:725)
        at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:711)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
```

This error is mostly because the database properties are not correctly specified. Ensure that the database properties are specified correctly in the **TOMCAT\_HOME/conf/catalina.properties** file as specified in the [Kill Bill Configuration](#_kill_bill_configuration) section above

**Plug Icon not seen in Kaui**

Sometimes, even after configuring kpm in kaui as specified in the [Setting up KPM in Kaui](#_setting_up_kpm_in_kaui) section above, the plug icon is not visible in Kaui. The following error is displayed in the KillBill logs:

```
org.osgi.framework.BundleException: Duplicate import: org.joda.time.format
	at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:366)
	at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:180)
	at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:121)
	at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1243)
	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2907)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
	at org.killbill.billing.osgi.FileInstall.installOSGIBundle(FileInstall.java:151)
	at org.killbill.billing.osgi.FileInstall.installAllOSGIBundles(FileInstall.java:142)
	at org.killbill.billing.osgi.FileInstall.installBundles(FileInstall.java:91)
	at org.killbill.billing.osgi.BundleRegistry.installBundles(BundleRegistry.java:64)
	at org.killbill.billing.osgi.DefaultOSGIService.initialize(DefaultOSGIService.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.killbill.billing.lifecycle.DefaultLifecycle.doFireStage(DefaultLifecycle.java:154)
	at org.killbill.billing.lifecycle.DefaultLifecycle.fireSequence(DefaultLifecycle.java:141)
	at org.killbill.billing.lifecycle.DefaultLifecycle.fireStartupSequencePriorEventRegistration(DefaultLifecycle.java:82)
	at org.killbill.billing.server.listeners.KillbillPlatformGuiceListener.startLifecycle(KillbillPlatformGuiceListener.java:308)
	at org.killbill.billing.server.listeners.KillbillPlatformGuiceListener.contextInitialized(KillbillPlatformGuiceListener.java:130)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1840)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
```

This typically happens on Windows machines. In such a case, delete `<kpm_bundles_path>/platform/killbill-platform-osgi-bundles-jruby-0.40.4.jar` if present. Restart Tomcat. This should fix the issue.

**SQLException on startup**

Sometimes, even after configuring everything as explained above, the following exception might occur when Kill Bill is started:

```
Caused by: java.sql.SQLTransientConnectionException: Could not connect to address=(host=127.0.0.1)(port=3306)(type=master) : RSA public key is not available client side (option serverRsaPublicKeyFile not set)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:79)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:153)
	at org.mariadb.jdbc.MariaDbDataSource.getConnection(MariaDbDataSource.java:305)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
	at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71)
	at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726)
	at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
```

Some later versions of MySQL require requesting a public key from the server. Thus, the database connection string needs to be specified as follows in the `TOMCAT_HOME/conf/catalina.properties file` file:

```
org.killbill.dao.url=jdbc:mysql://127.0.0.1:3306/killbill?allowPublicKeyRetrieval=true&useSSL=false
org.killbill.billing.osgi.dao.url=jdbc:mysql://127.0.0.1:3306/killbill?allowPublicKeyRetrieval=true&useSSL=false
```

**ClassNotFoundException on startup**

Sometimes, even after configuring everything as explained above, the following exception might occur when Kill Bill is started:

```
Caused by: java.lang.ClassNotFoundException: jar file 'killbill-api-0.53.17.jar' could not be instantiate from file path. Error: C:\Users\<username>\.m2\repository\org\kill-bill\billing\killbill-api\0.53.17\killbill-api-0.53.17.jar (The system cannot find the path specified)
    at org.killbill.billing.lifecycle.ServiceFinder.findClasses (ServiceFinder.java:130)
    at org.killbill.billing.lifecycle.ServiceFinder.initialize (ServiceFinder.java:64)
    at org.killbill.billing.lifecycle.ServiceFinder.<init> (ServiceFinder.java:48)
    at org.killbill.billing.util.glue.IDBISetup.mapperFactoriesToRegister (IDBISetup.java:65)
    at org.killbill.billing.server.modules.KillbillServerModule.configureDao (KillbillServerModule.java:127)
    at org.killbill.billing.server.modules.KillbillPlatformModule.configure (KillbillPlatformModule.java:86)
    at org.killbill.billing.server.modules.KillbillServerModule.configure (KillbillServerModule.java:99)
    at com.google.inject.AbstractModule.configure (AbstractModule.java:61)
    at com.google.inject.spi.Elements$RecordingBinder.install (Elements.java:347)
    at com.google.inject.spi.Elements.getElements (Elements.java:104)
    at com.google.inject.internal.InjectorShell$Builder.build (InjectorShell.java:137)
```

This error typically occurs on Windows machines and is most probably due to a space being present in the Maven repository path. By default, on Windows, Maven uses the `C:\Users\<username>\.m2\` path for the local repository. If there is a space in the `<username>`, this error can occur. In order to get rid of this error you can change the path of the Maven local repository using the following steps:

1.  Open `<MAVEN_HOME>/conf/settings.xml`.
    
2.  Update `<localRepository>` to the desired path. For example, to create the Maven local repository at the `c:/mavenrepo` path, you need to specify `<localRepository>c:/mavenrepo</localRepository>`.
    
3.  Restart tomcat.