This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 234328

Summary: Build Broken after update
Product: javame Reporter: wayneforrest <wayneforrest>
Component: ME SDK IntegrationAssignee: alexander.burdukov
Status: NEW ---    
Severity: normal CC: anebuzelsky, jrechtacek, pgebauer, rsvitanic
Priority: P1    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: ant config screenshot

Description wayneforrest 2013-08-13 13:07:35 UTC
Created attachment 138634 [details]
ant config screenshot

After updating Netbeans 7.3 yesterday, I tried to build my
old project and I am getting the following error when I build:

I have ckecked my Ant config and this seems to be broken after the upgrade. 


ERROR - Ant is misconfigured and cannot be run.
java.io.IOException: Could not load class org.netbeans.modules.javame.profiler.ant.OpenProfiler: java.lang.UnsupportedClassVersionError: org/netbeans/modules/javame/profiler/ant/OpenProfiler : Unsupported major.minor version 51.0
	at org.apache.tools.ant.module.bridge.AntBridge.loadDefs(AntBridge.java:561)
	at org.apache.tools.ant.module.bridge.AntBridge.createCustomDefs(AntBridge.java:538)
	at org.apache.tools.ant.module.bridge.AntBridge.createAntInstance(AntBridge.java:326)
	at org.apache.tools.ant.module.bridge.AntBridge.getAntInstance(AntBridge.java:279)
	at org.apache.tools.ant.module.bridge.AntBridge.getInterface(AntBridge.java:268)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: java.lang.UnsupportedClassVersionError: org/netbeans/modules/javame/profiler/ant/OpenProfiler : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at org.apache.tools.ant.module.bridge.AuxClassLoader.findClass(AuxClassLoader.java:88)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.apache.tools.ant.module.bridge.AntBridge.loadDefs(AntBridge.java:550)
	... 6 more
Caused by: loading: org.netbeans.modules.javame.profiler.ant.OpenProfiler


Product Version: NetBeans IDE 7.3 (Build 201306052037)
Java: 1.6.0_33; Java HotSpot(TM) Client VM 20.8-b03
Runtime: Java(TM) SE Runtime Environment 1.6.0_33-b03
Comment 1 wayneforrest 2013-08-13 13:35:49 UTC
It seems that an update was released with the wrong java
version format. 


I'll try to use the java 7 and see how it goes.
Comment 2 Jiri Rechtacek 2013-08-14 07:28:50 UTC
Caused by mixing JDK 6 and JDK 7 for building parts
Comment 3 Roman Svitanic 2013-08-14 07:34:09 UTC
Reassigning to ME SDK Integration since given class is in the one of ME SDK plugins.
Comment 4 Jiri Rechtacek 2013-08-14 07:40:12 UTC
> Reassigning to ME SDK Integration since given class is in the one of ME SDK plugins.

Probably caused ME SDK plugin were compiled on JDK 7 and their bytecode cannot be loaded by JDK 6. If so I increase the priority to urgent back then.
Comment 5 alexander.burdukov 2013-08-14 17:49:17 UTC
ME SDK 3.3 plugins are build with 1.7 target. So, this is the reason of this problem.

Fortunately, the workaround is siple: just use JDK 7 instead of JDK 6.

Since NB 7.4 will not support JDK 6 anymore and ME SDK 3.3 is already released it is not feasible to re-spin ME SDK plugins to support JDK 6.

So, let's just document this issue and the workaround for NB 7.3.x
Comment 6 wayneforrest 2013-08-15 12:45:12 UTC
I have noticed that NB 7.3 works with JAVA 6 and WTK 2.5.2 and WTK 3.2
whereas (NB 7.3 + updates) breaks this for me.

Here is my experience so far:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I do not know how to roll back updates.

I tried updating my JAVA to 7 and that got rid of the problem I reported, but
I could not get my WTK2.5.2 going so I reverted.

I uninstalled NB 7.3 and ticked to option to remove all the plugins/updates.
Then I re-installed 7.3 from scratch for the project.

All is working again but hesitant to update the 25 updates waiting.
Comment 7 Jiri Rechtacek 2013-08-15 13:43:31 UTC
Consider use OpenIDE-Module-Java-Dependencies > 1.7 in manifest.mf of related modules, it will requires JDK 7 from installation via Plugin Manager as well. Don't forget to increase spec.version of all modified modules.
Comment 8 alexander.burdukov 2013-08-16 20:05:24 UTC
We decided to do not re-spin ME SDK plugins.
Instead we document the workaround (use JDK 7 to run NetBeans) in ME SDK release notes.

3.3 plugins itself have to be removed from standard NetBeans update repository.
The users have to download them from OTN and install manually.

Priority of this issue should be decreased, since P1 and P2 priorities means that there is no acceptable workaround and the issue is reproduced regardless the user environment.
Comment 9 Jiri Rechtacek 2013-08-19 07:41:32 UTC
Alexander, don't assign to me again. I'm not responsible for ME SDK support in IDE.
Comment 10 David Strupl 2013-08-19 07:46:32 UTC
Roman (rsvitanic) is responsible person on our side. But if the task is to remove something from the UC the correct person is Petr Gebauer (pgebauer) with Jirka only as a backup.