I'm trying to run my code on local appengine simulator but I'm still getting error with info that class ServletInitializer is not a javax.servlet.Servlet
There is log from startup
Connected to server
2017-09-27 15:32:49.323:INFO:oejs.Server:main: jetty-9.3.18.v20170406
2017-09-27 15:32:53.756:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=3587ms
wrz 27, 2017 1:32:53 PM com.google.appengine.tools.development.ApiProxyLocalImpl log
INFO: javax.servlet.ServletContext log: 2 Spring WebApplicationInitializers detected on classpath
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.7.RELEASE)
...
...
...
...
2017-09-27 13:33:03.777 [main] [32mINFO[m -o.s.b.StartupInfoLogger- Started ServletInitializer in 9.329 seconds (JVM running for 15.913)
2017-09-27 13:33:04.045 [main] [34mDEBUG[m -o.s.w.f.GenericFilterBean- Initializing filter 'provideJwtAuthTokenFilter'
2017-09-27 13:33:04.045 [main] [34mDEBUG[m -o.s.w.f.GenericFilterBean- Filter 'provideJwtAuthTokenFilter' configured successfully
2017-09-27 13:33:04.047 [main] [31mERROR[m -c.g.a.t.d.ApiProxyLocalImpl- javax.servlet.ServletContext log: unavailable
javax.servlet.UnavailableException: Servlet class com.blenge.blenge.ServletInitializer is not a javax.servlet.Servlet
at org.eclipse.jetty.servlet.ServletHolder.checkServletType(ServletHolder.java:522)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:381)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:891)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.server.Server.start(Server.java:422)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart(Server.java:389)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:346)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:274)
at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:368)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:47)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:223)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:214)
I have created ServletInitializer class like in tutorial and example project
https://github.com/GoogleCloudPlatform/getting-started-java/blob/master/appengine-standard-java8/springboot-appengine-standard/src/main/java/com/example/appengine/demos/springboot/ServletInitializer.java
There is my build.gradle file
https://gist.github.com/Mistic92/576d333df9da7d7efb3e833fd502e430
Also gcloud sdk in version
C:\Users\Lukasz>gcloud version
Google Cloud SDK 172.0.1
alpha 2017.09.15
app-engine-java 1.9.56
app-engine-python 1.9.60
beta 2017.09.15
bq 2.0.26
cloud-datastore-emulator 1.2.1
core 2017.09.21
datalab 20170818
gcloud
gsutil 4.27
kubectl
pubsub-emulator 2017.09.15
Edit1:
web.xml file. Also there I get warning that ServletInitializer is not assignable to javax.servlet.Servlet. What should I do?
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
<servlet>
<servlet-name>blenge-backend</servlet-name>
<servlet-class>com.blenge.blenge.ServletInitializer</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>blenge-backend</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
If you have a web.xml it should points to the servlet 3.1 spec and not 2.5...
A lack of web.xml default to 3.1
"class com.blenge.blenge.ServletInitializer is not a javax.servlet.Servlet" seems to indicate an issue with your web.xml
The other possibility is that you have a classloader conflict.
Related
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
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
Using Apache Tomcat/8.5.24, running a Spring Boot application.
When we use the tomcat manager page and click "Reload" on our web-app, the app is not reloaded. catalina.out says that the context has been reloaded, but Spring does not fire and our endpoints don't respond. In order to get a real reload, we have to completely un-deploy the web app and re-deploy from scratch, which is less than ideal.
When I first deploy the app, I get the familiar
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.2.RELEASE)
Splash screen and all the associated controller bindings and bean creation logs. However, when I click "reload", I get this
23-Jan-2018 15:13:17.235 INFO [https-jsse-nio-8443-exec-10] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/myapp] has started
23-Jan-2018 15:13:17.237 INFO [https-jsse-nio-8443-exec-10] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext.doClose Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#283650df: startup date [Tue Jan 23 15:11:39 UTC 2018]; root of context hierarchy
23-Jan-2018 15:13:17.246 INFO [https-jsse-nio-8443-exec-10] org.springframework.context.support.DefaultLifecycleProcessor.stop Stopping beans in phase 2147483647
23-Jan-2018 15:13:17.247 INFO [https-jsse-nio-8443-exec-10] org.springframework.jmx.export.annotation.AnnotationMBeanExporter.destroy
Unregistering JMX-exposed beans on shutdown
System is shutting down
23-Jan-2018 15:13:17.428 INFO [https-jsse-nio-8443-exec-10] org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.shutdown Shutting down ExecutorService 'getAsyncExecutor'
23-Jan-2018 15:13:17.542 INFO [https-jsse-nio-8443-exec-10] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/myapp] is completed
And that's it.
We are using external jars, defined in a context.xml file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myapp" docBase="/myapp" reloadable="true">
<Resources>
<!-- Load the configuration files -->
<!-- Location of external log4j2 configuration file -->
<PreResources className="org.apache.catalina.webresources.DirResourceSet"
base="/mycompany/libs/config/"
webAppMount="/WEB-INF/classes" />
<!-- Location of the JARs -->
<JarResources className="org.apache.catalina.webresources.DirResourceSet"
base="/mycompany/libs/application_core/"
webAppMount="/WEB-INF/lib" />
<JarResources className="org.apache.catalina.webresources.DirResourceSet"
base="/mycompany/libs/application_supplemental/"
webAppMount="/WEB-INF/lib" />
<JarResources className="org.apache.catalina.webresources.DirResourceSet"
base="/mycompany/libs/third_party/"
webAppMount="/WEB-INF/lib" />
</Resources>
</Context>
Before we moved to this structure, this wasn't an issue so I assume it has something to do with this configuration but I'm not extremely familiar with all things tomcat and am not sure where to even look.
When I run a Spring Boot 1.3.5 application from console via java -jar target xxxx.jar, it runs perfectly. Instead, when I run it from my IntelliJ going to the Application class, right-click on class name and Debug as 'Application.main()', it starts and stops really fast. I can only get to see the following message.
Connected to the target VM, address: '127.0.0.1:35472', transport: 'socket'
SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.5.RELEASE)
nov 30, 2017 3:54:48 PM org.apache.catalina.core.StandardService startInternal
INFORMACIÓN: Starting service Tomcat
nov 30, 2017 3:54:48 PM org.apache.catalina.core.StandardEngine startInternal
INFORMACIÓN: Starting Servlet Engine: Apache Tomcat/8.0.33
nov 30, 2017 3:54:48 PM org.apache.catalina.core.ApplicationContext log
INFORMACIÓN: Initializing Spring embedded WebApplicationContext
nov 30, 2017 3:54:49 PM org.apache.catalina.core.StandardService stopInternal
INFORMACIÓN: Stopping service Tomcat
Disconnected from the target VM, address: '127.0.0.1:35472', transport: 'socket'
Process finished with exit code 1
Why isn't it working as always (first time I see this problem)?. I'd like to be able to wun my application in debug mode from my IntelliJ.
I'm trying to provide some custom logging levels to the default logback configuration, but it seems my configuration file is being ignored. I though Boot may skip it for whatever reason but if I make the file not valid (remove / of self-closing tag for example) I got an exception about not being able to parse it - so it is being picked up.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- Spring boot base -->
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="com.wedgetail" level="WARN" />
<logger name="nv" level="WARN" />
<logger name="StatsLogger" level="WARN" />
</configuration>
So for testing purposes (as my loggers are may be wrongly spelled or whatever) I included:
<logger name="org.springframework" level="ERROR" />
When the application comes up I still see spring logging on info level:
2014-08-22 14:28:34.756 WARN 5444 --- [on(3)-127.0.0.1] o.s.b.l.LoggingApplicationListener : Logging environment value '-Djava.util.logging.config.file="C:\Documents and Settings\zykajan\.IntelliJIdea13\system\tomcat\Unnamed_cnc-parent_2\conf\logging.properties"' cannot be opened and will be ignored
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.1.5.RELEASE)
2014-08-22 14:28:34.881 INFO 5444 --- [on(3)-127.0.0.1] o.s.boot.SpringApplication : Starting application on prgdwm395059 with PID 5444 (C:\workspace\command-and-control\webapp\target\cnc-webapp-UNVERSIONED-SNAPSHOT\WEB-INF\lib\spring-boot-1.1.5.RELEASE.jar started by zykajan in C:\Apps\Apache\jakarta\apache-tomcat-7.0.55\bin)
2014-08-22 14:28:34.928 INFO 5444 --- [on(3)-127.0.0.1] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#5dd439: startup date [Fri Aug 22 14:28:34 CEST 2014]; root of context hierarchy
I wonder whether the first line should ring bells unfortunatelly it doesn't in my case :)
2014-08-22 14:28:34.756 WARN 5444 --- [on(3)-127.0.0.1] o.s.b.l.LoggingApplicationListener : Logging environment value '-Djava.util.logging.config.file="C:\Documents and Settings\zykajan\.IntelliJIdea13\system\tomcat\Unnamed_cnc-parent_2\conf\logging.properties"' cannot be opened and will be ignored
As usual, any tips much appreciated.
Upgrade to Spring Boot 1.1.6. for a fix of this issue.