Problem while generating an entry for a keystore on SCA-6000

Hi everybody,
this is my first message.....
i need to develop a sw to adding entry on a keystore that is on a SCA-6000
when i try to add an entry witn method KeyStore.setKeyEntry i have this error:
java.security.KeyStoreException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TEMPLATE_INCONSISTENT
at sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1067)
at sun.security.pkcs11.P11KeyStore.engineSetKeyEntry(P11KeyStore.java:443)
at java.security.KeyStore.setKeyEntry(KeyStore.java:848)
at TestProvider.main(TestProvider.java:160)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TEMPLATE_INCONSISTENT
at sun.security.pkcs11.wrapper.PKCS11.C_CopyObject(Native Method)
at sun.security.pkcs11.P11KeyStore.updateP11Pkey(P11KeyStore.java:1518)
at sun.security.pkcs11.P11KeyStore.storePkey(P11KeyStore.java:1678)
at sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1063)
i don't find anything on documentation.....
this is my code:
Provider pkcs11Provider = new sun.security.pkcs11.SunPKCS11(fis);
Security.addProvider(pkcs11Provider);
char [] pin = args[1].toCharArray();
KeyStore smartCardKeyStore;          
smartCardKeyStore = KeyStore.getInstance("PKCS11");
smartCardKeyStore.load(null, pin); //ALL OK
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", pkcs11Provider);
kpg.initialize(1024);
KeyPair kp = kpg.generateKeyPair();
Certificate[] cc = {cer};
smartCardKeyStore.setKeyEntry("[email protected]", kp.getPrivate(), "dlozzi".toCharArray(), cc);PS fis is an FileInputStream that is the file for configuring SunPKCS11 and this is
name = SunCryptoAccelerator6000
library = /usr/lib/libpkcs11.so
thanks for your help
Ad Maiora,
Daniele Lozzi

"IN UPDATE TASK" resolved by myself. The one should explicitly call 'COMMIT WORK' from Z-program after CALL FUNCTION '...' IN UPDATE TASK in order to get changes in the CDHDR/CDPOS commited. The key in this issue for me was to check the documentation of CALL FUNCTION :-).
Regards,
Ivo

Similar Messages

  • Problem while generating Update progam for a Change Document Object

    Hi,
    I'm trying to deal with Change Document concept in a R/3 4.6C environment and to establish new Change Document object for my (Z)-table. I haven't using any namespace and created object with name ZTEST. Following the online documentation I came to the point, where I have to generate include program. I made all the nessesary inputs (using Z prefix) but faced
    "Function module name is reserved for SAP"
    Creating everything similarily using some of our registered namespaces (/somenamespace/) I succeed to generate the Update program and to integrate it in my Z-programs as well.
    My question is: is it possible to use Change Document Object-names without predefined namespace - being a regular customer developer, but not an SAP developer - means, if I am allowed to manage programs in the customer namespace (Z,Y, X) only. If yes, how to do this?
    Further (I decided not to open a new thread) - generated Update program uses
    CALL FUNCTION 'xxxxx' IN UPDATE TASK
    for creation of Change Numbers for generated Change Document Object. This CALL doesn't work when I implemented it in my Z-program, but when changed  (IN UPDATE TASK was commented) - everything goes well and the system creates records in CDHDR/CDPOS tables for my object class and table.
    Why is that? According to the documentation I shoud only fill appropriate variables for the Change Document Object (class, tr.code, etc.) and call generated FM, nothing is pointed out about any possible problems? Am I doing something wrong?
    Well, to be precise, I think I have to give a sample:
    1. I have a sample Z-table with few fields (their data elements are marked as Change-Document relevant).
    2. Using own z-progam I created a new record for this z-table. Also fill all the nessesary variables included in the interface of generated FM for Change Document Object (for example - FM-mane CD_CALL_my_object).
    3. I call the CDO FM.
    4. Check what is happening (directly in both tables CDHDR/CDPOS or using FM CHANGEDOCUMENT_READ).
    Further, I perfom the steps from 1 to 4 updating the created in previous loop record in my Z-table.
    In both cases if the FM 'CD_CALL_my_object' is called IN UPDATE TASK nothing happens, but in case of direct call (without addition IN UPDATE TASK) the system behaves as expected. Well, obliously I can change the generated code for our production needs, but it doesn't seems to be the correct decision - in case of next possible modification of the Change Document Object definition, respectively in need of re-generation of the code.
    Any hints are wellcome.
    Thanks in advance.
    Ivaylo Mutafchiev
    Edited by: Ivaylo Mutafchiev on Jan 24, 2008 10:24 AM

    "IN UPDATE TASK" resolved by myself. The one should explicitly call 'COMMIT WORK' from Z-program after CALL FUNCTION '...' IN UPDATE TASK in order to get changes in the CDHDR/CDPOS commited. The key in this issue for me was to check the documentation of CALL FUNCTION :-).
    Regards,
    Ivo

  • Problem while Generating client code for webservice

    hi,
    my environnement is weblogic 8.1, and i folow the tutorial to generate stub and client code for invoking a webservice hosted by another weblogicserver, here is a portion of the wsdl file :
    <wsdl:definitions targetNamespace=" .......
    xmlns:tns2="http://exception.toto.fr"......>
    <wsdl:types>
    <schema targetNamespace="http://exception.toto.fr" xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
    - <complexType name="ChainedException">
    - <sequence>
    <element name="cause" nillable="true" type="xsd:anyType" />
    </sequence>
    </complexType>
    </schema>
    </wsdl:types>
    <wsdl:message ....../>after that, as desribed in the weblogic doc, i create a build.xml, and run the ant command (wich call the clientgen weblo ant task, i end up with the following error :
    [clientgen] weblogic.xml.schema.model.XSDException: Unable to resolve definition for ['http://exception.toto.fr']:tns2:ChainedException perhaps due to the lack of an import statement for namespace http://exception.toto.fr
    [clientgen] at weblogic.xml.schema.model.XSDSchema.getSchemaForName(XSDSchema.java:1062)
    [clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTopLevelObjectImpl(XSDSchema.java:893)
    [clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTypeImpl(XSDSchema.java:881)
    [clientgen] at weblogic.xml.schema.model.XSDSchema.lookupType(XSDSchema.java:872)
    [clientgen] at weblogic.xml.schema.model.XSDObject.lookupType(XSDObject.java:324)
    [clientgen] at weblogic.xml.schema.model.XSDAnyType.getBaseTypeObject(XSDAnyType.java:56)
    [clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.realBaseType(SchemaInspe
    .....thanks a lot for your help

    I am facing the same problem.Did any one able to find the solution

  • IS- Retail- problem while generating delivery in WF30

    Hi Guys,
    I do have problem while generating deliveries after adjusting the stocks to stores and external customers.
    T.Code WF30- Merchandise Distribution for CD/FT process
    Scenario :!from DC to Stores process (1)
    I am getting an error called for stores is "*shipping Data not Found for item 10,20 and 30" (using one article and 3 stores)*
    Another scenario :2 from DC to external Customer(2)
    I am getting an error called "No deliveries are generated"
    (using one article and 2 customer)
    shipping point determination was done in OVL2,
    Picking area determination has done with few settings( if anybody guides what and where all the settings to be checked) I given Storage conditions in Article MD, entered Sto loc in Storage loc Deter and condition at IMG>LE>Shipping>Picking
    Is it problem in Allocation Table Item category level for second one ?
    for both scenarios i am using Allocation Table Item category AAFA
    In AAFA,(Alloc Item Cate) SD Type is ZZTA and delivery type is not maintined..(what are the entries should be in the Alloc Tab Item Cat).
    but in ZZTA sales order doc type(v0v8) Delivery type is LF
    Plz help on this..
    regards
    Harish

    Hi guys,
    I got the answer and i am closing this thread.
    Harish

  • Problem while postings a MIRO for partial deliveries.

    Hi,
    We ar facing a problem
    while posting a Miro for the Planned delivery costs for the import orders.
    when we receive an item in partial consignment of the same order.
    The system will allow for the first time to post the deliver cost, after this the MIGO and MIRO will be done and cycle will be completed.
    For the second remaining consignment, the system is not allowing to post the Miro itself for the delivery costs.
    IT is giving an error message."Quantity invoiced greater than goods receipt quantity."
    We have disable GR based IV in PO
    Provide me the solution.
    Sunil

    hi,
    i hope you have done the following steps
    1) for import do MIRO first for the custom duties ( CVD, Edu Cess, S& H Cess on CVD) by selecting planned delivery cost.
    2) J1IEX ( capture) referencing material document number of MIRO.
    3) MIGO of the qty received.
    4) J1IEX ( post).
    follow the same steps for the next consignment.
    what I see is that you have mentioned the full qty against the value in MIRO.
    say ur PO qty is 10 and your partial shipment is of qty 5.
    then in first MIRO entry enter qty as 5 not 10.
    pl check your material documents of MIRO and MIGO and see what qty you have entered.
    Thanks and regard
    Rajesh

  • Problems while generating the proxy definition

    Hi Experts,
       I am facing the error " Problems while generating the Proxy Definition! ", when creating the proxy definition, for a specific URL.
    The URL to call the webservice is similar to "http://www3.XYZ.com/_vti_bin/newswebservice.asmx?WSDL" and is returning the appropriate XML code. Moreover accessing the webservice through browser, returns the expected response, too.
    From the NWDS side, where we are creating the proxy, again, everything is fine, because we have already created two proxy definitions, in similar fashion, but for different WSDL links.
    The only difference we are encountering is like, earlier the links were of type "www.abc.com/..." while the new URL is of type "www3.xyz.com/..." type. I hope this load balancing technique has hardly to do anything with it.
    Any pointers for possible reasons and solutions will be of much help.
    Regards,
    Akhil Mishra

    If you are consuming a web service in NWDS look below document and check if you are not missing any step:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0cf9e42-ccb0-2c10-d0a4-f5aa8a79e19a

  • Problems while generating the report........

    Hi Experts,
    I have genereated a new report on purchasing data, I am facing bellow problems while generating the report,
    1) In rows one Invoice doc num is there, I am not getting result row for this object, I have given NEVER in supress result rows in properties of that object, but it's not showing.....how can i get result row for this object?
    2) I am getting '#' for the blank values, How to remove these '#"s
    Please help to solve my above problems,
    Helpful answer will be awarded with points,
    Thanks in advance,
    Venkat.

    Hi,
    1) If you have only Invoice Num it does not shows the result Row .
    2)If you display the characteristics as Key u will get as '#'. You can select as Text,then it will show 'Not Assigned'. (Hope you know that when the Values not updated from Infoprovider then # appears at output )
    Hope it helps

  • Problem while generating hindi pdfs

    Hi,
    This is Dasaradh. I have one problem while generating pdfs in HIndi. Here i have used two properties files, one is English and another one is Hindhi. If the user selects English PDF is generates Suceesfully. But if the user selects hindhi then pdf is generated but in that pdf all the charcaters are in diferent format but not in hindi.Actually my hindhi properties file and that pdfgerneration jsp both are in UTF-8 format. Here i have used PDFWriter class for generating pdfs.
    Can any one pls help for generating the hindhi pdfs.
    Thanking You,
    Dasaradh.P

    Make sure that you use the correct and the same encoding thoroughout the complete process.
    1) Save the propertiesfile with in that encoding. Even the most simplest texteditor (notepad) offers you an option list of charset encodings to be used during 'Save As'.
    2) Read values from the propertiesfile with that encoding. Use a Reader where you specify the encoding in the constructor. Otherwise either the platform's default encoding (e.g. CP1252 in Windows) or the API's default encoding (e.g. ISO 8859-1 in java.util.Properties) will be used.
    3) Display the values with that encoding. Specify the charset encoding in a <meta> tag in the HTML head.
    A must-read: [http://www.joelonsoftware.com/articles/Unicode.html].

  • Error while generating CW kin for the new BG created for Taiwan

    HiAll,
    Please provide your help to resolve this issue,
    Iam getting error while generating CW kin for the new BG created for Taiwan, China.
    Error : Value TW is not a Valid context for the Descriptive Flexfield Person Developer DF.
    Please let me know, is there any step missed to create CW kins for new BG's.
    Thanks-
    Sowmya.
    Edited by: user13419037 on Jul 2, 2012 3:41 AM

    Hello ,
    Your solution can be solved by enabling the displayed check Box in Location Address DFF
    Thanks
    Bindu

  • Getting error in Portal "Error while generating the PDF" for BI Report

    Hi Experts,
    we are gettign the error while trying to generate the PDF file from the Reports.
    Earlier it was working fine Adobe Reader 8 , currently we have upgrated Adobe Reader 9 in our system.
    After this upggradation browser "*Failed to open PDF in Browser"*
    Could you please suggest me how to diagnostic the error. Do we need to configre something in the Portal or in the Backend BI system for this.
    Please suggest me the needful on this?
    thanks
    Narpal

    Hello,
    i am facing the same problem and found help by 925741:
    "Error while generating PDF"
    There is no more information available when clicking on the error.
    Used Software:
    Adobe 8
    SAP_ABA             700       0018      SAPKA70018     Cross-Application Component
    SAP_BASIS           700       0018      SAPKB70018     SAP Basis Component
    SAP_BW     700       0020     SAPKW70020     SAP NetWeaver BI 7.0
    PI_BASIS       2005_1_70 0018      SAPKIPYJ7I       PI_BASIS 2005_1_700   
    BI_CONT     703     0013     SAPKIBIIQ3     Business Intelligence Content
    Any other ideas?
    Thanks,
    Rainer
    Edited by: Rainer SIGG on Mar 9, 2009 4:41 PM
    Edited by: Rainer SIGG on Mar 9, 2009 5:27 PM
    Edited by: Rainer SIGG on Mar 9, 2009 5:42 PM

  • Error while generating Web report for UML Modeling

    I am using Sun java studio enterprise 8, i design uml diagrams for that diagrams i am trying to generate a webreport while generating i am getting the error as follows
    "Cannot execute /usr/bin/firefox Check that a valid external browser properly is set. In the Options window, expand IDE Configuration then expand Server and External Tool Settings and Select web Browsers"

    Is anyone having any idea about it...

  • Bins problem while creating goods receipt for production order.

    Hi All,
              I am facing a problem with selection of bins while creating goods receipt for production order in transaction MB31 and MBBE.
    The order of filling bins is with respect to storage Unit not by document no, Please suggest something.
    The scene is like that.
    The bins are not filled in the proper sequence, the system checks for the empty bins and filled those later on.
    like this,.
    Typ StorageBin  SC SS    Stock Avail.st BUn GR Date    DocumentNo Storage Unit         Time   
    SLoc Batch      Re IA PutawayS Pick qty Cert. No.                                                                               
    VN1 106A088                 0        0  CS  01/25/2010    4739297 1005721391           10:00:59
    100  0001020069            60        0                                                        
    VN1 107B076                 0        0  CS  01/25/2010    4739298 1005721392           10:01:01
    100  0001020069            60        0                                                        
    VN1 108B076                 0        0  CS  01/25/2010    4739299 1005721393           10:01:04
    100  0001020069            60        0                                                        
    VN1 109A077                 0        0  CS  01/25/2010    4739300 1005721394           10:01:06
    100  0001020069            60        0                                                        
    VN1 110B079                 0        0  CS  01/25/2010    4739301 1005721395           10:01:08
    100  0001020069            60        0                                                        
    VN1 106B088                 0        0  CS  01/25/2010    4739302 1005721403           10:01:11
    100  0001020069            60        0                                                        
    VN1 123B158                 0        0  CS  01/25/2010    4739303 1005721389           10:01:13
    100  0001020069            60        0                                                        
    VN1 124A160                 0        0  CS  01/25/2010    4739304 1005721390           10:01:15
    100  0001020069            60        0                                                        
    VN1 118A133                 0        0  CS  01/25/2010    4739305 1005721396           10:01:17
    100  0001020069            60        0                                                        
    VN1 119A128                 0        0  CS  01/25/2010    4739306 1005721397           10:01:20
    100  0001020069            60        0                                                        
    VN1 120B162                 0        0  CS  01/25/2010    4739307 1005721398           10:01:22
    100  0001020069            60        0                                                        
    VN1 121B159                 0        0  CS  01/25/2010    4739308 1005721399           10:01:24
    100  0001020069            60        0                                                        
    VN1 122B159                 0        0  CS  01/25/2010    4739309 1005721400           10:01:26
    100  0001020069            60        0                                                        
    VN1 123B159                 0        0  CS  01/25/2010    4739310 1005721401           10:01:29
    100  0001020069            60        0                                                        
    VN1 124B160                 0        0  CS  01/25/2010    4739311 1005721402           10:01:31
    100  0001020069            60        0                                                        
    Thnks you,
    Anmol.
    Edited by: anmol112 on Jan 25, 2010 10:34 PM

    no replay, clossing threat.

  • Problems while defining EJB relations for container managed bean

    I am having a problem while trying to create my relations for my container managed bean.
    My Database schema is:
    Order table
    order_id
    message
    WorkItem table:
    order_id
    item_id
    message
    I have defined my OrderBean to have:
    @LocalMethod()
    @CmrField
    public abstract Collection getCmWorkItemsCmr();
    @LocalMethod()
    public abstract void setCmWorkItemsCmr(Collection workItems);
    I am not sure how to define my relation for my class:
    @Relation(cmrField = "cmWorkItemsCmr", multiplicity = Relation.Multiplicity.MANY, name = "Orders-CmWorkItems")
    An order can have many workitems. I am not sure how to fill in the rest for foreign Key jointable and such.
    Any help pointing me in the right direction would be helpful.
    Thanks,
    Ian

    I am having a problem while trying to create my relations for my container managed bean.
    My Database schema is:
    Order table
    order_id
    message
    WorkItem table:
    order_id
    item_id
    message
    I have defined my OrderBean to have:
    @LocalMethod()
    @CmrField
    public abstract Collection getCmWorkItemsCmr();
    @LocalMethod()
    public abstract void setCmWorkItemsCmr(Collection workItems);
    I am not sure how to define my relation for my class:
    @Relation(cmrField = "cmWorkItemsCmr", multiplicity = Relation.Multiplicity.MANY, name = "Orders-CmWorkItems")
    An order can have many workitems. I am not sure how to fill in the rest for foreign Key jointable and such.
    Any help pointing me in the right direction would be helpful.
    Thanks,
    Ian

  • PROBLEM  TRANSFERRING   MULTIPLE   DATA  ENTRIES    FOR  ONE KEY-FIELD.

    DEAR   EXPERTS ,
       I  HAVE  TRANSFERRED  DATA  FROM  THE  FINAL  INTERNAL  TABLE  OF  MY  ABAP REPORT (NOT ALV)  TO  CUSTOM  Z-TABLE  CREATED  IN  SE11.
    BUT  MY  PROBLEM  IS  :  I   COULD  NOT   TRANSFER  MULTIPLE   DATA  ENTRIES   FOR  A  PARTICULAR  FIELD.
    FOR  EXAMPLE :  IN  TABLE  EKKO  THERE  ARE   FOUR  EBELN-4900006375  AND  FOR  THAT  DIFFERENT  EBELP S  ARE
    PRESENT.  I  COULD  TRANSFER  ONLY  THE  FIRST  ENTRY ,  THAT  IS :  EBELN -  4900006375  AND   EBELP - 0010,
    AFTER  THAT  THE  ZTABLE  IS  NOT  GETTING  UPDATED  TO  EBELN-4900006375 FOR  EBELP - 0020  AND  SO ON.
    I  HAVE  TRIED  ALL  THE  '  MODIFY, INSERT,  UPDATE  '  STATEMENTS.  I  HAVE  USED  AT - USERCOMMAND - HIDE  AND  CHECKBOXES.
       PLEASE   SUGGEST   A   SAMPLE   CODE   FOR   THIS.
    Moderator message: please post again, but not in all upper case.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    Edited by: Thomas Zloch on Jun 19, 2011 10:05 PM

    There are actually 5 queries in this report now. From what I understand about a union query, I don't think it will work here because the data being returned in each of the queries is so different. I basically need to know how to make all the criteria for each individual to be displayed before proceeding to the next data set, which will include the same data as the first, but for the next employee, and so on. I need to basically create a repeating frame with each individual's respective data I guess, but every time I do, it tells me that it's referencing an invalid group.

  • Problem while generating classification data-sources

    Hi ,
    I have one classification data-source 1CL_OVEN001 which is based on vendor master data and class type 10.  I tried to added one field in this data-source . while generating data-source, I got some error like " Extractor can not be generated".
    Then I searched on SAP site and got one note 1946309 . When I implemented this note and tried to generated data-source. Now I am getting another error.
    "EXTRACT STRUCTURE IS NOT PERMITTED"
    I have tried with several note  but getting same error.
    Please help.
    Thanks in advance
    Devesh Varshney

    Hi,
    What field you have added, if it is Keyfigure then make sure that you have added its unit.
    -Sriram

Maybe you are looking for