错误处理程序java.lang.ClassNotFoundException

时间:2017-07-17 14:34:39

标签: java tomcat logging tomcat7

我在我的VM Red-Hat 6.5 64位

上启动tomcat-7.0.64时出错
Using CATALINA_BASE:   /opt/OSSM/3pps/tomcat
Using CATALINA_HOME:   /opt/OSSM/3pps/tomcat
Using CATALINA_TMPDIR: /opt/OSSM/3pps/tomcat/temp
Using JRE_HOME:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64/jre
Using CLASSPATH:/opt/OSSM/3pps/tomcat/bin/jdk_logging.jar:/opt/OSSM/3pps/tomcat/bin/bootstrap.jar:/opt/OSSM/3pps/tomcat/bin/tomcat-juli.jar

tomcat_start.log包含以下日志:

Handler error
java.lang.ClassNotFoundException: org.apache.juli.FileHandler
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709)
        at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:560)
        at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:503)
        at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:400)
        at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:396)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.juli.ClassLoaderLogManager.getClassLoaderInfo(ClassLoaderLogManager.java:396)
        at org.apache.juli.ClassLoaderLogManager.findProperty(ClassLoaderLogManager.java:280)
        at org.apache.juli.ClassLoaderLogManager.getProperty(ClassLoaderLogManager.java:266)
        at java.util.logging.LogManager.getLevelProperty(LogManager.java:1341)
        at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:651)
        at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:608)
        at java.util.logging.LogManager$SystemLoggerContext.demandLogger(LogManager.java:771)
        at java.util.logging.LogManager.demandSystemLogger(LogManager.java:460)
        at java.util.logging.Logger.getPlatformLogger(Logger.java:473)
        at java.util.logging.LoggingProxyImpl.getLogger(LoggingProxyImpl.java:41)
        at sun.util.logging.LoggingSupport.getLogger(LoggingSupport.java:100)
        at sun.util.logging.PlatformLogger$JavaLoggerProxy.<init>(PlatformLogger.java:639)
        at sun.util.logging.PlatformLogger$JavaLoggerProxy.<init>(PlatformLogger.java:634)
        at sun.util.logging.PlatformLogger.<init>(PlatformLogger.java:243)
        at sun.util.logging.PlatformLogger.getLogger(PlatformLogger.java:202)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:68)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:195)
        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
        at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182)
        at com.tomsawyer.graphicaldrawing.ui.composite.evaluator.TSServerGraphObjectEvaluator.<clinit>(SourceFile:866)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:195)
        at com.tomsawyer.util.evaluator.TSFunctionsLoader.readFunctionDefinitions(SourceFile:200)
        at com.tomsawyer.util.evaluator.TSFunctionsLoader.readExtensions(SourceFile:93)
        at com.tomsawyer.util.evaluator.TSFunctionsLoader.loadFunctions(SourceFile:67)
        at com.tomsawyer.graphicaldrawing.ui.composite.evaluator.TSServerEvaluatorSetup.setup(SourceFile:53)
        at com.tomsawyer.visualization.gwt.server.bootstrap.TSServletContainerBootstrap.evaluatorSetup(SourceFile:120)
        at com.tomsawyer.visualization.gwt.server.bootstrap.TSServletContainerBootstrap.<init>(SourceFile:37)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:383)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:116)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4919)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/OSSM/lib/logback-classic-1.1.9.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/OSSM/3pps/apache-tomcat-7.0.64/webapps/topology_maps/WEB-INF/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
15:18:26.539 [localhost-startStop-1] DEBUG c.h.n.o.t.ui.licensing.LicenseUtil - Initializing TS License Manager
15:18:26.542 [localhost-startStop-1] DEBUG c.h.n.o.t.ui.licensing.LicenseUtil - Licensing user.name=root
15:18:26.547 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - OSSM_DATA=/var/opt/OSSM
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - OSSM_HOME=/opt/OSSM
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Image Library=/var/opt/OSSM/topology_maps/images/
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Image Library=/var/opt/OSSM/topology_maps/backgrounds/
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Default Image=_default_
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - WebApps Dir=/opt/OSSM/3pps/tomcat/webapps/
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Tsp Dir=/opt/OSSM/3pps/tomcat/webapps/topology_maps/project/
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Tsp file =/opt/OSSM/3pps/tomcat/webapps/topology_maps/project/topology_map.tsp
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Color tree =false
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Link decoration =false
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Server refresh time =60
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Relate link =false
15:18:26.548 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Relate link color =000 000 204
15:18:26.549 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataUtil - DataUtil - Source Object =managed_object
15:18:26.551 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - DataSource=jdbc/uoc_datasource
15:18:26.551 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - driver=org.h2.Driver
15:18:26.551 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - login=sa
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - password=
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - url=jdbc:h2:tcp://localhost:9093/mem:uocCenterPool;DB_CLOSE_DELAY=-1;MULTI_THREADED=1;LOCK_MODE=3;LOG=0;UNDO_LOG=0
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - maxActive=100
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - DataSource_dimension=jdbc/dimension_datasource
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - driver_dim=org.h2.Driver
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - login_dim=sa
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - password_dim=
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - url_dim=jdbc:h2:tcp://localhost:9093/mem:uocCenterPool;DB_CLOSE_DELAY=-1;MULTI_THREADED=1;LOCK_MODE=3;LOG=0;UNDO_LOG=0
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - maxActive_dim=100
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.dao.SqlFileExecutor - Database is using H2 for dimension, skip create tables.
15:18:26.552 [localhost-startStop-1] INFO  c.h.n.o.t.ui.service.InitService - Start init...
15:18:26.554 [localhost-startStop-1] INFO  c.h.n.o.t.u.s.AutoGetDimensionService - com.hp.ngoss.owd.topology_maps.ui.service.AutoGetDimensionService started.
15:18:26.554 [localhost-startStop-1] INFO  c.h.n.o.t.ui.service.InitService - Dimension data refresh thread started.
15:18:26.554 [Thread-2] INFO  c.h.n.o.t.u.s.AutoGetDimensionService - refresh dimension from db to cache every 60 seconds ...
15:18:26.556 [Thread-2] INFO  c.h.n.o.t.u.s.AutoGetDimensionService - [2017-07-17 15:18:26] get dimension data from view...

我根据{{3修改/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64/jre/lib/logging.properties下的logging.properties文件现在它看起来如下

############################################################
#       Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################

############################################################
#       Global properties
############################################################

# "handlers" specifies a comma separated list of log Handler
# classes.  These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.



handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = OSSM

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

我还在$CATALINA_HOME/conf

中创建了一个logging.properties,内容与上面相同

我已经尝试了这个http://tomcat.apache.org/tomcat-7.0-doc/logging.html但没有改变。

0 个答案:

没有答案