2020-02-09 21:55

@JFinal 感谢波总,换成jdk 1.8 编译就可以了,原来是jdk 12 ,先这样吧,有可能我引用的jar包部分不支持jdk 12

2020-02-09 20:58

@JFinal 以上是tomcat 的两个日志文件

2020-02-09 20:57

09-Feb-2020 20:54:40.851 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.21
09-Feb-2020 20:54:40.855 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.构建: Jun 4 2019 20:19:36 UTC
09-Feb-2020 20:54:40.856 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.21.0
09-Feb-2020 20:54:40.857 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
09-Feb-2020 20:54:40.857 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 6.1
09-Feb-2020 20:54:40.858 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 结.造: amd64
09-Feb-2020 20:54:40.859 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: D:\java\jdk-12.0.1_x64
09-Feb-2020 20:54:40.859 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本: 12.0.1+12
09-Feb-2020 20:54:40.860 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation
09-Feb-2020 20:54:40.861 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\payment_server\tomcat-9.0.21
09-Feb-2020 20:54:40.862 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\payment_server\tomcat-9.0.21
09-Feb-2020 20:54:40.871 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
09-Feb-2020 20:54:40.871 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
09-Feb-2020 20:54:40.872 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
09-Feb-2020 20:54:40.874 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\payment_server\tomcat-9.0.21\conf\logging.properties
09-Feb-2020 20:54:40.874 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
09-Feb-2020 20:54:40.875 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
09-Feb-2020 20:54:40.876 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
09-Feb-2020 20:54:40.877 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
09-Feb-2020 20:54:40.878 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=D:\payment_server\tomcat-9.0.21
09-Feb-2020 20:54:40.879 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\payment_server\tomcat-9.0.21
09-Feb-2020 20:54:40.880 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\payment_server\tomcat-9.0.21\temp
09-Feb-2020 20:54:40.881 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5].
09-Feb-2020 20:54:40.882 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
09-Feb-2020 20:54:40.883 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
09-Feb-2020 20:54:40.896 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018]
09-Feb-2020 20:54:41.125 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"]
09-Feb-2020 20:54:41.360 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["ajp-nio-8009"]
09-Feb-2020 20:54:41.365 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[719]毫秒内初始化
09-Feb-2020 20:54:41.403 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
09-Feb-2020 20:54:41.404 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.21]
09-Feb-2020 20:54:42.600 信息 [main] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
09-Feb-2020 20:54:42.830 警告 [main] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [214] milliseconds.
09-Feb-2020 20:54:42.871 严重 [main] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
09-Feb-2020 20:54:42.872 严重 [main] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
09-Feb-2020 20:54:42.880 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\payment_server\tomcat-9.0.21\webapps\docs]
09-Feb-2020 20:54:42.915 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\payment_server\tomcat-9.0.21\webapps\docs] has finished in [34] ms
09-Feb-2020 20:54:42.916 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\payment_server\tomcat-9.0.21\webapps\examples]
09-Feb-2020 20:54:43.257 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\payment_server\tomcat-9.0.21\webapps\examples] has finished in [341] ms
09-Feb-2020 20:54:43.258 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\payment_server\tomcat-9.0.21\webapps\host-manager]
09-Feb-2020 20:54:43.291 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\payment_server\tomcat-9.0.21\webapps\host-manager] has finished in [33] ms
09-Feb-2020 20:54:43.292 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\payment_server\tomcat-9.0.21\webapps\manager]
09-Feb-2020 20:54:43.323 信息 [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\payment_server\tomcat-9.0.21\webapps\manager] has finished in [31] ms
09-Feb-2020 20:54:43.328 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"]
09-Feb-2020 20:54:43.339 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"]
09-Feb-2020 20:54:43.344 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [1,977] milliseconds
09-Feb-2020 20:55:08.839 信息 [Thread-4] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
09-Feb-2020 20:55:09.053 信息 [Thread-4] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
09-Feb-2020 20:55:09.228 信息 [Thread-4] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
09-Feb-2020 20:55:09.250 信息 [Thread-4] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
09-Feb-2020 20:55:09.253 信息 [Thread-4] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
09-Feb-2020 20:55:09.256 信息 [Thread-4] org.apache.coyote.AbstractProtocol.destroy 正在摧毁协议处理器 ["http-nio-8080"]
09-Feb-2020 20:55:09.257 信息 [Thread-4] org.apache.coyote.AbstractProtocol.destroy 正在摧毁协议处理器 ["ajp-nio-8009"]

2020-02-09 20:56

09-Feb-2020 20:54:42.871 严重 [main] org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常
java.lang.UnsupportedClassVersionError: Preview features are not enabled for com/base/MainConfig (class file version 56.65535). Try running with '--enable-preview' (无法载入的.类 [com.base.MainConfig])
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2424)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1334)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:332)
at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:119)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:60)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:270)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:102)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4530)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5169)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
09-Feb-2020 20:54:43.249 信息 [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
09-Feb-2020 20:54:43.249 信息 [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
09-Feb-2020 20:54:43.251 信息 [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@9e30f9a')
09-Feb-2020 20:55:09.235 信息 [Thread-4] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
09-Feb-2020 20:55:09.235 信息 [Thread-4] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()

2020-02-09 17:42

public void configRoute(Routes me) {

System.out.println("启动路由");

me.add("/", helpdefault.class,"index");

me.add("/wxpayment", wxPayment.class,"index");

}

TOMCAT 启动时 ,没出现上面调试信息,因此断定没有启动 Jfinal

2019-11-27 11:15

搞定了,sqljdbc41.jar 换成 sqljdbc4_4.jar 就可以

2019-11-27 10:08

能发图片就好了,复制过来的代码都被阉割了,上面重新发调用代码

2019-11-27 10:07

DruidPlugin druidPlugin=null;
System.out.println("MSSQL数据库地址:" + pConfigFile.get("mssql_jdbcUrl"));
// 1.实例化新的数据库连接池
druidPlugin = new DruidPlugin(pConfigFile.get("mssql_jdbcUrl"), pConfigFile.get("mssql_user"), pConfigFile.get("mssql_password").trim());
druidPlugin.setDriverClass(pConfigFile.get("mssql_driver"));


me.add(druidPlugin);
try {
// 2.启动连接池
druidPlugin.start();
// 3.实例化连接
ActiveRecordPlugin arp = new ActiveRecordPlugin("sqlConnect", druidPlugin);
// 4.启动该连接
arp.start();
}
catch (Exception e){
System.out.println("启动连接池失败:"+ e.getMessage() );
}

2019-10-28 09:10

多谢指点,已经搞通,现在有另一个问题,我需要创建两个不TT的连接信息,也就是需要连接两台MQTT服务器,我该如何创建两个插件对象?

2019-10-24 16:37

2019-07-30 10:05

搞定了,忘记加 mql库了 ,谢谢支持