Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 164256
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Java team <java@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Tom Dexter <digitalaudiorock@hotmail.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 164256 depends on: Show dependency tree
Bug 164256 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-01-28 16:29 0000
When netbeans 5.5 loads a web application which contains a jsp file the
following exception is raised:

java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass2(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:719)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
        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 java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.initReflection(JspParserImpl.java:80)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.createParseProxy(JspParserImpl.java:174)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.getParseProxy(JspParserImpl.java:165)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.java:136)
        at
org.netbeans.modules.web.core.jsploader.TagLibParseSupport$ParsingRunnable.run(TagLibParseSupport.java:344)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)

When the jsp file is altered and a save is attempted similar excpetions occur. 
Here's an example of one:

java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass2(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:719)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
        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 java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.initReflection(JspParserImpl.java:80)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.createParseProxy(JspParserImpl.java:174)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.getParseProxy(JspParserImpl.java:165)
        at
org.netbeans.modules.web.jspparser.JspParserImpl.getJspOpenInfo(JspParserImpl.java:121)
        at
org.netbeans.modules.web.core.jsploader.TagLibParseSupport.getCachedOpenInfo(TagLibParseSupport.java:247)
        at
org.netbeans.modules.web.core.jsploader.JspDataObject.getFileEncoding(JspDataObject.java:165)
        at
org.netbeans.modules.web.core.jsploader.BaseJspEditorSupport.getObjectEncoding(BaseJspEditorSupport.java:311)
        at
org.netbeans.modules.web.core.jsploader.BaseJspEditorSupport.getObjectEncoding(BaseJspEditorSupport.java:300)
        at
org.netbeans.modules.web.core.jsploader.BaseJspEditorSupport.saveDocument(BaseJspEditorSupport.java:339)
        at
org.netbeans.modules.web.core.jsploader.BaseJspEditorSupport.saveDocument(BaseJspEditorSupport.java:321)
        at
org.netbeans.modules.web.core.jsploader.BaseJspEditorSupport$5.save(BaseJspEditorSupport.java:283)
        at org.openide.actions.SaveAction.performAction(SaveAction.java:57)
        at
org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:537)
        at
org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:53)
        at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:533)
        at
org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:880)
        at javax.swing.JComponent.processKeyBindings(JComponent.java:2818)
        at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
        at java.awt.Component.processEvent(Component.java:5278)
        at java.awt.Container.processEvent(Container.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3968)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826)
        at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:677)
        at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:934)
        at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:806)
        at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:641)
        at java.awt.Component.dispatchEventImpl(Component.java:3841)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Window.dispatchEventImpl(Window.java:1778)
        at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


Reproducible: Always

Steps to Reproduce:
1.  Use File->New Project
2.  Choose all the defaults
3.  The exception occurs when the project gets created and scanned, and will
occur whenever you open the project.

Actual Results:  
See exception in description.

------- Comment #1 From Miroslav Šulc 2007-01-28 17:56:41 0000 -------
Could you please specify what version of netbeans ebuild do you use? I tried
the steps with netbeans-5.5-r3 and no exception occured. I'm running netbeans
on Sun JDK 1.6.0.

Maybe some dep of netbeans was built using higher version of JDK than the JDK
you use for running the jsp file.

------- Comment #2 From Tom Dexter 2007-01-28 18:21:01 0000 -------
You're absolutely correct.  I've been using 1.5 as my user vm, in part because
that's what I'm using as a system vm and the vm used by my system tomcat.

If I switch my user vm to 1.6 I don't get the error either.

Is there some reason that portions of netbeans would get compiled with 1.6 even
though I'm not using it as a default?

------- Comment #3 From Tom Dexter 2007-01-28 18:22:24 0000 -------
Oh...forgot to mention...I'm also usiing netbeans-5.5-r3.

------- Comment #4 From Miroslav Šulc 2007-01-28 19:43:00 0000 -------
fordfrog@aceon /usr/share/netbeans-5.5 $ class-version-verify.py -t 1.5 -r .
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/CompilerHacks$HackPageInfo.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/CompilerHacks.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/ExtractPageData.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/GetParseData$BeanDataImpl.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/GetParseData$PageInfoImpl.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/GetParseData$TagInfoCacheRecord.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/GetParseData.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/NbValidator.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/NodeConverterVisitor.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/apache/jasper/compiler/ParserControllerProxy.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/OptionsImpl.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport$1.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport$2.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport$3.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport$InitTldLocationCacheThread.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport$JasperSystemClassLoader.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport$ParserClassLoader.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport$RRef.class
Bad: 1.6 ./enterprise3/modules/ext/jsp-parser-ext.jar
org/netbeans/modules/web/jspparser_ext/WebAppParseSupport.class
CVV: 5
Checked: 25293 Good: 25274 Bad: 19

It revealed that single jar was built with target 1.6 which caused the bug so I
turned back on rewrite of build.xml files which solved that.

New ebuild is committed in CVS. It'll take few hours till it hits the mirrors.
Thank you for reporting the bug.

------- Comment #5 From Tom Dexter 2007-01-29 00:13:19 0000 -------
Thanks!

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug