MySQL 中要预先建表吗?
[ERROR]-[2016-08-12 21:39:33]-[com.alibaba.druid.pool.DruidDataSource:643]: init datasource error, url: jdbc:mysql://localhost:3306/b3log_symphony?useUnicode=yes&characterEncoding=utf8
java.sql.SQLException: Unknown system variable 'language'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2541)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2499)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1432)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3870)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3284)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2293)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1386)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1442)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:632)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:934)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:930)
at org.b3log.latke.repository.jdbc.util.Connections.getConnection(Connections.java:190)
at org.b3log.latke.repository.jdbc.JdbcRepository.getConnection(JdbcRepository.java:877)
at org.b3log.latke.repository.jdbc.JdbcRepository.get(JdbcRepository.java:456)
at org.b3log.latke.repository.AbstractRepository.get(AbstractRepository.java:163)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77._d9get(UserRepository_$$_javassist_77.java)
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 org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77.get(UserRepository_$$_javassist_77.java)
at org.b3log.symphony.repository.UserRepository.getAdmins(UserRepository.java:145)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77._d10getAdmins(UserRepository_$$_javassist_77.java)
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 org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77.getAdmins(UserRepository_$$_javassist_77.java)
at org.b3log.symphony.service.UserQueryService.getAdmins(UserQueryService.java:274)
at org.b3log.symphony.service.UserQueryService_$$_javassist_114._d3getAdmins(UserQueryService_$$_javassist_114.java)
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 org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101)
at org.b3log.symphony.service.UserQueryService_$$_javassist_114.getAdmins(UserQueryService_$$_javassist_114.java)
at org.b3log.symphony.SymphonyServletListener.initDB(SymphonyServletListener.java:258)
at org.b3log.symphony.SymphonyServletListener.contextInitialized(SymphonyServletListener.java:114)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[ERROR]-[2016-08-12 21:39:33]-[org.b3log.symphony.service.UserQueryService:276]: Gets admins failed
org.b3log.latke.repository.RepositoryException: java.lang.NullPointerException
at org.b3log.latke.repository.jdbc.JdbcRepository.get(JdbcRepository.java:485)
at org.b3log.latke.repository.AbstractRepository.get(AbstractRepository.java:163)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77._d9get(UserRepository_$$_javassist_77.java)
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 org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77.get(UserRepository_$$_javassist_77.java)
at org.b3log.symphony.repository.UserRepository.getAdmins(UserRepository.java:145)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77._d10getAdmins(UserRepository_$$_javassist_77.java)
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 org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101)
at org.b3log.symphony.repository.UserRepository_$$_javassist_77.getAdmins(UserRepository_$$_javassist_77.java)
at org.b3log.symphony.service.UserQueryService.getAdmins(UserQueryService.java:274)
at org.b3log.symphony.service.UserQueryService_$$_javassist_114._d3getAdmins(UserQueryService_$$_javassist_114.java)
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 org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101)
at org.b3log.symphony.service.UserQueryService_$$_javassist_114.getAdmins(UserQueryService_$$_javassist_114.java)
at org.b3log.symphony.SymphonyServletListener.initDB(SymphonyServletListener.java:258)
at org.b3log.symphony.SymphonyServletListener.contextInitialized(SymphonyServletListener.java:114)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于