title: Frustrated with Latest Java Version, Spring Context does not load
body: <p>Thanks in advance to any one who reads this and can help. </p>
  
  <p>I have an existing code base that I have to update to Java8, it runs in AWS EB. So I am trying to run it under a Java8 + Tomcat8 ami.  When the app starts up, Spring throws an error on init:</p>
  
  <blockquote>
    <p>Caused by: org.springframework.beans.factory.BeanCreationException:
    Error creating bean with name 'config' defined in ServletContext
    resource [/WEB-INF/spring/servlet-context.xml]: Invocation of init
    method failed; nested exception is java.lang.IllegalArgumentException:
    The resource path [META-INF/MANIFEST.MF] is not valid</p>
  </blockquote>
  
  <p>Maven Generated Manifest file looks like this:</p>
  
  <pre><code>Manifest-Version: 1.0
  Archiver-Version: Plexus Archiver
  Created-By: Apache Maven
  Built-By: mgriffith-contractor
  Build-Jdk: 1.7.0_71
  artifactId: quirinus
  build-id: 
  build-number: 
  build-tag: 2.0-${BUILD_NUMBER}
  build-time: 2015-03-25_18-40-13
  groupId: com.zappos
  version: 2.0
  </code></pre>
  
  <p>This error does not show up when the code is compiled and run under Java 7 using Tomcat8.
  Google is not being cooperative -- so if you can offer any insights, any/all replies are appreciated. </p>
  
  <p>** Edit ** 
  I've also tried setting the target to 1.7. Compiled with Java 8, deployed to a Java8 JVM and Tomcat 8 AMI the entire stack looks like this:</p>
  
  <pre><code>25 Mar 2015 22:21:05,473 ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propertyConfigurer' defined in ServletContext resource [/WEB-INF/spring/servlet-context.xml]: Cannot resolve reference to bean 'config' while setting bean property 'location'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'config' defined in ServletContext resource [/WEB-INF/spring/servlet-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: The resource path [META-INF/MANIFEST.MF] is not valid
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:659)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:602)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:521)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:462)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      at com.zappos.zommons.web.servlet.DelayedInitHttpServletWrapper.doDelayedInit(DelayedInitHttpServletWrapper.java:86)
      at com.zappos.zommons.web.servlet.DelayedInitHttpServletWrapper.delayedInit(DelayedInitHttpServletWrapper.java:79)
      at com.zappos.zommons.web.DelayedInitResourceRegistry.isInitialized(DelayedInitResourceRegistry.java:140)
      at com.zappos.zommons.web.servlet.DelayedInitHttpServletWrapper.isInitialized(DelayedInitHttpServletWrapper.java:38)
      at com.zappos.zommons.web.servlet.DelayedInitHttpServletWrapper.service(DelayedInitHttpServletWrapper.java:101)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.zappos.quirinus.filters.JsonpCallbackFilter.doFilter(JsonpCallbackFilter.java:58)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:673)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'config' defined in ServletContext resource [/WEB-INF/spring/servlet-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: The resource path [META-INF/MANIFEST.MF] is not valid
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
      ... 51 more
  Caused by: java.lang.IllegalArgumentException: The resource path [META-INF/MANIFEST.MF] is not valid
      at org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:250)
      at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212)
      at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206)
      at org.apache.catalina.core.ApplicationContext.getResourceAsStream(ApplicationContext.java:559)
      at org.apache.catalina.core.ApplicationContextFacade.getResourceAsStream(ApplicationContextFacade.java:210)
      at com.zappos.zommons.util.VersionUtils.getAttributes(VersionUtils.java:159)
      at com.zappos.zommons.util.VersionUtils.getVersion(VersionUtils.java:122)
      at com.zappos.zommons.spring.ExternalPropertiesResource.getVersion(ExternalPropertiesResource.java:471)
      at com.zappos.zommons.spring.ExternalPropertiesResource.getVersion(ExternalPropertiesResource.java:459)
      at com.zappos.zommons.spring.ExternalPropertiesResource.getVersionedFilename(ExternalPropertiesResource.java:441)
      at com.zappos.zommons.spring.ExternalPropertiesResource.getConfigurations(ExternalPropertiesResource.java:365)
      at com.zappos.zommons.spring.ExternalPropertiesResource.afterPropertiesSet(ExternalPropertiesResource.java:333)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
      ... 58 more
  </code></pre>