Setting CMP Primary Key equal to DB primary key

Is their a mechanism in Oracle JDeveloper(or other tools) for setting the primary key of auto-generated CMP beans to equal the database primary key?
If so, could someone kindly share their views on the benefits/drawbacks of this approach to CMP?
-Teodoro Sorgo

Brice,
It sounds like you have a page process on every page. Why not just wait to process all of the data on the last page, using your own pl/sql process? Say you have pages 1-3 with items
P1_ID
P1_NAME
P2_DEPT
P2_LOCATION
P3_OTHER
Only have a process on Page 3 have that does
insert into table (id, name, dept, location, other) values
(:P1_ID, :P1_NAME, :P2_DEPT ...
Anton

Similar Messages

  • Unique key violation i.e. primary key violation in JSF page

    Hi, I am using Jdeveloper 11.1.1.5.0 and working with adf fusion web application. I have created entity object and view object. In view object I have primary key and I have set it's type to DB sequence. THe problem is though the attribute is DB sequence. IN JSF page it show unique key violation i.e. primary key violation. Please help me

    So, do you have a trigger in the database that updates the value of the primary key? Or do you assign the value in some other way?
    You can check [url http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/toc.htm]the docs for information about the ways it can be done.

  • How can I set up my time capsule as the primary base station with a centurylink router? I'm trying to extend my coverage, increase signal strength, and be able to connect a printer.

    I recently moved and now I'm trying to set up my Time Capsule as the primary base station or router with an existing network that has a Centurylink modem/router. The TC still has the settings for my old network. I also have backups on it. I have the data backed up to another HD so it's not an issue to return it to factory settings if doing so deletes the back ups. Do I need to restore it to the factory settings to set it up? Also, what settings would I select on the TC (and the Centurylink modem/router) in order for the TC to serve as the router, instead of the Centurylink router? I want to be able to use the TC to back up my Mac's, print wirelessly, and improve overall performance. I tried setting the TC up and ended with 2 different networks. Can anyone please help me with this?

    The TC has to plug into the existing modem router by ethernet.. you cannot use wireless.
    You have a choice of which is router.. only if Centurylink agree to bridge their modem router.. this has to be done by the ISP and often they do not allow it.
    Is your broadband cable or adsl or fibre or ???
    If it is cable and you are allowed to purchase your own cable modem pick a pure modem version with no router in it.. plug the TC into it by ethernet.
    Setup the TC in DHCP and NAT mode.. (depending on broadband type).
    You must reset the TC to factory to do the setup.. no files are lost at all.
    Here is my current recommended setup.. with Yosemite life has become harder than ever.
    Factory reset universal
    Power off the TC.. ie pull the power cord or power off at the wall.. wait 10sec.. hold in the reset button.. be gentle.. power on again still holding in reset.. and keep holding it in for another 10sec. You may need some help as it is hard to both hold in reset and apply power. It will show success by rapidly blinking the front led. Release the reset.. and wait a couple of min for the TC to reset and come back with factory settings. If the front LED doesn’t blink rapidly you missed it and simply try again. The reset is fairly fragile in these.. press it so you feel it just click and no more.. I have seen people bend the lever or even break it. I use a toothpick as tool.
    N.B. None of your files on the hard disk of the TC are deleted.. this simply clears out the router settings of the TC.
    Setup the TC again.
    ie Start from a factory reset. No files are lost on the hard disk doing this.
    Then redo the setup from the computer with Yosemite.
    1. Use very short names.. NOT APPLE RECOMMENDED names. No spaces and pure alphanumerics.
    eg TCgen5 and TCwifi for basestation and wireless respectively.
    Even better if the issue is more wireless use TC24ghz and TC5ghz with fixed channels as this also seems to help stop the nonsense. But this can be tried in the second round.
    2. Use all passwords that also comply but can be a bit longer. ie 8-20 characters mixed case and numbers.. no non-alphanumerics.
    3. Ensure the TC always takes the same IP address.. you will need to do this on the main router using dhcp reservation.. or a bit more complex setup using static IP in the TC. But this is important.. having IP drift all over the place when Yosemite cannot remember its own name for 5 min after a reboot makes for poor networking. If the TC is main router it will not be an issue.
    4. Check your share name on the computer is not changing.. make sure it also complies with the above.. short no spaces and pure alphanumeric.. but this change will mess up your TM backup.. so be prepared to do a new full backup. Sorry.. keep this one for second round if you want to avoid a new backup.
    5. Mount the TC disk in the computer manually.
    In Finder, Go, Connect to server from the top menu,
    Type in SMB://192.168.0.254 (or whatever the TC ip is which you have now made static. As a router by default it is 10.0.1.1 and I encourage people to stick with that unless you know what you are doing).
    You can use name.. SMB://TCgen5.local where you replace TCgen5 with your TC name.. local is the default domain of the TC and doesn't change.
    However names are not so easy as IP address.. nor as reliable. At least not in Yosemite they aren't. The domain can also be an issue if you are not plugged or wireless directly to the TC.
    6. Make sure IPv6 is set to link-local only in the computer. For example wireless open the network preferences, wireless and advanced / TCP/IP.. and fix the IPv6. to link-local only.
    There is a lot more jiggery pokery you can try but the above is a good start.. if you find it still unreliable.. don't be surprised.
    You might need to do some more work on the laptop itself. eg Reset the PRAM.. has helped some people. Clean install of the OS is also helpful if you upgrade installed.
    Tell us how you go.
    Someone posted a solution.. See this thread.
    Macbook can't find Time Capsule anymore
    Start from the bottom and work up.. I have a list of good network practice changes but I have avoided Yosemites bug heaven.
    This user has had success and a few others as well.
    RáNdÓm GéÉzÁ
    Here is why Yosemite has fundamental issues.
    http://arstechnica.com/apple/2015/01/why-dns-in-os-x-10-10-is-broken-and-what-yo u-can-do-to-fix-it/

  • Primary Key Materlized View and primary key in master tables

    We are using Oracle 11g2 and I created a materlized view on several master tables. The master tables all have primary key, but I did not include all primary key columns in the defining query.
    According to Oracle Manual e10592 Specify WITH PRIMARY KEY to create a primary key materialized view. This is the default ....
    The master table must contain an enabled primary key constraint, and the defining query of the materialized view
    must specify all of the primary key columns directly.My MV created OK and works. My question is what can be the impact on my MV? Could it hit the performance. It takes 40 minutes for the MV to be created and 5 minutes to refresh for single row insert in each mater table. I would like to see it refresh in seconds.

    Retrieving rows from the mview is purely a function of the number of rows and indexing on the mview itself. Refreshing the mview wall time depends on the quality of the query used to refresh the mview. Whether you include PKs from the source table in the mview is of little, or no, consequence here. What matters is the execution path of the refresh query. Is there proper indexing on the underlying tables to support the joins. Did you use mlog$_s to enable fast refresh - are mlog$_s even usable for your mview. There are a number of possible causes to your problem and we do not have enough information to make an estimate of the problem.
    BTW, if the mview could refresh in seconds w/o mlog$_s, you probably do not need an mview.

  • How to khow how many foreign key are referenceing the primary key

    sir i would like to know that how many foreign key are referencing the primary key of a table
    is any command to know the table name
    please suggest
    thanks in advance..

    In the query below, table_name is the name of the table whose primary key is referenced.
    SELECT b.owner owner
    ,b.constraint_name foreign_key
    ,b.constraint_type constraint_type
    ,b.table_name referencing_table
    ,b.r_constraint_name primary_key
    ,c.table_name referenced_table
    ,c.column_name referenced_column
    FROM all_constraints a
    ,all_constraints b
    ,all_cons_columns c
    WHERE a.owner = b.owner
    AND a.table_name = :table_name
    AND a.constraint_type = 'P'
    AND b.r_constraint_name = a.constraint_name
    AND b.constraint_type = 'R'
    AND c.constraint_name = a.constraint_name
    AND c.owner = a.owner;
    If the name of the primary key is known, the query below
    select * from all_constraints where constraint_type = 'R' and r_constraint_name = :pk_name

  • HT1175 how do you set the airport time capsule as the primary base station rather than as a network client?

    how do you set the airport time capsule as the primary base station rather than as a network client?

    The Time Capsule needs to connect to a simple modem......not a modem/router or gateway type of device that is often furnished by Internet Service Providers.
    So, the first logical question here would be......
    What is the make and model number of the device that you call your "modem"?

  • Just got a used airport base station. Set it up and getting wif signal. when I try to hook up on a computer it asks for a security key. where can I locate key?

    just got a used airport base station. Set it up and getting wif signal. when I try to hook up on a computer it asks for a security key. where can I locate key?

    If you mean the hexidecimal equivalent of the alphanumeric password, then you can find this via the AirPort Utility, as follows:
    AirPort Utility > Select the AirPort > Manual Setup
    On the AirPort Utility's menubar select Base Station > Equivalent Network Password

  • HT202667 I am trying to make one of my secondary emails my primary and remove my current primary.

    I am trying to make one of my secondary emails my primary and remove my current primary as I am going to be closing my current primary soon to tidy up all email correspondence. The system seems to remember my secondary after I delete it and try to assign it as the primary.

    If you don't have access to your rescue email account (you won't be able to change it until you can answer your questions) then you will have to contact Support in your country to get the questions reset.
    Contacting Apple about account security : Contact Apple for help with Apple ID account security
    If your country isn't on that page then try this form to contact Support : https://www.apple.com/emea/support/itunes/contact.html
    When they've been reset you can then update your rescue email address to an account that you have access to for potential future use : Manage your Apple ID primary, rescue, alternate, and notification email addresses

  • Set a string variable equal to a JTextField entry

    Like the title says, how could I go about setting a string variable equal to a JTextField entry

    Ah, I remember you.
    http://forum.java.sun.com/thread.jspa?threadID=5267710
    You've been told to read the API before.
    At least you should show some effort. In your post state, I read the API and I tried this method or that method but it didn't work because of so and so. Otherwise, you may appear lazy, and that just won't do.
    Edited by: petes1234 on Feb 24, 2008 7:38 AM

  • Hi guru's what is forign key , and what is foriegn key table

    hi guru's what is forign key , and what is foriegn key table

    hi...
    Foreign key is nothing but simply we can say,
    A field in one table related to field in another table..see the below example...
    consider, there are two tables like emp_personal and emp_official .
    In emp_personal table , the fields are  empid,empname, dob for example. In this table, empid is the primary key field.
    In emp_official table , the fields are empid,dept,designat ion for example. In this also, empid is the Primary key or may not be a Primary key field.
    now we relate these two tables using the foreign key relationship. Foreign key relationship is used to avoid the redundancy mainly...
    now, emp_personal is the Check table( Bcos it holds the empid field, which has the primary key...)
    emp_official table is the Foreign key table (Bcos it holds the empid field, which may or may not be a Primary key).
    now, we foreign key relationship is given. (click the KEY Like  icon in ABAP Dict - Database Table : Emp Official )
    Tables are ready to enter the records...for example create some 5 records in the emp_personal table .
    Table : emp_personal :   Primary Key - empid
    empid     empname    empdob             Status
       1            AAA          1.1.1990          Record saved successfully
       2            BBB          2.2.1990          Record saved successfully
       3            CCC          3.3.1990          Record saved successfully
       4            DDD          4.4.1990          Record saved successfully
       5            EEE          5.5.1990          Record saved successfully
    records are saved in the table : emp_personal.
    now, we are tryiing to create records in emp_official table.
    Table : emp_official :   Primary Key or not a Primary Key - empid
    empid          dept        designation             Status
       1            Dept1        S.E                 Record saved successfully
       2            Dept2       S.SE               Record saved successfully
    now, if u try to create the record which is not in the table emp_personal , which has the empid = 6. but it'll not allow us to create the record 6, bcos of the foreign key relationship between these two tables....
       6            Dept6       P.M                Record doesn't exist......
    now, the foreign key relationship helps us to avoid the duplicate entry......
    Foreign key relationship is possbile between the tables having atleast one same type of field. Also the Technical characteristics of the fields should be same . this is done in the value table.....
    this is the concept of Foreign key...I think this explantion is enough to describe the Foreign key....

  • No entry for account key 1002 in HRA transaction key in Account assignment

    Dear sap-gurus,
    the following problem occured. When posting a document (s-modelling), system displayed an error that there is no entry for account key 1002 in HRA transcation key in SPRO Account assignment.
    The document's size is very big, it considers many lime items in it.  May be this happened because of this?
    In F1 for SPRO Account assignment we have:
    In this step, you assign a document split account to an account key. This is a clearing acount (Transaction HRA) in Accounting.
    For various reasons, payroll data that is formatted for posting to accounting must be split into several documents per posting run. In Human Resources (HR), key 1001 is used for the breakdown of documents. A breakdown occurs if:
    There are several company codes
    There are different posting dates
    There are postings to G/L accounts, customer accounts, vendor accounts
    This is specified in the step Create Posting Variants (for example, document breakdown for expenses and payables)
    The document split account that is stored under the key 1001 is also used to clear the balance within a G/L account document for each business area.
    An additional split may be required depending on the size of the document in Financial Accounting. In this case, the clearing account specified under account key 1002 in transaction HRA, is used as the document split account.
    Further notes
    To avoid problems in current operations, it is advisable to set up a document split account even if a document breakdown is not necessary. In this way, you can avoid having to set up the system at short notice if changes are made to the settings or if there is an increased number of postings, or if cross-company code transactions occur.
    We have an entry 1001 and a clearing account for postings between several company codes. What are we supposed to do? How to avoid this error and post the documents to FI? Please, help!
    Best regards,
    Eldar

    Hello,
    How did you resolve this issue? Any inputs anyone.
    John

  • DM4 Insert Key without pressing the FN key

    Regardless of what setting is applied in the BIOS, the insert key always requires a combination of FN+Insert... 
    Is there any way to configure the keyboard to not require the FN key to get the insert key to work? A lot of apps use the Insert key to add new items (e.g., mind mapping software - insert adds new nodes).
    Thanks so much in advance!

    You might try this keytweak software to remap the key
    http://majorgeeks.com/KeyTweak_d4161.html

  • Using Arrow Keys to Move Pointer - Mouse Keys?

    Hello, I am trying to use Universal Access on a new MacBook Pro.
    Ideally, I would like to move the screen pointer by holding the function key (or some command type key) and the directional arrows - instead of using the mouse. Is there a way to map the keys to do this?
    I tried to turn on Universal Access and turning on Mouse Keys, but there are no instructions in the Help section that tell you which keys move in what directions. Anyhow, after confirming that it was on, no keys would move the pointer or do any mouse functions.
    Thank you!

    Hello Saksiri-san,
    Mouse Keys are controlled by the numeric keys which form a secondary keypad in the block: J->1, K->2, L->3, ;->-, U->4, I->5, O->6, P->*, 7->7, 8->8, 9->9, 0->/. M gives 0 and / gives +, all on an English-language keyboard of course. The movement is U or 4 to the left, O or 6 to the right and so on. The I or 5 key gives the mouse click.
    Once Mouse Keys are on, you will normally need to use the fn key as well as those in the secondary numeric keypad to move the mouse. This can be avoided by setting the default option to "software functions" in the Keyboard tab of the Keyboard and Mouse pane of System Preferences.
    HTH
    Archie

  • Getting Super Key to work as FN key.

    Hi.
    Recently I've bought port replicator II for my Thinkpad T40. When laptop is connected to replicator the lid is closed and I use additional keyboard. I was wondering, do You know how can I change the Super Key (the one with windows logo) to work as a FN key?
    Thanks in advance.
    Szelek.

    Do you mean to work as one of F1, F2, F3, etc? Or do you mean to work as the FN modifier key, that e.g., combines with the left arrow key to produce Home, and so on. Neither is trivial. The first shouldn't be too much trouble. The second will be a lot more trouble, and depending on your keyboard hardware, you may find yourself unable to fully replicate the FN keys behavior you want.
    What you need to do is the same for remapping this key as for any other key. You have to set it up differently for in the Linux Console/Virtual Terminals on the one hand, and in X on the other hand. (Unless you only use one of these.)
    For X, read up on xmodmap (manpage and Google it).
    For Linux console, the pipeline works like this. You press a key, and that generates a sequence of scancodes. These are reported by "showkey -s". The scancode sequence is then translated into a single keycode/keynumber. This is reported by "showkey -k". Then your keymap file translates that into a keysymbol. You can load your own keymap file using the command "loadmap", and your file can include other files, so it only needs to specify the keycode->keysymbol mappings it wants to overwrite. You can see your current mappings with "dumpkeys" and you can see all possible keysymbols with "dumpkeys -l".
    As unwelcome as this may be to hear, I really recommend that you read around a lot about "xmodmap" and "showkey" and "key remapping." I fumbled around with this stuff for months without really understanding it and it was frustrating voodoo that sometimes worked and usually didn't. Once you understand it, though, the voodoo aura will go away.
    If there were one or two excellent documentation sites, I'd point you to them, but I haven't found them. I had to learn by reading the man pages closely and reading 20-30 sometimes outdated, usually incomplete, overviews I found by Googling.
    Last edited by Profjim (2008-10-09 11:39:09)

  • Invalid Key Exception: Unsupported key type: Sun RSA public key, 1024 bits

    I am trying to retrieve certificates from Microsoft Keystore and extract its keys using SunMSCAPI in jdk 1.6. It gives me an invalid key exception, when I am trying to wrap the Symmetric key (which was previously used to perform AES encryption on data), using RSA algorithm.
    Code snippet:
               // RSA 1024 bits Asymmetric encryption of Symmetric AES key             
                // List the certificates from Microsoft KeyStore using SunMSCAPI.
                      System.out.println("List of certificates found in Microsoft Personal Keystore:");
                       KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
                       ks.load(null, null) ;
                       Enumeration en = ks.aliases() ;
                       PublicKey RSAPubKey = null;
                       Key RSAPrivKey = null;
                       int i = 0;
                       while (en.hasMoreElements()) {
                            String aliasKey = (String)en.nextElement() ;              
                            X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey) ;     
                            String sss = ks.getCertificateAlias(c);
                            if(sss.equals("C5151997"))
                            System.out.println("---> alias : " + sss) ;
                            i= i + 1;
                            String str = c.toString();
                            System.out.println(" Certificate details : " + str ) ;
                          RSAPubKey = c.getPublicKey();
                            RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
                            Certificate[] chain = ks.getCertificateChain(aliasKey);     
                       System.out.println("No of certificates found from Personal MS Keystore: " + i);
                // Encrypt the generated Symmetric AES Key using RSA cipher      
                        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());            
                       rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
                       byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);   
                       System.out.println("Encrypted Symmetric Key :" + new String(encryptedSymmKey));
                       System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
                       // RSA Decryption of Encrypted Symmetric AES key
                       rsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
                       Key decryptedKey = rsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);Output:
    List of certificates found in Microsoft Personal Keystore:
    ---> alias : C5151997
    Certificate details : [
    Version: V3
    Subject: CN=C5151997, O=SAP-AG, C=DE
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: Sun RSA public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
    Validity: [From: Mon Jan 24 18:17:49 IST 2011,
                   To: Wed Jan 23 18:17:49 IST 2013]
    Issuer: CN=SSO_CA, O=SAP-AG, C=DE
    SerialNumber: [    4d12c509 00000005 eb85]
    Certificate Extensions: 6
    [1]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 07 E5 83 A1 B2 B7 DF 6B 4B 67 9C 1D 42 C9 0D F4 .......kKg..B...
    0010: 35 76 D3 F7 5v..
    [2]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: E4 C4 2C 93 20 AF DA 4C F2 53 68 4A C0 E7 EC 30 ..,. ..L.ShJ...0
    0010: 8C 0C 3B 9A ..;.
    [3]: ObjectId: 1.3.6.1.4.1.311.21.7 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 30 30 2E 06 26 2B 06 01 04 01 82 37 15 08 82 .00..&+.....7...
    0010: D1 E1 73 84 E4 FE 0B 84 FD 8B 15 83 E5 90 1B 83 ..s.............
    0020: E6 A1 43 81 62 84 B1 DA 50 9E D3 14 02 01 64 02 ..C.b...P.....d.
    0030: 01 1B ..
    [4]: ObjectId: 2.5.29.17 Criticality=false
    SubjectAlternativeName [
    RFC822Name: [email protected]
    [5]: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
    DigitalSignature
    Non_repudiation
    Key_Encipherment
    Data_Encipherment
    [6]: ObjectId: 2.5.29.19 Criticality=true
    BasicConstraints:[
    CA:false
    PathLen: undefined
    Algorithm: [SHA1withRSA]
    Signature:
    0000: B3 C5 92 66 8D D7 ED 6D 51 12 63 CC F4 52 18 B9 ...f...mQ.c..R..
    0010: B8 A6 78 F7 ED 7D 78 18 DA 71 09 C9 AE C8 49 23 ..x...x..q....I#
    0020: F5 32 2F 0F D1 C0 4C 08 2B 6D 3C 11 B9 5F 5B B5 .2/...L.+m<.._[.
    0030: 05 D9 CA E6 F9 0A 94 14 E7 C6 7A DB 63 FE E5 EC ..........z.c...
    0040: 48 94 8C 0D 77 92 59 DE 34 6E 77 1A 24 FE E3 C1 H...w.Y.4nw.$...
    0050: D8 0B 52 6A 7E 22 13 71 D7 F8 AF D1 17 C8 64 4F ..Rj.".q......dO
    0060: 83 EA 2D 6A CA 7F C3 84 37 15 FE 99 73 1D 7C D1 ..-j....7...s...
    0070: 6D B4 99 09 62 B9 0F 18 33 4C C6 66 7A 9F C0 DB m...b...3L.fz...
    No of certificates found from Personal MS Keystore: 1
    Exception in thread "main" java.security.InvalidKeyException: Unsupported key type: Sun RSA public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
         at sun.security.mscapi.RSACipher.init(RSACipher.java:176)
         at sun.security.mscapi.RSACipher.engineInit(RSACipher.java:129)
         at javax.crypto.Cipher.init(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at com.sap.srm.crpto.client.applet.CryptoClass.main(CryptoClass.java:102)
    Edited by: sabre150 on 18-Jul-2011 03:47
    Added [ code] tags to make code readable.

    A bit of research indicates that the classes of the keys obtained by
                          RSAPubKey = c.getPublicKey();
                               RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()are sun.security.rsa.RSAPublicKeyImpl and sun.security.*mscapi*.RSAPrivateKey . It seems that for Cipher objects from the SunMSCAPI provider cannot accept RSA public keys of class sun.security.rsa.RSAPublicKeyImpl and that the SunMSCAPI will only accept RSA private keys of class sun.security.mscapi.RSAPrivateKey.
    This came up under different guise a couple of years ago. It makes sense since encrypting/wrapping with a public key does not represent a security problem (there is nothing secret in any of the encryption operations) when done outside of MSCAPI so one can use any provider that has the capability BUT the decryption/unwrapping must be done with the SunMSCAPI provider which delegates it to the MSCAPI.
    My working test code based on your code implementing this approach is :
            // RSA 1024 bits Asymmetric encryption of Symmetric AES key             
            // List the certificates from Microsoft KeyStore using SunMSCAPI.
            System.out.println("List of certificates found in Microsoft Personal Keystore:");
            KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
            ks.load(null, null);
            Enumeration en = ks.aliases();
            PublicKey RSAPubKey = null;
            Key RSAPrivKey = null;
            int i = 0;
            while (en.hasMoreElements())
                String aliasKey = (String) en.nextElement();
                X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey);
                String sss = ks.getCertificateAlias(c);
                if (sss.equals("rsa_key")) // The alias for my key - make sure you change it back to your alias
                    System.out.println("---> alias : " + sss);
                    i = i + 1;
                    String str = c.toString();
                    System.out.println(" Certificate details : " + str);
                    RSAPubKey = c.getPublicKey();
             System.out.println(RSAPubKey.getClass().getName());
                   RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
            System.out.println(RSAPrivKey.getClass().getName());
                    Certificate[] chain = ks.getCertificateChain(aliasKey);
            System.out.println(ks.getProvider().getName());
            System.out.println("No of certificates found from Personal MS Keystore: " + i);
            Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");//, ks.getProvider().getName());       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
            byte[] keyBytes =
                1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9
            SecretKey aeskey = new SecretKeySpec(keyBytes, "AES");
            byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);
            System.out.println("Encrypted Symmetric Key :" + Arrays.toString(encryptedSymmKey));
            System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
            // RSA Decryption of Encrypted Symmetric AES key
            Cipher unwrapRsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());       //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            unwrapRsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
            Key decryptedKey = unwrapRsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);
            System.out.println("Decrypted Symmetric Key :" + Arrays.toString(decryptedKey.getEncoded())); // Matches the 'keyBytes' above

Maybe you are looking for