Giter Club home page Giter Club logo

Comments (10)

chengaopan avatar chengaopan commented on August 31, 2024

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< io.github.wechaty:wechaty-examples >-----------------
[INFO] Building wechaty-examples 1.0.0-SNAPSOHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from mvnrepository: http://www.mvnrepository.com/io/wechaty/wechaty/1.0.0-SNAPSOHOT/wechaty-1.0.0-SNAPSOHOT.pom
Downloading from github: https://maven.pkg.github.com/diaozxin007/java-wechaty/io/wechaty/wechaty/1.0.0-SNAPSOHOT/wechaty-1.0.0-SNAPSOHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.070 s
[INFO] Finished at: 2020-05-22T09:32:43+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project wechaty-examples: Could not resolve dependencies for project io.github.wechaty:wechaty-examples:jar:1.0.0-SNAPSOHOT: Failed to collect dependencies at io.wechaty:wechaty:jar:1.0.0-SNAPSOHOT: Failed to read artifact descriptor for io.wechaty:wechaty:jar:1.0.0-SNAPSOHOT: Could not transfer artifact io.wechaty:wechaty:pom:1.0.0-SNAPSOHOT from/to mvnrepository (http://www.mvnrepository.com/): Transfer failed for http://www.mvnrepository.com/io/wechaty/wechaty/1.0.0-SNAPSOHOT/wechaty-1.0.0-SNAPSOHOT.pom 503 Service Temporarily Unavailable -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

from java-wechaty-getting-started.

huan avatar huan commented on August 31, 2024

I got the following error message after merged #4:

[INFO] --- maven-install-plugin:2.4:install (default-install) @ wechaty-examples ---
[INFO] Installing /home/huan/chatie/java-wechaty-getting-started/examples/target/wechaty-examples-1.0.0-SNAPSHOT.jar to /home/huan/.m2/repository/io/github/wechaty/wechaty-examples/1.0.0-SNAPSHOT/wechaty-examples-1.0.0-SNAPSHOT.jar
[INFO] Installing /home/huan/chatie/java-wechaty-getting-started/examples/pom.xml to /home/huan/.m2/repository/io/github/wechaty/wechaty-examples/1.0.0-SNAPSHOT/wechaty-examples-1.0.0-SNAPSHOT.pom
[INFO] Installing /home/huan/chatie/java-wechaty-getting-started/examples/target/wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar to /home/huan/.m2/repository/io/github/wechaty/wechaty-examples/1.0.0-SNAPSHOT/wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.122 s
[INFO] Finished at: 2020-05-22T12:08:12+08:00
[INFO] ------------------------------------------------------------------------
(base) ┌ huan@huan-home:~/chatie/java-wechaty-getting-started [12:08:12] tty:[0] jobs:[0]
└ {master} $ make bot
java -jar examples/target/wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/StackLocator$FqcnCallerLocator
	at org.apache.logging.log4j.util.StackLocator.<clinit>(StackLocator.java:37)
	at org.apache.logging.log4j.util.StackLocatorUtil.<clinit>(StackLocatorUtil.java:33)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:44)
	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
	at io.github.wechaty.eventEmitter.EventEmitter.<clinit>(EventEmitter.kt:119)
	at io.github.wechaty.DingDongBot.main(DingDongBot.java:21)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.util.StackLocator$FqcnCallerLocator
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 9 more
make: *** [Makefile:10: bot] Error 1

from java-wechaty-getting-started.

diaozxin007 avatar diaozxin007 commented on August 31, 2024

https://stackoverflow.com/questions/52700803/im-getting-noclassdeffounderror-org-apache-logging-log4j-util-reflectionutil

May be you should make sure the log4j2 version in your ~/.m2 folder higher then 2.9

from java-wechaty-getting-started.

huan avatar huan commented on August 31, 2024

Thanks! I'll check it and try to make it work later.

BTW: My environment should be very clean and fresh, because I have never run any Java build before.

from java-wechaty-getting-started.

diaozxin007 avatar diaozxin007 commented on August 31, 2024

plz provide mvn and jvm version

mvn -version
java -version

from java-wechaty-getting-started.

huan avatar huan commented on August 31, 2024

I tried the latest master branch code today, it still the same error message:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/StackLocator$FqcnCallerLocator

My mvn and jvm version:

$ mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 14.0.1, vendor: Private Build, runtime: /usr/lib/jvm/java-14-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-29-generic", arch: "amd64", family: "unix"

$ java -version
openjdk version "14.0.1" 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7-Ubuntu-1ubuntu1)
OpenJDK 64-Bit Server VM (build 14.0.1+7-Ubuntu-1ubuntu1, mixed mode, sharing)

from java-wechaty-getting-started.

diaozxin007 avatar diaozxin007 commented on August 31, 2024

may be the reason is jdk version 14,plz try jdk 8.

from java-wechaty-getting-started.

huan avatar huan commented on August 31, 2024

MacBook Pro:

$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 13.0.2, vendor: N/A, runtime: /usr/local/Cellar/openjdk/13.0.2+8_2/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.4", arch: "x86_64", family: "mac"

$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 13.0.2, vendor: N/A, runtime: /usr/local/Cellar/openjdk/13.0.2+8_2/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.4", arch: "x86_64", family: "mac"[email protected]:~/chatie/java-wechaty-getting-started [18:25:54] tty:[ttys003] jobs:[0]
└ (master) $ java -version
openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
$ make bot
java -jar examples/target/wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/StackLocator$FqcnCallerLocator
	at org.apache.logging.log4j.util.StackLocator.<clinit>(StackLocator.java:37)
	at org.apache.logging.log4j.util.StackLocatorUtil.<clinit>(StackLocatorUtil.java:33)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:44)
	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
	at io.github.wechaty.eventEmitter.EventEmitter.<clinit>(EventEmitter.kt:119)
	at io.github.wechaty.DingDongBot.main(DingDongBot.java:25)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.util.StackLocator$FqcnCallerLocator
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 9 more
make: *** [bot] Error 1

from java-wechaty-getting-started.

diaozxin007 avatar diaozxin007 commented on August 31, 2024

plz

 mvn dependency:tree

from java-wechaty-getting-started.

huan avatar huan commented on August 31, 2024

Fixed! Thank you @diaozxin007 so much for the fixing!

from java-wechaty-getting-started.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.