Solo 初始化问题

本贴最后更新于 2050 天前,其中的信息可能已经沧海桑田

我又遇到问题了。。。我之前的是 2.9.7 版本的,现在下了最新的 war 包来部署,

mysql 版本

root@iZuf6a0oa5iduhj9h0jk4vZ:/usr/local/tomcat/webapps/solo/WEB-INF/classes# mysql --version

mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper

latke.prop

#### Server ####

# Browser visit protocol
serverScheme=http
serverHost=zhangchensong.top
serverPort=8080

#### Runtime Mode ####
#runtimeMode=DEVELOPMENT
runtimeMode=PRODUCTION

local.prop

#### MySQL runtime ####

runtimeDatabase=MYSQL
jdbc.username=zhangcs
jdbc.password=qaqaqa136045033
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC

库的

日志
[INFO ]-[2019-04-12 17:27:21]-[org.b3log.solo.SoloServletListener:97]: Solo is booting [pid=13550, runtimeDatabase=MYSQL, runtimeMode=PRODUCTION, jdbc.username=zhangcs, jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC]

[INFO ]-[2019-04-12 17:27:21]-[com.zaxxer.hikari.HikariDataSource:110]: HikariPool-1 - Starting...
[INFO ]-[2019-04-12 17:27:22]-[com.zaxxer.hikari.HikariDataSource:123]: HikariPool-1 - Start completed.
[WARN ]-[2019-04-12 17:27:22]-[org.b3log.solo.service.InitService:164]: Solo has not been initialized, please open your browser to init Solo
[ERROR]-[2019-04-12 17:27:42]-[org.b3log.latke.repository.jdbc.JdbcRepository:490]: Query failed
java.sql.SQLSyntaxErrorException: Unknown column 'userGitHubId' in 'where clause'

        
[ERROR]-[2019-04-12 17:27:42]-[org.b3log.solo.service.UserQueryService:79]: Gets a user by GitHub id [37106292] failed
org.b3log.latke.repository.RepositoryException: java.sql.SQLSyntaxErrorException: Unknown column 'userGitHubId' in 'where clause'

Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'userGitHubId' in 'where clause'

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:975)
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1025)
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
        at org.b3log.latke.repository.jdbc.util.JdbcUtil.queryJson(JdbcUtil.java:159)
        at org.b3log.latke.repository.jdbc.util.JdbcUtil.queryJsonArray(JdbcUtil.java:130)
        at org.b3log.latke.repository.jdbc.JdbcRepository.get(JdbcRepository.java:486)
        ... 60 more
[INFO ]-[2019-04-12 17:27:42]-[org.b3log.solo.service.InitService:465]: Initialized statistic
[ERROR]-[2019-04-12 17:27:42]-[org.b3log.latke.repository.jdbc.JdbcRepository:153]: Add failed
java.sql.SQLException: Incorrect string value: '\xE4\xB8\x80\xE6\xAC\xBE...' for column 'optionValue' at row 1

[ERROR]-[2019-04-12 17:27:42]-[org.b3log.solo.service.InitService:236]: Initializes Solo failed

org.b3log.latke.repository.RepositoryException: java.sql.SQLException: Incorrect string value: '\xE4\xB8\x80\xE6\xAC\xBE...' for column 'optionValue' at row 1

Caused by: java.sql.SQLException: Incorrect string value: '\xE4\xB8\x80\xE6\xAC\xBE...' for column 'optionValue' at row 1

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:975)
        at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:392)
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
        at org.b3log.latke.repository.jdbc.util.JdbcUtil.executeSql(JdbcUtil.java:91)
        at org.b3log.latke.repository.jdbc.JdbcRepository.add(JdbcRepository.java:150)
        ... 59 more
[INFO ]-[2019-04-12 17:27:44]-[com.zaxxer.hikari.HikariDataSource:350]: HikariPool-1 - Shutdown initiated...
[INFO ]-[2019-04-12 17:27:44]-[com.zaxxer.hikari.HikariDataSource:352]: HikariPool-1 - Shutdown completed.
[INFO ]-[2019-04-12 17:27:44]-[org.b3log.solo.SoloServletListener:152]: Destroyed the context

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • v3 以前不支持跨版本升级,得一个一个版本先升级到 v3.0.0,再用最新版部署。升级操作请参考版本发布帖。

    1 回复
  • someone38063
    作者

    谢谢!
    我删除了在 2.9.7 版本时建的库,重新建了库以后已经部署成功了

    1 回复
  • 客气,还遇到问题的话随时艾特我 😄

  • 对了,既然是新搭建的话建议用 Docker,这样后面发布新版本的话可以做到自动升级部署。