We want to run some remote tests in Docker. Our idea was to create a SpringBootApplication that will run the tests and report the results and we will have this Application deployed in it's own Docker with it's own JAR.
To make sure that it does not ship with the main code (src/main/java) we want to have this code in src/test/java..
From the documentation this does not appear possible from the Spring-boot-maven-plugin.
So now I am trying to create a test-jar but when I run the Application class I get
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::
2019-01-24 10:38:56.736 INFO 5082 --- [ main] c.h.i.smoketest.SmokeTestApplication : Starting SmokeTestApplication on 1usmfkelly.ad.here.com with PID 5082 (/usr/local/aaa/identity-client/target/identity-client-0.1.0-SNAPSHOT-tests.jar started by fkelly in /usr/local/aaa/identity-client/target)
2019-01-24 10:38:56.738 INFO 5082 --- [ main] c.h.i.smoketest.SmokeTestApplication : No active profile set, falling back to default profiles: default
2019-01-24 10:38:56.777 INFO 5082 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3aeaafa6: startup date [Thu Jan 24 10:38:56 EST 2019]; root of context hierarchy
2019-01-24 10:38:56.852 WARN 5082 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.here.identity.smoketest.SmokeTestApplication]; nested exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.
2019-01-24 10:38:56.860 ERROR 5082 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.here.identity.smoketest.SmokeTestApplication]; nested exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.
at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:558) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:187) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:92) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at com.here.identity.smoketest.SmokeTestApplication.main(SmokeTestApplication.java:12) [identity-client-0.1.0-SNAPSHOT-tests.jar:na]
Caused by: java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.
at org.springframework.util.Assert.notEmpty(Assert.java:277) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getCandidateConfigurations(AutoConfigurationImportSelector.java:153) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.selectImports(AutoConfigurationImportSelector.java:95) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:549) ~[identity-client-0.1.0-SNAPSHOT-jar-with-dependencies.jar:na]
... 14 common frames omitted
Is there any documentation on how to package a SpringBoot Application without the maven plugin?
It turns out all I needed to do as add a file to my source repo
src/main/resources/META-INF/spring.factories
You can grab a copy from here
All thanks to the answer from another post related the question
Related
I try to install klov-0.2.5.jar locally, my settings are as below:
Mongodb 3.2 running and listening on port 27017
klov application.properties file reside in the same folder as klov-0.2.5.jar
Have tried different ports for Klov (80, 90, 2571,1100), but all giving the same error as in description
Have tried it on mongoDB 5.0 with same result
Running it on windows 10, with application.properties settings as below:
# klov
application.name=Klov
server.host=localhost
server.port=1100
# data.mongodb
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=klov
# data.rest
spring.data.rest.basePath=/rest
spring.data.rest.default-page-size=6
# redis, session
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.session.SessionAutoConfiguration
spring.data.redis.repositories.enabled=false
spring.data.elasticsearch.repositories.enabled=false
spring.data.jpa.repositories.enabled=false
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.enabled=false
# use.redis.session.store=false
# spring.redis.host=localhost
# spring.redis.port=6379
# spring.redis.ssl=false
# spring.redis.database=0
# spring.session.store-type=redis
# server.session.timeout=-1
# users
server.admin.name=klovadmin
server.admin.key=$2a$10$I/5TFi6BrHChUghTZEZfCO82txzu8L5brcK0CxhS3m.V6glfj2vZe
# storage
file.storage.location=./upload/reports/
# schedulers
scheduler.jobs.enabled=false
# automatically delete older builds
# default is -1 (keep all)
# this count must be greater than 0 for this scheduler to work
# scheduled to run daily at 12:00AM
scheduler.job.builds.retain.count=-1
# mail
#spring.mail.host=
#spring.mail.port=
#spring.mail.username=
#spring.mail.password=
#spring.mail.properties.mail.smtp.ssl.enable=true
#spring.mail.properties.mail.smtp.starttls.enable=true
#spring.mail.properties.mail.smtp.starttls.required=true
#spring.mail.properties.mail.smtp.auth=true
#spring.mail.properties.mail.smtp.connectiontimeout=5000
#spring.mail.properties.mail.smtp.timeout=5000
#spring.mail.properties.mail.smtp.writetimeout=5000
spring.mail.test-connection=false
Once i try to execute jar file in my powershell i get:
poerwshell outcome
PS D:\klov\0.2.5> java -jar .\klov-0.2.5.jar
. ____ _ __ _ _ /\ / ' __ _ () __ __
_ \ \ \ \ ( ( )__ | '_ | '| | ' / ` | \ \ \ \ \/ __)| |)| | | | | || (| | ) ) ) ) ' || .__|| ||| |_, | / / / /
=========||==============|/=//// :: Spring Boot :: (v2.0.4.RELEASE)
2022-07-13 14:34:42.138 INFO 2796 --- [ main]
com.aventstack.klov.Application : Starting Application v0.2.5
on fedoruk with PID 2796 (D:\klov\0.2.5\klov-0.2.5.jar started by
mfedoruk in D:\klov\0.2.5) 2022-07-13 14:34:42.141 INFO 2796 --- [
main] com.aventstack.klov.Application : No active profile
set, falling back to default profiles: default 2022-07-13 14:34:42.215
INFO 2796 --- [ main]
ConfigServletWebServerApplicationContext : Refreshing
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#7a3d45bd:
startup date [Wed Jul 13 14:34:42 CEST 2022]; root of context
hierarchy 2022-07-13 14:34:42.984 INFO 2796 --- [ main]
.s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data
modules found, entering strict repository configuration mode!
2022-07-13 14:34:43.356 ERROR 2796 --- [ main]
o.s.boot.SpringApplication : Application run failed
java.lang.IllegalStateException: Cannot load configuration class:
com.aventstack.klov.Application
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:414)
~[spring-context-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:254)
~[spring-context-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:282)
~[spring-context-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:126)
~[spring-context-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
~[spring-context-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
~[spring-context-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
~[spring-boot-2.0.4.RELEASE.jar!/:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
~[spring-boot-2.0.4.RELEASE.jar!/:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)
~[spring-boot-2.0.4.RELEASE.jar!/:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
~[spring-boot-2.0.4.RELEASE.jar!/:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258)
~[spring-boot-2.0.4.RELEASE.jar!/:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)
~[spring-boot-2.0.4.RELEASE.jar!/:2.0.4.RELEASE]
at com.aventstack.klov.Application.main(Application.java:61) ~[classes!/:0.2.5]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
~[klov-0.2.5.jar:0.2.5]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
~[klov-0.2.5.jar:0.2.5]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
~[klov-0.2.5.jar:0.2.5]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
~[klov-0.2.5.jar:0.2.5] Caused by:
java.lang.ExceptionInInitializerError: null
at org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122)
~[spring-context-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
I dealt with it by:
running the newest ver of klov in docker container
then I copied the klov.jar file from container to my local path
same properties, mongoDB 5.0.9
typed java -jar -klov.jar
all started with no issues
I have one spring-boot test application in which I provide the following configuration in application.yml file. when I start my server using mvn test, it doesn't initiate the database connection, what can be the issue here? Am I missing any dependency in pom.xml?
spring.datasource.driverClassName = com.ibm.db2.jcc.DB2Driver
spring.datasource.url=jdbc:db2://<fullURL>
spring.datasource.username = <uname>
spring.datasource.password = <password>
Following are my dependencies related to spring-boot
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.1.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
Here are my boot logs in which I don't see the database connection logs
[INFO] Running com.test.installments.customers.data.processor.test.RunTest
11:11:30.823 [main] INFO o.s.b.t.c.SpringBootTestContextBootstrapper - Neither #ContextConfiguration nor #ContextHierarchy found for test class [com.test.in
stallments.customers.data.processor.test.RunTest], using SpringBootContextLoader
11:11:30.829 [main] INFO o.s.t.c.s.AbstractContextLoader - Could not detect default resource locations for test class [com.test.installments.customers.data.
processor.test.RunTest]: no resource found for suffixes {-context.xml, Context.groovy}.
11:11:30.976 [main] INFO o.s.b.t.c.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]:
[org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springfr
amework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecut
ionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.we
b.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframe
work.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.te
st.context.event.ApplicationEventsTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.tes
t.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.co
ntext.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener]
11:11:30.992 [main] INFO o.s.b.t.c.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBefor
eModesTestExecutionListener#162be91c, org.springframework.test.context.event.ApplicationEventsTestExecutionListener#2488b073, org.springframework.boot.test.mock.mo
ckito.MockitoTestExecutionListener#1c9f0a20, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener#55787112, org.springfra
mework.test.context.support.DirtiesContextTestExecutionListener#1cd201a8, org.springframework.test.context.transaction.TransactionalTestExecutionListener#7db82169,
org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener#1992eaf4, org.springframework.test.context.event.EventPublishingTestExecutionListener#f74e83
5, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener#3276732, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionLi
stener#3f28bd56, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener#31e3250d, org.springframework.boot.test.aut
oconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener#19fe4644, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListe
ner#21d8bcbe, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener#5be067de]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.5.3)
11:11:31.362 [main] INFO c.m.i.c.data.processor.test.RunTest - Starting RunTest using Java 11.0.8 on test with PID 17676 (started by test in C:\git\c
ustomers-data-processor-tests)
11:11:31.362 [main] INFO c.m.i.c.data.processor.test.RunTest - The following profiles are active: dev
11:11:31.446 [main] INFO c.m.i.c.data.processor.test.RunTest - Started RunTest in 0.422 seconds (JVM running for 1.403)
-----------Databse driver name---------- com.ibm.db2.jcc.DB2Driver
11:11:32.161 [main] DEBUG com.intuit.karate.Suite - [config] classpath:karate-config.js
11:11:32.858 [main] INFO com.intuit.karate - karate.env system property was: null
11:11:32.932 [main] INFO com.intuit.karate - [print] Total number of rows
---------------------------------------------------------
feature: classpath:com/test/installments/customers/data/processor/test/fileuload/uploadfile.feature
Couple of things I note:
You are mentioning application.yml but the format of the file is properties
You need to add the Driver in your dependencies for Spring Boot to pick up as well.
If you are running test, and have an applicatio.yml in src/test/resources, it will override the one in src/main/resources
I'm new to Java/Spring and whenever I compile and run a package or class in Spring Tool Suite, I will see the output, but STS will also included a bunch of other information that I'm really not concerned about. How can I make it so that STS only shows me the output and relevant errors and not all the extraneous info like the stuff below:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.5.RELEASE)
2018-10-01 20:43:06.780 INFO 74504 --- [ main] JDBCTest.CodeWarsAppApplication : Starting CodeWarsAppApplication on Johns-MacBook-Pro-3.local with PID 74504 (/Users/johnwolfe/Documents/workspace-sts-3.9.5.RELEASE/demo/CodeWarsApp/bin/main started by johnwolfe in /Users/johnwolfe/Documents/workspace-sts-3.9.5.RELEASE/demo/CodeWarsApp)
2018-10-01 20:43:06.785 INFO 74504 --- [ main] JDBCTest.CodeWarsAppApplication : No active profile set, falling back to default profiles: default
2018-10-01 20:43:06.840 INFO 74504 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#413d1baf: startup date [Mon Oct 01 20:43:06 CDT 2018]; root of context hierarchy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/Users/johnwolfe/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.0.9.RELEASE/9f9a828936d81afd49a603bda9cc1aed863a0d85/spring-core-5.0.9.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018-10-01 20:43:07.409 INFO 74504 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-10-01 20:43:07.425 INFO 74504 --- [ main] JDBCTest.CodeWarsAppApplication : Started CodeWarsAppApplication in 0.99 seconds (JVM running for 1.436)
2018-10-01 20:43:07.429 INFO 74504 --- [ Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#413d1baf: startup date [Mon Oct 01 20:43:06 CDT 2018]; root of context hierarchy
2018-10-01 20:43:07.431 INFO 74504 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter
Apparently you need to change the default logger threshold. This can be done in your application.properties or else directly to your logger config file if you are using any third party logging libraries.
The allowed levels are : ERROR, WARN, INFO, DEBUG, or TRACE.
For Spring Boot the defaults are :
ROOT :
logging.level.root=ERROR
Spring WEB :
logging.level.org.springframework.web: ERROR
In case you are using Hibernate :
logging.level.org.hibernate: ERROR
More info at Spring's Boot Logging Page
I've implemented a Sping Boot Maven project using one class with #RestController. I configured this application to use port 9000 as the normal Vaadin application uses port 8082. What I want to achieve is, to start the REST-Application project through a class of the Vaadin application project. The main class for the Spring application is called RestServiceApplication containing the annotation #SpringBootApplication. No I just call
SpringApplication sa = new SpringApplication(SenAalRestServiceApplication.class);
sa.run(args);
to run the RESTful webservice.
Now my problem is, that I can't call any method in the REST service. The log output of Spring startup just says:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.1.RELEASE)
2016-01-15 14:10:30.907 INFO 7900 --- [nio-8082-exec-1] o.s.boot.SpringApplication : Starting application on Kampfkeks with PID 7900 (C:\Users\Marcel\Desktop\ENTWICKLUNG_JAVA\java\workspaces\RaspAAL\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SenAAL\WEB-INF\lib\spring-boot-1.3.1.RELEASE.jar started by Marcel in C:\Users\Marcel\Desktop\ENTWICKLUNG_JAVA\java\eclipse)
2016-01-15 14:10:30.913 INFO 7900 --- [nio-8082-exec-1] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
2016-01-15 14:10:31.020 INFO 7900 --- [nio-8082-exec-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#1c9710d: startup date [Fri Jan 15 14:10:31 CET 2016]; root of context hierarchy
2016-01-15 14:10:34.320 INFO 7900 --- [nio-8082-exec-1] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-01-15 14:10:34.340 INFO 7900 --- [nio-8082-exec-1] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2016-01-15 14:10:34.540 INFO 7900 --- [nio-8082-exec-1] o.s.boot.SpringApplication : Started application in 4.126 seconds (JVM running for 18.913)
EDIT:
Okay, I explain this in more detail:
I've got two applications:
1. Vaadin application NOT Spring powered, just running in a NORMAL Tomcat container (server).
2. Spring Boot Application containing a main class and a RestController.
In projec 1. I've got a class which just calls the above mentioned
SpringApplication sa = new SpringApplication(SenAalRestServiceApplication.class);
sa.run(args);
After launching the Vaadin app and calling this code fragment, the Spring Boot application will startup, but it will never show any REST service available. I think there is too little log output at the moment for a Spring Boot application. I played around with the log level, but it is still the same.
Now what I've done is, removed the dependency to project 2. ind project 1. and copied all sources of project 2. into project 1. and tried to run the Spring Boot application directly in project 1. My problem here is, that the embedded Tomcat server/container couldn't be started. I get the following error. What's the problem here??? I am starting the Spring Boot application within the Vaadin application with the same mentioned code fragment.
2016-01-16 11:59:29.025 WARN 1060 --- [nio-8080-exec-1] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "org/apache/catalina/Service"
2016-01-16 11:59:29.039 ERROR 1060 --- [nio-8080-exec-1] o.s.boot.SpringApplication : Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "org/apache/catalina/Service"
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) ~[EmbeddedWebApplicationContext.class:1.3.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[AbstractApplicationContext.class:4.2.4.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[EmbeddedWebApplicationContext.class:1.3.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:764) ~[SpringApplication.class:1.3.1.RELEASE]
at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:357) ~[SpringApplication.class:1.3.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:305) ~[SpringApplication.class:1.3.1.RELEASE]
at de.hska.iwi.senaal.service.rest.SenAALRestCallback.<init>(SenAALRestCallback.java:24) [SenAALRestCallback.class:na]
at de.hska.iwi.senaal.service.SenAALService.<init>(SenAALService.java:117) [SenAALService.class:na]
at de.hska.iwi.senaal.factory.SenAALFactoryImpl.getSenAALService(SenAALFactoryImpl.java:56) [SenAALFactoryImpl.class:na]
at de.hska.iwi.senaal.servlet.MainServlet.servletInitialized(MainServlet.java:43) [MainServlet.class:na]
at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:216) [VaadinServlet.class:7.6.0.alpha2]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241) [catalina.jar:8.0.14]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154) [catalina.jar:8.0.14]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827) [catalina.jar:8.0.14]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135) [catalina.jar:8.0.14]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.14]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) [catalina.jar:8.0.14]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.14]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.14]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) [catalina.jar:8.0.14]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.14]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) [catalina.jar:8.0.14]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081) [tomcat-coyote.jar:8.0.14]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) [tomcat-coyote.jar:8.0.14]
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) [tomcat-coyote.jar:8.0.14]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) [tomcat-coyote.jar:8.0.14]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) [tomcat-coyote.jar:8.0.14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_31]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.14]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_31]
My projects relies on Spring Boot to build standalone executable jar files. It works great for internal testing. However, once we are ready to deployment it to our development environment, applications need to be in a war file so it can be deployed to our Resin server.
So I followed the guide (http://spring.io/guides/gs/convert-jar-to-war/) and did the conversion. Then I deployed the war application to a local Resin server and a long series of exceptions occurred.
Long story short, I ended up creating a simple hello world REST service using Spring Boot that builds as war and deployed it to Resin. The test application is at (https://github.com/ChrisZhong/spring-boot-war-sample). Similar problems occurred with the test application. But, the same test war deployed to Tomcat 7 without any problems and worked as intended. The following log is from Resin.
[14-03-12 17:06:25.414] {resin-34} WebApp[production/webapp/default/spring-boot-war-sample-1.1.1,STARTING] Spring WebApplicationInitializers detected on classpath: [hello.WebXml#62da57c9]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.0.0.RC4)
2014-03-12 17:06:26.765 INFO 4024 --- [ resin-34] o.s.boot.SpringApplication : Starting application on CHRIS-DESKTOP with PID 4024 (C:\resin-4.0.38\webapps\spring-boot-war-sample-
1.1.1\WEB-INF\lib\spring-boot-1.0.0.RC4.jar started by czhong)
2014-03-12 17:06:26.919 INFO 4024 --- [ resin-34] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3
93d3e1d: startup date [Wed Mar 12 17:06:26 CDT 2014]; root of context hierarchy
2014-03-12 17:06:29.034 INFO 4024 --- [ resin-34] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[14-03-12 17:06:29.135] {resin-34} HV000001: Hibernate Validator 4.3.0.Final
2014-03-12 17:06:29.414 INFO 4024 --- [ resin-34] com.caucho.server.webapp.WebApp : WebApp[production/webapp/default/spring-boot-war-sample-1.1.1,STARTING] Initializing Spring embedded
WebApplicationContext
[14-03-12 17:06:29.415] {resin-34} WebApp[production/webapp/default/spring-boot-war-sample-1.1.1,STARTING] Initializing Spring embedded WebApplicationContext
2014-03-12 17:06:29.416 INFO 4024 --- [ resin-34] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2497 ms
2014-03-12 17:06:31.500 INFO 4024 --- [ resin-34] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
com.caucho.config.ConfigException: Custom bean class 'org.springframework.boot.context.web.ErrorPageFilter' is not public. Bean classes must be public, concrete, and have a zero-argument constructor.
at com.caucho.config.Config.checkCanInstantiate(Config.java:532)
at com.caucho.config.Config.validate(Config.java:561)
at com.caucho.server.dispatch.FilterConfigImpl.setFilterClass(FilterConfigImpl.java:105)
at com.caucho.server.webapp.WebApp.addFilter(WebApp.java:1457)
at com.caucho.server.webapp.WebApp.addFilter(WebApp.java:1439)
at org.springframework.boot.context.embedded.FilterRegistrationBean.onStartup(FilterRegistrationBean.java:233)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:214)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132)
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:619)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:130)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:89)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:51)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at com.caucho.server.webapp.WebApp.callInitializer(WebApp.java:3494)
at com.caucho.server.webapp.WebApp.callInitializers(WebApp.java:3462)
at com.caucho.server.webapp.WebApp.startImpl(WebApp.java:3687)
at com.caucho.server.webapp.WebApp.access$400(WebApp.java:207)
at com.caucho.server.webapp.WebApp$StartupTask.run(WebApp.java:5231)
at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
2014-03-12 17:06:31.518 INFO 4024 --- [ resin-34] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.
1.1/WEB-INF/classes/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/aopalliance-1.0.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/commo
ns-logging-1.1.3.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/jackson-annotations-2.3.0.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-I
NF/lib/jackson-core-2.3.1.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/jackson-databind-2.3.1.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1
/WEB-INF/lib/jcl-over-slf4j-1.7.6.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/jul-to-slf4j-1.7.6.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1
.1.1/WEB-INF/lib/log4j-over-slf4j-1.7.6.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/logback-classic-1.1.1.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war
-sample-1.1.1/WEB-INF/lib/logback-core-1.1.1.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/slf4j-api-1.7.6.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-
sample-1.1.1/WEB-INF/lib/snakeyaml-1.13.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-aop-4.0.2.RELEASE.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-
war-sample-1.1.1/WEB-INF/lib/spring-beans-4.0.2.RELEASE.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-boot-1.0.0.RC4.jar!/, jar:file:/C:/resin-4.0.38/webapps
/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-boot-autoconfigure-1.0.0.RC4.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-boot-starter-1.0.0.RC4.jar!/, jar
:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-boot-starter-logging-1.0.0.RC4.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-b
oot-starter-tomcat-1.0.0.RC4.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-boot-starter-web-1.0.0.RC4.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-wa
r-sample-1.1.1/WEB-INF/lib/spring-context-4.0.2.RELEASE.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-core-4.0.2.RELEASE.jar!/, jar:file:/C:/resin-4.0.38/web
apps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-expression-4.0.2.RELEASE.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-web-4.0.2.RELEASE.jar!/, jar:file
:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/spring-webmvc-4.0.2.RELEASE.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/tomcat-embed-core-7.0.5
2.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/tomcat-embed-el-7.0.52.jar!/, jar:file:/C:/resin-4.0.38/webapps/spring-boot-war-sample-1.1.1/WEB-INF/lib/tomcat-embe
d-logging-juli-7.0.52.jar!/]
2014-03-12 17:06:31.523 INFO 4024 --- [ resin-34] com.caucho.server.webapp.WebApp : WebApp[production/webapp/default/spring-boot-war-sample-1.1.1] fail
[14-03-12 17:06:31.523] {resin-34} WebApp[production/webapp/default/spring-boot-war-sample-1.1.1] fail
2014-03-12 17:06:31.535 WARN 4024 --- [ main] com.caucho.server.webapp.WebApp : java.lang.IllegalStateException: Registration is null. Was something already registered for name=[er
rorPageFilter]?
java.lang.IllegalStateException: Registration is null. Was something already registered for name=[errorPageFilter]?
at org.springframework.util.Assert.state(Assert.java:385)
at org.springframework.boot.context.embedded.RegistrationBean.configure(RegistrationBean.java:107)
at org.springframework.boot.context.embedded.FilterRegistrationBean.configure(FilterRegistrationBean.java:241)
at org.springframework.boot.context.embedded.FilterRegistrationBean.onStartup(FilterRegistrationBean.java:233)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:214)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132)
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:619)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:130)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:89)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:51)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at com.caucho.server.webapp.WebApp.callInitializer(WebApp.java:3494)
at com.caucho.server.webapp.WebApp.callInitializers(WebApp.java:3462)
at com.caucho.server.webapp.WebApp.startImpl(WebApp.java:3687)
at com.caucho.server.webapp.WebApp.access$400(WebApp.java:207)
at com.caucho.server.webapp.WebApp$StartupTask.run(WebApp.java:5231)
at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
[14-03-12 17:06:31.541] {main} java.lang.IllegalStateException: Registration is null. Was something already registered for name=[errorPageFilter]?
at org.springframework.util.Assert.state(Assert.java:385)
at org.springframework.boot.context.embedded.RegistrationBean.configure(RegistrationBean.java:107)
at org.springframework.boot.context.embedded.FilterRegistrationBean.configure(FilterRegistrationBean.java:241)
at org.springframework.boot.context.embedded.FilterRegistrationBean.onStartup(FilterRegistrationBean.java:233)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:214)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132)
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:619)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:130)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:89)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:51)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at com.caucho.server.webapp.WebApp.callInitializer(WebApp.java:3494)
at com.caucho.server.webapp.WebApp.callInitializers(WebApp.java:3462)
at com.caucho.server.webapp.WebApp.startImpl(WebApp.java:3687)
at com.caucho.server.webapp.WebApp.access$400(WebApp.java:207)
at com.caucho.server.webapp.WebApp$StartupTask.run(WebApp.java:5231)
at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
[14-03-12 17:06:31.543] {main} Host[production/host/default] active
[14-03-12 17:06:31.543] {main} ServletService[id=app-0,cluster=app] active
[14-03-12 17:06:31.543] {main}
[14-03-12 17:06:31.544] {main} http listening to *:8080
[14-03-12 17:06:32.294] {main} https listening to *:8443
[14-03-12 17:06:32.313] {main}
[14-03-12 17:06:32.327] {main} Resin[id=app-0] started in 17193ms
2014-03-12 17:08:31.542 INFO 4024 --- [ resin-29] com.caucho.server.webapp.WebApp : WebApp[production/webapp/default/spring-boot-war-sample-1.1.1] stopping
I am told by a colleague who has some experience with Resin that there is a problem with loading the jar files as indicated by the ! at the end of each jar file.
Please see bug reference: http://bugs.caucho.com/view.php?id=5701
You can add yourself as a 'watch' on this bug to be notified on progress.
For some reason Resin enforces that filters (programmatically?) added to the context must have a public modifier. The ErrorPageFilter in Spring Boot is package protected and as such fails that check (check the sources for both Resin and Spring Boot).
I can imagine this check for Filters that are added through the ServletContext.addFilter(String, Class) method. Not for the method ServletContext.addFilter(String, Filter). The latter is used by Spring Boot to register the filters.
I would consider this a bug in Resin.
Looks like this was fixed in Resin 4.0.42, on 2014-11-03.
I had a similar problem and was able to solve it by removing the following jars that are part of the resin distribution:
/webapp-jars/hibernate-validator-4.*.jar
/lib/validation-api-1.*.jar
There is also: /webapp-jars/jboss-logging-3.*.jar that may cause problems.
Those files are not used by resin itself, according to Caucho. So you can remove them and rely on the libraries on your WAR.