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.
Create a new "Classic Applet Project". Add one line to process() method: public void process(APDU apdu) { ISOException.throwIt((short) (0x9001)); } Run the project. Notice this line in the log: CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 06, cf, cb, 92, 69, e2, dc, Le: 00, SW1: 90, SW2: 01 Last two values is a status word 0x9001, behavior is correct. Change value in program to 0x9002 and run it again. Output still shows 0x9001 status. Here is the tail of the log: ---------------------------------- OffCard Installer [v3.0.2] Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. [ INFO: ] [Deleting an instance //aid/CFCB9269E2/DC from http://localhost:8019/cardmanager/] [ INFO: ] "Off Card Installer validating delete request information" [ INFO: ] "Off Card Installer sending delete request" [ INFO: ] Operation completed successfully. OffCard Installer [v3.0.2] Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. [ INFO: ] Begin load........ [ INFO: ] [Loading app bundle <somedir>\nbp\ClassicApplet2\dist\ClassicApplet2.cap onto http://localhost:8019/cardmanager/ with name ClassicApplet2] [ INFO: ] "Off Card Installer Validating load information" [ INFO: ] "Off Card Installer sending load request" [ INFO: ] Attempt to load module (or) library which was already loaded. Bundle/Library ClassicApplet2 exists on the card. create-instance: OffCard Installer [v3.0.2] Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. [ INFO: ] [Creating an instance of ClassicApplet2 with instance ID //aid/CFCB9269E2/DC on http://localhost:8019/cardmanager/] [ INFO: ] "Off Card Installer validating create information" [ INFO: ] "Off Card Installer preparing create information" [ INFO: ] "Off Card Installer sending create request" [ INFO: ] Operation completed successfully. An instance //aid/CFCB9269E2/DC is created for //aid/CFCB9269E2/DB. run-client: Invoking apdutool on <somedir>\nbp\ClassicApplet2/scripts/classicapplet2.scr ApduTool [v3.0.2] Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Opening connection to localhost on port 9025. Connected. Received ATR = 0x3b 0xf0 0x11 0x00 0xff 0x00 CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 06, cf, cb, 92, 69, e2, dc, Le: 00, SW1: 90, SW2: 01 run: BUILD SUCCESSFUL (total time: 3 seconds) ---------------------------------- According to it applet instance was deleted: [ INFO: ] [Deleting an instance //aid/CFCB9269E2/DC from http://localhost:8019/cardmanager/] After that there was an attempt to install new version of the module: [ INFO: ] [Loading app bundle <somedir>\nbp\ClassicApplet2 which failed because old version of module is still there: [ INFO: ] Attempt to load module (or) library which was already loaded. Bundle/Library ClassicApplet2 exists on the card. and after that new instance of old applet version is created: [ INFO: ] [Creating an instance of ClassicApplet2 with instance ID //aid/CFCB9269E2/DC on http://localhost:8019/cardmanager/] To run new code user have to stop "device" manually. Build used is #34.
Anki, is this expected behavior here? I.e. should the Run action remove any existing instance of the applet? Otherwise I think this is the behavior you would get. This issue probably belongs to the RI and its Ant tasks, not NetBeans, I think - unless the IDE should be doing the delete prior to run (== different Ant script behavior in and out of the IDE).
Yes, the run should delete instances and unload the bundle. This probably be an issue in the build file. run action (or target) should be calling <jc-delete/> <jc-unload/> <jc-load/> <jc-create/> in this sequence.
Closing as duplicate of 177997 - if Unload is not working, that would cause the rest as a side-effect. *** This bug has been marked as a duplicate of bug 177997 ***