Springboot application runs from uberjar but not from eclipse - spring

I have a springboot application that I can build using maven and then
java -jar target/jarfile.jar
and it runs.
I would like to keep it running in eclipse and update my thymeleaf templates rather than build and restart with every edit of a template
However, when I try to run from eclipse I get
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/common/home/xxx/.m2/repository/org/slf4j/slf4j-log4j12/1.7.30/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/common/home/xxx/.m2/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.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 [org.slf4j.impl.Log4jLoggerFactory]
2020-06-21 09:40:40 INFO Version:30 - HV000001: Hibernate Validator 5.3.5.Final
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.1.RELEASE)
2020-06-21 09:40:41 INFO Application:55 - Starting Application on austin
2020-06-21 09:40:41 INFO Application:651 - No active profile set, falling back to default profiles: default
2020-06-21 09:40:41 INFO ChangeableUrls:225 - The Class-Path manifest attribute in /common/home/xxx/.m2/repository/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar referenced one or more files that do not exist: file:/common/home/xxx/.m2/repository/ant/ant-optional/1.5.1/xml-apis.jar,file:/common/home/xxx/.m2/repository/ant/ant-optional/1.5.1/xercesImpl.jar,file:/common/home/xxx/.m2/repository/ant/ant-optional/1.5.1/optional.jar,file:/common/home/xxx/.m2/repository/ant/ant-optional/1.5.1/xalan.jar
2020-06-21 09:40:41 INFO DevToolsPropertyDefaultsPostProcessor:225 - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-06-21 09:40:41 INFO DevToolsPropertyDefaultsPostProcessor:225 - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-06-21 09:40:42 ERROR SpringApplication:837 - Application run failed
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.websocket.WebSocketAutoConfiguration$TomcatWebSocketConfiguration.websocketContainerCustomizer
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:184)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:280)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at com.pacificdataservices.diamond.apsweb.Application.main(Application.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.IllegalStateException: Attribute 'value' in annotation org.springframework.boot.autoconfigure.condition.ConditionalOnJava should be compatible with org.springframework.boot.system.JavaVersion but a org.springframework.boot.autoconfigure.condition.ConditionalOnJava$JavaVersion value was returned
at org.springframework.core.annotation.TypeMappedAnnotation.adaptForAttribute(TypeMappedAnnotation.java:500)
at org.springframework.core.annotation.TypeMappedAnnotation.adapt(TypeMappedAnnotation.java:426)
at org.springframework.core.annotation.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:369)
at org.springframework.core.annotation.TypeMappedAnnotation.asMap(TypeMappedAnnotation.java:284)
at org.springframework.core.annotation.AbstractMergedAnnotation.asAnnotationAttributes(AbstractMergedAnnotation.java:193)
at org.springframework.core.type.AnnotatedTypeMetadata.getAnnotationAttributes(AnnotatedTypeMetadata.java:106)
at org.springframework.core.type.AnnotatedTypeMetadata.getAnnotationAttributes(AnnotatedTypeMetadata.java:81)
at org.springframework.boot.autoconfigure.condition.OnJavaCondition.getMatchOutcome(OnJavaCondition.java:43)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
... 23 more

Related

Deploying gradle spring boot app profile don't work in heroku

The application stands up on the default profile, but should be on herok. What's wrong with my setup?
Procfile:
web: java -Dspring.profiles.active=heroku -jar build/libs/todo-api-all.jar
aplication-heroku.properties:
spring.jpa.generate-ddl=true
spring.jpa.show-sql=true
# App Properties
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:postgresql://localhost:5432/test
spring.datasource.username=xxxx
spring.datasource.password=xxxx
logs:
2022-03-17T22:16:37.062638+00:00 heroku[web.1]: Starting process with command `java -Dspring.profiles.active=heroku -jar build/libs/todo-api-all.jar`
2022-03-17T22:16:37.769060+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2022-03-17T22:16:37.772288+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -XX:+UseContainerSupport -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UT
F-8
2022-03-17T22:16:38.078366+00:00 app[web.1]:
2022-03-17T22:16:38.078397+00:00 app[web.1]: . ____ _ __ _ _
2022-03-17T22:16:38.078410+00:00 app[web.1]: /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2022-03-17T22:16:38.078428+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2022-03-17T22:16:38.078446+00:00 app[web.1]: \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2022-03-17T22:16:38.078463+00:00 app[web.1]: ' |____| .__|_| |_|_| |_\__, | / / / /
2022-03-17T22:16:38.078481+00:00 app[web.1]: =========|_|==============|___/=/_/_/_/
2022-03-17T22:16:38.080265+00:00 app[web.1]: :: Spring Boot ::
2022-03-17T22:16:38.080285+00:00 app[web.1]:
2022-03-17T22:16:38.151045+00:00 app[web.1]: 22:16:38.149 [main] INFO be.ordina.jworks.todoapi.TodoApplication - Starting TodoApplication using Java 17.0.2 o
n b96d702f-a867-4f6c-a1e7-a1c9c48b6f27 with PID 4 (/app/build/libs/todo-api-all.jar started by u47513 in /app)
2022-03-17T22:16:38.151382+00:00 app[web.1]: 22:16:38.151 [main] DEBUG be.ordina.jworks.todoapi.TodoApplication - Running with Spring Boot, Spring
2022-03-17T22:16:38.152810+00:00 app[web.1]: 22:16:38.152 [main] INFO be.ordina.jworks.todoapi.TodoApplication - No active profile set, falling back to 1 def
ault profile: "default"
2022-03-17T22:16:38.153431+00:00 app[web.1]: 22:16:38.153 [main] DEBUG org.springframework.boot.SpringApplication - Loading source class be.ordina.jworks.tod
oapi.TodoApplication

Native Spring function bundled as a docker image not working on AWS lambda

I'm trying to run an AWS Lambda using Docker image build by paketobuildpacks/builder using spring-native + spring-cloud-function-aws, but it's not handling incoming values, justs starts and returns an error, did I missed something?
Log output:
START RequestId: f7a451f1-f43b-4ba0-be3d-58526bfa0d10 Version: $LATEST
2021-06-30 00:20:58.229 INFO 8 --- [ main] o.s.nativex.NativeListener : This application is bootstrapped with code generated with Spring AOT
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.5.1)
2021-06-30 00:20:58.251 INFO 8 --- [ main] o.s.boot.SpringApplication : Starting application using Java 11.0.11 on 169.254.41.117 with PID 8 (started by sbx_user1051 in /workspace)
2021-06-30 00:20:58.251 INFO 8 --- [ main] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
2021-06-30 00:20:58.551 INFO 8 --- [ main] o.s.boot.SpringApplication : Started application in 0.42 seconds (JVM running for 0.421)
END RequestId: f7a451f1-f43b-4ba0-be3d-58526bfa0d10
REPORT RequestId: f7a451f1-f43b-4ba0-be3d-58526bfa0d10 Duration: 840.41 ms Billed Duration: 841 ms Memory Size: 128 MB Max Memory Used: 29 MB
RequestId: f7a451f1-f43b-4ba0-be3d-58526bfa0d10 Error: Runtime exited without providing a reason
Runtime.ExitError
Find my configs below:
Gradle Plugins:
kotlin("jvm")
kotlin("plugin.spring")
id("io.spring.dependency-management")
id("org.springframework.boot")
id("org.springframework.experimental.aot")
id("org.graalvm.buildtools.native")
Dependencies:
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.springframework.cloud:spring-cloud-function-adapter-aws")
implementation("com.amazonaws:aws-lambda-java-events:2.0.2")
implementation("com.amazonaws:aws-lambda-java-core:1.1.0")
GraalVM plugin config:
tasks.withType<BootBuildImage> {
builder = "paketobuildpacks/builder:tiny"
environment = mapOf("BP_NATIVE_IMAGE" to "true")
}
App sources:
#SpringBootApplication
class LinkGeneratorApplication: ApplicationContextInitializer<GenericApplicationContext> {
override fun initialize(applicationContext: GenericApplicationContext) {
applicationContext.registerBean(
"function",
FunctionRegistration::class.java,
{
FunctionRegistration(Function<Input, Result> { Result("Here") })
.type(
FunctionType
.from(Input::class.java)
.to(Result::class.java)
.type
)
}
)
}
}
data class Input(val sellerId: String, val ownerId: String, val market: String)
data class Result(val message: String)
fun main(args: Array<String>) {
runApplication<LinkGeneratorApplication>(*args)
}

Spring message appears several times during the test run

I am currently using spring-boot with the org.testcontainers library to pass test in docker . But I noticed that the following message appears several times :
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.20.RELEASE)
It appears up to 4 times , 2 of them with the following message :
11:33:23.733 [main] INFO org.springframework.web.context.support.GenericWebApplicationContext - Refreshing org.springframework.web.context.support.GenericWebApplicationContext#13ffeba4: startup date [Wed Jun 16 11:33:23 CEST 2021]; root of context hierarchy
Some messages that have caught my attention, first time that appears (the only one I think necessary)
11:31:48.515 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 0 (http)
11:31:49.019 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5416 ms
2 : It does not appear Why?
3:
11:35:06.738 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 0 (http)
11:35:06.764 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1569 ms
4:
11:36:19.343 [main] INFO org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 0 (http)
11:36:19.362 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 454 ms
The message always pops up after a specific test, for example the third time during this test.
#Category(OneTest.class)
public class PasswordEncryptionTest
{
#Test
public void passwordEncryptionTest()
{
PasswordEncryption passwordEncryption = new PasswordEncryption();
try
{
String password = "passwordExample";
String encrypted = passwordEncryption.encryptPassword(password.toCharArray());
String decrypted = passwordEncryption.decryptPassword(encrypted.toCharArray());
assertEquals(password, decrypted);
}
catch (PasswordDecryptionException e)
{
e.printStackTrace();
fail(e.getMessage());
}
}
}
Is this normal ? Because it is the message that appears when you start the application and that it appears 4 times, that is what I noticed.
Can it be affecting the performance of the tests?
Pd: They are messages, after passing the tests many times, in different environments, they are not the result of chance. I have seen no relationship in the times between the different appearances. (It does not follow a time pattern)
spring-boot 1.5.20
junit47
org.testcontainers 1.13.0
Docker windows 2.2.0.3

Changing embedded Tomcat server port to 80 in Springboot web in gradle environment is Error, when 80 port hasn't use.Why?

These days,I have working a springboot web program ,then I want to change server port to 80 ,but it always error. I have found some measure,but generally method has not work ,I hope some people can help me solve it.Thank you very much !
I use embeded Tomcat server ,Error Info is below:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.5.RELEASE)
2020-03-25 19:31:58.325 INFO 3890 --- [ main] top.uniondong.home.HomeApplication : Starting HomeApplication on dong-manjaro with PID 3890 (/home/dong/Program/Uniondong_Home/build/classes/java/main started by dong in /home/dong/Program/Uniondong_Home)
2020-03-25 19:31:58.330 INFO 3890 --- [ main] top.uniondong.home.HomeApplication : No active profile set, falling back to default profiles: default
2020-03-25 19:32:00.031 INFO 3890 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 80 (http)
2020-03-25 19:32:00.044 INFO 3890 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-03-25 19:32:00.045 INFO 3890 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.31]
2020-03-25 19:32:00.160 INFO 3890 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-03-25 19:32:00.160 INFO 3890 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1686 ms
2020-03-25 19:32:00.470 INFO 3890 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-03-25 19:32:00.531 INFO 3890 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index
2020-03-25 19:32:00.690 INFO 3890 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-03-25 19:32:00.697 INFO 3890 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-03-25 19:32:00.709 ERROR 3890 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:215) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at top.uniondong.home.HomeApplication.main(HomeApplication.java:12) [main/:na]
Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:231) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:278) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:197) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
... 10 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1038) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
... 12 common frames omitted
Caused by: java.net.SocketException: ζƒι™δΈε€Ÿ
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_242]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_242]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_242]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220) ~[na:1.8.0_242]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85) ~[na:1.8.0_242]
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:229) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:212) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1141) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1227) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:592) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1035) ~[tomcat-embed-core-9.0.31.jar:9.0.31]
... 14 common frames omitted
2020-03-25 19:32:00.712 INFO 3890 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
Process finished with exit code 1

When I use Spring Boot to start a remote service interface I get a "missing EmbeddedServletContainerFactory bean" exception

Following is my entire stacktrace in intellijIDEA:
"C:\Program Files\Java\jdk1.6.0_29\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:57558,suspend=y,server=n -javaagent:C:\Users\clearity\.IntelliJIdea13\system\groovyHotSwap\gragent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.6.0_29\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_29\jre\lib\ext\sunjce_provider.jar;D:\Work_space\External Card Related\project_related\icpay_v3_merchant\out\production\icpay_v3_merchant;C:\Users\clearity\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy-all\2.1.6\165b8246372a829c1915611646f6d964010656cf\groovy-all-2.1.6.jar;D:\Work_space\Spring-boot\annotations-api.jar;D:\Work_space\Spring-boot\catalina.jar;D:\Work_space\Spring-boot\commons-codec-1.6.jar;D:\Work_space\Spring-boot\commons-logging-1.1.3.jar;D:\Work_space\Spring-boot\ecj-4.3.1.jar;D:\Work_space\Spring-boot\el-api.jar;D:\Work_space\Spring-boot\fluent-hc-4.3.4.jar;D:\Work_space\Spring-boot\httpclient-4.3.4.jar;D:\Work_space\Spring-boot\httpclient-cache-4.3.4.jar;D:\Work_space\Spring-boot\httpcore-4.3.2.jar;D:\Work_space\Spring-boot\httpmime-4.3.4.jar;D:\Work_space\Spring-boot\jasper-el.jar;D:\Work_space\Spring-boot\jasper.jar;D:\Work_space\Spring-boot\jsp-api.jar;D:\Work_space\Spring-boot\juli-6.0.41.jar;D:\Work_space\Spring-boot\servletapi-3.0.jar;D:\Work_space\Spring-boot\spring-aop-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\spring-beans-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\spring-boot-1.1.1.RELEASE-tests.jar;D:\Work_space\Spring-boot\spring-boot-1.1.1.RELEASE.jar;D:\Work_space\Spring-boot\spring-boot-actuator-1.1.1.RELEASE.jar;D:\Work_space\Spring-boot\spring-boot-autoconfigure-1.1.1.RELEASE.jar;D:\Work_space\Spring-boot\spring-boot-gradle-plugin-1.1.1.RELEASE.jar;D:\Work_space\Spring-boot\spring-context-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\spring-context-support-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\spring-core-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\spring-expression-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\spring-web-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\spring-webmvc-4.0.5.RELEASE.jar;D:\Work_space\Spring-boot\tomcat-coyote.jar;D:\Work_space\Spring-boot\tomcat-dbcp.jar;D:\Work_space\Spring-boot\tomcat-util-7.0.16.jar;D:\Docs\httpcomponents-client-4.3.4-bin\httpcomponents-client-4.3.4\lib\commons-codec-1.6.jar;D:\Docs\httpcomponents-client-4.3.4-bin\httpcomponents-client-4.3.4\lib\commons-logging-1.1.3.jar;D:\Docs\httpcomponents-client-4.3.4-bin\httpcomponents-client-4.3.4\lib\fluent-hc-4.3.4.jar;D:\Docs\httpcomponents-client-4.3.4-bin\httpcomponents-client-4.3.4\lib\httpclient-4.3.4.jar;D:\Docs\httpcomponents-client-4.3.4-bin\httpcomponents-client-4.3.4\lib\httpclient-cache-4.3.4.jar;D:\Docs\httpcomponents-client-4.3.4-bin\httpcomponents-client-4.3.4\lib\httpcore-4.3.2.jar;D:\Docs\httpcomponents-client-4.3.4-bin\httpcomponents-client-4.3.4\lib\httpmime-4.3.4.jar;C:\Download\UsefulJars\fastjson-1.1.39.jar;C:\Download\jpos-1.9.0.jar;D:\Docs\slf4j-1.7.7\slf4j-1.7.7\slf4j-log4j12-1.7.7.jar;D:\Docs\slf4j-1.7.7\slf4j-1.7.7\slf4j-nop-1.7.7.jar;D:\Docs\slf4j-1.7.7\slf4j-1.7.7\slf4j-api-1.7.7.jar;C:\Download\UsefulJars\druid-1.0.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\lib\idea_rt.jar" MerchantApplication
Connected to the target VM, address: '127.0.0.1:57558', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.1.1.RELEASE)
Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:135)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:944)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:933)
at org.springframework.boot.SpringApplication$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at MerchantApplication.main(MerchantApplication.groovy:17)
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:185)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:158)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132)
... 11 more
Disconnected from the target VM, address: '127.0.0.1:57558', transport: 'socket'
Process finished with exit code 1
help me
you can add
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>

Resources