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 90047 - Cannot debug CDC xlet projects
Summary: Cannot debug CDC xlet projects
Status: CLOSED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: CDC pack (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: luky
URL:
Keywords: RELNOTE
Depends on:
Blocks:
 
Reported: 2006-11-26 12:21 UTC by zoharlerman
Modified: 2009-01-15 13:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Xlet project (13.99 KB, application/octet-stream)
2006-11-28 15:31 UTC, zoharlerman
Details
CDC TK project (8.34 KB, application/x-compressed)
2006-12-04 13:36 UTC, Lukas Hasik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zoharlerman 2006-11-26 12:21:30 UTC
java.lang.NoClassDefFoundError is thrown when trying to debug xlet projects.

the message is :
"java.lang.NoClassDefFoundError: javax/microedition/xlet/Xlet
        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:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main" 
Java Result: 1
"
Comment 1 Lukas Hasik 2006-11-26 15:21:00 UTC
what platform, what SDK?

Comment 2 Lukas Hasik 2006-11-26 15:33:19 UTC
maybe the same cause like issue 90019
Comment 3 luky 2006-11-27 11:42:53 UTC
Most likely duplicate of 90019. What version of CDC pack (date) did you use?
If it is duplicate of 90019, it should be fixed in build from 28th of Nov
Comment 4 zoharlerman 2006-11-27 12:25:07 UTC
My used CDC pack is not older then 30/10
Comment 5 luky 2006-11-27 13:29:06 UTC
hmm, changes which may cause your problem were submitted on 21.11. 
Can you update from cvs an try again, or if you do not have cvs access, try to 
download tomorrows buid?
What version of CDC Toolkit are you using? Is your source file in the editor 
shown without any errors?

Comment 6 luky 2006-11-27 13:35:23 UTC
hmm, changes which may cause your problem were submitted on 21.11. 
Can you update from cvs an try again, or if you do not have cvs access, try to 
download tomorrows buid?
What version of CDC Toolkit are you using? Is your source file in the editor 
shown without any errors?

Comment 7 zoharlerman 2006-11-28 14:01:17 UTC
I downloaded the latest cdc mobility pack today (28/11) and the exception still
thrown when trying to debug xlet app.

In addition i found that when debugging a main app it run J2se (and not the
emulator) and ignores the break points.
Comment 8 luky 2006-11-28 14:58:45 UTC
I see, can you please pack your project and attach it to this issue. It would 
help us to identify the issue

Regards
               Luky
Comment 9 zoharlerman 2006-11-28 15:31:29 UTC
Created attachment 36324 [details]
Xlet project
Comment 10 luky 2006-11-30 11:36:41 UTC
I tried your project and have neither problem running it neither debugging.
Can you give me build number of NB you are using (Help/About/Details/Product 
Version)?
Can you make sure that agui-1.0.jar is correctly installed and contains 
javax\microedition\xlet\Xlet.class? You should be able to find it in the 
C:\CDCTK10\lib folder
Comment 11 zoharlerman 2006-11-30 13:34:35 UTC
Hi,

I am using NB 5.5 build 200610141010 and the agui-1.0.jar is corretly installed.

I tried to uninstall both NB and Mobility pack for CDC but i got the same results
Comment 12 Lukas Hasik 2006-11-30 15:38:56 UTC
Zohar, I tried to debug with your project and it worked for me. No exceptions. I
had to check "Generate Debug Info" in Project Properties | Build | Compiling to
get it work. It won't stop on breakpoints otherwise. 

Could you please try to create new empty CDC project? (don't let it to "Create
Main Class") then create new Xlet (File | New File... | CDC | Xlet) and try to
debug this new project.

thank you
Comment 13 zoharlerman 2006-12-03 07:57:37 UTC
Hi luky,

I tried both your suggestions and both of them failed.

When i debugged a new project with new class i got the following notification:

"Could not find helper library for argument
-Xrunjdwp:transport=dt_socket,address=localhost:29266
Cannot start VM (error handling -Xrun argument
-Xrunjdwp:transport=dt_socket,address=localhost:29266)
java.lang.UnsatisfiedLinkError: no jdwp in sun.boot.library.path
        at
java.lang.ClassLoader.loadLibraryInternal(Ljava/lang/Class;Ljava/lang/String;ZZ)Ljava/lang/Object;(ClassLoader.java:1587)
Could not create JVM.
C:\CDC\toolkit\Setup_CDC-Toolkit-1.0-RR-bin-win-2006_11_21-b61\CDCTK10\apps\MyXlet2\nbproject\build-target-impl.xml:145:
Emulator execution failed!
BUILD FAILED (total time: 3 seconds)
"
Comment 14 luky 2006-12-03 11:44:39 UTC
OK, I've got another idea. Do you have some firewall running? It may cause this
problem. If you do, try to switch it off and try again. But it apparently looks
like the root cause of the problem is not CDC pack itself
Comment 15 Lukas Hasik 2006-12-03 13:46:43 UTC
ok, maybe I got it. I'm able to reproduce it. 

1, the project was created by CDC TK not by Mobility Pack!
2, open the CDC TK project in NB
3, upgrade it
4, clean/build/debug -> following exception appears

-debug-start-debugger:
Setting project property: jpda.address -> localhost:4890
-debug-start-debuggee:
Executing 'C:\Program Files\Java\jdk1.5.0_09\jre\bin\java.exe' with arguments:
'-Xdebug'
'-Xnoagent'
'-Djava.compiler=none'
'-Xrunjdwp:transport=dt_socket,address=localhost:4890'
'-classpath'
'F:\netbeans\nb55-fcs\cdc2\TOOLKIT\apps\XletProject1\build\classes'
'NewXlet'
The ' characters around the executable and arguments are
not part of the command.
Execute:Java13CommandLauncher: Executing 'C:\Program
Files\Java\jdk1.5.0_09\jre\bin\java.exe' with arguments:
'-Xdebug'
'-Xnoagent'
'-Djava.compiler=none'
'-Xrunjdwp:transport=dt_socket,address=localhost:4890'
'-classpath'
'F:\netbeans\nb55-fcs\cdc2\TOOLKIT\apps\XletProject1\build\classes'
'NewXlet'
The ' characters around the executable and arguments are
not part of the command.
java.lang.NoClassDefFoundError: javax/microedition/xlet/Xlet
        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:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main" 
Java Result: 1
debug:
BUILD SUCCESSFUL (total time: 2 seconds)


It seems that it doesn't upgrade correctly the execution method (or other
properties). 
I was able to debug the same project when I went to project properties and set
up the execution method to Xlet again. (project properties | Run | Browse |
Select Main Class | OK)
Comment 16 zoharlerman 2006-12-03 14:28:35 UTC
Hi luky,

I managed to run the debug.

We still have problem debug app that was create by the CDC-TK but it is our bug

Thanks

Zohar
Comment 17 Lukas Hasik 2006-12-04 13:36:31 UTC
Created attachment 36450 [details]
CDC TK project
Comment 18 luky 2006-12-04 15:46:03 UTC
CDC Toolkit doesn't support debugging of its own projects. So uppon loading of 
CDC Toolkit project to Mobility pack for CDC, debugging won't work. You have 
to upgrade project to Mobility pack for CDC project to be able to debug. You 
can achieve it by going to project properties and pressing OK and follow the 
steps offered by IDE.
It should be noted in release notes 
Comment 19 Lukas Hasik 2006-12-05 21:36:55 UTC
verified in 061205 build
Comment 20 Ivan Sidorkin 2009-01-15 13:33:49 UTC
closing old issues