tomcat启动失败 Exception fixing docBase for context

6 篇文章 0 订阅
3 篇文章 0 订阅
  1. 问题描述:
    在服务器部署java程序时,向服务器上传了war包,程序自启动失败,手动启动失败,查看程序业务日志,发现没有启动信息,没有启动成功;随即,查看tomcat启动日志 catalina.out 发现启动报错,分析后发现是war包解压失败或war包不存在。去查看war存放目录,好家伙,发现多了一个 空的*.war !立马把它删了,再次启动,启动成功。
    在tomcat启动准备前会到war存放目录下扫描war并进行解压。 这种多了一个空的war包,在准备阶段,解压报错,或者解压错了war包,启动自然不成功。这种情况下,会出现程序偶尔启动成功(正确解压到war包),偶尔启动失败(解压到空的war/错误的war),很是恶心

  2. 报错定位日志:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  3. 报错信息

Oct 21, 2021 10:50:42 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /home/tomcat/war/var/web-uat/webapps/*.war
Oct 21, 2021 10:50:42 AM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Error registering Catalina:j2eeType=WebModule,name=//localhost/*,J2EEApplication=none,J2EEServer=none
javax.management.RuntimeOperationsException
        at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:413)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
        at org.apache.tomcat.util.modeler.Registry.registerComponent(Registry.java:742)
        at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:158)
        at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:61)
        at org.apache.catalina.core.ContainerBase.initInternal(ContainerBase.java:1196)
        at org.apache.catalina.core.StandardContext.initInternal(StandardContext.java:6668)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:135)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Repository: cannot add mbean for pattern name Catalina:j2eeType=WebModule,name=//localhost/*,J2EEApplication=none,J2EEServer=none
        ... 23 more

Oct 21, 2021 10:50:42 AM org.apache.catalina.util.LifecycleMBeanBase register
WARNING: Failed to register object [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/*]] with name [Catalina:j2eeType=WebModule,name=//localhost/*,J2EEApplication=none,J2EEServer=none] during component initialisation
javax.management.RuntimeOperationsException
        at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:413)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
        at org.apache.tomcat.util.modeler.Registry.registerComponent(Registry.java:742)
        at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:158)
        at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:61)
        at org.apache.catalina.core.ContainerBase.initInternal(ContainerBase.java:1196)
        at org.apache.catalina.core.StandardContext.initInternal(StandardContext.java:6668)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:135)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Repository: cannot add mbean for pattern name Catalina:j2eeType=WebModule,name=//localhost/*,J2EEApplication=none,J2EEServer=none
        ... 23 more

Oct 21, 2021 10:50:42 AM org.apache.catalina.startup.ContextConfig beforeStart
SEVERE: Exception fixing docBase for context [/*]
java.util.zip.ZipException: zip file is empty
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:225)
        at java.util.zip.ZipFile.<init>(ZipFile.java:155)
        at java.util.jar.JarFile.<init>(JarFile.java:166)
        at java.util.jar.JarFile.<init>(JarFile.java:103)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:99)
        at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
        at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
        at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:111)
        at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:737)
        at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:862)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:390)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:388)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:144)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Oct 21, 2021 10:50:42 AM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Invalid or unreadable WAR file : zip file is empty
        at org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:136)
        at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5239)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5430)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Oct 21, 2021 10:50:42 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/*]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Error in resourceStart()
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5431)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        ... 10 more

Oct 21, 2021 10:50:42 AM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive /home/tomcat/war/var/web-uat/webapps/*.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/*]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1019)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Oct 21, 2021 10:50:42 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /home/tomcat/war/var/web-uat/webapps/*.war has finished in 54 ms
Oct 21, 2021 10:50:42 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /home/tomcat/war/var/web-uat/webapps/ROOT.war
Oct 21, 2021 10:50:46 AM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.`
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Install driver for USB-UART bridge converter on Linux Ubuntu12.04 Ubuntu下USB转串口芯片驱动程序安装,支持cp210x,pl2303等 Reference: Fixing the cp210x open - Unable to enable UART Error When you plugin your USB-UART converter, and run "> ls /dev/tty*", if you don't see the /dev/ttyUSB0 (or similar), your Linux does not detect your USB-UART device. We need to install the driver for your device. Here we use Ubuntu12.04, and Updated the source to 3.2.0 version. If there is difference about version Number from your OS platform, please try to modify it into yours. 1.Download the Linux Source Code Open a terminal and execute the following commands. Note that your version of Linux may differ slightly -- adjust accordingly. $ cd ~ $ sudo apt-get install build-essential linux-source $ cp /usr/src/linux-source-3.2.0.tar.bz2 . $ bunzip2 linux-source-3.2.0.tar.bz2 $ tar xf linux-source-3.2.0.tar $ cd ~/linux-source-3.2.0 2.Recompile and Reinstall the cp210x Driver From within a terminal, execute: $ cd ~/linux-source-3.2.0 $ make oldconfig $ make prepare $ make scripts $ cp /usr/src/linux-headers-3.2.0-34-generic-pae/Module.symvers . Here, I have the "3.2.0-29" version also, I launched the command above, but not the below: "cp /usr/src/linux-headers-3.2.0-29-generic-pae/Module.symvers ." Recompile and Reinstall the cp210x Driver Here, We can actually install many kinds of USB-UART converter drivers. We take cp210x as the example. From within a terminal, execute: $ make M=drivers/usb/serial $ sudo mv /lib/modules/$(uname -r)/kernel/drivers/usb/serial/cp210x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/cp210x.ko.old $ sudo cp drivers/usb/serial/cp210x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/ $ sudo modprobe -r cp210x $ sudo modprobe cp210x Reboot Linux system. Run Terminal: $ ls /dev/tty* The we can see the device is detected by Linux Host OS: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Reference: http://pharos.ece.utexas.edu/wiki/index.php/Fixing_the_cp210x_open_-_Unable_to_enable_UART_Error_-_04/17/2011 Then, We can configure the minicom to communicate with our target board. ====================================================== Here is an example of configure the parameters of minicom for TLL6527M PAL board: I just copied it here hardly without any font editing. Sorry about that. Serial Communications from Host-PC to TLL6527M Target Hardware The TLL System Design Environment (SDE) running on the host PC comes pre-configured with the required settings for serial-UART communications between the host PC and the TLL6527M base module. Generally, for use with TLL6527M the settings need not to be changed (Note: From the SDE OS version 0.3.2, the serial terminal program Minicom is set to open /dev/ttyUSB0 with the needed configuration as mentioned above.). To start serial communication from host to the TLL6527M, open the serial communication terminal program Minicom. Just open a terminal window on your Linux SDE running on the host PC and type the command "minicom" at the command prompt on your host PC terminal console. The TLL6527M on power-up is set by default to the following serial-UART communication settings: Bits per second = 115200 Data bits = 8 Parity = None Stop Bits = 1 Flow control = None Make sure that the TLL6527M's USB-UART port has been mapped to a ttyUSBx device node in the /dev folder on the host PC SDE. See following example: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Now make sure that this "ttyUSBx" is set as the destination port, baud rate is 115200, and 8N1 mode for minicom, by running the command 'minicom -s'. Note that running the "minicom -s" command as a normal user will only apply the settings for the current session. In order to make the settings permanent, these commands need to be run with root privileges.See example below: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 The following window will appear on your host PC terminal window: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Go to ‘Serial port setup’, following screen will appear, make sure that serial device is set to ‘/dev/ttyUSB0’ and bps/par/bits is set to 115200 8N1: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Now go back to the main menu and choose ‘save setup as dfl’. This will save the configuration settings and from next time onwards user can directly run ‘minicom’ command without the option ‘–s’ and it will load settings from the saved file. 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 RESET the target by using the SDE's TLL6527M reset utility or by pressing the RESET button on the target. Following messages will be displayed on the terminal. By default, U-Boot is setup to automatically start booting the OS after waiting for a few seconds for the user to interrupt the automatic launch by pressing any key. So to stop U-Boot from loading uClinux and provide U-Boot command prompt, just hit any key. (This is assuming TLL6527M is flashed with u-boot and uClinux. TLL6527Ms are pre-flashed with firmware before shipping).

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值