1. If you runProgramError:"Exception in thread "Main" Java. Lang. noclassdeffounderror: ORG/slf4j/loggerfactory", This is because the project lacks both the slf4j-api.jar and slf4j-log4j12.jar jar packages.
2. If an error occurs in the running program:"Java. Lang. noclassdeffounderror: ORG/Apache/log4j/logmanager", This is because the project lacks the jar package log4j. jar.
3. Error:"Exception in thread "Main" Java. Lang. nosuchmethoderror: org. slf4j. MDC. getcopyofcontextmap () ljava/util/Map", This is caused by a jar package version conflict.
Slf4j-log4j12.jar version info:
Manifest-version: 1.0
Archiver-version: plexus archiver
Created-by: Apache Maven
Built-by: ceki
Build-JDK: 1.5.0 _ 06
Bundle-Description: The slf4j log4j-12 binding
Bundle-version: 1.3.1
Implementation-version: 1.4.2
Implementation-title: slf4j-log4j12
Bundle-manifestversion: 2
Bundle-symbolicname: slf4j. log4j12
Bundle-Name: slf4j-log4j12
Bundle-vendor: slf4j. org
Export-package: org. slf4j. impl; version = 1.3.1
Import-package: org. slf4j; version = "[1.3, 1.4)", org. slf4j. SPI; version ="
[1.3, 1.4) ", org. slf4j. helpers; version =" [1.3, 1.4) ", org. Apache. log4j
Slf4j-api.jar version info:
Manifest-version: 1.0
Archiver-version: plexus archiver
Created-by: Apache Maven
Built-by: ceki
Build-JDK: 1.5.0 _ 06
Bundle-Description: The slf4j API
Bundle-version: 1.3.1
Implementation-version: 1.4.2
Implementation-title: slf4j-api
Bundle-manifestversion: 2
Bundle-symbolicname: slf4j. API
Bundle-Name: slf4j-api
Bundle-vendor: slf4j. org
Export-package: org. slf4j; version = 1.3.1, org. slf4j. SPI; version = 1.3.1,
Org. slf4j. helpers; version = 1.3.1
Import-package: org. slf4j. impl; version = "[1.3, 1.4 )"
Log4j. Jar version information:
Manifest-version: 1.0
Ant-version: Apache ant 1.6.5
Created-by: 1.3.1 _ 18-b01 (Sun Microsystems Inc .)
Name: ORG/Apache/log4j/
Implementation-title: log4j
Implementation-version: 1.2.14
Implementation-vendor: "Apache Software Foundation"
Later, log4j. jar was changed from 1.2.14 to 1.2.11.
Manifest-version: 1.0
Ant-version: Apache ant 1.6.4
Created-by: 1.4.2 _ 06-b03 (Sun Microsystems Inc .)
Name: ORG/Apache/log4j/
Implementation-title: log4j
Implementation-version: 1.2.11
Implementation-vendor: "Apache Software Foundation"
The"Exception in thread "Main" Java. Lang. nosuchmethoderror: org. slf4j. MDC. getcopyofcontextmap () ljava/util/Map"Error.
4. activemq error: wire format negociation Timeout: Peer did not send his wire format.
Official explanation: http://activemq.apache.org/javaxjmsjmsexception-wire-format-negociation-timeout-peer-did-not-send-his-wire-format.html
I encountered this error mainly because activemq conflicts with the slf4j version and I used the previous slf4j-1.4. Apache-activemq-5.5.1, slf4j-api-1.5.11.jar and slf4j-log4j12-1.5.11.jar under the log4j-1.2.14.jar \ lib directory. I think these jar files should match activemq, and these three jar files are used to solve the problem.