Skip to content
Advertisement

Tag: maven

JUnit 5 does not execute method annotated with BeforeEach

JUnit 5 does not invoke my method in a test class that is annotated with the @BeforeEach annotation, where I initialize some fields of the test object that are needed in the tests. When trying to access these fields inside a test method (method annotated with @Test) I obviously get a NullpointerException. So I added some output messages to the

Getting Error: …. nested exception is java.lang.NoSuchMethodError: org.apache.catalina.Context.addServletMapping(Ljava/lang/Stri

I am trying to run an Spring-Boot App, but it is giving me following error while running the application as a Java Application My POM file is as below And my Java file is Please help, thanks in advance…… Answer I guess that you are using tomcat 9 instead of tomcat 8. In tomcat 8 the method org.apache.catalina.Context.addServletMapping was marked

package org.springframework.boot does not exist

I am trying to run a Small basic Spring boot program on my machine and I when I run clean compile (even before trying spring-boot:run) on maven I get the following Error : Here is my Pom.xml : And here is my java Class : I tried many solutions I could find on internet, such as deleting the .m2 repository,

cannot find Chrome binary error on Jenkins using maven and WebDriverManager

I’m trying to run my test (Selenium+junit+cucumber+Maven) on Jenkins. In my definition class I’m not pointing to Chrome binary but rather use WebDriverManager: @Given(“^I navigate to page$”) It works fine on my machine (Win), but when I’m trying to execute this on Jenkins (Ubuntu box), I get error: org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.4.0-1047-aws

getting a java.lang.ClassNotFoundException when starting a Docker container

I am having a problem starting a .jar file within a Docker Container. The error message I am getting is: Exception in thread “main” java.lang.ClassNotFoundException: ccinfw.MainApplication I have added information below. Why am I getting this error and how can I fix it? TIA Manifest File ran jar -xvf BackEndRestFunctionality-0.0.1-SNAPSHOT.jar > expanded. Below is a portion of the output. MainApplication.class

Gradle is failing on malformed pom.xml in Central Maven

I have this gradle script snippet: Now when running a build, Gradle consistently fails on downloading transitive dependencies and gives me this message: When I had a look at the content of the pom.xml file from the repository, I noticed that, although the pom.xml is in the right place, it indicates a version different than what is expected. In this

Spring Boot – NoClassDefFoundError: ch/qos/logback/classic/Level

I created a vanilla Spring Boot App (1.5.9.RELEASE) but when I Run As -> Spring Boot App (in Eclipse Oxygen) I get pom.xml App Remark I also tried mvn clean package -> java -jar target/boot-demo.jar which gives me Answer Extending Mark Bramnik answer, It does look like you don’t have logback, which is pretty weird because spring-boot-starter-web have a dependency

Could not transfer artifacts from/to central maven repo when using Spring Framework Cloud

I am trying to create a maven project using Spring Framework Cloud. I defined pom.xml file as below When trying to build maven getting error for all dependencies as Could not transfer artifacts from/to central (https://repo.maven.apache.org/maven2) Multiple annotations found at this line: – Failure to transfer org.springframework:spring-orm:jar:4.2.6.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted

Advertisement