java.lang.UnsupportedClassVersionError: com/liferay/portal/spring/context/PortalContextLoaderListener : Unsupported major.minor version 51.0 (unable to load class com.liferay.portal.spring.context.PortalContextLoaderListener)

Liferay Issues | Bejond Shao | 2 years ago
  1. 0

    *Reproduction steps:* *1.)* Install jdk-6u17 (in order to do this, we can edit catalina.sh file (For windows operating system, edit catalina.bat). Add "export JAVA_HOME=java location 1.6.17 export JRE_HOME=java location/jre" to the head of these files. Java location is where we unzip JDK, just like we set JAVA_HOME. This will make tomcat find specific jdk and jre to run Liferay portal, not system installed jdk.) *2.)* Start a 6.2 Portal and go to home page *Actual result:* home page doesn't show well. *Console exception:* {noformat} INFO [localhost-startStop-1][LicenseManager:?] Failed to find directory C:\Portal\liferay-portal-6.2-ee-sp8\data\license 13:20:40,544 ERROR [http-bio-8080-exec-3][StripFilter:83] java.lang.IndexOutOfBoundsException java.lang.IndexOutOfBoundsException at java.nio.StringCharBuffer.subSequence(StringCharBuffer.java:92) at java.io.PrintWriter.append(PrintWriter.java:998) at java.io.PrintWriter.append(PrintWriter.java:35) at com.liferay.portal.servlet.filters.strip.StripFilter.processJavaScript(StripFilter.java:499) at com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:672) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:397) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at {noformat} *trunk:* could not test. Once I set tomcat to use 1.6.0_17, console shows {noformat} SEVERE: Error configuring application listener of class org.apache.catalina.deploy.ApplicationListener@771e98f4 java.lang.UnsupportedClassVersionError: com/liferay/portal/spring/context/PortalContextLoaderListener : Unsupported major.minor version 51.0 (unable to load class com.liferay.portal.spring.context.PortalContextLoaderListener) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2899) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) {noformat} *ee-7.0.x:* the same result like trunk.

    Liferay Issues | 2 years ago | Bejond Shao
    java.lang.UnsupportedClassVersionError: com/liferay/portal/spring/context/PortalContextLoaderListener : Unsupported major.minor version 51.0 (unable to load class com.liferay.portal.spring.context.PortalContextLoaderListener)
  2. 0

    Error loading class [com.denimgroup.threadfix.webapp.filter.CsrfPreventionFilter] for bean with name 'CsrfPreventionFilter'

    GitHub | 2 years ago | jeremie0
    org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.denimgroup.threadfix.webapp.filter.CsrfPreventionFilter] for bean with name 'CsrfPreventionFilter' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: com/denimgroup/threadfix/webapp/filter/CsrfPreventionFilter : Unsupported major.minor version 51.0 (unable to load class com.denimgroup.threadfix.webapp.filter.CsrfPreventionFilter)
  3. 0

    UnsupportedClassVersionError exception prevents Tomcat from starting

    Stack Overflow | 3 years ago | Abhi
    java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/p]]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0 (unable to load class

    Stack Overflow | 2 years ago | mcv
    java.lang.UnsupportedClassVersionError: com/nlrt/reportgenerator/ReportGenerator : Unsupported major.minor version 51.0 (unable to load class com.nlrt.reportgenerator.ReportGenerator)
  6. 0

    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CollegeWebsite]] [duplicate]

    dolinked.com | 1 year ago
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CollegeWebsite]]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedClassVersionError

      com/liferay/portal/spring/context/PortalContextLoaderListener : Unsupported major.minor version 51.0 (unable to load class com.liferay.portal.spring.context.PortalContextLoaderListener)

      at org.apache.catalina.loader.WebappClassLoader.findClassInternal()
    2. Glassfish Core
      DefaultInstanceManager.loadClassMaybePrivileged
      1. org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2899)
      2. org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
      3. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
      4. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      5. org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527)
      6. org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509)
      6 frames