Posts

Showing posts with the label maven

Spring Boot Application failed to start with classpath: []

Spring Boot Application failed to start with classpath: I generated a Spring Boot application with jHipster, added some code from my previous project (non-jhipster project) and tried to run it using IDEA. First I got an error message similar to this, saying "Command line is too long.." (I am running Windows 10 x64). I clicked enable, but then I got an error like this.: "C:Program FilesJavajdk1.8.0_144binjava" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51351,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=51350 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath C:UsersUserAppDataLocalTempclasspath.jar com.test.pc.TestPartsComposerApp Connected to the target VM, address: '127.0.0.1:51351', transport...

java.lang.IllegalStateException: Location is not set

java.lang.IllegalStateException: Location is not set I am getting the following error. I have attached my code. Caused by: java.lang.IllegalStateException: Location is not set. at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459) at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435) at com.John.Smith.Cars.Main.start(Main.java:31) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:919) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(PlatformImpl.java:449) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.win.WinApplication....

JUnit Easymock - spurious results invoking unit test method as a) method b) within class c) as mvn build

JUnit Easymock - spurious results invoking unit test method as a) method b) within class c) as mvn build I have a unit test and contained within this unit test is my problem method: @Test(expected = CheckoutException.class) public void performCheckout_CheckoutException() throws Exception { // setup test data Order order = new OrderImpl(); OMSOrder omsOrder = new OMSOrderImpl(); Order omsOrderProxy = OMSOrderProxy.proxify(order, omsOrder, Logger.getRootLogger()); omsOrderProxy.setId(1L); FulfillmentOrder fulfillmentOrder = new FulfillmentOrderImpl(); FulfillmentGroup fulfillmentGroup = new FulfillmentGroupImpl(); fulfillmentGroup.setType(FulfillmentType.DIGITAL); fulfillmentOrder.setFulfillmentGroup(fulfillmentGroup); ((OMSOrder)omsOrderProxy).getAllFulfillmentOrders().add(fulfillmentOrder); ProcessContext<CheckoutSeed> context = new DefaultProcessContextImpl<>(); // create the expected flow expect(orderService.save(anyObje...

Spring MockMvc WebApplicationContext is null when running JUnit Tests with Maven

Spring MockMvc WebApplicationContext is null when running JUnit Tests with Maven I have a Spring mock-mvc JUnit test class that contains two tests. When I run the tests within Eclipse IDE both tests pass (I use Eclipse Maven plugin). When running the tests from the command line using mvn test one of the tests fails because the WebApplicationContext that is @Autowired is sometimes null. Here is my test class @WebAppConfiguration @ActiveProfiles({ "dev", "test" }) public class AddLinkEndpointMvcTest extends BaseMvc { @Autowired private WebApplicationContext wac; private MockMvc mockMvc; @Before public void before() { System.out.println("WAC = " + wac); mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); } @Test public void addLinkDoesNotSupportGet() throws Exception { mockMvc.perform(get("/myurl")).andExpect(status().is(HttpStatus.SC_METHOD_NOT_ALLOWED)); } @Test public v...

Serenity tutorial for testing

Serenity tutorial for testing http://serenity-bdd.info/docs/articles/screenplay-tutorial.html http://serenity-bdd.info/docs/articles/screenplay-tutorial.html Im doing the above tutorial and im in 4.2.1. Implementing a simple business task class Now Im stuck in: The only thing we do need to do is to add some Serenity instrumentation to the instance using the net.serenitybdd.screenplay.Tasks.instrumented() method, so that the task and underlying actions will appear in the Serenity reports: package task; import net.serenitybdd.screenplay.Actor; import net.serenitybdd.screenplay.Task; public class StartWith implements Task { @Override public <T extends Actor> void performAs(T actor) { } public static StartWith anEmptyTodoList() { return instrumented(StartWith.class); } } This is my code and Im getting error in instrumented instrumented How to fix that error? Im using netbeans. When I do right click > fix imports. Still not fix Update Update Added import...

Error injecting: org.jboss.as.plugin.deployment.Deploy

Error injecting: org.jboss.as.plugin.deployment.Deploy I am getting the following error while building my maven project. [INFO] --- jboss-as-maven-plugin:7.9.Final:deploy (default-cli) @ project-parent --- [WARNING] Error injecting: org.jboss.as.plugin.deployment.Deploy java.lang.NoClassDefFoundError: org/jboss/as/controller/client/ModelControllerClient at java.lang.Class.getDeclaredConstructors0 (Native Method) at java.lang.Class.privateGetDeclaredConstructors (Class.java:2595) at java.lang.Class.getDeclaredConstructors (Class.java:1914) at com.google.inject.spi.InjectionPoint.forConstructorOf (InjectionPoint.java:245) at com.google.inject.internal.ConstructorBindingImpl.create (ConstructorBindingImpl.java:99) at com.google.inject.internal.InjectorImpl.createUninitializedBinding (InjectorImpl.java:658) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding (InjectorImpl.java:882) at com.google.inject.internal.InjectorImpl.createJustInTimeBin...

Maven Class path error multiple SLF4J bindings

Maven Class path error multiple SLF4J bindings I have been getting this error while trying to do a MAVEN INSTALL. I tried exclusions, but not sure the where to include in pom file. Let me how and what exclusion tags should i include in my pom file. I am also attaching my pom file snippet where to include the exclusions`SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/147188/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/147188/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.10.0/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] POM file: <!-- Start of required part to make log4j work --> <dependency> ...