Showing posts with label Tomcat 7. Show all posts
Showing posts with label Tomcat 7. Show all posts

Wednesday, 17 July 2013

org.xml.sax.helpers.SecuritySupport12 cannot access its superclass org.xml.sax.helpers.SecuritySupport

Error:


java.lang.IllegalAccessError: class org.xml.sax.helpers.SecuritySupport12 cannot access its superclass org.xml.sax.helpers.SecuritySupport

berlaku ketika cuba run kod di atas Tomcat 7 dengan JDK 1.7

Penyelesaian:

masukkan property metadata-complete="true" dalam web.xml

Contoh:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0" metadata-complete="true">


Rujukan:


Unsupported major.minor version 51.0

Masalah ini didapati ketika cuba run sistem Online.

Environment:

  • Spring Tool Suite (STS 2.9.2)
  • Tomcat 7
  • JDK 1.7
Punca:
  • Class dikompil menggunakan JDK 1.7 manakala Tomcat 7 ketika itu diset untuk gunakan JDK 1.6
Penyelesaian:
  • Set server untuk run gunakan JDK 1.7.

Tuesday, 26 February 2013

Invalid expression: ${SPRING_SECURITY_LAST_EXCEPTION.class.simpleName}

Hari ini nakama report error pada page login /WEB-INF/jsp/login.jsp (line: 90, column: 13)
"${SPRING_SECURITY_LAST_EXCEPTION.class.simpleName}" contains invalid expression(s)


Selepas kaji, dicadangkan bahawa Tomcat7 tak benarkan penggunaan keyword class

Maka tukar kepada
${SPRING_SECURITY_LAST_EXCEPTION['class'].simpleName}

My environment: Tomcat 6
Nakama environment: Tomcat 7