Org. apache. commons. logging. LogConfigurationException: No suitable Log constructor, NoClassDefFoundErr

Source: Internet
Author: User

On debian4, install java5: sudo aptitude install sun-java5-jdk with Aptitude

The version information running in java-version is similar to: --------------------------------------- java version "1.5.0 _ 17" Java (TM) 2 Runtime Environment, Standard Edition (build 1.5.0 _ 17-b04) Java HotSpot (TM) client VM (build 1.5.0 _ 17-b04, mixed mode, sharing) ------------------------------------------ the last sharing is very strange. If this information is not found in the installed version, aptitude install tomcat 5.5 installed, it may conflict with log4j. The error is similar :----------------------------- -------------------------------------------- Org. apache. commons. logging. logConfigurationException: org. apache. commons. logging. logConfigurationException: No suitable Log constructor [Ljava. lang. class; @ 8b058b for org. apache. commons. logging. impl. log4JLogger (Caused by java. lang. noClassDefFoundError: org/apache/log4j/Category) (Caused by org. apache. commons. logging. logConfigurationException: No suitable Log constructor [Ljava. lang. class; @ 8b058b for org. apache. commons. logging. impl. log4JLogger (Caused by java. lang. noClassDefFoundError: org/apache/log4j/Category) at org. apache. commons. logging. impl. logFactoryImpl. newInstance (LogFactoryImpl. java: 543) at org. apache. commons. logging. impl. logFactoryImpl. getInstance (LogFactoryImpl. java: 235) at org. apache. commons. logging. logFactory. getLog (LogFactory. java: 370) at org. apache. catalina. core. containerBase. getLogger (ContainerBase. java: 381) at org. apache. catalina. core. standardContext. start (StandardContext. java: 4119) at org. apache. catalina. core. containerBase. addChildInternal (ContainerBase. java: 760) at org. apache. catalina. core. containerBase. addChild (ContainerBase. java: 740) at org. apache. catalina. core. standardHost. addChild (StandardHost. java: 544) at org. apac He. catalina. startup. hostConfig. deployWAR (HostConfig. java: 831) at org. apache. catalina. startup. hostConfig. deployWARs (HostConfig. java: 720) at org. apache. catalina. startup. hostConfig. deployApps (HostConfig. java: 490) at org. apache. catalina. startup. hostConfig. start (HostConfig. java: 1149) at org. apache. catalina. startup. hostConfig. lifecycleEvent (HostConfig. java: 311) at org. apache. catalina. util. lifecycleSuppo Rt. fireLifecycleEvent (LifecycleSupport. java: 120) at org. apache. catalina. core. containerBase. start (ContainerBase. java: 1022) at org. apache. catalina. core. standardHost. start (StandardHost. java: 736) at org. apache. catalina. core. containerBase. start (ContainerBase. java: 1014) at org. apache. catalina. core. standardEngine. start (StandardEngine. java: 443) at org. apache. catalina. core. standardService. start (StandardSer Vice. java: 448) at org. apache. catalina. core. standardServer. start (StandardServer. java: 700) at org. apache. catalina. startup. catalina. start (Catalina. java: 552) at sun. reflect. nativeMethodAccessorImpl. invoke0 (Native Method) at sun. reflect. nativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 39) at sun. reflect. delegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 25) at java. lang. Reflect. method. invoke (Method. java: 585) at org. apache. catalina. startup. bootstrap. start (Bootstrap. java: 295) at org. apache. catalina. startup. bootstrap. main (Bootstrap. java: 433) Caused by: org. apache. commons. logging. logConfigurationException: No suitable Log constructor [Ljava. lang. class; @ 8b058b for org. apache. commons. logging. impl. log4JLogger (Caused by java. lang. noClassDefFoundError: org/apache/log4j/Ca Tegory) at org. apache. commons. logging. impl. logFactoryImpl. getLogConstructor (LogFactoryImpl. java: 413) at org. apache. commons. logging. impl. logFactoryImpl. newInstance (LogFactoryImpl. java: 529 )... 26 moreCaused by: java. lang. noClassDefFoundError: org/apache/log4j/Category at java. lang. class. getDeclaredConstructors0 (Native Method) at java. lang. class. privateGetDeclaredConstructors (Class. java: 2357) at jav A. lang. class. getConstructor0 (Class. java: 2671) at java. lang. class. getConstructor (Class. java: 1629) at org. apache. commons. logging. impl. logFactoryImpl. getLogConstructor (LogFactoryImpl. java: 410 )... 27 more then check the information of the commons-logging-api-1.1.1.jar file under/usr/share/java, ls-l out if the size is 38015, replace with a size of 47724 Or a larger file. I searched the internet, and only.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.