Simulation Exception Problem

Hi guys,

I have a strange problem, the source codes given in the samples of the JavaCardDevelpmentKit works absolutely fine... however, once transported to a source folder OUT of the native installtion folder(c:\jsmarcardkit2_1_3, say)...to (c:\temp) and the same jcwde and apdutool commands called again the following error is thrown:

C:\whoa>jcwde -p 9025 jcwde.app

Java Card 2.1.2 Workstation Development Environment (version 0.18).

Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved.

jcwde is listening for T=0 Apdu's on TCP/IP port 9,025.

java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read

jcwde terminating on receipt of SimulationException. See previous messages for

cause.

AND

C:\whoa>apdutool whoa.scr

Java Card ApduTool (version 0.15)

Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved.

Opening connection to localhost on port 9025.

Connected.

com.sun.javacard.apdutool.ReaderWriterError: Card powered down. (0x15)

on CLIENT side,

Any suggestions?

-- Kaps

[1169 byte] By [KaputZie] at [2007-9-26 8:54:57]
# 1
> Connected.> com.sun.javacard.apdutool.ReaderWriterError: Card powered down. (0x15)This is the reason. The script that you are trying to execute doesn't contain 'powerup;' command in the beginning.
Alb at 2007-7-1 19:53:14 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

Which script are you referring to specifically? I must repeat, the process works seamlessly on in the native folder (ie c:\javacardDec_2_1whatever)where the Java Card is installed... but it bombs once we try the same routine, from ANY RANDOM folder. I have fixed the paths to export files, etc etc...but the situation fails to rectify.

Like i said, its a strange problem. Any help?

KaputZie at 2007-7-1 19:53:14 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3
I was referring the APDU script that you use with apdutool. As far as I know 'card powered down' error message means that script file doesn't contain 'powerup' command.It looks like you are sure that it is not the case.
Alb at 2007-7-1 19:53:14 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4

>It looks like you are sure that it is not the case.

Thats right man. Like I said, the codes work A-ok in the native installed environment. I know this is a smoking gun, but Im unable to arrive at the root of the problem. Oviously, the code does not have powerup; command in the Native installation folder too, but it works perfectly there.

Im baffled. any help?

--Kaps

KaputZie at 2007-7-1 19:53:14 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 5
Do you run EXACTLY the same APDU script in native installation folder and in your folder?Some of scripts in demo folder doesn't have 'powerup' because they are parts of demo2.scr. Examples: AppletTest.scr, JavaPurse.scr.
Alb at 2007-7-1 19:53:14 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 6
Probably cause is that u've used scriptgen to generate the script file.
pdcnic at 2007-7-1 19:53:14 > top of Java-index,Java Mobility Forums,Consumer and Commerce...