started getting Class Not Found Exception randomly
hey guys. when i start my spring boot app i get this error:
java.lang.ClassNotFoundException: lt.mycompany.myapp.service.XmlParserUtil
.
The thing is that XmlParserUtil
was used just fine in this app. Now im adding new functionality, and for some reason i cant even start my app. XmlParserUtil
looks like this:
can smb help me out? thanks in advance13 Replies
⌛
This post has been reserved for your question.
Hey @bambyzas! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Can you show the pom.xml and the complete stack trace?
i use gradle 😦
Can you show the build.gradle and the complete stack trace?
as well as how you are running it
Pastebin
plugins { id 'org.springframework.boot' version '2.2.6.RELEASE' ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
this is my build.gradle
im just running it in my ide
any ideas?
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
thanks. im doing it right now. i was also thinking would doing smth with gradle help? idk, maybe refreshing gradle project or smth?
nope, still the same 😦
Given the context of the error and the line at
org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
, it is likely that the Spring Boot DevTools is causing the issue.
Try disabling Spring Boot DevTools. In your build.gradle comment out the devtools dependency: implementation 'org.springframework.boot:spring-boot-devtools'
If you want to use DevTools then just exclude this package: spring.devtools.restart.exclude=lt/mycompany/paymentimport/service/**
.
Sometimes, cleaning and rebuilding the project can resolve issues related to outdated or corrupt class files.
gradle clean build
Alternatively it could theoretically be some verifier issue (some dependency class being missing and verification not completing because of that). You could try to check this by adding
-Xverify:none
to the JVM args but only do that for testing and remove it afterwards💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.