KEY value modified by javax.smartcardio?

Hello

I encountered a problem.

I got a cap card manufacturer, and I loaded it in the card properly.
When I send the following APDU command to map by smartcardio java, I got the answer of 6E00 (invalid Class).

But, when I used another card reader dll (C++) and send the APDU even on the same card, I got the 9000.

So, I use a usb monitor software (USBTrace) to seek what was sent to the javax.smartcardio card and I found CLA of the last command has been replaced by 0 x 14...

Code:

CommandAPDU selectPse = new CommandAPDU (HexBinary.decode ("00a404000e335041592e5359532e4444463031"));
resp = channel.transmit (selectPse);
Print (selectPse, respectively);

CommandAPDU initCommand = new CommandAPDU(HexBinary.decode("5401000062000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA5DAF9D3"));

ResponseAPDU initResp = (initCommand) channel.transmit;
print (initCommand, initResp);

JOURNAL:

Card found in the terminal: SCM Microsystems Inc. SDI010 player 0 contactless

RTA: 3B8E800180318066B0840C016E01830090001D

auth. external...

......................

......................

DEBUG: APDU command: 00A404000E335041592E5359532E4444463031

DEBUG: Response APDU: 9000

DEBUG: Command APDU: 5401000062000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA5DAF9D3

DEBUG: Response APDU: 6E00

Software monitor usb, above the APDU is:

Select the command: 02 00 00 00 08 00 00 00 00 A4 04 0E 00 33 50 41 59

2ND 53 59 53 2 44 44 46 30 31

and 5401 order became:

02 00 00 00 08 00 00 00 14 01 00 00 62 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00

00 00 00 00 00 01 FF FF FF FF FF FF FF FF FF FF FF

FF FF FF FF FF A5 F9 DA D3

I spent all day to find if there is bad in my app and check this 5401 command again and again...

Finally, I found that it was changed to javax.smartcardio (j2pcsc?).

My question is about the definition of the CLA.

CLA = 0 x 54 is not a valid value? or java impl obeys other CLA?

I do not want to load another dll and use native method to reslove this problem so that a command because of my application is written in java, and there are a lot of card operation before.5401 is the last command...

Can someone tell me I was doing wrong or what am I I miss?

Thanks in advance.

See my response in this thread:

Different command using c# and Java

Tags: Java

Similar Questions

  • Trigger - use one to create primary key values

    I'm stuck on a simple use to do a TRIGGER that fires when you add new rows to a table and want to Developer SQL to add the primary key value.

    I seem to be able to relax, but it is not inserted the primary key but giving a SQL error: ORA-00947: not enough values.

    Here's what I have.

    CREATE TABLE HF_fishers

    (

    contact_id INT NOT NULL

    , name VARCHAR (25)

    , last_name VARCHAR (35)

    PRIMARY KEY (contact_id)

    );

    CREATE SEQUENCES HF_fishers_seq.

    Then I ran the following trigger:

    CREATE

    HF_fishers_seq_trigger RELAXATION

    BEFORE INSERTING

    ON HF_fishers

    FOR EACH LINE

    BEGIN

    IF (: new.contact_id IS NULL)

    THEN

    : NEW.contact_id: = NVL (: NEW.contact_id)

    HF_fishers_seq. NEXTVAL

    );

    END IF;

    END HF_fishers_seq_trigger;

    =============

    Then I executed the following SQL statement that gives the error.

    INSERT INTO HF_fishers VALUES('Jacob','Muller');

    But if I do everything is good except that it defeats the purpose of relaxation.

    INSERT INTO HF_fishers VALUES(1,'Jacob','Muller');

    MySQL has a nice 'AUTO_INCREMENT' command, but from what I understand in Oracle, I need to set up a trigger to automatically increment a column/cell, which in this case I use for the PRIMARY KEY.

    3003916 wrote:

    OK Jaramillo, I tried as you wrote, but what would be an INSERT statement correct?

    -After the code trigger of Jaramillo

    INSERT INTO HF_fishers (first_name, last_name) values ("Jesse", "Owens"); -I have the trigger but he made the mistake of duplicate key.

    INSERT INTO HF_fishers values (hf_fishers_seq.nextval, 'Jesse', "Owens");  -No trigger but get key duplicated,.

    INSERT INTO HF_fishers VALUES(:NEW_contact_id,'Jesse','Ownes'); -works without the trigger but the "get links" dialog box appears. So not much 'automatic' on this issue,.

    My mistake.  Here is the modified version of the trigger. I removed the CONDITIONAL clause and comes to be a part of the body of the trigger.

    So, I created the table, the sequence, the relaxation and ran the first two insert statements and it worked fine.  The third one you have invites SQL + or any tool you use to enter a value if she sees the ":" colon as a variable binding.  Colon only works in a trigger without asking for confirmation.

    Here is the code and my exit I ran home

    DROP TABLE hf_fishers CASCADE CONSTRAINTS PURGE;
    DROP SEQUENCE hf_fishers_seq;
    
    CREATE TABLE hf_fishers
    (
    contact_id   INTEGER NOT NULL
    ,first_name   VARCHAR(25)
    ,last_name    VARCHAR(35)
    ,PRIMARY KEY (contact_id)
    );
    
    CREATE SEQUENCE hf_fishers_seq;
    
    CREATE OR REPLACE TRIGGER hf_fishers_seq_trigger
       BEFORE INSERT
       ON hf_fishers
       FOR EACH ROW
    BEGIN
    
       IF(:NEW.contact_id IS NULL) THEN
          :NEW.contact_id := hf_fishers_seq.NEXTVAL;
       END IF;
    
    END hf_fishers_seq_trigger;
    
    INSERT INTO hf_fishers(first_name, last_name)
         VALUES ('Jesse', 'Owens');  -- Works with the trigger
    
    INSERT INTO hf_fishers
         VALUES (hf_fishers_seq.nextval, 'Jesse', 'Owens');  --Works without using the trigger body code.
    
    SELECT *
      FROM hf_fishers;
    
    COMMIT;
    

    The output

    Deleted table.

    Elapsed time: 00:00:00.05

    Sequence has fallen.

    Elapsed time: 00:00:00.02

    Table created.

    Elapsed time: 00:00:00.03

    Order of creation.

    Elapsed time: 00:00:00.02

    Trigger created.

    Elapsed time: 00:00:01.05

    1 line of creation.

    Elapsed time: 00:00:00.04

    1 line of creation.

    Elapsed time: 00:00:00.01

    CONTACT_ID FIRST NAME LAST NAME

    ---------- ------------------------- -----------------------------------

    1 Jesse Owens

    2 Jesse Owens

    2 selected lines.

    Elapsed time: 00:00:00.04

    Validation complete.

    Elapsed time: 00:00:00.01

  • With the help of several key values to find the data

    Hello, it's me again.

    I had a question out about data from database and display them on a page of the ADF on Jdev 11.1.1.3.

    And Mr. Daniel Atwood answered my question with this blog to follow, that wrote.
    http://www.avioconsulting.com/blog/datwood/2012/06/19/using-BPM-process-variable-ADF-form-retrieve-database-information-0.

    But I have another question on top that.

    The Mr.Atwood example is when using a value of key 'one', what happens if I have two key values, how to set?

    Here are some details:

    I have a table like this

    ID Type_code name
    0001 05 a-blabla
    0002 b 25-blabla
    0002 26 b-blabla
    0003-08 c-blabla
    0003 25 c-blabla
    0003 c 79-blabla

    What I want to do is after the entry of the ID (0003) and type_code (25), he will show me the result on three components of text entry in the ADF with the value 0003, 25 page and c-blabla.

    Currently, I use only ID to query the data, but I would use two key values to find specific data.

    Thank you very much for taking the time to think about it,

    Sincerely,

    Alto

    If you had multiple values to use for the request, one approach would be to create a display object. Whether you are creating the view object, in step 6, you will add two bind variables. Call a "pTypeCode" and call the other "pId". Click on the back button so that you're still in step 5, and modify the WHERE clause as follows:

    (ID = :pId) and (Type_code = :pTypeCode)
    

    After you have done this, double-click the Module of the Application and add your new view object. In the tab control of data, click the Refresh button. Expand your new view object tab of data control-> expand "French"-> note that you now have a new method called "ExecuteWithParams".

    Open your workflow diagram-> delete your existing "SetCurrentRowKeyValues" method-> made slide on your new "ExecuteWithParams" operation on the diagram. When you do so, you should see two settings you need to complete the dialog box. Just as you did before with the SetCurrentRowKeyValue method, set the values for the pTypeCode and the nest.

    Add the case of control flow of the new method to your existing view-> make the new method, the default value.

    On your form, remove the fields that have been placed here who uses the old object from view. On the tab of data control, drag the fields you want to be placed on the inside of your new view object form.

    Dan

  • Impersonate user without privilege preferred to access the registry on Windows Server 2008 key/value.

    Hello

    I'm trying to impersonate another Administrators\ [an other domian user] to do some access to the registry key/value with an Administrators\ [my domain user].

    Failed with some registry access denied.

    The code is quite format.

    1. the user to logon: LogonUser (username, domain, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, Ref token)! = 0)

    2 DuplicateToken: DuplicateToken (token, SecurityImpersonation, ref tokenDuplicate)

    3 impersonate another user:
    m_ImpersonatedUser = new WindowsIdentity (tokenDuplicate);

    using (m_ImpersonationContext = m_ImpersonatedUser.Impersonate ())

    {

    access to the registry key.

    ...
    }

    This works on Windows7 and some windows server 2008, if the new WindowsIdentity.AuthenticationType is "Kerberos", then it works, but if it's the "negotiation", it will fail.

    Can someone tell how to force the AuthenticationType to be "Kerberos"?

    Thank you.

    Hello

    I suggest you to ask your question at the following link.

    http://social.technet.Microsoft.com/forums/en-us/101ed379-ba6c-4974-BF47-c0e068515116/Server

  • change registry key values

    It was recommended to me that I have change many registry key values to improve my performance of the system, but I thought that I could better get a second opinion on this before proceeding.
    These are the keys that have been recommended to change...
    (1) MenuShowDelay... present value... 400... recommended value... 200
    (2) SendAlert... present value... Value N/A...recommended... 0
    (3) Crashdumpenabled... present value... 2... recommended value... 0
    (4) LogEvent... present value... 1... recommended value... 0
    (5) DoReport... present value... Value N/A...recommended... 0

    Any suggestions would be greatly appreciated.
    System = Vista Home Premium SP 2, ram 1 GB, AMD dual core 4200 + 2.20 GHz

    Thanks for all your comments... I think I'll leave just well enough alone. I learned these so-called "tweaks" by one of my IT friends... but it is always doing things to its systems... while I'm more than an amateur... .well I appreciate learning new things... In any case thanks for your comments.

  • Don't forget to call with several key-value pairs

    I'm looking to invoke the application Remember and I try to send a title and a due date. The problem is that I don't know the format for sending multiple data items. Can someone help me with the format what should I use to having an remember entry created with a title and a due date?

    function invokeRemember (someTitle, someDate) {}
    BlackBerry.Invoke.Invoke ({}
    target: "sys.pim.remember.composer."
    Action: "bb.action.ADD."
    URI: "remember://notebookentry?title=" + someTitle + '& duedate =' + someDate;
    (}, onInvokeSuccess, onInvokeError);
    }

    I think "Ivoking Basic Applications" page shows how to do this: https://developer.blackberry.com/html5/documentation/remember.html

    It looks like you can send the following in the field of the URI:

    You can also add the following key-value pairs by adding a question mark (?) after the URI:
    
    title=
    description=
    duedate=<# SECONDS SINCE EPOCH>
    status=NotActionable, Completed, NotCompleted
    notebookid=:
    tags=
    
  • Need help to build the query/pl-sql block to get the query result and the name of column from DB table in the form of key-value pairs.

    Hi Experts,

    I have a DB table has columns of more than 50.

    I question this table, it should only return one line at any time. as sqldeveloper below image.

    here, I need to build block pl/sql-query, Discover the column in the table as a key and query result as values.

    Eg:     Key                         -  Value

    TASK_EVENT_ID - 1765

    EVENT_TYPE - ASR_UPDATE

    ... etc until all of the columns in my table.

    Experts please comment on that point, appreciate your help on this.

    Thank you

    -Vincent.

    Here is an approach using DBMS_SQL to iterate over the columns of key / value to assign... (Little code snipped for brevity)

    create or replace procedure (task_expired)

    v_store_id in full,

    v_task_action_id in full,

    v_job_id in full

    )

    as

    -[SNIP code...]

    v_sql VARCHAR2 (4000): = ' select * from my_table where PK = 123';  -Your SQL here!

    v_v_val VARCHAR2 (4000);

    v_n_val NUMBER;

    v_d_val DATE;

    v_ret NUMBER;

    c NUMBER;

    d NUMBER;

    col_cnt INTEGER.

    f BOOLEAN;

    rec_tab DBMS_SQL. DESC_TAB;

    col_num NUMBER;

    vAsString VARCHAR2 (4000);

    BEGIN

    -[SNIP code...]

    Message_properties. CORRELATION: = "EDF_EVENT";

    MSG: = SYS. AQ$ _JMS_BYTES_MESSAGE. Construct();

    Msg.set_string_property ('queueName', ' shipping/csi_cth');

    Msg.set_string_property ('MODE', 'CR8');

    c: = DBMS_SQL. OPEN_CURSOR;

    DBMS_SQL. PARSE (c, v_sql, DBMS_SQL. NATIVE);

    d: = DBMS_SQL. Execute (c);

    DBMS_SQL. DESCRIBE_COLUMNS (c, col_cnt, rec_tab);

    1.col_cnt J

    LOOP

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_n_val);      -Number

    WHEN 12 CAN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_d_val);      -Date

    ON THE OTHER

    DBMS_SQL. DEFINE_COLUMN (c, j, v_v_val, 2000);   -Else treat as varchar2

    END CASE;

    END LOOP;

    LOOP

    v_ret: = DBMS_SQL. FETCH_ROWS (c);

    WHEN OUTPUT v_ret = 0;

    1.col_cnt J

    LOOP

    -Fetch each column to the correct data type based on coltype

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. COLUMN_VALUE (c, j, v_n_val);

    vAsString: = to_char (v_n_val);

    WHEN 12 CAN

    DBMS_SQL. COLUMN_VALUE (c, j, v_d_val);

    vAsString: = to_char (v_d_val, ' DD/MM/YYYY HH24:MI:SS');

    ON THE OTHER

    DBMS_SQL. COLUMN_VALUE (c, j, v_v_val);

    vAsString: = v_v_val;

    END CASE;

    Msg.set_string_property (rec_tab (j) .col_name, vAsString);

    END LOOP;

    END LOOP;

    DBMS_SQL. CLOSE_CURSOR (c);

    DBMS_AQ. ENQUEUE (queue_name-online 'cbus.aqjms_common',

    Enqueue_options => Enqueue_options,

    Message_properties => Message_properties,

    Payload-online msg,

    Msgid => Message_handle);

    dbms_output.put_line ('00 Msgid =' |) Message_handle);

    dbms_output.put_line('===Done=');

    -[SNIP code...]

    END;

    /

  • Cursor of two or more with the same key value

    Is it possible to have a slider (c1) that has a key value that can be used in another cursor (c2)?

    See the example below:

    / * Sum of all economies where the amount is 50,000 or more * /.

    CURSOR c1 IS

    Select cusno, sum (savings)

    deposits

    Cusno group

    After having sum (savings) > = 50000;

    / * All customers in the system * /.

    CURSOR c2

    Select firstname, lastname, cusno, address, telephone

    of the customer;

    This, I would like to put in a file: all customer (from c2) information with economies falling into the first slider (c1).

    Is this possible?

    1 with cust_dep like)

    2 SELECT CUSNO, SUM (savings) DEPOSITS BY CUSNO GROUP TOTALS)

    3. SELECT c.firstname

    4, c.lastname

    5, c.cusno

    6, c.address

    7, c.phone

    8, d.totals

    9. customer'S c

    10, cust_dep d

    11 WHERE c.cusno = d.cusno

    12 AND d.totals > = 50000

    13 * ORDER BY c.cusno ASC

    SQL > /.

    FIRSTNAME LASTNAME CUSNO

    --------------- --------------- ----------

    ADDRESS PHONE TOTALS

    -------------------------------------------------- --------------- ----------

    John            Doe                      1

    123 main St. Anytown, USA 12345-123-456-7890 50000

    John Smith 3

    456 main St. Anytown, USA 12345 132-546-7890 58000

    SQL >

    SQL >

  • Helps getting metadata keys / values

    Hi all

    Struggling a bit trying to figure out how to display a vApps of metadata entries.  For the moment just try to get a list of key/value.  I'm away insofar as:

    
    Vapp vapp = Vapp.GetVappByReference(client, vAppRef);
    
    
    Metadata md = vapp.GetMetadata();
    
    
    Dictionary<string, string> mdDict = md.GetMetadataEntries();
    
    
    

    But apparently my dictionary is empty

    I can get a list of metadata keys by doing:

    List<MetadataEntryType> mdList = md.GetTypedMetadataEntries();
    foreach (MetadataEntryType mdEntry in mdList)
    {
        Response.Write(mdEntry.Key);
    }
    

    But that's all I can get.  No values - what I am doing wrong?

    Thank you!

    Mark

    Hello

    Attached a snippet of java code to read typed metadata entries.

          Vdc vdc =
                Vdc.getVdcById(vcloudClient,
                      "urn:vcloud:vdc:506a798d-9638-49cf-a415-45f95cbc194f");
          Metadata vdcMetadata = vdc.getMetadata();
          for (MetadataEntryType entry : vdcMetadata.getTypedMetadataEntries()) {
             System.out.println(entry.getKey());
             if (entry.getTypedValue() instanceof MetadataStringValue) {
                System.out.println(((MetadataStringValue) entry.getTypedValue())
                      .getValue());
    // similarly based on the other typed metadata entires you can type cast accordingly and consume them.
             }
          }
    

    The vCloud API programming guide contains more information on this side atleast API to understand how they work.

    Working with the metadata of the object

    Kind regards

    Rajesh Kamal.

  • How to programmatically Exchange data (key-value pairs) with operating system called?

    Hi all

    Is there a programmatic way to Exchange data (of the key-value pairs) with the guest OS?

    We have an application that runs inside comments, and we want that this application in order to use this mechanism to Exchange data. At this point, the guest have no network connectivity. One thing that might work for us is to use the registry to the guest operating system. But I'm not sure how to handle the registry of the guest operating system.

    We looked in the VirtualMachineConfigInfo.extraConfig property, but these key-value pairs are not accessible from the comments (at least this is what I know)

    any ideas?

    Thank you

    Onur

    I think that it is better to use an environment variable or file to Exchange data with the guest operating system.

    http://www.doublecloud.org/2012/03/set-environment-variables-in-guest-operating-system-on-VMware/

    http://www.doublecloud.org/2012/03/read-environment-variables-in-guest-operating-system-on-VMware/

    If you really want the registry value,

    http://www.doublecloud.org/2012/02/run-program-in-guest-operating-system-on-VMware/

    http://en.Wikipedia.org/wiki/Windows_Registry#Command_line_editing

    Good luck!

    Steve, author of the Open Source, VMware VI and vSphere SDK VI Java API

  • To access the inside loops key/value pairs

    According to the docs of Shopify, liquid allows access to key/value pairs in for loops, as follows:

    {% for item in hash %}   {{point [0]}}: {{point [1]}} {% endfor %}

    This does not work in the liquid renderer in British Colombia; the output of the key/value tags are empty. Here is an example of using the always available this.urlculture global object:

    {   ...   {"urlculture": {"ModuleName": "urlculture", "culture": "EN"},...}

    {% for obj in this.urlculture %}

    {{ obj | json }}
    Key: {{obj [0]}}
    Value: {{obj [1]}}
    {% endfor %}

    This is the result I get:

    {
      "Key": "moduleName",
      "Value": "urlculture"
    }
    
    Key:
    Value:
    
    {
      "Key": "culture",
      "Value": "EN"
    }
    
    Key:
    Value: 

    Access by name (such as {{ obj.Key }} ) also fails.

    Am I missing something, or is this all just not yet implemented?

    Also, why isn't the nice formatting illustrated in this visible post editor in the current post code?

    Thank you, Robert.

    This was a great find. And you'll be happy to learn that we have set and it will work in the next version (unfortunately the hotfix does not update today, we have deployed on the beta version).

    You will then be able to do things like:

    {% for getParam in globals.get %}
    {{getParam[0]}} = '{{getParam[1]}}'
    {% endfor %}

    -Lucian

  • Add key/value pairs to an ArrayList from a HashMap in

    I'm trying to create a HashMap, loop through this hash table, and finally, I try to create an ArrayList of key/value - of the HashMap pairs - containing, in its set of value, a parameter value. I know that maybe it's a little difficult to understand, so I provided my code to make sense what I'm trying to accomplish.
    package data;
    
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Map;
    
    public class ProductInventory 
    {  
        private Map <String, ArrayList<String>> product;
        private ArrayList <String> buildProduct;
        private ArrayList <ArrayList<String>> addProduct;
    
        public ProductInventory()
        {   
            /** Set default values **/
    
            product = new <String, ArrayList<String>> HashMap();
            buildProduct = new ArrayList<String> ();
            addProduct = new ArrayList<ArrayList <String>> ();
            
            /** START - Create ArrayList for each item and add to HashMap**/
    
            ArrayList <String> c1 = new ArrayList<String>();
            ArrayList <String> c2 = new ArrayList<String>();
    
            c1.add("computer"); c1.add("Apple"); c1.add("iPad2"); c1.add("499.00");
            c2.add("computer"); c2.add("Asus"); c2.add("Zenbook"); c2.add("1449.00");
    
            ArrayList <String> tv1 = new ArrayList<String>();
            ArrayList <String> tv2 = new ArrayList<String>();
    
            tv1.add("television"); tv1.add("Panasonic"); tv1.add("Viera"); tv1.add("899.00");
            tv2.add("television"); tv2.add("Samsung"); tv2.add("Series 6"); tv2.add("1597.00");
    
            ArrayList <String> a1  = new ArrayList<String>();
            ArrayList <String> a2 = new ArrayList<String>();
    
            a1.add("audio"); a1.add("Bose"); a1.add("321 GS Series III"); a1.add("999.00");
            a2.add("audio"); a2.add("Onkyo"); a2.add("HT-S3400"); a2.add("329.00"); 
    
            /** END - Create ArrayList for each item and add to HashMap **/
    
            /** Add entrys to HashMap **/
    
            product.put("CMC769LLA",c1);
            product.put("CUX31EDH72",c2);
            product.put("TVTCL50E3",tv1);
            product.put("TVUN55D6000",tv2);
            product.put("A321GSIIIBK",a1);
            product.put("AHTS3400",a2);
    
        }
    
        /** For the sake of this example, the productAttribute parameter will be equal to "computer"  **/
        
        public void setProducts(String productAttribute)
        {
                for (Map.Entry <String, ArrayList<String>> entry : product.entrySet()) /** Loop through all entrys in the HashMap **/
                {              
                    for (String s: entry.getValue()) /** Loop through all values in HashMap**/
                    {
                        /** Add product attributes **/
                        if (s.equals(productAttribute))  /** Check to see if param exists in the value set**/
                        {
                           /** Add key to buildProduct ArrayList **/
                            buildProduct.add(entry.getKey()); 
    
                             /*Loop through values of the corresponding key and add to buildProduct*/
                            for (Iterator<String> i = entry.getValue().iterator(); i.hasNext();)
                            {    
                                    Object item = i.next(); 
                                    buildProduct.add(item.toString());
                            }
                            
                            /** Add buildProduct arrayList to product arrayList **/
                            addProduct.add(buildProduct);
                            break; /** Exit nested loop**/
                        }
                    }
                }  
        }
    }
    For the desired output, it can be assumed that the value of the productAttribute parameter is "computer."

    Output current of the ArrayList addProduct:
    Size of ArrayList: [2]
    Content of each element:
    [0] - (Size [10]
          [0] - "CMC769LLA"
          [1] - "Computer"
          [2] - "Apple"
          [3] - "iPad2"
          [4] - "499.00"
          [5] - "CUX31EDH72"
          [6] - "Computer"
          [7] - "Asus"
          [8] - "Zenbook"
          [9] - "1449.00"
    [1] - (Size [10])
         /**  It includes the exact same content as element [0] **/
    Desired output of the ArrayList addProduct:
    Size of ArrayList: [2]
    Content of each element:
    [0] - (Size [5])
          [0] - "CMC769LLA"
          [1] - "Computer"
          [2] - "Apple"
          [3] - "iPad2"
          [4] - "499.00"
    [1] - (Size [5])
          [0] - "CUX31EDH72"
          [1] - "Computer"
          [2] - "Asus"
          [3] - "Zenbook"
          [4] - "1449.00"
    I can't understand what I'm doing wrong. Any help would be greatly appreciated.

    You have defined buildProduct and then add to it.

    buildProduct = new ArrayList ();
    

    Do this assignment at the top of each loop so that a new ArrayList is allocated.

    1 buildProduct = new ArrayList () ;
    2. Add your 4 things using buildProduct.add
    3. Add buildProduct to your 'mother' object - addProduct.add (buildProduct);
    4. loop back to step 1 and create a new arraylist to the next set of elements

  • What is the best way to move with esx3.5 vmtools key/value pairs?

    Hello

    I found both candidates to store the key/value pairs for a vmware client. My ultimate goal is to run a process on the VC box that updates these data, and then read through the software tools of vm on the host (somehow) were invited.

    The first method is through 'guestinfo' settings which can be adjusted in four ways:

    Add the variable of the vmx fileprompt.
    Set the variable manually on the client (using vmwareservice.exe - cmd "infoset");
    using vmware-cmd (vmware-cmd & lt; vm-cfg-path & gt; setguestinfo & lt; variable & gt; & lt; value & gt;)
    the use of vmcom.dll COM objects (seems to be deprecated in ESX 3.5)
    These variables are easily accessible on the client by running vmwareservice.exe - cmd 'info-get guestinfo.variablename '. However, I cannot find a convenient way (better based on powershell) of their definition of a scheduled task or service to VC area.

    The second method is the customfields of guests in VItoolkit property, which can be defined as follows:

    get - vm MyVMName | Game-CustomField-nameOfValue name-value DataToBeStored
    Unfortunately, I am unable to access these data in the comments, and indeed I do not know if this is possible. If this isn't the case, I guess my only recourse would be to write a tool to connect to Web services on the VC box with a low privilege account. I prefer not to do this because it means the network infrastructure implementation to point the guest to the right VC, development of custom etc permissions...

    So, my questions are:

    • Is it possible to define variables of guestinfo through VI Toolbox, running on the virtual circuit?

    • Is it possible to read customfields on the client, through the vmtools?

    • Or is there another method to make this key/value data exchange?

    You can add/edit entries in the VMX file like this

    $vm = get-vm  | Get-View
    
    $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
    $vmConfigSpec.extraconfig[0].Key= "guestinfo"
    $vmConfigSpec.extraconfig[0].Value = "whatever"
    
    $vm.ReconfigVM($vmConfigSpec)
    
  • by the way of multiple key values

    Hi all

    I need to know how to pass the keystore multiple values for more information of a simultaneously.i esxserver came to know that keystore value from the variable approx.

    ' %JAVAHOME%"\bin\java-'%»-Djavax.net.ssl.trustStore="%VMKEYSTORE% LOCALCLASSPATH' cp - Xmx1024M ARG %.

    can I know what - Xmx1024M in this average line. ? and if I put several key values:

    c:\VMware-Certs\vmware.keystore;c:\VMware-Certs\vmware1.keystore in the variables env, I get error.

    Can I get a detailed explanation of what is happening.

    Thanks in advance.

    Simo

    You can import the certificates of all servers in the same keystore file and just refer to that one.

    Steve JIN, VMware engineering

    Creator of VI Java API: http://vijava.sf.net

  • How to combine the large number of tables of pair key / value in a single table?

    I have a pair key / value tables of 250 + with the following features

    (1) keys are unique within a table but may or may not be unique in the set of tables
    (2) each table has about 2 million lines

    What is the best way to create a single table with all unique key-values of all these paintings? The following two queries work up to about 150 + tables
    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select coalesce(t1.key, t2.key, t3.key) as key
    ,      max(t1.val) as val1
    ,      max(t2.val) as val2
    ,      max(t3.val) as val3
    from t1
    full join t2 on ( t1.key = t2.key )
    full join t3 on ( t2.key = t3.key )
    group by coalesce(t1.key, t2.key, t3.key)
    /
    
    with
      master as ( select rownum as key from dual connect by level <= 5 )
    , t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select m.key as key
    ,      t1.val as val1
    ,      t2.val as val2
    ,      t3.val as val3
    from master m
    left join t1 on ( t1.key = m.key )
    left join t2 on ( t2.key = m.key )
    left join t3 on ( t3.key = m.key )
    /

    A couple of questions, then a possible solution.

    Why the hell you have 250 + tables pair key / value?

    Why the hell you want to group them in a table containing one row per key?

    You could do a pivot of all the tables, not part. something like:

    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select key, max(t1val), max(t2val), max(t3val)
    FROM (select key, val t1val, null t2val, null t3val
          from t1
          union all
          select key, null, val, null
          from t2
          union all
          select key, null, null, val
          from t3)
    group by key
    

    If you can do it in a single query, Union all 250 + tables, you don't need to worry about chaining or migration. It may be necessary to do this in a few passes, depending on the resources available on your server. If so, I would be inclined to first create the table, with a larger than normal free percent, making the first game as a right inset and other pass or past as a merger.

    Another solution might be to use the approach above, but limit the range of keys with each pass. So pass we would have a like predicate when the key between 1 and 10 in every branch of the union, pass 2 would have key between 11 and 20, etc. In this way, everything would be straight inserts.

    That said, I'm going back to my second question above, why the hell you want or need to do that? What is the company you want to solve. There could be a much better way to meet the requirement.

    John

Maybe you are looking for

  • Why captcha box is missing in Add - this app?

    It started today (22/10/12 about 1: 00 a.m. et.) I used the Add - this app and now the captcha box is absent from the sending of Add page - this. This has happened with a duration of at least 5. I changed nothing.

  • External hard drive USB

    Primarily for backup purposes, I have connected via USB, a new external hard drive to my Compaq Presario (using Windows 7) but I don't see how to access or use. Removal and replacement of the plug USB produce noise sound from the PC that I expect.  S

  • Toshiba Portege R500 - external display display problem

    At my work, we have a number of series laptops Toshiba Portege R500. All laptops are home in a Toshiba Slim Port Replicator II. Laptops are all running a version of Windows XP Professional with Service Pack 2 applied (and of course a few customizatio

  • IMac 27, making a strange noise in the rear lower left

    A few days ago that my Imac is strange a hum, which last usually 1 or 2 hours after I turn it on, then abruptly stopped. I tried all these things without permanent result: 1 reset the SMC 2 reset the PRAM and NVRAM 3. clean the vents 4. store any ele

  • Het expensive dvd / cdr microsoft

    ALS ik said apperaat aanzetten squeeze vermelding ik wil's code 10, wat wil dat hotel?