运行新项目时候服务器出现问题,具体出现的错误如下:
[17-09-12 09:37:29.190] {resin-35} WebApp[production/webapp/default/ROOT] active
[17-09-12 09:37:29.417] {resin-36} WebApp[production/webapp/default/resin-doc] active
[17-09-12 09:37:33.051] {main} Found library 'resin_os' as 'd:\java\resin-4.0.51\win64\resin_os.dll', but the load failed. The JVM exception was: java.lang.UnsatisfiedLinkError: no resin_os in java.library.path
[17-09-12 09:37:33.054] {main} WEB-INF/web.xml:25: com.caucho.server.dispatch.FilterConfigImpl.setFilterClass(): java.lang.UnsupportedClassVersionError: com/umpay/sp/web/filter/ContentTypeValidFilter : Unsupported major.minor version 51.0
23: <filter>
24: <filter-name>ContentTypeValidFilter</filter-name>
25: <filter-class>com.umpay.sp.web.filter.ContentTypeValidFilter</filter-class>
26: </filter>
27: <filter-mapping>
[17-09-12 09:37:33.054] {main} Host[production/host/default] active
[17-09-12 09:37:33.054] {main} ServletService[id=app-0,cluster=app] active
错误原因:Unsupported major.minor version 51.0
项目运行所需要的jdk版本与服务器运行的jdk版本不一致导致
解决方法:保证项目编译运行的jdk版本与服务器运行的jdk版本一致
以我的项目jdk 1.7、所使用的服务器resin为例和编写软件myeclipse16为例
①编译jdk更改:
项目右键→properties
②maven编译运行jdk更改:
项目右键→run as→maven bluid…→JRE
③resin运行jdk更改: