Failed startup of context when Deploy Spring-boot WAR

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
h128
Posts: 9
Joined: 04 Apr 2014, 23:30

Failed startup of context when Deploy Spring-boot WAR

Post by h128 »

I have a Spring-boot web application, which contains some user authentication features and is planned to perform management tasks on SmartFoxServer, such as kicking players or setting configs of our game dynamically.

I can successfully package my spring-boot application as a WAR file and deploy it on local Jetty server(jetty-9.4.19) by putting the WAR file under the webapps directory. However, when I deploy the WAR file to SmartFoxServer’s www directory and restart SmartFoxServer, I got the following error message:

Code: Select all

8:04:56,485 INFO  [SFSWorker:Sys:1] v2.SmartFoxServer     - SmartFoxServer 2X (2.13.0) READY!
18:04:58,836 WARN  [main] webapp.WebAppContext     - Failed startup of context o.e.j.w.WebAppContext@36cda2c2{/gmtool,file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/,UNAVAILABLE}{/Applications/SmartFoxServer_2X/SFS2X/www/gmtool.war}
MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/h2/util/Bits.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/h2-1.4.197.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-commons-7.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-7.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-tree-7.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-analysis-7.0.jar]
	at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:534)
	at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:447)
	at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:494)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1361)
	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:520)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
	at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:452)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.server.Server.start(Server.java:411)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.Server.doStart(Server.java:378)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1510)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1435)
	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.eclipse.jetty.start.Main.invokeMain(Main.java:214)
	at org.eclipse.jetty.start.Main.start(Main.java:457)
	at org.eclipse.jetty.start.Main.main(Main.java:75)
	at com.smartfoxserver.v2.http.JettyServer.start(JettyServer.java:35)
	at com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:321)
	at com.smartfoxserver.v2.Main.main(Main.java:14)
	Suppressed: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/h2/util/Bits.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/h2-1.4.197.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
		at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
		at java.lang.Thread.run(Thread.java:745)
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
	Suppressed: java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-commons-7.0.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
		at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
		at java.lang.Thread.run(Thread.java:745)
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
	Suppressed: java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-7.0.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
		at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
		at java.lang.Thread.run(Thread.java:745)
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
	Suppressed: java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-tree-7.0.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
		at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
		at java.lang.Thread.run(Thread.java:745)
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
	Suppressed: java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/asm-analysis-7.0.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
		at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
		at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
		at java.lang.Thread.run(Thread.java:745)
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
Caused by: MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar]
	at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:923)
	at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
	at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
	at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:546)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
	Suppressed: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		... 6 more
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
	Suppressed: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		... 6 more
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
	Suppressed: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
		... 6 more
	Caused by: java.lang.IllegalArgumentException
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.objectweb.asm.ClassReader.<init>(Unknown Source)
		at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
		at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
		... 6 more
Caused by: java.lang.RuntimeException: Error scanning entry META-INF/versions/9/module-info.class from jar file:///private/var/folders/jq/8rtwd_ys1mzcpqbvjdqvjvmw0000gp/T/jetty-0.0.0.0-8080-gmtool.war-_gmtool-any-8352282107734449238.dir/webapp/WEB-INF/lib/log4j-api-2.11.2.jar
	at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
	... 6 more
Caused by: java.lang.IllegalArgumentException
	at org.objectweb.asm.ClassReader.<init>(Unknown Source)
	at org.objectweb.asm.ClassReader.<init>(Unknown Source)
	at org.objectweb.asm.ClassReader.<init>(Unknown Source)
	at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
	at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
	at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
	... 6 more


Here is my main class

Code: Select all

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
public class Application extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}
and my gradle dependencies script

Code: Select all


dependencies {
    
    compile ('org.springframework.boot:spring-boot-starter-web:2.1.5.RELEASE'){
        exclude group:"org.springframework.boot", module: "spring-boot-starter-tomcat"
    }

    compile group: 'org.springframework.boot', name: 'spring-boot-starter-jetty', version: '2.1.5.RELEASE'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf', version: '2.1.5.RELEASE'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.1.5.RELEASE'
    compile group: 'org.springframework', name: 'spring-orm', version: '5.1.7.RELEASE'
    compile group: 'org.springframework.data', name: 'spring-data-jpa', version: '2.1.5.RELEASE'

    compile group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '2.4.1'
    compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity4', version: '3.0.4.RELEASE'
    compile group: 'org.hibernate', name: 'hibernate-core', version: '5.3.0.Final'
    compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.3.0.Final'
    compile group: 'com.h2database', name: 'h2', version: '1.4.197'

}

Can anyone tell me what might go wrong and how could I fix it?

Many thanks!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Failed startup of context when Deploy Spring-boot WAR

Post by Lapo »

Hi,
maybe it has something to do with this?
https://stackoverflow.com/questions/527 ... s-from-jar

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
h128
Posts: 9
Joined: 04 Apr 2014, 23:30

Re: Failed startup of context when Deploy Spring-boot WAR

Post by h128 »

Lapo wrote:Hi,
maybe it has something to do with this?
https://stackoverflow.com/questions/527 ... s-from-jar

Cheers
Thanks for your reply.

It's about JEP-238 jar problem. Since the current Jetty SmartFox is v.9.3.11 and Jetty only supports JEP-238 jar after v.9.4.9,
many dependencies included by Spring-boot will report errors.

My temporary solution is manually excluding the problematic dependencies when building WAR.

Code: Select all

compile.exclude module: 'spring-boot-starter-tomcat'
compile.exclude module: 'spring-boot-starter-logging'
compile.exclude module: 'asm'
compile.exclude module: 'asm-commons'
compile.exclude module: 'slf4j-api'
compile.exclude group: 'org.eclipse.jetty.websocket'
Post Reply