Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 284768

Summary: [fiximprove][SDK]: Device importing. WTK 3.0.0 devices have incorrect Configuration and Profile values upon import.
Product: [Tools] MTJ Reporter: Jon Dearden <jdearden>
Component: SDK ManagementAssignee: Diego Madruga Sandin <wds057>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: dsdp.mtj-inbox, jdearden, MathsMadness, mr, wds057, wgp010
Version: 1.0   
Target Milestone: 1.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jon Dearden CLA 2009-07-27 11:23:44 EDT
Steps To Reproduce:

1. Install Sun Wireless Toolkit 3.0.0.
2. Import the devices using Preferences/Java ME/Device Management/Import... button.
3. After importing, the Configuration for all devices is reported as 1.0 and the Profile as 2.0.
4. For most of these devices, the Configuration should be 1.1 and the Profile should be 2.1.


More information:

When a user imports devices from WTK 3.0.0, the Configuration and Profile values are misreported in the Preferences/Java ME/Device Management page. The values do not match the values indicated in the symbol sets or libraries for those devices.

This error was not seen in an early access version of WTK 3.0.0, but is now seen in the release version.
Comment 1 Diego Madruga Sandin CLA 2009-07-28 09:19:43 EDT
I will investigate this issue.
Comment 2 Diego Madruga Sandin CLA 2009-07-28 16:36:40 EDT
It seems that the problem is in the AbstractMIDPDevice#getLibraryWithType(MIDPAPIType type) method.

This method implementation returns the first occurrence of an API with the given type. Since WTK 3.0 has more then one profile/configuration jar in the classpath, the call of methods AbstractMIDPDevice#getMIDPAPI() and   AbstractMIDPDevice#getCLDCAPI() always return the lowest version of the profile/configuration.


Comment 3 Diego Madruga Sandin CLA 2009-07-28 20:40:06 EDT
Hi Jon,

I've fixed this issue and it's now available on N20090728 NB in case you want to test it.

http://download.eclipse.org/dsdp/mtj/downloads/drops/N-N20090728-200907282027/index.html

Comment 4 Diego Madruga Sandin CLA 2009-07-28 20:42:28 EDT
Fixed and committed to svn.
Comment 5 Diego Madruga Sandin CLA 2009-10-28 08:46:27 EDT
Released
Comment 6 Marcel RUff CLA 2009-12-02 07:17:22 EST
The bug still exists in my
  Vista
  eclipse 3.5.1
  MTJ 1.0.1
  Java_ME_platform_SDK_3.0
environment.

Workaround:
  Removing the CLCD 1.0 library and restart eclipse did help

Window -> Preferences -> Java ME -> Device Management -> DefaultCldcPhone2 -> Edit -> Libraries -> cldc_1.0.jar: Remove -> Restart eclipse
Comment 7 Martin Döring CLA 2010-05-20 15:09:44 EDT
The bug also still exists in my
  Windows XP SP 3
  Eclipse 3.5.2
  MTJ 1.0.1
  Java_ME_platform_SDK_3.0
environment.

The workaround proposed by Marcel RUff (see Comment 6) does not work either in my environment.
Comment 8 Martin Döring CLA 2010-05-20 15:26:17 EDT
(In reply to comment #7)
> The bug also still exists in my
>   Windows XP SP 3
>   Eclipse 3.5.2
>   MTJ 1.0.1
>   Java_ME_platform_SDK_3.0
> environment.
> 
> The workaround proposed by Marcel RUff (see Comment 6) does not work either in
> my environment.

Update: deleting the "Application Descriptor" created when creating a new MIDlet Project does the trick, even when keeping the default libraries for the Java ME platform SDK 3.0 devices.

But then, changing the Microedit Configuration in the Application Descriptor does not have any effect. Even when choosing CLDC 1.0, there are no compiler errors, although several methods are used which were introduced in CLDC 1.1.