首页 > 数据库技术 > 详细

java sqlite docker,sqlite出错

时间:2019-11-05 19:51:37      阅读:104      评论:0      收藏:0      [点我收藏+]

1.问题

使用docker镜像部署springboot程序,sqlite出错,在windows和linux环境都没有问题,使用docker部署就报错

Caused by: java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open_utf8([BI)V

2.原因

基础镜像错误

FROM java:8-jre-alpine

将基础镜像替换为下面镜像

FROM openjdk:8-jre-alpine3.9

程序正常运行

3.错误日志

Caused by: java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open_utf8([BI)V
    at org.sqlite.core.NativeDB._open_utf8(Native Method)
    at org.sqlite.core.NativeDB._open(NativeDB.java:71)
    at org.sqlite.core.DB.open(DB.java:174)
    at org.sqlite.core.CoreConnection.open(CoreConnection.java:220)
    at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:76)
    at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:25)
    at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:24)
    at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
    at org.sqlite.JDBC.createConnection(JDBC.java:114)
    at org.sqlite.JDBC.connect(JDBC.java:88)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:149)
    at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:786)
    at com.alibaba.druid.filter.FilterEventAdapter.connection_connect(FilterEventAdapter.java:38)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:143)
    at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218)
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:143)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1515)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1578)
    at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:859)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1227)
    ... 66 common frames omitted

 

java sqlite docker,sqlite出错

原文:https://www.cnblogs.com/SmilingEye/p/11800001.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!