启动后出现这个问题是怎么回事?

skyfly 1月前 69

Wildfire IM server start success...  java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.  at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:571)  at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:204)  at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:321)  at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:373)  at io.moquette.persistence.DatabaseStore.getSession(DatabaseStore.java:1237)  at io.moquette.persistence.MemorySessionStore.loadActiveSession(MemorySessionStore.java:425)  at com.xiaoleilu.loServer.action.RouteAction.action(RouteAction.java:85)  at com.xiaoleilu.loServer.action.Action.doAction(Action.java:65)  at com.xiaoleilu.loServer.handler.ActionHandler.doAction(ActionHandler.java:142)  at com.xiaoleilu.loServer.handler.ActionHandler.channelRead0(ActionHandler.java:52)  at com.xiaoleilu.loServer.handler.ActionHandler.channelRead0(ActionHandler.java:31)  at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)  at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)  at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)  at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)  at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)  at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)  at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)  at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)  at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)  at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)  at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)  at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)  at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)  at java.lang.Thread.run(Thread.java:748)  Caused by: org.h2.jdbc.JdbcSQLException: Table "T_USER_SESSION" not found; SQL statement:  select  _package_name,_token,_voip_token,_secret,_db_secret,_platform,_push_type,_device_name,_device_version,_phone_name,_language,_carrier_name, _dt, _deleted from t_user_session where _uid = ? and _cid = ? limit 1 [42102-197]  at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)  at org.h2.message.DbException.get(DbException.java:179)  at org.h2.message.DbException.get(DbException.java:155)  at org.h2.command.Parser.readTableOrView(Parser.java:5920)  at org.h2.command.Parser.readTableFilter(Parser.java:1430)  at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:2138)  at org.h2.command.Parser.parseSelectSimple(Parser.java:2287)  at org.h2.command.Parser.parseSelectSub(Parser.java:2133)  at org.h2.command.Parser.parseSelectUnion(Parser.java:1946)  at org.h2.command.Parser.parseSelect(Parser.java:1919)  at org.h2.command.Parser.parsePrepared(Parser.java:463)  at org.h2.command.Parser.parse(Parser.java:335)  at org.h2.command.Parser.parse(Parser.java:307)  at org.h2.command.Parser.prepareCommand(Parser.java:278)  at org.h2.engine.Session.prepareLocal(Session.java:611)  at org.h2.engine.Session.prepareCommand(Session.java:549)  at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)  at org.h2.jdbc.JdbcPreparedStatement.(JdbcPreparedStatement.java:76)  at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:304)  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  at java.lang.reflect.Method.invoke(Method.java:498)  at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask.run(GooGooStatementCache.java:547)  at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

最新回复 (4)
  • x86 1月前
    引用 2
    还有其他什么启动日志吗?看起来像数据库表创建失败了。
  • HeavyRain 29天前
    引用 3
    升级的时候,migrate文件夹有没有拷贝过去
  • skyfly 28天前
    引用 4
    直接下载github上运行,项目中有migrate文件夹
    可能是server启动时h2数据库并没建好表:
    Caused by: org.h2.jdbc.JdbcSQLException: Table "T_USER" not found; SQL statement:
    insert into t_user (`_uid`, `_name`, `_display_name`, `_portrait`, `_mobile`, `_gender`, `_email`, `_address`, `_company`, `_social`, `_extra`, `_type`, `_dt`) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE `_name`=?, `_display_name`=?, `_portrait`=?, `_mobile`=?, `_gender`=?, `_email`=?, `_address`=?, `_company`=?, `_social`=?, `_extra`=?, `_type`=?, `_deleted`=?, `_dt`=? [42102-197]
           at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
           at org.h2.message.DbException.get(DbException.java:179)
           at org.h2.message.DbException.get(DbException.java:155)
           at org.h2.command.Parser.readTableOrView(Parser.java:5920)
           at org.h2.command.Parser.readTableOrView(Parser.java:5897)
           at org.h2.command.Parser.parseInsert(Parser.java:1220)
           at org.h2.command.Parser.parsePrepared(Parser.java:431)
           at org.h2.command.Parser.parse(Parser.java:335)
           at org.h2.command.Parser.parse(Parser.java:307)
           at org.h2.command.Parser.prepareCommand(Parser.java:278)
           at org.h2.engine.Session.prepareLocal(Session.java:611)
           at org.h2.engine.Session.prepareCommand(Session.java:549)
           at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
           at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)
           at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:304)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask.run(GooGooStatementCache.java:547)
           at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
  • skyfly 28天前
    引用 5
    DBUtil.java中的这一句:
    migrateLocation = "filesystem:./migrate/h2";
    可能是主目录不同,我的改成 “broker/migrate/h2”就好了
返回