Bad version number in .class file
由这个看是版本问题!!但是又不知道具体信息
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:591)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:712)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:641)
at sun.applet.AppletPanel.run(AppletPanel.java:320)
at java.lang.Thread.run(Thread.java:595)
这两天是这个错误:
org.apache.jasper.JasperException: Bad version number in .class file
root cause
java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:869)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1322)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:127)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
org.apache.jsp.index_jsp._jspService(index_jsp.java:57)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
baidu,google上说是因为编译和运行的版本不一样,可是并没有啊,如附图,
无意间在百度上搜了一个关键字,大致提了一下这个东东,于是照着看了一下我的IDE(JBoss-IDE2.0.0)里面的Java-Compiler选项,发现Compiler Compliance level 居然默认的是6.0的JDK,而我装的是5.0的JDK。改成5.0,重新Deploye一下,这个问题总算是没有了,如附图:
但是又发生如下错误,看不懂:
java.lang.ClassCastException: $Proxy96
org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
阅读(825) | 评论(0) | 转发(0) |