连接SQL Server总是报空指针异常。。。下面是configPlugins里的代码
// sqlserver
String url = getProperty("jdbc.url").trim();
String username = getProperty("jdbc.username").trim();
String password = getProperty("jdbc.password").trim();
String driverClass = getProperty("jdbc.driverClassName").trim();
// 配置C3p0数据库连接池插件
C3p0Plugin c3p0Plugin = new C3p0Plugin(url, username, password, driverClass);
me.add(c3p0Plugin);
// 配置ActiveRecord插件
ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);
arp.setDialect(new SqlServerDialect());
me.add(arp);
严重: Exception starting filter JFinalFilter
java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.find(Model.java:567)
at com.jfinal.plugin.activerecord.Model.findFirst(Model.java:594)
at com.jfinal.plugin.activerecord.Model.findFirst(Model.java:603)
at com.jfinalshop.model.Orders.getLastOrderSn(Orders.java:119)
at com.jfinalshop.util.SerialNumberUtil.lastSnNumberInit(SerialNumberUtil.java:52)
at com.jfinalshop.cfg.JFWebConfig.afterJFinalStart(JFWebConfig.java:138)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:55)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4855)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5549)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
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)