title: Using ObjectBox as Server Database with Spring Boot and Tomcat
body: <p>I am trying to use ObjectBox as a server database with Spring Boot and Tomcat
  When i use the embedded tomcat server of Spring Boot, it works fine (running directly from IntelliJ IDEA),</p>
  
  <p>But when i deploy the WAR file / exploded API to Tomcat, i get the error "no objectbox-jni-windows-x64 in java.library.path"</p>
  
  <p>I do have Microsoft Visual C++ 2017 installed</p>
  
  <p>Can you please help me to deploy it successfully?</p>
  
  <p>The following is my build.gradle file:</p>
  
  <pre><code>buildscript {
      ext {
          kotlinVersion = '1.3.10'
          springBootVersion = '2.1.1.RELEASE'
          objectboxVersion = '2.2.0'
      }
      repositories {
          mavenCentral()
          maven { url "https://plugins.gradle.org/m2/" }
          jcenter()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
          classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
          classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
          classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
          classpath "net.ltgt.gradle:gradle-apt-plugin:0.15"
  
      }
  }
  plugins {
      id 'java'
      id 'org.jetbrains.kotlin.jvm' version '1.3.10'
  }
  
  apply plugin: 'application'
  apply plugin: 'kotlin'
  apply plugin: 'kotlin-spring'
  apply plugin: 'eclipse-wtp'
  apply plugin: 'org.springframework.boot'
  apply plugin: 'io.spring.dependency-management'
  apply plugin: 'war'
  apply plugin: 'java'
  apply plugin: 'idea'
  apply plugin: 'io.objectbox'
  apply plugin: 'kotlin-kapt'
  apply plugin: 'net.ltgt.apt-idea'
  
  group = 'com.techontouch'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = 1.8
  mainClassName = "ScoresOnTouchApplicationKt"
  compileKotlin {
      kotlinOptions {
          freeCompilerArgs = ["-Xjsr305=strict"]
          jvmTarget = "1.8"
      }
  }
  compileTestKotlin {
      kotlinOptions {
          freeCompilerArgs = ["-Xjsr305=strict"]
          jvmTarget = "1.8"
      }
  }
  
  repositories {
      mavenCentral()
      jcenter()
  }
  
  configurations {
      providedRuntime
  }
  
  dependencies {
      implementation('org.springframework.boot:spring-boot-starter-actuator')
      implementation('org.springframework.boot:spring-boot-starter-data-rest')
      implementation('org.springframework.boot:spring-boot-starter-web')
      implementation('com.fasterxml.jackson.module:jackson-module-kotlin')
      providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
      testImplementation('org.springframework.boot:spring-boot-starter-test')
      implementation "io.objectbox:objectbox-java:$objectboxVersion"
      implementation "io.objectbox:objectbox-kotlin:$objectboxVersion"
      kapt "io.objectbox:objectbox-processor:$objectboxVersion"
      implementation "io.objectbox:objectbox-linux:$objectboxVersion"
      implementation "io.objectbox:objectbox-macos:$objectboxVersion"
      implementation "io.objectbox:objectbox-windows:$objectboxVersion"
      implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
      implementation("org.jetbrains.kotlin:kotlin-reflect")
      compile('org.json:json:20180813')
      compile('com.google.code.gson:gson:2.8.5')
      compile('javax.xml.bind:jaxb-api:2.2.8')
      compile('io.springfox:springfox-swagger2:2.9.2')
      compile('io.springfox:springfox-swagger-ui:2.9.2')
      compile('org.antlr:antlr-complete:3.5.2')
  }
  // enable debug output for plugin
  objectbox {
      debug = true
  }
  // enable debug output for annotation processor
  tasks.withType(JavaCompile) {
      options.compilerArgs += ["-Aobjectbox.debug=true"]
  }
  </code></pre>
  
  <p>GitHub Link: <a href="https://github.com/objectbox/objectbox-java/issues/170#issuecomment-444075662" rel="nofollow noreferrer">https://github.com/objectbox/objectbox-java/issues/170#issuecomment-444075662</a></p>