Exception starting filter jfinal java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. File not found : "F:/mystudy_04_web1/day10-JDBC高级与XML/资料/tomcat/apache-tomcat-7.0.69/webapps/lirPCMS/WEB-INF/classes/sqlserver.sql" 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:63) 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:4908) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002) 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) Caused by: java.lang.IllegalArgumentException: File not found : "F:/mystudy_04_web1/day10-JDBC高级与XML/资料/tomcat/apache-tomcat-7.0.69/webapps/lirPCMS/WEB-INF/classes/sqlserver.sql" at com.jfinal.template.source.ClassPathSource.<init>(ClassPathSource.java:67) at com.jfinal.template.source.ClassPathSourceFactory.getSource(ClassPathSourceFactory.java:29) at com.jfinal.template.Engine.buildTemplateBySourceFactory(Engine.java:157) at com.jfinal.template.Engine.getTemplate(Engine.java:144) at com.jfinal.plugin.activerecord.sql.SqlKit.parseSqlTemplate(SqlKit.java:93) at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:224) at com.jfinal.core.Config.startPlugins(Config.java:128) ... 20 more 二月 28, 2019 5:34:57 下午 org.apache.catalina.core.StandardContext startInternal 严重: One or more Filters failed to start. Full details will be found in the appropriate container log file 二月 28, 2019 5:34:57 下午 org.apache.catalina.core.StandardContext startInternal 严重: Context [/lirPCMS] startup failed due to previous errors 2019-02-28 17:34:57 [ERROR]-[Thread: localhost-startStop-1]-[com.jfinal.core.Config.startPlugins()]: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. File not found : "F:/mystudy_04_web1/day10-JDBC高级与XML/资料/tomcat/apache-tomcat-7.0.69/webapps/lirPCMS/WEB-INF/classes/sqlserver.sql" java.lang.IllegalArgumentException: File not found : "F:/mystudy_04_web1/day10-JDBC高级与XML/资料/tomcat/apache-tomcat-7.0.69/webapps/lirPCMS/WEB-INF/classes/sqlserver.sql" at com.jfinal.template.source.ClassPathSource.<init>(ClassPathSource.java:67) at com.jfinal.template.source.ClassPathSourceFactory.getSource(ClassPathSourceFactory.java:29) at com.jfinal.template.Engine.buildTemplateBySourceFactory(Engine.java:157) at com.jfinal.template.Engine.getTemplate(Engine.java:144) at com.jfinal.plugin.activerecord.sql.SqlKit.parseSqlTemplate(SqlKit.java:93) at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:224) 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:63) 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:4908) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002) 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) @Override public void configPlugin(Plugins me) { // 配置C3p0数据库连接池插件 DruidPlugin druidPlugin = createDruidPlugin(); druidPlugin.setDriverClass(PropKit.get("driver")); me.add(druidPlugin); // 配置ActiveRecord插件 ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin); arp.setDialect(new SqlServerDialect()); /*DruidPlugin druidPlugin2 = new DruidPlugin(PropKit.get("jdbcUrl2"), PropKit.get("user"), PropKit.get("password").trim()); druidPlugin2.setDriverClass(PropKit.get("driver")); me.add(druidPlugin2); ActiveRecordPlugin arp2 = new ActiveRecordPlugin("db2", druidPlugin2); arp2.setDialect(new SqlServerDialect()); arp2.setShowSql(true); me.add(arp2);*/ // 所有映射在 MappingKit 中自动化搞定 arp.setBaseSqlTemplatePath(PathKit.getRootClassPath()); arp.addSqlTemplate("sqlserver.sql"); arp.setShowSql(true); _MappingKit.mapping(arp); me.add(arp);
项目:JFinal