Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rapsberry - Update sqlite libraries to support ARM processors #12

Open
joussy opened this issue Jan 8, 2017 · 2 comments
Open

Rapsberry - Update sqlite libraries to support ARM processors #12

joussy opened this issue Jan 8, 2017 · 2 comments

Comments

@joussy
Copy link

joussy commented Jan 8, 2017

Hi,

Thanks for your great work, this project is definitly useful!

I'm trying to run your adapter on debian. When I start your application I have got the following output:

java -jar google-drive-ftp-adapter-jar-with-dependencies.jar /etc/google-drive-adapter/config

Implementation-Title:Google Drive FTP Adapter
Implementation-Version:1.2.3
Archiver-Version:Plexus Archiver
Built-By:andres
Specification-Title:Google Drive FTP Adapter
Implementation-Vendor-Id:org.andresoviedo
Created-By:Apache Maven 3.3.9
Build-Jdk:1.8.0_45-internal
Specification-Version:1.2.3
Manifest-Version:1.0
Main-Class:org.andresoviedo.apps.gdrive_ftp_adapter.Main
2017-01-08 13:57:53,942 INFO main Main - Program info: {Archiver-Version=Plexus Archiver, Implementation-Title=Google Drive FTP Adapter, Specification-Version=1.2.3, Implementation-Version=1.2.3, Created-By=Apache Maven 3.3.9, Manifest-Version=1.0, Specification-Title=Google Drive FTP Adapter, Implementation-Vendor-Id=org.andresoviedo, Built-By=andres, Build-Jdk=1.8.0_45-internal, Main-Class=org.andresoviedo.apps.gdrive_ftp_adapter.Main}
2017-01-08 13:57:53,962 INFO main Main - Started with args '[/etc/google-drive-adapter/config]'...
2017-01-08 13:57:53,963 INFO main Main - Loading configuration...
2017-01-08 13:57:53,967 INFO main Main - Loading properties from classpath...
2017-01-08 13:57:53,970 INFO main Main - Properties loaded: '{}'
2017-01-08 13:57:53,972 INFO main Main - Loading properfiles file 'configuration.properties'...
2017-01-08 13:57:53,975 WARN main Main - Exception loading file 'configuration.properties'.
2017-01-08 13:57:53,996 INFO main Main - Properfiles loaded: '{}'
2017-01-08 13:57:53,998 INFO main Main - Loading properfiles file '/etc/google-drive-adapter/config'...
2017-01-08 13:57:54,001 INFO main Main - Properfiles loaded: '{ftp.pass=user, port=1821, os.illegalCharacters=/|[\x00-\x1F\x7F]|`|?|*|\|<|>|||"|:, ftp.user=user, ftp.anonymous.enabled=false, account=default, log4j.fileId=}'
2017-01-08 13:57:54,026 INFO main Main - Property 'log4j.configuration' was not specified in application properties. Using defaults.
2017-01-08 13:57:54,029 INFO main Main - Configuring log4j from 'classpath:/log4j.xml'
2017-01-08 13:57:54,111 INFO main Main - Creating application with configuration '{ftp.pass=user, port=1821, os.illegalCharacters=/|[\x00-\x1F\x7F]|`|?|*|\|<|>|||"|:, log4j.fileId=, account=default, ftp.anonymous.enabled=false, ftp.user=user}'
2017-01-08 13:57:54,340 INFO main SQLiteCache - Loading database 'data/default/gdrive.db'...
Exception in thread "main" org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Error opening connection)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:382)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:456)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:464)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:472)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:477)
at org.andresoviedo.apps.gdrive_ftp_adapter.model.SQLiteCache.(SQLiteCache.java:99)
at org.andresoviedo.apps.gdrive_ftp_adapter.GDriveFtpAdapter.(GDriveFtpAdapter.java:34)
at org.andresoviedo.apps.gdrive_ftp_adapter.Main.main(Main.java:64)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Error opening connection)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
... 8 more
Caused by: java.sql.SQLException: Error opening connection
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:179)
at org.sqlite.SQLiteConnection.(SQLiteConnection.java:105)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 12 more
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.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:63)
at org.sqlite.NativeDB.load(NativeDB.java:50)
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:175)
... 19 more

The application has created the folders data/default/ but the folders are empty. I've tried to run the application as an administrator and a normal user but I end up with the same result.

Thanks for your help !

@joussy
Copy link
Author

joussy commented Jan 8, 2017

I found out what the issue was: sqlite-jdbc old versions didn't have build rules for ARM (http://stackoverflow.com/a/29647774). I've changed the version of the dependency (3.7.15-M1) with the latest one (3.15.1) and it solved the problem !

@andresoviedo andresoviedo changed the title JDBC Connection fails Update sqlite libraries to support ARM processors Mar 11, 2017
@andresoviedo andresoviedo changed the title Update sqlite libraries to support ARM processors Rapsberry - Update sqlite libraries to support ARM processors Feb 10, 2019
@andresoviedo
Copy link
Owner

Thanks for your feedback @joussy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants