You need to follow a few steps to debug properly.
1) mvn clean dependency:tree
Take a look at the output to see exactly what you get and verify your dependencies are all there.
2) mvn clean compile
. Does this fail? If not does that mean you only get the error in Eclipse?
You mentioned in a comment “And I run both commands above but I am getting this error”. Did mvn clean compile
work? Or did you get an error for that as well? If it worked then it’s just an IDE problem and I’d look at the m2eclipse
plugin. Better still, use IntelliJ as the free version has better maven support than Eclipse đ
Some style things …
People often add too many dependencies in their pom file when they don’t need to. If you take a look at a couple of links in mavenrepository.com you can see that spring-oxm
and spring-jdbc
both depend on spring-core
so you don’t need to add that explicitly (for example). mvn clean dependency:tree
will show you what is coming in after all of that, but this is more tidying.
Related Posts:
- Eclipse/Maven error: “No compiler is provided in this environment”
- Why Maven project is tied to J2SE-1.5 by default?
- Cannot change version of project facet Dynamic Web Module to 3.0?
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- “Source folder is not a Java project” error in eclipse
- Maven dependency update on commandline
- How do I enable index downloads in Eclipse for Maven dependency search?
- How to uninstall Eclipse?
- Is there a way to convert all comments into javadoc comments? [Eclipse/Java]
- âError occurred during initialization of VM; Could not reserve enough space for object heapâ using -Xmx3G
- Failed to write core dump. minidumps are not enabled by default on client version of windows
- How to uninstall Eclipse?
- Editor does not contain a main type in Eclipse [duplicate]
- âError occurred during initialization of VM; Could not reserve enough space for object heapâ using -Xmx3G
- Editor does not contain a main type in Eclipse [duplicate]
- How is “mvn clean install” different from “mvn install”?
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1
- Lombok and Maven
- Server Tomcat v9.0 Server at localhost failed to start
- Cannot find “Package Explorer” view in Eclipse
- JVM Crash – “EXCEPTION_ACCESS_VIOLATION”
- what does Dead Code mean under Eclipse IDE Problems Section
- what does Dead Code mean under Eclipse IDE Problems Section
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Eclipse: Java was started but returned error code=13
- Unable to create requested service [org.hibernate .engine.jdbc.env.spi.JdbcEnvironment]-MySQL
- Server Tomcat v9.0 Server at localhost failed to start
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- unused import statement for used ones in IntelliJ IDEA
- How to change a package name in Eclipse?
- what is this ANT build?
- Maven: Failed to read artifact descriptor
- Eclipse “Error: Could not find or load main class”
- Error: Selection does not contain a main type
- Integrate Ant builder into Eclipse: Error “Variable references empty selection”
- What exactly is a Maven Snapshot and why do we need it?
- Spring Maven clean error – The requested profile “pom.xml” could not be activated because it does not exist
- “Could not find Java SE Runtime Environment.” after installing Java
- Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
- Eclipse does not start when I run the exe?
- The declared package does not match the expected package “”
- Eclipse Java error: This selection cannot be launched and there are no recent launches
- How can I avoid this Ant Build error?
- Access restriction: The type ‘Application’ is not API (restriction on required library rt.jar)
- Error: JAVA_HOME is not defined correctly executing maven
- Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory
- JAVA_HOME should point to a JDK not a JRE
- Eclipse error, “The selection cannot be launched, and there are no recent launches”
- Failed to load the JNI shared Library (JDK)
- channel 3: open failed: connect failed: Connection refused
- Java can’t find file when running through Eclipse
- Eclipse java debugging: source not found
- No appenders could be found for logger(log4j)?
- Syntax error on token(s), misplaced construct(s)
- “The public type <
> must be defined in its own file” error in Eclipse [duplicate] - Corrupt jar file
- Installing WindowBuilder on Eclipse Neon
- How to clear console in Java – Eclipse
- The import javafx cannot be resolved
- How are “mvn clean package” and “mvn clean install” different?
- Fatal error compiling: tools.jar not found:
- java.lang.VerifyError: Inconsistent stackmap frames at branch target 421
- Unreachable code in eclipse
- Java project in Eclipse: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
- How to import a jar in Eclipse
- Node cannot be resolved to a type
- Resource leak: ‘in’ is never closed
- Android Emulator: Unfortunately App has stopped
- Java console program
- implicit super constructor object() is undefined. must explicitly invoke another constructor
- Cannot be resolved to a variable error in Eclipse
- Using JavaFX in JRE 8, âAccess restrictionâ error
- Eclipse Problems View not showing Errors anymore
- ‘No JUnit tests found’ in Eclipse
- “Cannot be resolved to a type” when attempting to use Scanner
- Resolving File paths – ‘File not found’ error in Eclipse
- java eclipse red exclamation mark
- Eclipse is executing the wrong Java file
- Configure active profile in SpringBoot via Maven
- Eclipse: JVM terminated. Exit code=2
- Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven
- Unknown version of Tomcat was specified in Eclipse
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- How can i fix this equals on primitive type(int)
- A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations
- Error :- java runtime environment JRE or java development kit must be available in order to run eclipse
- The import org.junit cannot be resolved
- Wrong project is being run in Eclipse
- How fix Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
- The import javax.servlet can’t be resolvedÂ
- Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2)
- How to enable the Java keyword assert in Eclipse program-wise?
- Why “no projects found to import”?
- Error message ‘Cannot be resolved or is not a field’
- Eclipse message saying List cannot be resolved to a type