用druid 连接 postgresql ,启动报错

发布于 2021-11-29 16:46:03 字数 24847 浏览 974 评论 1


@JFinal 你好,想跟你请教个问题:

我用druid 连接 postgresql ,启动报错,(配置ActiveRecord插件后)

代码如下:

public void configPlugin(Plugins me) { // 配置C3p0数据库连接池插件  //C3p0Plugin c3p0Plugin = new C3p0Plugin(getProperty("jdbcUrl"), getProperty("user"), getProperty("password").trim());  //me.add(c3p0Plugin);   druidPlugin = new DruidPlugin(getProperty("url"),
         getProperty("username"),
         getProperty("password"),
         getProperty("driverClassName")); druidPlugin.start();
   me.add(druidPlugin); // 配置ActiveRecord插件  ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin);
   me.add(arp);
   arp.addMapping("blog", Blog.class); // 映射blog 表到 Blog模型 }

报错日志:

D:Javajdk1.8.0binjava -Didea.launcher.port=7541 "-Didea.launcher.bin.path=D:IDEIntelliJ IDEA 14.0.2bin" -Dfile.encoding=UTF-8 -classpath "D:Javajdk1.8.0jrelibcharsets.jar;D:Javajdk1.8.0jrelibdeploy.jar;D:Javajdk1.8.0jrelibjavaws.jar;D:Javajdk1.8.0jrelibjce.jar;D:Javajdk1.8.0jrelibjfr.jar;D:Javajdk1.8.0jrelibjfxswt.jar;D:Javajdk1.8.0jrelibjsse.jar;D:Javajdk1.8.0jrelibmanagement-agent.jar;D:Javajdk1.8.0jrelibplugin.jar;D:Javajdk1.8.0jrelibresources.jar;D:Javajdk1.8.0jrelibrt.jar;D:Javajdk1.8.0jrelibextaccess-bridge-64.jar;D:Javajdk1.8.0jrelibextcldrdata.jar;D:Javajdk1.8.0jrelibextdnsns.jar;D:Javajdk1.8.0jrelibextjaccess.jar;D:Javajdk1.8.0jrelibextjfxrt.jar;D:Javajdk1.8.0jrelibextlocaledata.jar;D:Javajdk1.8.0jrelibextnashorn.jar;D:Javajdk1.8.0jrelibextsunec.jar;D:Javajdk1.8.0jrelibextsunjce_provider.jar;D:Javajdk1.8.0jrelibextsunmscapi.jar;D:Javajdk1.8.0jrelibextsunpkcs11.jar;D:Javajdk1.8.0jrelibextzipfs.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFclasses;D:developdemojfinaljfinal_demoWebRootWEB-INFlibc3p0-0.9.1.2.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFlibmysql-connector-java-5.1.20-bin.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFliblog4j-1.2.16.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFlibfreemarker-2.3.20.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFlibjetty-server-8.1.8.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFlibjfinal-1.9-bin-with-src.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFlibdruid-1.0.8.jar;D:developdemojfinaljfinal_demoWebRootWEB-INFlibpostgresql-9.2-1002.jdbc4.jar;D:IDEIntelliJ IDEA 14.0.2libidea_rt.jar" com.intellij.rt.execution.application.AppMain com.demo.common.DemoConfig
Starting JFinal 1.9
Starting scanner at interval of 5 seconds.
Starting web server on port: 80


2015-01-07 17:54:01
[ERROR]-[Thread: main]-[com.alibaba.druid.pool.DruidDataSource.init()]: init datasource error
java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1427)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:616)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:890)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:886)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:96)
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:36)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


2015-01-07 17:54:01
[ERROR]-[Thread: main]-[com.alibaba.druid.pool.DruidDataSource.init()]: dataSource init error
java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1427)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:616)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:890)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:886)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:96)
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:36)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
2015-01-07 17:54:01.162:WARN:oejuc.AbstractLifeCycle:FAILED jfinal: java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. |java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. |java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.jfinal.core.Config.startPlugins(Config.java:96)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: 
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:48)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: 
java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1427)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:616)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:890)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:886)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:96)
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:36)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


2015-01-07 17:54:01
[ERROR]-[Thread: main]-[com.jfinal.core.Config.startPlugins()]: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. 
java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:48)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1427)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:616)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:890)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:886)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:96)
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:36)
... 25 more
2015-01-07 17:54:01.169:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/D:/develop/demo/jfinal/jfinal_demo/WebRoot/}
java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. |java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.jfinal.core.Config.startPlugins(Config.java:96)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: 
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:48)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: 
java.sql.SQLException: connect error, url jdbc:postgresql://127.0.0.1:5432, driverClass org.postgresql.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1427)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:616)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:890)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:886)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:96)
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:36)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.demo.common.DemoConfig.main(DemoConfig.java:88)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Starting Complete. Welcome To The JFinal World :)


如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

各自安好 2021-11-29 19:03:26

设置一下方言:

arp.setDialect(new PostgreSqlDialect());

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文