NutzCN Logo
问答 引入quartz,debug日志文件不输出
发布于 2033天前 作者 qq_2ac473ac 3200 次浏览 复制 上一个帖子 下一个帖子
标签:

引入quartz后突然日志就不输出了,不知道怎么回事,退回去也不行

5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.服务器版本:        Apache Tomcat/9.0.19
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.构建:          Apr 12 2019 14:22:48 UTC
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version number: 9.0.19.0
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS.版本:            6.1
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 结.造:          amd64
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java 环境变量:             D:\Program Files\Java\jdk-12.0.1
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM 版本:           12.0.1+12
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM.供应商:            Oracle Corporation
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         E:\zb\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         E:\zb\apache-tomcat-9.0.19
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=E:\zb\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\zb\apache-tomcat-9.0.19
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=E:\zb\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
5月 29, 2019 12:05:05 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\Program Files\Java\jdk-12.0.1\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/Program Files/Java/jdk-12.0.1/bin/server;D:/Program Files/Java/jdk-12.0.1/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\Java\jdk-12.0.1\bin;D:\Program Files\Java\apache-maven-3.6.1\bin;;D:\个人文件\桌面;;.]
5月 29, 2019 12:05:05 下午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["http-nio-8080"]
5月 29, 2019 12:05:05 下午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["ajp-nio-8009"]
5月 29, 2019 12:05:05 下午 org.apache.catalina.startup.Catalina load
信息: 服务器在[1,211]毫秒内初始化
5月 29, 2019 12:05:05 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
5月 29, 2019 12:05:05 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet engine: [Apache Tomcat/9.0.19]
5月 29, 2019 12:05:06 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
警告: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [156] milliseconds.
5月 29, 2019 12:05:07 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.nutz.lang.reflect.ReflectTool$1 (file:/E:/zb/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/picmanage/WEB-INF/lib/nutz-1.r.68.v20190220.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.nutz.lang.reflect.ReflectTool$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO ] 12:05:08.861 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:932) - {dataSource-1} inited
Wed May 29 12:05:09 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
5月 29, 2019 12:05:09 下午 org.apache.coyote.AbstractProtocol start
信息: 开始协议处理句柄["http-nio-8080"]
5月 29, 2019 12:05:09 下午 org.apache.coyote.AbstractProtocol start
信息: 开始协议处理句柄["ajp-nio-8009"]
5月 29, 2019 12:05:09 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in [4,322] milliseconds

发现提示SLF4J,然后引入SLF4J,还是不行

  <dependency>
        <groupId>org.nutz</groupId>
        <artifactId>nutz</artifactId>
        <version>1.r.68.v20190220</version>
    </dependency>
    <dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>
<dependency>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz</artifactId>
    <version>2.3.1</version>
</dependency>
<dependency>
    <groupId>org.nutz</groupId>
    <artifactId>nutz-integration-quartz</artifactId>
    <version>1.r.67</version>
</dependency>
    <!-- mysql驱动 -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.40</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>
    <!-- Druid连接池 -->
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>1.1.5</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
            <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.6</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20180813</version>
</dependency>
  
        <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.8.0-beta4</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.8.0-beta4</version>
    <scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.8.0-beta4</version>
    <scope>test</scope>
</dependency>
log4j.rootLogger=debug,Console

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%-5p] %d{HH:mm:ss.SSS} %l - %m%n
org.quartz.scheduler.instanceName = NutzbookScheduler
org.quartz.threadPool.threadCount = 3
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.scheduler.skipUpdateCheck=true
6 回复

把这个scope去掉

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.8.0-beta4</version>
    <scope>test</scope>
</dependency>

还是不行啊

5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.服务器版本:        Apache Tomcat/9.0.19
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.构建:          Apr 12 2019 14:22:48 UTC
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version number: 9.0.19.0
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS.版本:            6.1
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 结.造:          amd64
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java 环境变量:             D:\Program Files\Java\jdk-12.0.1
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM 版本:           12.0.1+12
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM.供应商:            Oracle Corporation
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         E:\zb\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         E:\zb\apache-tomcat-9.0.19
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=E:\zb\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\zb\apache-tomcat-9.0.19
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=E:\zb\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
5月 29, 2019 12:17:31 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\Program Files\Java\jdk-12.0.1\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/Program Files/Java/jdk-12.0.1/bin/server;D:/Program Files/Java/jdk-12.0.1/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\Java\jdk-12.0.1\bin;D:\Program Files\Java\apache-maven-3.6.1\bin;;D:\个人文件\桌面;;.]
5月 29, 2019 12:17:31 下午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["http-nio-8080"]
5月 29, 2019 12:17:31 下午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["ajp-nio-8009"]
5月 29, 2019 12:17:31 下午 org.apache.catalina.startup.Catalina load
信息: 服务器在[1,296]毫秒内初始化
5月 29, 2019 12:17:31 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
5月 29, 2019 12:17:31 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet engine: [Apache Tomcat/9.0.19]
5月 29, 2019 12:17:32 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
警告: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [165] milliseconds.
5月 29, 2019 12:17:33 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.nutz.lang.reflect.ReflectTool$1 (file:/E:/zb/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/picmanage/WEB-INF/lib/nutz-1.r.68.v20190220.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.nutz.lang.reflect.ReflectTool$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO ] 12:17:35.599 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:932) - {dataSource-1} inited
Wed May 29 12:17:36 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
5月 29, 2019 12:17:36 下午 org.apache.coyote.AbstractProtocol start
信息: 开始协议处理句柄["http-nio-8080"]
5月 29, 2019 12:17:36 下午 org.apache.coyote.AbstractProtocol start
信息: 开始协议处理句柄["ajp-nio-8009"]
5月 29, 2019 12:17:36 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in [4,926] milliseconds

贴现在的pom.xml

maven更新成功了的

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mygroupId</groupId>
<artifactId>my</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
    <!-- UTF8大法好 -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
    <!-- 核心jar -->
    <dependency>
        <groupId>org.nutz</groupId>
        <artifactId>nutz</artifactId>
        <version>1.r.68.v20190220</version>
    </dependency>
    <dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>
<dependency>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz</artifactId>
    <version>2.3.1</version>
</dependency>
<dependency>
    <groupId>org.nutz</groupId>
    <artifactId>nutz-integration-quartz</artifactId>
    <version>1.r.67</version>
</dependency>
    <!-- mysql驱动 -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.40</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>
    <!-- Druid连接池 -->
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>1.1.5</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
            <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.6</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20180813</version>
</dependency>
  
        <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.8.0-beta4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.8.0-beta4</version>
    <scope>test</scope>
</dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <compilerArgs>
                    <arg>-parameters</arg>
                </compilerArgs>
                <useIncrementalCompilation>false</useIncrementalCompilation>
            </configuration>
        </plugin>
    </plugins>
</build>
<repositories>
    <repository>
        <id>nutz</id>
        <url>http://jfrog.nutz.cn/artifactory/libs-release</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>nutz-snapshots</id>
        <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
        <releases>
            <enabled>false</enabled>
        </releases>
    </repository>
</repositories>
</project>

我是说把scope去掉,不是把整个依赖删掉
另外,slf4j-simple是整个删掉

懂了,,,,可以了。多谢大神啊

添加回复
请先登陆
回到顶部