用druid 连接 postgresql ,启动报错?报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

用druid 连接 postgresql ,启动报错?报错

2020-06-14 18:27:10 289 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:\Java\jdk1.8.0\bin\java -Didea.launcher.port=7541 "-Didea.launcher.bin.path=D:\IDE\IntelliJ IDEA 14.0.2\bin" -Dfile.encoding=UTF-8 -classpath "D:\Java\jdk1.8.0\jre\lib\charsets.jar;D:\Java\jdk1.8.0\jre\lib\deploy.jar;D:\Java\jdk1.8.0\jre\lib\javaws.jar;D:\Java\jdk1.8.0\jre\lib\jce.jar;D:\Java\jdk1.8.0\jre\lib\jfr.jar;D:\Java\jdk1.8.0\jre\lib\jfxswt.jar;D:\Java\jdk1.8.0\jre\lib\jsse.jar;D:\Java\jdk1.8.0\jre\lib\management-agent.jar;D:\Java\jdk1.8.0\jre\lib\plugin.jar;D:\Java\jdk1.8.0\jre\lib\resources.jar;D:\Java\jdk1.8.0\jre\lib\rt.jar;D:\Java\jdk1.8.0\jre\lib\ext\access-bridge-64.jar;D:\Java\jdk1.8.0\jre\lib\ext\cldrdata.jar;D:\Java\jdk1.8.0\jre\lib\ext\dnsns.jar;D:\Java\jdk1.8.0\jre\lib\ext\jaccess.jar;D:\Java\jdk1.8.0\jre\lib\ext\jfxrt.jar;D:\Java\jdk1.8.0\jre\lib\ext\localedata.jar;D:\Java\jdk1.8.0\jre\lib\ext\nashorn.jar;D:\Java\jdk1.8.0\jre\lib\ext\sunec.jar;D:\Java\jdk1.8.0\jre\lib\ext\sunjce_provider.jar;D:\Java\jdk1.8.0\jre\lib\ext\sunmscapi.jar;D:\Java\jdk1.8.0\jre\lib\ext\sunpkcs11.jar;D:\Java\jdk1.8.0\jre\lib\ext\zipfs.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\classes;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\c3p0-0.9.1.2.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.20-bin.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\log4j-1.2.16.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\freemarker-2.3.20.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\jetty-server-8.1.8.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\jfinal-1.9-bin-with-src.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\druid-1.0.8.jar;D:\develop\demo\jfinal\jfinal_demo\WebRoot\WEB-INF\lib\postgresql-9.2-1002.jdbc4.jar;D:\IDE\IntelliJ IDEA 14.0.2\lib\idea_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 :)


取消 提交回答
全部回答(1)
相关问答

17

回答

【大咖问答】对话PostgreSQL 中国社区发起人之一,阿里云数据库高级专家 德哥

阿里ACE 彭飞 2019-07-10 09:36:10 1037434浏览量 回答数 17

162

回答

惊喜翻倍:免费ECS+免费环境配置~!(ECS免费体验6个月活动3月31日结束)

豆妹 2014-10-29 17:52:21 226121浏览量 回答数 162

8

回答

OceanBase 使用动画(持续更新)

mq4096 2019-02-20 17:16:36 336989浏览量 回答数 8

110

回答

OSS存储服务-客户端工具

newegg11 2012-05-17 15:37:18 295511浏览量 回答数 110

18

回答

阿里云开放端口权限

xcxx 2016-07-20 15:03:33 646752浏览量 回答数 18

38

回答

安全组详解,新手必看教程

我的中国 2017-11-30 15:23:46 259819浏览量 回答数 38

21

回答

请教一下数据量有100万条左右要什么配置?

易网网络 2013-03-27 15:18:02 192633浏览量 回答数 21

249

回答

阿里云LNAMP(Linux + Nginx + Apache + MySQL + PHP)环境一键安装脚本

云代维 2014-02-14 15:26:06 305615浏览量 回答数 249

24

回答

【精品问答】python技术1000问(1)

问问小秘 2019-11-15 13:25:00 475558浏览量 回答数 24

2

回答

区域选择帮助

fanyue88888 2012-12-07 15:54:30 204382浏览量 回答数 2
+关注
爱吃鱼的程序员
https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
2
文章
21569
问答
问答排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载