title: Error opening connection SQLite on Raspberry pi
body: <p>Update: I just check the latest JDBC jar which I use, and it's missing the map /Linux/arm/libsqlitejdbc.so, Would this problem be fixed by downloading this file from somewhere? Can't find it anywhere.</p>
  
  <p>Edit: Problem seems to be this, however I don't know how to fix this. </p>
  
  <pre><code>Caused by: java.lang.Exception: Error loading native library: /org/sqlite/native/Linux/arm/libsqlitejdbc.so
  </code></pre>
  
  <p>I'm trying to use a SQLite database on my raspberry pi. However I can't get it to work. I get the output posted below. I'm using the JDBC driver. The code works fine on my main computer. I have searched everywhere but can't find a solution. I packed my code into a Jar file if that matters.</p>
  
  <p>Relevant code:</p>
  
  <pre><code>     private final String dbLocation = "jdbc:sqlite:" + System.getProperty("user.home") + "/ServerSQLite.db";
  
      public SQLServer() throws ClassNotFoundException {
          System.out.println("DB location: " + dbLocation);
          Connection connection = null;
          Class.forName("org.sqlite.JDBC");
          try {
  
              // create a database connection
              connection = DriverManager.getConnection(dbLocation);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>DB location: jdbc:sqlite:/usr/share/tomcat7/ServerSQLite.db
  Error opening connection
  </code></pre>
  
  <p>Edit: same problem with hardcoded location which should have both read and write permission:</p>
  
  <pre><code>jdbc:sqlite:/home/pi/ServerSQLite.db
  Error opening connection
  </code></pre>
  
  <p>Thankful for any help I can get :)</p>
  
  <p>Edit 2: Thought I printed stack trace, but didn't here it is:</p>
  
  <pre><code>java.sql.SQLException: Error opening connection
      ...Lots of exception
  Caused by: java.lang.Exception: Error loading native library: /org/sqlite/native/Linux/arm/libsqlitejdbc.so
      at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:241)
  ...
      at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:175)
      ... 29 more
  Error opening connection
  </code></pre>
  
  <p>Problem seems to be Caused by: </p>
  
  <pre><code>java.lang.Exception: Error loading native library: /org/sqlite/native/Linux/arm/libsqlitejdbc.so
  </code></pre>