Getting Exception 0x8010002f PCSC

Hello everyone, writing a Java Card applet and my code is look like: -.

// some other initialization
public static void install(byte[] bArray, short bOffset, byte bLength) {
        // GP-compliant JavaCard applet registration
        pin = new OwnerPIN((byte) 0X03,(byte) 0X08);
        pin.update(PIN_NO, (short) 0, (byte) 0x08);
        new DZCARD().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
        
    }

    public void process(APDU apdu) {
        // Good practice: Return 9000 on SELECT
        if (selectingApplet()) {
            
            return;
        }

        byte[] buf = apdu.getBuffer();
        switch (buf[ISO7816.OFFSET_INS]) {
        case (byte) 0x04:
            if(buf[ISO7816.OFFSET_CLA]!=(byte) 0xA4)
                ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
            else
            {
                short byte_read=(short)(apdu.setIncomingAndReceive());
                byte x = Util.arrayCompare(buf, ISO7816.OFFSET_CDATA, APPLET_ID, (short)0 , byte_read);
                if(x!= (byte) 0x00)
                {
                    ISOException.throwIt(ISO7816.SW_FILE_NOT_FOUND);
                }
            }
        ISOException.throwIt((short) 0x6099);
            break;
// other code goes here.

My applet is installed well and selecting applet giving 9000, but when I send a command with CLA = 0xa4 and INS = 0x04, I am getting error in JCOP as

jcshell: Error code: -7fefffd1 (0x8010002F)
jcshell: Command failed: SCardTransmit(): 0x8010002f, PCSC failed with 0x8010002F: 0x2F (Warning,--,(SCard))

and when I'm with Gpshell, I get the error like:

send_APDU() returns 0x8010002F (A communications error with the smart card has been detected. Retry the operation.

my task is very simple, put a 8-byte data in the card and during the passage of an APDU as a404000008 0 x 6099 back (8 bytes data). Could someone tell me where I made a mistake...

I found in ISO7816-3, ' Sw1 = 60 is a NULL byte, it don't ask for action on the transfer of data. This was the cause of error in communication... When I tried to 9000, same code works well in the Simulator and real card... thanks for all

Tags: Java

Similar Questions

  • Get exceptions when a blackberry file downloading

    I updated my jboss server in place Upload(basically a photo upload) file to blackberry.

    I wanted to use the phonegap API to download the file, but it is limited. (even if phonegap has a lot)

    It must be the full path of the file that we cannot get a file of the form field. (Name of file is accessible)

    Also, his example is also very poor, because it downloads only the files whose paths are known.

    So I used a simple, this form with request for multipart/form-data and here is the code on the client side:

    function uploadProfilePicToServer() {}
    parent.pop.popOut ("Loading...");
    var xhrObj = false;
    var self = this;
      
    var file = document.getElementById ("CIPP");
    file = file.files [0];
    xhrObj = new XMLHttpRequest();
    try {}
           
         
    xhrObj.open ("POST", URL + "service", true);
    xhrObj.setRequestHeader ("Content-type", "multipart/form-data");
    xhrObj.onreadystatechange = function() {}
    If (xhrObj.readyState == 4 & xhrObj.status == 200) {}
    Alert (xhrObj.ResponseText);
    }
    }
    formData var = new FormData();
           
    formData.append ("cfs", "imgup");
    formData.append ("cfa", "pi");
    formData.append ("ppic", file);
           
    xhrObj.send (formData);
    } catch (e) {}
    Alert (e.message);
    }
    }

    I used the common Apache of the FileUpload library on the server side. (the one shown in their doc)

    In addition, have set the maxsize and timeout parameters correctly.

    Problems that are coming on intranet

    When used in intranet, small sizes like 50-100 KB it works fine, but for larger files i.e. > 500Ko, I get following exception on the server:

    2011-09-23 10:49:10, ERROR 640 [http - 127.0.0.1 - 8080-2] [com.spidoss.cityfan.controller.CityFanController:89] org.apache.commons.fileupload.FileUploadBase$ IOFileUploadException: multipart/form-data request processing failed. Stream ended unexpectedly

    Problems that are coming on internal

    When I use an external server to download the files, I keep getting the above exception

    I thought about building an extension for downloading files, but Java also requires the full path of the file, and we can get the javascriptcolon; NO.

    Someone at - he got the download of a file to an external server with BrowserField

    Help, please

    We just had a post the other day about this... My guess is that you have the same problem they have...

    Make sure your paths are exactly as they are specified in step (6) of the instructions... the other developer forgot the directory 'src '.

  • Get exception to restarting the device.

    I made a request in which several threads are running. Its works fine when I install the build. But when I reboot the device, then I'm the exception.

    application of the untrapped exception (150) does not have blackberry process is completed.

     

    Can you please help me to solve this problem and the reason why I get this reboot of the device.

    Check if you follow these guidelines:
    http://supportforums.BlackBerry.com/T5/Java-development/detect-system-availability-on-startup/Ta-p/4...

    also ensure that all threads are started using start()

  • How do you get except the password?

    What are you doing to get it except for your password?

    Hi michaelh51485739,

    Please check what userid & password I need to install Flash Player?

    Thank you

    Eswar.

  • getting exception when using JavaFX SDK/JRE bundled in Netbeans

    When I try to put my JavaFX SDK/JRE to use Java SE and run my application I get an exception ClassLoader (java.lang.NoClassDefFoundError: javafx/application/application).

    I still have to get my Netbeans to use properly the bundled JavaFX SDK/JRE that come with JRE/SDK to the Java SE. I am referring to Java for JavaFX platform properties (in a project-> properties-> library-> manage-> tab JavaFX platforms).

    Here's what I have my JavaFX platform settings the value:
    JavaFX SDK--> C:\Program Files (x86)\Java\jdk1.7.0_10
    JRE JavaFX--> C:\Program Files (x86)\Java\jdk1.7.0_10\jre

    I am currently using 7u10 7.2 Netbeans and Java (the problem also occurs with 7u7 and 7u6).

    For those who using Java7u6 and later, can you tell me what your platform setting manage is the JavaFX tab?

    Thank you
    Jose

    OK its fixed. I noticed that the word hellow JavaFX netbeans 7.2 contains the following pots as part of its compilation libraries, jfxrt, deploy, plugin and javaws. In my project of problem I just add them to my library of compilation and it worked.

    Thanks for the help Igor.
    Jose

  • How to get the SQL if I get exception

    I get this exception and do not know what was the actual sql with the variables of liaison who was executed.



    sqlmesg = error in the select query to retrieve the segment associated with a pair of cables: ORA-01006: there is no bind variable

    y at - it a way to get the real sql executed so I know what mistake I did.

    I thought your question was about how to view the SQL statement and bind variables in the exception. The answer to that is to put variables in the exception message.

    The root cause of the problem seems to be that your dynamic SQL statement may require 3 or4 variable bind but your USING clause specifies always 4 values if the underlying SQL statement has 3 positions, it will lead to an error.

    Justin

  • AssetGather get exception after save

    The exception occurred when it is to save an article. It is check all attributes required are complete and all are text.

    It has been verified to 'NCounter' is '1; 1 "and the parseInt method fails." The value of 'NCounter' is inside AssetGather.jsp sett.

    Do you know if there is an error within the AssetGather.jsp logic? I don't think so.

    It is possible that I miss a setting to save an article. It has happened for all items.

    I used the latest version of the Oracle 11 g webCenter site. You can see below a few newspapers added to this problem:

    [2013-09-30 14:30:59, CEST 606] [INFO] [http-8080-3] [com.fatwire.logging.cs] NCounter = 1; 1 [OpenMarket/Gator/FlexibleAssets/Common/AssetGather #OpenMarket/Xcelerate/Actions/EditPost]

    [2013-09-30 14:30:59, CEST 606] [ERROR] [http-8080-3] [fatwire.logging.cs.request] Exception including resources /jsp/cs_deployed/OpenMarket/Gator/FlexibleAssets/Common/AssetGather.jsp

    org.apache.jasper.JasperException: an exception occurred processing JSP page at line 498 /jsp/cs_deployed/OpenMarket/Gator/FlexibleAssets/Common/AssetGather.jsp

    495:                     {

    496: if (valueNumber == 0)

    497:                         {

    498: valueNumber = Integer.parseInt (ics. GetVar ("NCounter")) + 1;

    499:                                       }

    500: string currentOrdinals = ics. GetVar ('cs_' + ics. GetVar ("n") + "_ordinals");

    501: if (currentOrdinals! = null & & currentOrdinals.length ()! = 0)

    The solution for the exception when trying to convert the integer value by using the parseInt("1;1") method, remove EDITOR of ATTRIBUTES definition attribute .

    There are many cases that NewSite WebCenter Oracle 11 g is no need of an EDITOR of ATTRIBUTE.

  • Get exceptions expired when using HttpConnection

    I'm reading the information from a site, for example ("http://www.mysite.com/page.html") in my application.  I'm doing a call on the site using Connector.open ("http://www.mysite.com/page.html"), but the connection just times out.

    I also tried to set deviceside = true, as written here: http://digitalsonata.blogspot.com/2009/04/blackberry-connection-tip.html, but that no longer works.

    I am currently having this run on a device with an OS to v4.5.  It works fine on the device Simulator, but it fails as described when it is deployed on a real device.

    All ideas of code examples on reading my site would be appreciated.  Thank you.

    « ; deviceside = true' by itself, without parameters APN or WAP specific carrier, is not going to work on 90% of carriers.

    See the sticky thread on this forum of Peter Strange for more information.

    Also see this article:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

  • I have windows XP, 32-bit service pack 3 (or4?) IE8. What and when will support end of various programs, if I do not get windows 7?

    I can't really afford to upgrade to windows 7 now, or buy a new computer (it is 6 years old), so what do I expect?

    Support for Windows XP is already completed.  To (security only patches) extended support until June of 2014, when it is entirely not taken in charge.  With regard to "programs" I don't know what you're asking - we don't know, and there is no context to make a good estimate.  If you have Windows XP Service Pack 3 and Internet Explorer 8 is installed, you also update you're going to get (except of course to keep installation monthly security updates from Microsoft).

  • Failed to create system restore point exception exception c:\windows\system32\shell32.dll,control_rundll,"c:\windows\system32\sysbm.cpl",system

    Original title: I can't do a restore point.

    I get exception c:\windows\system32\shell32.dll,control_rundll,"c:\windows\system32\sysbm.cpl",system what can I do?

    This has happened for a very long time.

    Does really say '... sysdm.cpl "?"

    Is that what the text complete and accurate of what the message said exactly?  (there is no sysbm.cpl in XP, but there's a sysdm.cpl).

    What happens if you click on start, run and enter in the box:

    sysdm.cpl

    Click OK - the system properties box opens?

    What happens if you click on start, run and in the type box (exactly):

    %SystemRoot%\System32\restore\rstrui.exe

    Click OK - is the open window of the system restore?

    What is exactly the process (step by step) you are using when you try to create the restore point and when in the process you see this message?

    I think it's a miracle that the Microsoft support engineer can provide a link to an article when the error message report you is a little out of whack and articles doesn't mention your error message at all.  It's real good troubleshooting or clairvoyance!

    You should also tell us a little about your system:

    Since the Microsoft Answers forum does not have any kind of information system request when a new question is asked, we know absolutely nothing about your system.  Not knowing the basic information a problem prolongs the frustration and the agony of these issues.

    Thank you MS Answers, allowing the resolution of simple problems as frustrating and a lot of time as possible.

    Provide information on your system, the better you can:

    What is your system brand and model?

    What is your Version of XP and the Service Pack?

    Describe your current antivirus and software anti malware situation: McAfee, Symantec, Norton, Spybot, AVG, Avira!, MSE, Panda, Trend Micro, CA, Defender, ZoneAlarm, PC Tools, Comodo, etc..

    The question was preceded by a loss of power, aborted reboot or abnormal termination?  (this includes the plug pulling, buttons power, remove the battery, etc.)

    The afflicted system has a working CD/DVD (internal or external) drive?

    You have a true bootable XP installation CD (it is not the same as any recovery CD provided with your system)?

    Do you see that you think not you should see and when you see it?

    What do not you think that you should see?

    If the system works, what do you think might have changed since the last time it did not work properly?

  • Why connecttng signals and slots of an element of action gets segfault

    I add an action item to a page. For some reasong I had to disconnect the item, delete and re-create, and then reconnect it. But I am getting exception when I try to pull the plug. If I omit the disconnection then I get exception when connecting. My code is below

      if(addAllRules)
        {
            disconnect(addAllRules,SIGNAL(triggered()),this,SLOT(onTriggeredAddRuleActionAllRules()));
            delete(addAllRules);
        }
        addAllRules =  ActionItem::create().title("Add Rule").enabled(true);
        allRulesPage->addAction(addAllRules, ActionBarPlacement::OnBar);
        connect(addAllRules,SIGNAL(triggered()),this,SLOT(onTriggeredAddRuleActionAllRules()));
    

    Have you tried cleaning and reconstruction project?

    You will need to find the exact location of the crash using a debugger or newspapers, or analyze a dump core after accident.

    This can also occur due to memory corruption. If the memory is damaged from somewhere, the accident can happen in completely independent place. In this case, try commenting on most of the features of the application until the QTimer started working restaurant then step by step.

  • exception in ksoap please help

    String serviceURL = "http://www.deeptraining.com/webservices/weather.asmx";

    response = (envelope.getResponse ()) m:System.NET.SocketAddress.ToString ();

    String serviceNamespace =http://www.deeptraining.com';

    String serviceMethod = 'GetWeather ';

    String SoapAction = "http://litwinconsulting.com/webservices/GetWeather";

    SoapObject SoapObj =new SoapObject(serviceNamespace,serviceMethod);

    SoapObj.newInstance ();

    SoapObj.addProperty ("city", "delhi");

    Envelope SoapSerializationEnvelope =new SoapSerializationEnvelope (SoapEnvelope.VER11);

    envelope. bodyOut = SoapObj;

    envelope. dotNet = true;

    envelope. implicitTypes = true;

    envelope. encodingStyle = "utf-8";

    envelope. ENC = SoapSerializationEnvelope.ENC2001;

    envelope. xsd = SoapEnvelope.XSD;

    envelope. xsi = SoapEnvelope.XSI;//Build connection

    Ht HttpTransport =new HttpTransport (serviceURL);

    ht.setXmlVersionTag ("");

    Response of object = "nope."

    Try

    {

    HT. Debug = true;

    HT. Call (SoapAction, envelope);

    response = envelope.getResponse ();

    System.out.println (envelope.bodyIn);

    }

    I get exception after ht.debug = true;

    Here's the exception:

    SoapFault - faultcode: "SOAPServer" faultstring: ' System.Web.Services.Protocols.SoapException: server could not process the request. ---> System.NullReferenceException: object reference not set to an instance of an object. \n \n Weather.GetWeather (String City) - end of inner exception stack trace to-' faultactor: "null" detail: org.kxml2.kdom.Node@78aac9ec

    Help, please

    Thank you

    Please help.i really needed this.

  • get ClassCastException help me please...

    public class AutoCompleteFieldDemoScreen extends MainScreen {
        AutoCompleteField autoCompleteField ;
        private BasicFilteredList filteredList;
        Vector vector ;
        TodayListCallBack todayListCallBack;
        Event event;
        ListField listField ;
        private Bitmap bitmapRight;
        protected Font font;
        public AutoCompleteFieldDemoScreen() {
            this.vector = new Vector();
            this.event = new Event();
            this.listField = new ListField();
            filteredList = new BasicFilteredList();
            this.bitmapRight = Bitmap.getBitmapResource("arrow.png");
    
            todayListCallBack = new TodayListCallBack(vector, listField);
            String url =Util.getUrlForTodayEvents(CurLocationPicker.getLatitude(),CurLocationPicker.getLongitude());
            vector =DownloadUtil.ParseEventList(url,AutoCompleteFieldDemoScreen.this,todayListCallBack,null);
            int size = vector.size();
            System.out.println("===============>>>>>>>>>>"+size);
            Event[] events = new Event[size];
            vector.copyInto(events);
            filteredList.addDataSet(0,events, null);
    
            autoCompleteField= new AutoCompleteField(filteredList){
    
                protected void onSelect(Object selection, int type) {
    
            Event event = (Event) selection;
                    UiApplication.getUiApplication().pushScreen(new EventDetailScreen(event));
    
                }
    
                protected XYEdges getDropMargin() {
                    return new XYEdges(-1,-1,-1,-1);
                }
            };
    
            add(autoCompleteField);
        }
    

    in above code I have the event object Array class when I try to remove object event onselect methos BasiFilterList I get ClassCatException... Please help me...

    Hi Peter I solved this thanks for your reply...

    HA peter, I get exception to that line only because the selection is an object of type object BasicFilterFieldResult I take a MyEvents this object...

    Thanks for your help...

  • My app works fine on the Simulator, but no devices make null pointer exception

    my application works fine on the Simulator, but when I try to run on the device its getting null pointer exception

    I have also to debug the code and found that none of the allocated objects. Not a memory allocate unique.

    For example I allcated String object in constructor

    Dim myString As String = new String ("my String");

    But its not allocated and even I put permissions

    Please help me

    I was getting exception somewhere

  • Application crashes with the Exception when using javax.microedition.media.Player

    Hello

    I have an application that processes data from bluetooth and send it to the web service. Recently, there was a request to add sounds to the request. Now when the application processes lots of data and the player plays constantly after a few seconds I get exception "Application is not responding. And then the treatment is finished. In the newspapers, I see many connected after this exception ForcedStackTrace exception.

    The sounds are played in the separate thread. If the app is not play sounds or short sounds - everything works fine. Is it possible to avoid what happens an exception? Why this is happening?

    Thanks in advance,

    Viktor.

    Solved by implementing my own PlayerManager, which running in a separate thread would point the way to the queue rather then the number of threads by using the internal player application.

Maybe you are looking for