java.lang.NosuchFielderRor:IS_SECURITY_ENABLED at org.apache.jasper.compiler.jspruntimeContext.(jspruntimeContext.java:197)~[jsp-2.1-6.1.14.jar!/:na]at org.apache.jasper.servlet.jspservlet.init(jspServlet.java:150)~[jsp-2.1-6.1.14.jar!/:na]at 28]在org.eclipse.jetty.servlet.servlet.servletholder.initialize(servletholder.java:419)~[jettyServlet-9.3.14.v20161028.jar!/:9.3.14.v20161028]在org.eclipse.jetty.servlet.servlet.servlet.servlet.servlethandler.initialize(servlethandler.java:892)~[jettyServlet-9.3.14.v20161028.jar!/:9.3.14.v20161028]在ettyEmbeddedWebAppContext.java:46)~[spring-boot-1.4.2.release.jar!/:1.4.2.release]位于org.springframework.boot.context.embeddedd.jetty.jettyEmbeddedWebAppContext.deferredInitialize(jettyEmbeddedWebAppContext.java:36)~[spring-boot-1.4.2.release.jar!/:1.4.2.release]ring-boot-1.4.2.release.jar!/:1.4.2.release]在org.springframework.boot.context.embedded.jetty.jettyEmbeddedServletContainer.handleDeferredInitialize(jettyEmbeddedServletContainer.java:186)~[spring-boot-1.4.2.release]在org.springframework.boot.context.embedded.jar!/:1.4.2.release]在ext.embedded.embeddedWebApplicationContext.startembeddededServletContainer(EmbeddedWebApplicationContext.java:297)~[spring-boot-1.4.2.release.jar!/:1.4.2.release]在org.springframework.boot.context.embeddedWebApplicationContext.FinishRefresh(embeddedWebApplicationContext.java:145)~[spring-boot-1.4.2.release.jar!/:1.4.2.release]在.发布]位于org.springframework.boot.context.embedded.embeddedwebapplicationContext.refresh(embeddedwebapplicationContext.java:122)~[spring-boot-1.4.2.release.jar!/:1.4.2.release]在org.springframework.boot.springapplication.refresh(springapplication.java:761)[spring-boot-1.4.2.release.jar!/:1.4.2.release]在org.springframework.boot.springapplication.java:761).4.2.release.jar!/:1.4.2.release]在org.springframework.boot.springapplication.run(Springapplication.java:1186)[spring-boot-1.4.2.release.jar!/:1.4.2.release]在org.springframework.boot.springapplication.run(Springapplication.java:1175)[spring-boot-1.4.2.release]在com.analytics.bi.app.main(app.java:91)]在sun.reflect.nativeMethodAccessorImpl.invoke(java.base@9-internal/nativeMethodAccessorimpl.java:62)~[na:na]在sun.reflect.delegatingMethodAccessorimpl.invoke(java.base@9-internal/delegatingMethodAccessorimpl.java:43)~[na:na]在java.lang.reflect.method.invoke(java.base@9-internal/method.java:531)~[na:na]在springframework.boot.loader.launcher.launch(launcher.java:50)[bi.jar:0.0.1-snapshot]位于org.springframework.boot.loader.jarlauncher.main(jarlauncher.java:58)[bi.jar:0.0.1-snapshot]
我的POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>project-lyoko</groupId>
<artifactId>bi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>bi</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<!-- The main class to start by executing java -jar -->
<start-class>com.analytics.bi.App</start-class>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
</parent>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sourceforge.nekohtml/nekohtml -->
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.3.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.8.11.2</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz-jobs</artifactId>
<version>2.2.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazon.redshift</groupId>
<artifactId>redshift-jdbc42</artifactId>
<version>1.2.1.1001</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.4</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.7.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.7.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
<version>3.6.9.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.5</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>redshift</id>
<url>http://redshift-maven-repository.s3-website-us-east-1.amazonaws.com/release</url>
</repository>
</repositories>
<build>
<!-- <resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources> -->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>false</addResources>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Maven Shade Plugin -->
<!--<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>
<version>2.3</version> <executions> <execution> <phase>package</phase> <goals>
<goal>shade</goal> </goals> <configuration> <minimizeJar>false</minimizeJar>
<createDependencyReducedPom>true</createDependencyReducedPom> </configuration>
</execution> </executions> </plugin> -->
</plugins>
</build>
我正在使用Spring-Boot-Embedded-Jetty。我可以在本地运行该应用程序,但当我mvn包并在远程实例(ec2)上运行时,它会给我这个错误。
我读过很多关于jar问题的评论,不明白这是什么意思。
您有错误的jsp实现类。
JSP-2.1-6.1.14.jar
对Jetty 9.3.x无效
用这个代替...
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<version>9.3.14.v20161028</version> <!-- same version as jetty itself -->
</dependency>