Exception 6A80 while setting Triple DES key inside the applet constructor

In the applet definition part, I am having these definition:
public static final byte DEFAULT_PERSO_KEY_SET_REFERENCE = (byte) 0x81;
     public static final byte[] DEFAULT_PERSO_KEY_SET_ENC = {
          (byte) 0x52, (byte) 0x57, (byte) 0x4d, (byte) 0x41,
          (byte) 0x43, (byte) 0x45, (byte) 0x43, (byte) 0x48,
          (byte) 0x41, (byte) 0x4e, (byte) 0x54, (byte) 0x49,
          (byte) 0x4c, (byte) 0x4c, (byte) 0x4f, (byte) 0x4e
     public static final byte[] DEFAULT_PERSO_KEY_SET_MAC = {
          (byte) 0x52, (byte) 0x57, (byte) 0x45, (byte) 0x4e,
          (byte) 0x43, (byte) 0x45, (byte) 0x43, (byte) 0x48,
          (byte) 0x41, (byte) 0x4e, (byte) 0x54, (byte) 0x49,
          (byte) 0x4c, (byte) 0x4c, (byte) 0x4f, (byte) 0x4e
public Key keyEnc;
     public Key keyMac;In the applet constructor I am having these lines of code:
keyEnc = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES, KeyBuilder.LENGTH_DES3_2KEY,
                         false);
               keyMac = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES, KeyBuilder.LENGTH_DES3_2KEY,
                         false);
          ((DESKey) keyMac).setKey(DEFAULT_PERSO_KEY_SET_MAC, (short) 0);
          ((DESKey) keyEnc).setKey(DEFAULT_PERSO_KEY_SET_ENC, (short) 0);On line when the MAC is setting, the next exception is thrown: 
Status: Wrong data
jcshell: Error code: 6a80 (Wrong data)
jcshell: Wrong response APDU: 6A80
Unexpected error; aborting execution

>
Status: Wrong data
jcshell: Error code: 6a80 (Wrong data)
jcshell: Wrong response APDU: 6A80
Unexpected error; aborting execution
>
usually unhandled exceptions do not look like this. If you catch the exception you can try to specify the reason. May be the problem in parity bits of des keys, though this error is not listed in possible exceptions of setKey method.

Similar Messages

  • An exception occurred while reading or writing from/to the IIS server

    Hi All,
    I am trying to install and configure calendar connectivity in EP6 sp9.
    As mentioned in
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/3d59fdaa5ebb45967ea107d3fa117a/frameset.htm, i have installed MSX-A component and On testing MSX-A Component i am not getting any error.
    Also log file looks like this.
    BEGIN 3/8/2005 10:09:00 AM----
    URL: HTTP://10.10.18.213:8080/Calendar.asp
    URL Parameters: Server=10.10.18.205&Alias=[email protected]&Action=READ&StartDate=200503081007&EndDate=200503091007&Email=[email protected]&Debug=true
    Reponse: <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
    <!DOCTYPE OUTPUT [<!ELEMENT OUTPUT (FAILURE|APPOINTMENTS)>
    <!ELEMENT FAILURE (ERRORNUMBER?, ERRORMESSAGE?, CLASSNAME?, METHODNAME?, LINENUMBER?, PARAMETERS?)>
    <!ELEMENT ERRORNUMBER (#PCDATA)>
    <!ELEMENT ERRORMESSAGE (#PCDATA)>
    <!ELEMENT CLASSNAME (#PCDATA)>
    <!ELEMENT METHODNAME (#PCDATA)>
    <!ELEMENT LINENUMBER (#PCDATA)>
    <!ELEMENT PARAMETERS (#PCDATA)>
    <!ELEMENT APPOINTMENTS (APPOINTMENT*)>
    <!ELEMENT APPOINTMENT (ID, SUBJECT?, LOCATION?, STARTDATE, ENDDATE, MEETINGTYPE, ALLDAY, RECURRING, BUSYSTATUS?)>
    <!ELEMENT ID (#PCDATA)>
    <!ELEMENT SUBJECT (#PCDATA)>
    <!ELEMENT LOCATION (#PCDATA)>
    <!ELEMENT STARTDATE (#PCDATA)>
    <!ELEMENT ENDDATE (#PCDATA)>
    <!ELEMENT MEETINGTYPE (#PCDATA)>
    <!ELEMENT ALLDAY (#PCDATA)>
    <!ELEMENT RECURRING (#PCDATA)>
    <!ELEMENT BUSYSTATUS (#PCDATA)>]><OUTPUT><APPOINTMENTS></APPOINTMENTS></OUTPUT>
    END 3/8/2005 10:09:00 AM----
    i have created calendar repository and exchange system on the portal and now i am getting this error in MyAppointment iView in <i>Content Provided by SAP</i>.
    <i><b>An exception occurred while reading or writing from/to the IIS server.</b></i>
    i would appreciate if you please help me urgently
    thanx and regards
    Santosh Choudhary

    Hi Akhilesh,
    I am able to browse HelloWorld.asp in same website. Also i am not getting any error while testing data retrieval through SAPPXchTest.exe, log file looks like this.
    <b>IIS Log File</b>
    IIS Log File
    #Software: Microsoft Internet Information Services 5.0
    #Version: 1.0
    #Date: 2005-03-18 04:44:58
    #Fields: date time c-ip cs-username s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status cs(User-Agent)
    2005-03-18 04:44:58 10.10.18.213 - 10.10.18.213 8080 GET / - 401 Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.0)
    2005-03-18 04:45:05 10.10.18.213 santoshc 10.10.18.213 8080 GET / - 200 Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.0)
    <b>Application Log File</b>
    BEGIN 3/18/2005 10:18:31 AM----
    URL: HTTP://10.10.18.213:8080/Calendar.asp
    URL Parameters: Server=10.10.18.205&[email protected]&Action=READ&StartDate=200503161151&EndDate=200503171151&[email protected]&Debug=true
    Reponse: <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
    <!DOCTYPE OUTPUT [<!ELEMENT OUTPUT (FAILURE|APPOINTMENTS)>
    <!ELEMENT FAILURE (ERRORNUMBER?, ERRORMESSAGE?, CLASSNAME?, METHODNAME?, LINENUMBER?, PARAMETERS?)>
    <!ELEMENT ERRORNUMBER (#PCDATA)>
    <!ELEMENT ERRORMESSAGE (#PCDATA)>
    <!ELEMENT CLASSNAME (#PCDATA)>
    <!ELEMENT METHODNAME (#PCDATA)>
    <!ELEMENT LINENUMBER (#PCDATA)>
    <!ELEMENT PARAMETERS (#PCDATA)>
    <!ELEMENT APPOINTMENTS (APPOINTMENT*)>
    <!ELEMENT APPOINTMENT (ID, SUBJECT?, LOCATION?, STARTDATE, ENDDATE, MEETINGTYPE, ALLDAY, RECURRING, BUSYSTATUS?)>
    <!ELEMENT ID (#PCDATA)>
    <!ELEMENT SUBJECT (#PCDATA)>
    <!ELEMENT LOCATION (#PCDATA)>
    <!ELEMENT STARTDATE (#PCDATA)>
    <!ELEMENT ENDDATE (#PCDATA)>
    <!ELEMENT MEETINGTYPE (#PCDATA)>
    <!ELEMENT ALLDAY (#PCDATA)>
    <!ELEMENT RECURRING (#PCDATA)>
    <!ELEMENT BUSYSTATUS (#PCDATA)>]><OUTPUT><APPOINTMENTS></APPOINTMENTS></OUTPUT>
    END 3/18/2005 10:18:31 AM----
    But when i am Testing it from the Portal i am getting this error.
    I have created Exchange Transport that whose configuration looks like this:
    System Alias : myExchange
    Domain : mydomain
    exchange server : 10.10.18.205
    IIS server : 10.10.18.213
    Port : 8080
    Protocol : Http
    Exchange is the Name of System and Alias name is myExchange.
    Hope this will help you to solve my problem.
    Thanks and regards,
    Santosh Choudhary<b></b><b></b>

  • Hoe to convert a String to Triple DES Key

    Hi
    can Someone help me how to convert a string to TRipleDES key, some times the string can be less than
    24 bytes ( but DESedeKeySpec needs at least 24 bytes).
    thanks
    chintha

    I would take a slightly different approach than that offered by previous posts. This is from looking at what OpenSSL does for generating keys.
    1) Do a String.getBytes() from your password (or String.getBytes("UTF-8") if you are using other than ASCII).
    2) Generate a SHA-1 hash from the bytes. This gives you a 20 byte value.
    3) Compute a SHA-1 hash of the original hash and the password. This will give you another 20 byte value.
    4) Take the first 20 bytes from hash #1 and the first 4 bytes of hash #2 to get a 24 byte value.
    5) Give the 24 byte value odd parity (this means that each byte has an odd number of 1 bytes). You'll need to write a bit of your own code to do this.
    6) Finally, use this 24 byte, odd parity value to generate your DES key.
    --Kevin

  • How to encode/pad an RSA-Encrypted Triple-DES Key

    Similar to this guy's problem: http://forum.java.sun.com/thread.jspa?messageID=3332692&#3332692
    I am having an issue along the same lines... I'm writing a java client that is dealing with a C++ agent, which is expecting an encrypted TripleDES key. However when I create a DesEDE key, then encrypt it using a public RSA key, I am only sending 24 bytes, where the C++ code is expecting 32.
    Luckily, I DO have a C++ client that is doing what I need to do, so I'm investigating exactly how they're doing with the padding/encoding in order to fix my problem. But it's using the crypto 5.1 library (crypto++ maybe) and its not the most readable code.
    If anyone's done anything similar, I'd appreciate any tips/advice for how you dealt with it.
    tOm

    32/24 == 4/3 == the expansion ration converting bytes to Base64.
    Is this a possibility?

  • Encountered exceptional error while setting receiving info R12.0.6

    Hi ,
    I have created inventory organization. I have done setups with accounting information and inventory information. But, later when I try to set Receiving information, error happens as “You have encountered an unexpected error. Please contact the System Administrator for assistance.” Please let me know how to solve this issue...R12.0.6 HP UX
    Thanks in advance.
    Sandeep.

    Can you find any details about the error in Apache log files and/or the application.log file?
    Please see if (Receiving Information Type Cannot Be Entered In the Inventory Organization [ID 435045.1]) is applicable.
    Thanks,
    Hussein

  • Error while renaming indexes and keys in the tables

    hi gems...good afternoon..
    i am using oracle 11gr2 database.
    when i am trying to rename the primary key, foreign key, indexes of all the tables as per the standard, then the following error is given...
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-01000: maximum open cursors exceeded
    currently the maximum open cursors parameter is set to 300.
    please help..thanks in advance

    thanks a lot for your help..
    there are total 162 records in the v$open_cursor for that user.
    among that the open cursor is only 4 and open-recursive cursor is only 6 for that user.
    in my session i am executing only the renaming of the constraints and nothing more.
    When i have queried the v$open_cursor for cursor_type='OPEN' for all the users, then i got that it has exceeded the value of open_cursors parameter.
    So how can i resolve that....

  • Can we set a variable used inside the template from the java code.

    Hi everybody,
    I am uploading template,sub template and data xml fle to generate the preview using XDO API's. My main template is calling a sub template so it needs to import the sub template in the main template.since i am uploading my files on a particular server,my subtemplates has been put on different path as specified in the main template.
    so i need to change the subtemplate path dynamically at run time.
    is there any way i can pass this information to my main template at run time.
    one solution could be,my rtf template has a variable 'i' inside it,which is setting the file path to include my subtemplate like this :
    <?xdoxslt:set_variable($_XDOCTX, i ,"import:file:///c:/Temp/htmlmarkup.xsl")?>
    <?xdoxslt:get_variable($_XDOCTX, i )?>
    now is there any way i can set this variable at run time from my external java code.?
    Thanks,
    Anuradha

    Thanks for the response.
    but i still am looking for the solution.
    if both my template and subtemplate are in the same directory then atleast
    <?import:file:../htmlmarkup.xsl?> should work.
    but its not working...i m getting following error:
    FOProcessor setData: C:\subtemplates\projects.xml
    FOProcessor setLocale: en-us
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:514)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:192)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:156)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:916)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:869)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:204)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1535)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:925)
         at RTF2PDF.runRTFto(RTF2PDF.java:590)
         at RTF2PDF.runXDO(RTF2PDF.java:443)
         at RTF2PDF.main(RTF2PDF.java:237)
    Caused by: java.io.FileNotFoundException: C:\Documents and Settings\fusion\htmlmarkup.xsl (The system cannot find the file specified)
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
         ... 15 more
    please suggest me what to do..

  • Setting a composite key where the 2nd PK is generated depending on the 1st

    Hi,
    I am dealing with a large database with a composite primary key made up of 1. ID 2.Sequence. Now my problem is for a particular ID I want to assign Sequence numbers starting from one to however many instances of that ID is there. This numbering will restart for another ID.Thus the combination of the ID and Sequence will make it unique.E.g.:
    ID 1 has sequence 1,
    ID 1 has sequence 2,
    ID 1 has sequence 3,
    ID 2 has sequence 1,
    ID 2 has sequence 2....
    For performance issues I will be using bulk bindings. Here is my go at the code. Can someone please suggest how I can optimize the code or make it better.
    Code:
    DECLARE
    CURSOR c_orders IS
    SELECT ID
    FROM customer_orders;
    TYPE t_num_array IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    v_order_ids t_num_array;
    v_orders_sequence t_num_array;
    v_row_count NUMBER := 0;
    v_orders_sequence(1) := 1;
    v_orders_sequence(2):=1;
    BEGIN
    OPEN c_orders;
    LOOP
    FETCH c_orders
    BULK COLLECT INTO v_order_ids
    LIMIT 100;
    EXIT WHEN v_row_count = c_orders%ROWCOUNT;
    v_row_count := c_orders%ROWCOUNT;
    FOR i IN 2..v_order_ids.count LOOP
    if(v_orders_id(i) = v_orders_id(i-1))
    v_orders_sequence(i)=v_orders_sequence(i) + 1;
    else
    v_orders_sequence(i) = 1;
    END LOOP;
    FORALL i IN 1..v_order_ids.count
    UPDATE customer_orders
    SET sequence = v_orders_sequence(i)
    WHERE id = v_order_ids(i);
    END LOOP;
    CLOSE c_orders;
    COMMIT;
    END;
    Again if I made any mistakes please point it out and suggest any improvements to the code.
    Edited by: user13579621 on Mar 3, 2011 3:40 PM
    Edited by: user13579621 on Mar 3, 2011 3:43 PM
    Edited by: user13579621 on Mar 4, 2011 7:15 AM
    Edited by: user13579621 on Mar 4, 2011 7:19 AM
    Edited by: user13579621 on Mar 4, 2011 9:35 AM

    Hi,
    The thing is both the id and the seqnums are part of a primary key. So say an ID has 3 instances this week and four the next week.
    Week 1:
    ID1 has Seq Num1
    ID1 has Seq_num2
    ID1 has Seq_num3
    Week2:
    ID1 has Seq Num1
    ID1 has Seq_num2
    ID1 has Seq_num3
    ID1 has Seq_num4
    Using an analytical function the sequence numbers will now be changed to reflect the new numbers. But what if the new ID coming in this week has a lesser ROWID in the original table. From what I understand your logic will now assign this new ID a sequence number of 1 and change the sequence numbers of the 3 existing from last week from 1 to 2,3,4 accordingly. But since it is part of the primary key we dont want to change them. The new ID coming in should always be assigned a sequence number of 4 not 1. Any ideas about how to achieve this.
    Also it does not have to be the way I do it. Let me just go back and rephrase what I want to achieve.
    I have a new table primary key(id,seqnum) which gets data from another table. Now I want to set the id incremented normally and the sequence number incremented uniquely like I mentioned before for each unique id and then reset for the next ID. How do I go about achieving this efficiently, keeping in mind that if a new id comes in next week the new id will always be assigned a sequence number that is +1 of the last sequence number for that ID?

  • DES Key - Client Side

    Hi,
    I would like to be able to generate a DES key, store it in a file, and use the key to encrypt my message and send it to my friend�s server. I�ve started the program, but am not sure where else to go with it. It�s on the next post. Any help is greatly appreciated.
    Thanks,
    James
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import javax.crypto.*;
    public class Cipher
         public static void main(String[] args) throws Exception
              String message = "Hi John, here is the first message.";
              String host = "xxx.xxx.xxx";
              int port = 7999;
              Socket s = new Socket(host, port);
                        //Help here
              // DES key.
              //Storage of DES key
              // Encrypt the message using the key and send it to the server         
    }

    Please excuse my ignorance, but what is keystore?Search the web!
    http://www.unix.org.ua/orelly/java-ent/security/ch11_01.htm
    I can't really comment, because I have yet to use it.

  • Problems turning bytes back into a des key

    hi there-
    i'm writing a client/server application the uses encryption to send files back and forth. i have been able to get my program to receive certificates from the client and server. i have generated a des key using:
    KeyGenerator kg = KeyGenerator.getInstance("DES");
    java.security.Key secretkey = kg.generateKey();
    and I want to send that to the server, encrypted with the public key. i'm trying to do it like this:
    Cipher cipher = Cipher.getInstance("RSA");
    cipher.init ( Cipher.ENCRYPT_MODE, key); //key is the public key
    theBytes [] = secretkey.getEncoded(); //send secretkey
    bytesEncrypted [] = cipher.doFinal(theBytes);
    outToServer.writeInt(bytesEncrypted.length);
    outToServer.write(bytesEncrypted);
    the problem is, once i transmit the des key and decrypt it with the private key, i dont know how to turn it back into a des key from the bytes. can someone help me out bigtime and let me know how i can go about doing this?
    thanks a bunch!

    In followup to my previous reply, here is the sample code.
    import java.security.spec.KeySpec;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    import javax.crypto.SecretKeyFactory;
    import javax.crypto.spec.DESKeySpec;
    public class SecretKeyTest {
         public static void main(String[] args) throws Exception {
              System.out.println(System.getProperty("java.version"));
              KeyGenerator kg = KeyGenerator.getInstance("DES", "SunJCE");
              SecretKey sk1 = kg.generateKey();
              System.out.println(sk1);
              byte [] sk1Bytes = sk1.getEncoded();
              SecretKeyFactory skf = SecretKeyFactory.getInstance("DES");
              KeySpec spec = new DESKeySpec(sk1Bytes);
              SecretKey sk2 = skf.generateSecret(spec);
              System.out.println(sk1.equals(sk2) ? "Equal" : "Not Equal");
    }

  • Generate DES key with java card with JCRE 2.1.2

    Hi everyone,
    I want to generate DES key in my applet . my card supports GP 2.0.1 and JCRE 2.1.2 .
    I have tested my applet with JCRE 2.2.1 and used this JCSystem class functions to generate DES key and it compiles and works correctlly .
    but when I want to compile my applet with JCRE 2.1.2 I recieve an error which says that API 2.1.2 doesn't support JCSystem class .
    so I'll really appreciate it if anyone could tell me how can I generate DES key with JCRE 2.1.2
    and also I use JCSystem class functions to get my card's persistent and transistent memory , so with this class not working on JCRE 2.1.2 I have problem to read my free memories too .
    So I'll appreciate your help on this matter too.
    Best Regards,
    Vivian

    Hi Vivian,
    I don't seem to have any problem with the code you posted. What is the error you are getting? Is it with the compiler or with the CAP file converter? If it is a compiler error, you will need to ensure that the Java Card API jar is in your build path.
    Here is a simple class that works with JC 2.1.1 (which will work with JC 2.1.2 as well). I have confirmed that this applet compiles and will return encrypted data to the caller.
    package test;
    import javacard.framework.APDU;
    import javacard.framework.Applet;
    import javacard.framework.ISO7816;
    import javacard.framework.ISOException;
    import javacard.framework.JCSystem;
    import javacard.security.DESKey;
    import javacard.security.KeyBuilder;
    import javacard.security.RandomData;
    import javacardx.crypto.Cipher;
    * Test JC2.1.1 applet for random DES key.
    * @author safarmer - 1.0
    * @created 24/11/2009
    * @version 1.0 %PRT%
    public class TestApplet extends Applet {
        private DESKey key;
        private Cipher cipher;
         * Default constructor that sets up key and cipher.
        public TestApplet() {
            RandomData rand = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
            short lenBytes = (short) (KeyBuilder.LENGTH_DES / 8);
            byte[] buffer = JCSystem.makeTransientByteArray(lenBytes, JCSystem.CLEAR_ON_DESELECT);
            key = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES, KeyBuilder.LENGTH_DES, false);
            rand.generateData(buffer, (short) 0, lenBytes);
            key.setKey(buffer, (short) 0);
            cipher = Cipher.getInstance(Cipher.ALG_DES_CBC_ISO9797_M1, false);
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            // GP-compliant JavaCard applet registration
            new TestApplet().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) 0x00:
                    cipher.init(key, Cipher.MODE_ENCRYPT);
                    short len = cipher.doFinal(buf, ISO7816.OFFSET_CDATA, buf[ISO7816.OFFSET_LC], buf, (short) 0);
                    apdu.setOutgoingAndSend((short) 0, len);
                    break;
                default:
                    // good practice: If you don't know the INStruction, say so:
                    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
    }Cheers,
    Shane

  • Manager Self Service - An exception occurred while processing your request.

    hi SAP Expert,
    when i go to the Manager Self-Service > Team, Budget, Planning, the page was showing the error below :
    Headcount
    Portal runtime error.
    An exception occurred while processing your request. Send the exception ID to your portal administrator.
    Exception ID: 01:57_15/07/10_0059_29014050
    Refer to the log file for details about this exception.
    Headcount (FTE)
    Portal runtime error.
    An exception occurred while processing your request. Send the exception ID to your portal administrator.
    Exception ID: 01:57_15/07/10_0060_29014050
    Refer to the log file for details about this exception.
    anyway i can solve the issue above, thanks.
    Regards
    Hariyono

    here is the log details.
    000D6017A6BB00730000041A00001A0400048B6A0B064F02#1279187474281#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#RONALD#11677##n/a##8132a1708ff611df8fcc000d6017a6bb#SAPEngine_Application_Thread[impl:3]_19##0#0#Error#1#/System/Server#Java###Exception ID:05:51_15/07/10_0172_29014050
    [EXCEPTION]
    #1#com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Portal Component
    Component : pcd:portal_content/com.sap.pct/line_manager/com.sap.pct.erp.mss.bp_folder/com.sap.pct.erp.mss.roles/com.sap.pct.erp.mss.manager_self_service/com.sap.pct.erp.mss.manager/overview/com.sap.pct.erp.mss.budget/com.sap.pct.erp.mss.budget_page/com.sap.pct.erp.mss.bw_cost_center
    Component class : com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent
    User : RONALD
    at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:973)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:343)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
    at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:523)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:412)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Caused by: com.sapportals.portal.prt.runtime.PortalRuntimeException: Exception in SAP Application Integrator occured: Unable to parse template &\#39;<System.Access.WAS.protocol>://<System.Access.WAS.hostname>/sap/bw/BEx?sap-client=<System.client>&sap-language=<Request.Language>&accessibility=<User.Accessibility[SAP_BOOL]>&style_sheet=<LAF.StylesheetUrl[url_ENCODE]>&<TrayInformation[IF_true PROCESS_RECURSIVE]>&<Authentication>&<Report>&<BusinessParameters>&\#39;; the problem occured at position 82. Cannot process expression <System.client> because Invalid System Attribute:
    System: &\#39;SAP_LocalSystem&\#39;,
    Attribute: &\#39;client&\#39;.
    at com.sapportals.portal.appintegrator.AbstractIntegratorComponent.doContentPass(AbstractIntegratorComponent.java:123)
    at com.sapportals.portal.appintegrator.AbstractIntegratorComponent.doContent(AbstractIntegratorComponent.java:98)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    ... 29 more

  • Generate public private keys inside smart card

    Dear all,
    I am using this code to generate public and private key inside the smart card.
    KeyPair kp = new KeyPair(KeyPair.ALG_RSA_CRT, KeyBuilder.LENGTH_RSA_512);
    kp.genKeyPair();
    PrivateKey prikey = kp.getPrivate();
    PublicKey pubkey = kp.getPublic();
    This code is executing without errors.
    I need to get out the public key from the smart card. So I need to get public key to a byte array.
    But I can't get those keys to plain text byte array.
    The methods that I can get for pubkey object are
    pubkey.clearKey();
    pubkey.equals(obj);
    pubkey.getSize();
    pubkey.getType();
    pubkey.isInitialized(); only these.
    I am using
    Eclipse Version: 3.4.1 (Compiler complience level = 1.4)
    Jcop plugin (to communicate with the actual card and to test the java code in virtual card provided by JCOP)
    OmniKey5321 card reader (In contactless type)
    What is the reason to get only those above methods to pubkey object? Is it a version problem?
    How can I get the public key to plain byte array? Is it possible?
    If it is not possible Is there a way to get public key as a export certificate or something other solution?
    If my scenario is not a possible strategy, How can I use public private keys to send specific data to applet? Is there a better way to do this?
    Edited by: 863766 on Jun 6, 2011 12:16 AM

    Thank you very much!
    I used this code
    RandomData rand = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
              short lenBytes = (short) (KeyBuilder.LENGTH_DES/8);
              byte[] buffer = JCSystem.makeTransientByteArray(lenBytes,JCSystem.CLEAR_ON_DESELECT);
              DESKey key = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES , KeyBuilder.LENGTH_DES,false);
              rand.generateData(buffer, (short) 0 ,lenBytes);
              key.setKey(buffer, (short) 0 ) ;
              byte keyData[]= new byte[256];
              key.getKey(keyData, (short) 0);
    Now I know how to initialize the key...
    Thank you again.
    Regards,
    Dushantha
    Edited by: 863766 on Jun 6, 2011 3:52 AM

  • Portal runtime error. An exception occurred while processing.....

    Hi!
    In a collaboration-Room, I see in one room in the Collaboration Detailed Navigation null and below I receive windwos with the message:
    Portal rumtime error.
    An exception occured while processing your request. Send the exeption ID to your portal adminisistrator.
    I have all permissions of that room and I'm admin. What is happend? In other rooms with this template, I see all areas.
    Best Regards,
    Emma

    Hi Emma,
    Please check the default trace log file to search the message to find the root cause of the issue.
    It might be some problem with your access to collaboration room or may be some problem in colaboration room setup.
    Best Regards
    Arun Jaiswal

  • How to read DES key from a file?

    I stored the DES key in the file as follows:
    KeyGenerator keygen = KeyGenerator.getInstance("DES");
    SecretKey Key = keygen.generateKey();
    FileOutputStream ostream = new FileOutputStream("t.tmp");
         ObjectOutputStream p = new ObjectOutputStream(ostream);
         p.writeObject(Key) ;
         p.flush();
         ostream.close();
    I don't know if there is problem with the above code, I am just new to java cryptography.
    I have problem read in the key and store it in the DES key object to be used for decryption.
    Can someone please tell me how to do it and a simple example will be appriciated.
    thanks
    Jeff

    Thank you for your help. after getting the key from the file( the output of the key is com.sun.crypto.provider.DESKey@fffe786d, not sure if it is right), I use this key to decrypt the message sent from the client program.
    here is the code:
    ObjectInputStream ois=new ObjectInputStream(data.getInputStream());
    String c = ois.readLine() ;//should I convert the byte[] data to String?
    ois.close() ;
    jTextField1.setText(c) ;//display the cipher text to the first textfield
    byte[] ciphertext = c.getBytes() ;
    // System.out.write(ciphertext) ;
    // get key from file
    FileInputStream in = new FileInputStream("t.tmp");
    ObjectInputStream oin = new ObjectInputStream(in);
    SecretKey Key = (SecretKey)oin.readObject();
    oin.close();
    in.close();
    System.out.println(Key) ;
    //decrypt
    Cipher C = Cipher.getInstance("DES");
    C.init(Cipher.DECRYPT_MODE, Key);
    // Decrypt the ciphertext
    byte[] cleartext1 =C.doFinal(ciphertext);
    System.out.write(cleartext1) ;//doesn't show anything!!
    System.out.println("this is cleartexxt");//doesn't even show this!!
    String display = new String(cleartext1);
    jTextField2.setText(display);
    why there is no output from System.out.write(cleartext1)? where did I go wrong?
    thank you.
    Jeff

Maybe you are looking for