Git Product home page Git Product logo

Comments (5)

mopemope avatar mopemope commented on July 18, 2024

@liujoey Could you tell me the repository that it reproduces?

from meghanada-server.

liujoey avatar liujoey commented on July 18, 2024

Ok, here you are.
https://github.com/liujoey/meghanada_slf4j

This is a spring-boot gradle project, simply run ./gradlew bootRun to start the application.
To run test, just do ./gradlew test.

You can also import this project to IntelliJ IDEA, and run test with no problem.

Now in Meghanada, if I open the test file
src/test/java/com/jiuzhekan/survey/controller/SurveyControllerTest.java
Then run meghanada-run-junit-test-case command, it shows these error message:

11:25:29.007 [main] DEBUG meghanada.reflect.asm.CachedASMReflector - start createClassIndexes
Exception in thread "main" java.lang.ClassCastException: org.apache.logging.slf4j.SLF4JLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
	at meghanada.config.Config.<init>(Config.java:56)
	at meghanada.config.Config.load(Config.java:78)
	at meghanada.reflect.asm.ASMReflector.<init>(ASMReflector.java:65)
	at meghanada.reflect.asm.ASMReflector.getInstance(ASMReflector.java:70)
	at meghanada.reflect.asm.CachedASMReflector.lambda$updateClassIndexFromDirectory$7(CachedASMReflector.java:257)
	at meghanada.utils.FunctionUtils.lambda$wrapIOConsumer$2(FunctionUtils.java:34)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
	at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
	at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
	at meghanada.reflect.asm.CachedASMReflector.updateClassIndexFromDirectory(CachedASMReflector.java:253)
	at meghanada.reflect.asm.CachedASMReflector.createClassIndexes(CachedASMReflector.java:170)
	at meghanada.junit.TestRunner.<init>(TestRunner.java:43)
	at meghanada.junit.TestRunner.main(TestRunner.java:50)

from meghanada-server.

dhirajsurve avatar dhirajsurve commented on July 18, 2024

Removeing below jar's from class path worked for me

log4j-to-slf4j-2.0.2.jar
log4j-to-slf4j-2.0.2-sources.jar
log4j-slf4j-impl-2.0.2.jar
log4j-slf4j-impl-2.0.2-sources.jar

from meghanada-server.

paradigm-shifter avatar paradigm-shifter commented on July 18, 2024

Removeing below jar's from class path worked for me

log4j-to-slf4j-2.0.2.jar
log4j-to-slf4j-2.0.2-sources.jar
log4j-slf4j-impl-2.0.2.jar
log4j-slf4j-impl-2.0.2-sources.jar

where did you remove these from?

from meghanada-server.

dhirajsurve avatar dhirajsurve commented on July 18, 2024

you can remove them from your project properties from jar list .

from meghanada-server.

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.