Questions tagged [spring-boot-maven-plugin]

1

votes
1

answer
1.5k

Views

org.springframework.boot:spring-boot-maven-plugin:1.5.10.RELEASE:repackage failed: Unable t o find main class

I have the following project structure : parent pom | - Core module - pom - Dist - pom - Integration test - pom Spring boot main class is in the core module. Integration tests will go into the integration tests folder. I am trying to use spring-boot-maven-plugin for integration testing. I have don...
humbleCoder
1

votes
1

answer
171

Views

Can't get JSON data from SpringBoot app

This is the code snippest in my service.ts(this.http is a HttpClient obj) importAllImages (): Observable { return this.http.get('http://localhost:8080/fileservice/allimages'); } And this is the code snippest that calls the service shown above(filemanager is an obj of the service above and images is...
zhangzhan
1

votes
1

answer
399

Views

Passing parameter to Controller by using ajax

Used Spring boot, MySQL, JPA and RESTFUL CRUD API. What I'm trying to do is passing the parameter to Controller so that the parameter goes into the table. But null values go into the table and I can't figure out which part is the problem. Only I can sure about is that the Controller doesn't receive...
Alice Cho
1

votes
1

answer
167

Views

Spring Boot Maven Plugin missing stack trace

I recently updated a code base from Spring Boot 1.2.7 to v2.0.0. For the most part, this was successful but I noticed an undesired change in functionality wherein stack traces are missing when failures occur during startup. I am uncertain whether I missed something, this is intended, or if a bug w...
Eric Simon
1

votes
2

answer
1.4k

Views

The type org.springframework.data.repository.Repository cannot be resolved. It is indirectly referenced from required .class files

I am new for spring Boot, I got this problem when I follow the Spring Guide-Accessing data with MySQL I got an Error in my STS IDE, I don't know what's the hell happening. In the src/main/java/UserRepository.java package hello; import org.springframework.data.repository.CrudRepository; import hello....
oneslide
1

votes
0

answer
89

Views

Eclipse: Exception (nullpointer) while running spring boot maven project via boot dashboard

I am getting the following exception when I am trying to run spring boot maven project from boot dashboard !ENTRY Activator 4 0 2018-09-24 16:46:55.345 !MESSAGE NullPointerException: null !STACK 0 java.lang.NullPointerException at org.eclipse.m2e.jdt.internal.MavenClassifierManager.getClassifierClas...
DHRUV BANSAL
1

votes
0

answer
291

Views

Repackage failed creating uber jar with spring-boot-maven-plugin

I want to run create an uber jar to create a docker image of that. I am using spring-boot-maven-plugin to create the uber jar. My pom file looks like this : org.springframework.boot spring-boot-maven-plugin MainClassName JAR JARName repackage org.apache.maven.plugins maven-jar-plugin Command to ru...
Komal Bhola
1

votes
1

answer
55

Views

Setup Spring-Boot Maven Project

I am trying to configure Spring-Boot project from Spring Initilizr . Dependencies --> kafka,web When i imported this project i got error in pom.xml at line org.springframework.boot spring-boot-starter-parent 2.0.6.RELEASE as Project build error: Non-resolvable parent POM for com.mobicule.kafkae...
Ajinkya Karode
1

votes
1

answer
32

Views

spring boot unix service is not picking up mode option

I am having an spring boot app with 2.0.2.RELEASE and trying to run as unix service. The jar is inside bin folder. The bin folder also has a .conf file with the same name as jar. But when I run the jar with the command ./app-name.jar , it is run as foreground process and not as background process....
shiva
1

votes
2

answer
115

Views

Springboot -Include JPA dependency and run “mvn clean install” fails with HikariPool-1 - Exception during pool initialization

Springboot Version 2.0.6.RELEASE +JPA Why it is trying to create Datasource bean. Properties for Hibernate and Oracle spring.datasource.driverClassName=oracle.jdbc.driver.OracleDriver spring.datasource.url=jdbc:oracle:thin:@//earth-db-11:5121/stardev spring.datasource.username=ops$abcdefg spring.dat...
tharani dharan
1

votes
0

answer
225

Views

Spring Boot with spring-boot-maven plug-in - unable to RESTART the application server after running integration tests

I have a Spring Boot application and that application has integration tests. Here is the relevant snippet from my pom.xml for running the integration tests. org.springframework.boot spring-boot-maven-plugin com.xyz.Application true true 7654 pre-integration-test start true 7654 post-integration-tes...
Muthu Palanisamy
1

votes
0

answer
8

Views

How to format exception output in springboot with ResponseBodyAdvice<Object> and Interceptor?

I format my springboot application output to json even when exception happens. format is as follows: { 'result': null, 'code': '-1', 'msg': 'Exception happen' } It's ok when the code only with a ResponseBodyAdvice, main code is : @ResponseStatus(HttpStatus.OK) @ExceptionHandler(Exception.class) @Res...
Kiwi Qi
0

votes
0

answer
4

Views

SpringBoot & Kotlin jar ClassNotFoundException

I have an springboot application with kotlin when I try to run jar file it throws 'main' ClassNotFoundException I also add start class in properties xxx.yyy.ServiceApplication And also in plugins org.springframework.boot spring-boot-maven-plugin xxx.yyy.ServiceApplication What am I doing wrong?
nikinci
1

votes
1

answer
161

Views

Spring Boot profiles not active when set with maven plugin

I'm trying to set spring profiles when starting Tomcat for integration tests in maven like this: ... org.springframework.boot spring-boot-maven-plugin pre-integration-test start testProfile ... The profile is definitely not active. On the other hand the following does work and the requested profile...
Simon
1

votes
1

answer
145

Views

spring-boot:run doesn't load profiles [duplicate]

This question already has an answer here: Are spring-boot command line properties available when using spring-boot:run? 2 answers Spring Boot Maven plugin lacks of examples with profiles While repackage goal loads profiles properly: mvn spring-boot:repackage -Dspring.profiles.active=stage run goal...
David Canós
1

votes
1

answer
1.6k

Views

SpringBoot: Adding 3rd Party jars in a Spring Boot Project

I have set MAVEN paths and variables. I am able to run a sample SpringBoot project in Eclipse but what I want is I have a custom jar and I am using classes from that jar in my Spring Boot Project. When I include this custom jar and build the SpringBoot application, I get the following errors [ERROR]...
iQuestProgrammer
1

votes
1

answer
541

Views

Unpack WAR Is Not Unpacking

I am trying to achieve the same objective to the question posted here, namely to assemble a war dependency into a deployable zip, with both the war and some of its unpacked *.yml files in the final zip. I have the war file correctly assembled into the zip, but I can't get the maven-dependency-plugin...
chaserb
1

votes
1

answer
2.2k

Views

.ClassNotFoundException Spring Boot 2.0.0

I'm new to spring and I'm trying to initialize a spring project using spring-boot 2.0.0 from https://start.spring.io/ with web as the dependencies. it generates this pom.xml file 4.0.0 com.kkesley springtest 0.0.1-SNAPSHOT jar springtest Demo project for Spring Boot org.springframework.boot spring-b...
kkesley
1

votes
1

answer
1.5k

Views

Getting NullPointerException when tried to read @Autowired configuration object [duplicate]

This question already has an answer here: Why is my Spring @Autowired field null? 13 answers I am trying to read some properties from application.properties. I have created a configuration class with @Component and @ConfigurationProperties annotations. When I am trying to access the configuration...
TweetMan
1

votes
1

answer
0

Views

Maven multi module project packaging error

I am trying to develop multimodule project with maven. But when I want to package my project it gives errors. It says package does not exist in web class. I already tried the solution on ask & answer part. But did not work. Can you review my repo and tell me what I did wrong, please? [INFO] 8 error...
Ali Kaan Bacı
1

votes
2

answer
0

Views

How to fix Spring boot controller getting null data from AJAX DELETE request?

I have tried using @QueryParam, @PathVariable and @RequestParam but my controller is not getting data request from AJAX call. I have the same approach with my other methods. Only the DELETE request is not working and I am getting null value. I have referred to this Ajax delete method in spring boot...
Renzchler
1

votes
1

answer
1.6k

Views

How to enable undertow log in appication.properties in Spring boot

How to enable http server logs in an embedded tomcat server provided by spring boot in undertow? I've tried this in application.properties but it doesn't create file, neither logs to console I am looking for something similar like this Spring Boot enable http requests logging Any help would be appr...
user3352615
0

votes
1

answer
44

Views

ClientHttpRequestInterceptor not called in springboot

I am trying to add logging to my application using ClientHttpRequestInterceptor.My interceptor is not being called. Not sure what is going wrong here - Here is my code - @Component @Slf4j public final class RestTemplateInterceptor implements ClientHttpRequestInterceptor { protected static final Logg...
user327126
1

votes
1

answer
2.1k

Views

application-test.properties isn't loaded when activating profiles with <profiles>

I'm trying to use new feature from Spring Boot 1.3.0.RELEASE -- activate profile via configuration of spring-boot-maven-plugin: org.springframework.boot spring-boot-maven-plugin test start-application start stop-application stop But in this case my integration test starts to fail, because of Illegal...
Slava Semushin
1

votes
1

answer
2.4k

Views

Spring Boot requiresUnpack is not upacking at runtime

I'm building an executable jar via the spring-boot maven plugin. I need to unpack one of the dependent jar so that xml files can be properly read at runtime. I followed the documentation regarding unpacking libs. My plugin config is as follows: org.springframework.boot spring-boot-maven-plugin re...
Andrew Hall
1

votes
1

answer
1.2k

Views

How to Solve Authentication issue when pushing Docker Image using Maven to Private repository

I am trying to push my docker image which is build using maven in my local to my public/private repository in Docker Cloud/Docker Hub.But I am getting Index response didn't contain any endpoints when it's try to Push.Below is sample config of my pom.xml. I am not sure which configuration I am missin...
springbootlearner
1

votes
1

answer
1.2k

Views

Maven dependency on original Spring Boot JAR [duplicate]

This question already has an answer here: How to add a dependency to a Spring Boot Jar in another project? 5 answers I'm using Spring Boot with the spring boot maven plugin which creates a JAR with The JAR created by the plugin puts the classes in subdirectory in the JAR which means that I can't us...
Jimmy T.
1

votes
1

answer
780

Views

using spring-boot-maven-plugin with exec classifier, but can't run the app from IDE anymore

I am working on Spring Boot 1.5.9 application, and I am generating a jar that contains a Spring Boot application, but that can also be imported as part of another project. Therefore, I am using below config to generate 2 jars : the exec, and the regular lib ones. org.springframework.boot spring-bo...
Vincent F
1

votes
0

answer
20

Views

docker image build issue in eclipse

I am trying to build docker image of spring boot microservice project using spotify but getting below error: [ERROR] ADD failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder873622989/target/Micro-Eureka-Server-0.0.1-SNAPSHOT.jar: no such file or directory I am not able to get why it is appending...
Nishant Varshney
1

votes
1

answer
369

Views

mvn spring-boot:run from command lime but choose which class to run

I need to run mvn spring-boot:run from command lime but choose which main class to run. Is there a way? I need to run this in command line but not from JAR.
Prostitutor
1

votes
3

answer
69

Views

How to start two springboot projects at the same time

My project includes a view service and an interface service. The project directory looks like this: Myproject/ springboot1/ springboot2/ Both springboot1 and springboot2 can be run separately.The way I start them now is to open both terminals and execute the following commands: springboot1 cd Myproj...
1

votes
2

answer
34

Views

Sending parameters to a maven plugin

In my pom file I execute a build plugin with this configuration. Can I access customProp from inside the plugin code? ... useTags=true custom-value
JNF
0

votes
1

answer
12

Views

spring-boot-maven-plugin not pulling in dependent classes into jar

Im having a problem with the spring-boot-maven-plugin whereby it is not including the dependent classes in the resulting jar file. In the docs, it states that dependencies with scope provided will be included in the jar file, but I cant get it to include them. I have a project with 2 sub-modules: mo...
Brady
1

votes
1

answer
1.1k

Views

Use of spring-boot-maven-plugin

While creating a spring boot project I define property in pom.xml as war with which I can create a war and thereafter deploy the war into server maybe tomcat or WAS. But I came across a plugin named spring-boot-maven-plugin whose documentation states that it's use is to package executable jar or war...
Always a newComer
1

votes
1

answer
9.4k

Views

Not able to Run Spring Boot 1.3.0M5

I tried changing Spring Boot version from 1.2.2 release to 1.3.0M5. while running spring boot run I get following exception. I tried updating the snapshots while building and running but to no avail. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M...
Shailesh Vaishampayan
1

votes
1

answer
19

Views

Why does the spring boot maven plugin require a main class to package war?

The Spring Boot guides give code that creates runnable jars, but we can use it build war files too as explained here. Basically, it requires us to specify the packaging as war, remove the embedded tomcat server dependency, and extend the SpringBootServletInitializer class like this: @SpringBootAppli...
Daud
2

votes
1

answer
2.8k

Views

To remove extra dependencies inherited from spring-boot-starter-parent

org.springframework.boot spring-boot-starter-parent 1.2.6.RELEASE When spring-boot-starter-parent is used as parent, then it includes many unnecessary dependencies. Like in my case it fetches the dependencies for (spring-mobile-device , spring-social-facebook , spring-social-linkedin , org.apache....
Ram Narayan
4

votes
2

answer
492

Views

Spring Boot maven plugin cant find main class, Could not exec java

I have a multi module maven spring-booot maven project. One of the child modules is a stub(a spring boot app) that I want to start and then stop during integration tests of myRealApp. Parent Pom | |----myRealApp module(spring boot app) |----stub-of-some-remote-rest-api module(This is also a sprin...
Spring
5

votes
3

answer
6.7k

Views

Springboot not loading application.dev.properties file

In my project I want to use environment specific property file. For example if I am running it into development it should use application.dev.properties, for production it should use application.prod.properties and so on. I have below two files in my resources folder. application.properties (For pr...
Sam
2

votes
1

answer
3.1k

Views

Deploy Spring Boot 1.3.2 IBM WAS 8.5

I'm facing a problem deploying a simple spring boot web on IBM Websphere 8.5.5.8 using full profile WAS is by default using servlet 3.0 and java 1.7. The application does not do much, just display a page with a 'Hi - [current-date]'. When deploying the war file, we see the following in server log ou...
Youssef Al Muhaidib

View additional questions