jfinal连接mysql数据库时报错

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Error reconfiguring/restarting webapp after change in watched files

2019-01-13 21:21:28.370:WARN:oejw.WebAppContext:JFinal-Scanner: Failed startup of context o.e.j.w.WebAppContext@4b0f1236{jfinal01,/,file:///E:/eclipsework/jfinal01/WebContent/,UNAVAILABLE}

java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. |java.sql.SQLException: The connection property 'useSSL' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'true;' is not in this set.

at com.jfinal.core.Config.startPlugins(Config.java:137)

at com.jfinal.core.Config.configPluginWithOrder(Config.java:71)

at com.jfinal.core.Config.configJFinal(Config.java:56)

at com.jfinal.core.JFinal.init(JFinal.java:61)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:62)

at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)

at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:741)

at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374)

at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)

at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)

at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847)

at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)

at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

at com.jfinal.server.jetty.JettyServer$1.onChange(JettyServer.java:139)

at com.jfinal.server.jetty.Scanner.compare(Scanner.java:94)

at com.jfinal.server.jetty.Scanner.working(Scanner.java:57)

at com.jfinal.server.jetty.Scanner.access$000(Scanner.java:31)

at com.jfinal.server.jetty.Scanner$1.run(Scanner.java:101)

at java.util.TimerThread.mainLoop(Timer.java:555)

at java.util.TimerThread.run(Timer.java:505)

Caused by: 

com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: The connection property 'useSSL' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'true;' is not in this set.

at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)

at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)

at com.jfinal.core.Config.startPlugins(Config.java:128)

at com.jfinal.core.Config.configPluginWithOrder(Config.java:71)

at com.jfinal.core.Config.configJFinal(Config.java:56)

at com.jfinal.core.JFinal.init(JFinal.java:61)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:62)

at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)

at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:741)

at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374)

at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)

jfinal版本为3.5,mysql版本为8.0.13。jdbcURL上已经配置了&useSSL=true,但是后面报的错误不知道怎么解决,麻烦大家帮忙看一下,谢谢了。

image.png

评论区

JFinal

2019-01-13 22:34

jdbcUrl 配置不正确,不要出现 & 这样的东东,此外,如果没有开启 SSL, 则要配置 useSSL=false

配置后面不要加分号,这不是写 java 程序,是 key=value 配置

J_muge

2019-01-18 18:01

@JFinal 多谢,问题解决了

热门反馈

扫码入社