Key usage extension on Signature.initVerify method

Hi,
I've a problem with method in object: my application tries to verify all CA-certs stored on a p12 file, but when I added some new certs with key usage extension it never works.
I found on initVerify(Certificate) documentation the following information: If the certificate is of type X.509 and has a key usage extension field marked as critical, and the value of the key usage extension field implies that the public key in the certificate and its corresponding private key are not supposed to be used for digital signatures, an InvalidKeyException is thrown.
Infact if I try to use initVerify with PublicKey (initVerify(PublicKey)), it correctly works.
Unfortunately I don't understand what is the difference between the first check (Certificate) and the second (PublicKey). Can I do a correct check also with Certificate.getPublicKey?
Thanks.

see this thread: http://forum.java.sun.com/thread.jspa?threadID=469244&tstart=0

Similar Messages

  • Problem with criticality of key usage extension

    Hi everybody, I'm instaling a subca and I'm submitting the request to a standalone CA. I need to make the key usage extension of the subca certificate critical, to do so after I submitted the request, I run this command
    certutil -setextension  Request_ID 2.5.29.15
    1 @File_Name.txt
    (exactly as what is said in the article below), but after the standalone ca issues the request, the key usage extension is not marked as critical.
    http://support.microsoft.com/kb/888180
    plaese help me solve this problem, thank you.

    after a lot of try and errors I'v found out that when I submit an end entity request to the ca, I can make the key usage extension critical with the said syntax. but when I Submit a subca request to the same ca it detects that its a subca request and kind
    of overwrites the criticality for key usage extension.
    I think it must have sth to do with subca template that the ca applies on the request by default (when the request is from a subca). as I mentioned before it's a standalone CA, I don't understand why it should use any template at all. how can I change the
    default setting for subca template or tell the ca that do not apply any templates? 
    anyway, here is a copy of my request, thank you
    -----BEGIN NEW CERTIFICATE REQUEST-----
    MIIDKDCCAhACAQAwETEPMA0GA1UEAxMGU1NMIENBMIIBIjANBgkqhkiG9w0BAQEF
    AAOCAQ8AMIIBCgKCAQEA9QIIrvgAykEHLVAjSuQF+nBMP9axOJvLreHprSsTo53J
    C19iefjEFjCejuDPFpJdxFNybb5pZW62HntuCBtIs/cUPjlIrGJq6jffigaxT4Eh
    KTDIsFURGOVMDjN2miPv7pbNtCxSd4v8cAXvHy8O+bNa7UbBD/YLlGGpsRPiDkjr
    NIHM0XvdnflcsblTrbsTxiOZdzjnMGzae/g0GPngdOH9C7eDWMwnh8/iV6e7e+Bk
    QAxmAN9XLAuiykfAw8FNT9tK5S4LKe81HbmuLjUHTUaUO+y5hbaw1zbQF+j9r4FG
    8jPHc2EKQLb2ZydAd6jxchqaAx3sSMzuU9PE/bCRPQIDAQABoIHRMCkGCisGAQQB
    gjcNAgMxGxYZNi4xLjc2MDEuMi5TZXJ2aWNlIFBhY2sgMTCBowYJKoZIhvcNAQkO
    MYGVMIGSMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBS/n6huucIaXOa6dHW0
    uF2KGorsrjAgBgNVHSUBAf8EFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwGQYJKwYB
    BAGCNxQCBAweCgBTAHUAYgBDAEEwDgYDVR0PAQH/BAQDAgGGMBIGA1UdEwEB/wQI
    MAYBAf8CAQAwDQYJKoZIhvcNAQEFBQADggEBABwvcgW8zikD7NHsLvCrxiq3gqJ7
    5S+dRngwn7F4VGise6HLMMec3XoCSdvxfD+l8x7K2IdUgvW95OYkY+MV9kDdsgpZ
    ooE+KU01mTTLl4HiE74WyFyg+X70cvJaJG9ZgC6/9iuzMuU8aJy4uOyDWg7yeSIs
    VzFP3hvtTYk39h0PQaKirrmRdLOMGRNipYqhNsbeDCVJDmnqyzVwo4yARV8rjkVY
    Aoxz2cQKV+gCWuV/awDstdYucAcQd2mkio7FkLo0QW8f+rl1+LGjd3h9ee/phTZY
    McRn7GqKp2y3/5IA+WY4Q3tdIOaasePpMayi3IfVGKkynZeGHYEAYmzZVnM=
    -----END NEW CERTIFICATE REQUEST-----

  • Sign with certificate with 'non-repudiation' key usage only

    Hello,
    We are facing a problem validating digital signatures created by our partners with Adobe Reader. When validating the signature, we get the general 'The signer's identity is invalid' error. The Signature properties -> Certificate tab reports a warning "The selected certificate has errors: Not valid for usage".
    The key usage extension in the certificate that our partners use for signing contains the only 'non-repudiation' element. Still, the intended usage shown on the certificate summary tab is "Sign document".
    The main question is if the problem is related to the specific value of the key usage extension, or it has a different root.
    Thanks in advance,
    Ken

    Hello Steve,
    Thank you very much for the document. In the mean time, we've got a permission from our partners to share with you one of the documents we've exchanged with them before. I have uploaded it to Google Docs (https://docs.google.com/open?id=0B1wk9toh5e7AbWNlVGZoY2thY1U), as the forum doesn't allow me to attach documents to a message. Just in case if you're not familiar with Google Docs, simply go to File->Download menu after opening the link in the browser, and you will be able to retrieve and save the original document locally.
    Do I still need to ask them to sign the document you attached above as well?
    We really appreciate your efforts in this regard,
    Ken Ivanov

  • X509v3 key usage in JWS 1.4.2

    I'm experiencing problem loading signed jar in 1.4.2. The same jar is working fine with JWS 1.0.1. Webstart loads the jar then complain with a message box
    "Warning: Failed to verify the authenticity of this certificate because there was an error parsing the certficate. No assertions can be made of the origin or validity of the code. Installation and running this code is not allowed"
    Strange enough, if I start the same application in 1.0.1 first and exit. Then start the same application using 1.4.2, it works. However, if I clear the cache and run it on 1.4.2, it ceases to work again. It seems to be some caching issues there.
    My question is "Has jws 1.4.2 changed in terms of reading the X509 certificate?" My bet is to do with my x509v3 certificate with a key usage set to
         X509v3 Key Usage: critical
         Digital Signature, Non Repudiation, Key Encipherment, Key Agreement
    Otherwise, I can't really see anything wrong with my certificate.
    Any help would be really appreciated

    Thanks for the help. I managed to track it down to the certificate extension. I'm wondering if my certificate has key usage " DigitalSignature + Non_repudiation + Key_Encipherment + Key_Agreement", does it mean it's not valid to use that to sign a jar? Or that's just something the JCE provider is not recognising? Thanks in advance if anyone can shed some light.
    William
    failed extension check: [
    Version: V3
    Subject: CN=XXXXX, L=LeSC, OU=Imperial, O=eScience, C=UK
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    ba1078bd 5c94ec07 8d0332df 9a0de0d9 a5ae000a 0a410061 54fd07ea 7594acdc
    93c8a5b8 3913c8c9 73319662 503c956a e97a75c9 4d8477d9 5ff2169e 41948ac8
    99b23686 fb85b5aa 3dbff6d8 0a70dc82 aa92b4a3 92a34323 aae80d1b d526f96e
    5749a10e 7913fe75 60dcab67 fa854182 cd980866 cec5e3bc 120f26b3 e4dbe753
    Validity: [From: Tue Aug 05 11:21:58 BST 2003,
                   To: Wed Aug 04 11:21:58 BST 2004]
    Issuer: [email protected], CN=CA, OU=Authority, O=eScience
    , C=UK
    SerialNumber: [    0331]
    Certificate Extensions: 12
    [1]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: 02 38 AB 11 A3 96 80 8B 0D D3 15 2B 08 A5 8E 30 .8.........+...0
    0010: DA B2 DA A8 ....
    [[email protected], CN=CA, OU=Authority, O=eScience, C=UK]
    SerialNumber: [    00]
    [2]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 4B 3A AD 15 5A E0 C3 89 FF 56 A9 B1 68 5B 4D 5A K:..Z....V..h[MZ
    0010: 78 B7 E2 B1 x...
    [3]: ObjectId: 2.16.840.1.113730.1.13 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 1F 16 1D 55 4B 20 65 2D 53 63 69 65 6E 63 65 ....UK e-Science
    0010: 20 55 73 65 72 20 43 65 72 74 69 66 69 63 61 74 User Certificat
    0020: 65 e
    [4]: ObjectId: 2.5.29.18 Criticality=false
    IssuerAlternativeName [
    [RFC822Name: [email protected]]]
    [5]: ObjectId: 2.16.840.1.113730.1.7 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 2F 16 2D 68 74 74 70 3A 2F 2F 63 61 2E 67 72 ./.-http://ca.gr
    0010: 69 64 2D 73 75 70 70 6F 72 74 2E 61 63 2E 75 6B id-support.ac.uk
    0020: 2F 63 67 69 2D 62 69 6E 2F 72 65 6E 65 77 55 52 /cgi-bin/renewUR
    0030: 4C L
    [6]: ObjectId: 2.5.29.32 Criticality=false
    CertificatePolicies [
    [CertificatePolicyId: [1.3.6.1.4.1.11439.1.1.1.1.3]
    [7]: ObjectId: 2.16.840.1.113730.1.1 Criticality=false
    NetscapeCertType [
    SSL client
    S/MIME
    [8]: ObjectId: 2.16.840.1.113730.1.4 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 30 16 2E 68 74 74 70 3A 2F 2F 63 61 2E 67 72 .0..http://ca.gr
    0010: 69 64 2D 73 75 70 70 6F 72 74 2E 61 63 2E 75 6B id-support.ac.uk
    0020: 2F 63 67 69 2D 62 69 6E 2F 69 6D 70 6F 72 74 43 /cgi-bin/importC
    0030: 52 4C RL
    [9]: ObjectId: 2.5.29.19 Criticality=true
    BasicConstraints:[
    CA:false
    PathLen: undefined
    [10]: ObjectId: 2.16.840.1.113730.1.3 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 30 16 2E 68 74 74 70 3A 2F 2F 63 61 2E 67 72 .0..http://ca.gr
    0010: 69 64 2D 73 75 70 70 6F 72 74 2E 61 63 2E 75 6B id-support.ac.uk
    0020: 2F 63 67 69 2D 62 69 6E 2F 69 6D 70 6F 72 74 43 /cgi-bin/importC
    0030: 52 4C RL
    [11]: ObjectId: 2.5.29.31 Criticality=false
    CRLDistributionPoints [
    [DistributionPoint:
    [URIName: http://ca.grid-support.ac.uk/cgi-bin/importCRL]
    [12]: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
    DigitalSignature
    Non_repudiation
    Key_Encipherment
    Key_Agreement
    Algorithm: [MD5withRSA]
    Signature:
    0000: 1A 7C 75 3F 5C 2B 4B 6D 64 E1 D3 5B 70 31 22 C8 ..u?\+Kmd..[p1".
    0010: 78 07 A5 8F B4 5A A0 D8 08 73 95 B2 E0 B9 20 D8 x....Z...s.... .
    0020: 01 50 7A D6 AE 48 7A 1E 49 6C 58 9A 18 9E B9 7F .Pz..Hz.IlX.....
    0030: 30 4F EB 00 B0 64 7C 02 23 35 80 19 15 74 B6 48 0O...d..#5...t.H
    0040: 4F 97 2C 03 1F A3 5D CE 98 A4 3C D2 35 F9 86 D7 O.,...]...<.5...
    0050: 86 2B 5C D3 0B A4 3F 34 E1 A5 72 FE 22 2F 18 E1 .+\...?4..r."/..
    0060: EA 5C 23 EB D4 73 69 4E 5A 86 57 C2 3E EE 02 53 .\#..siNZ.W.>..S
    0070: AB 9E 98 BC CE 32 68 08 C8 68 94 4C C7 98 32 77 .....2h..h.L..2w
    0080: 6F 18 A4 A7 A6 8A 29 FF 18 E2 A2 0E E4 51 57 80 o.....)......QW.
    0090: E8 94 6F 37 E5 4D 55 B0 86 42 3B 35 C5 5C D0 29 ..o7.MU..B;5.\.)
    00A0: C2 97 3F 56 D2 7F E2 60 11 8C E8 C7 77 9B 64 A9 ..?V...`....w.d.
    00B0: 62 96 96 05 A2 81 C9 A4 F7 06 21 51 74 16 43 14 b.........!Qt.C.
    00C0: D9 57 7E 40 EA 82 D6 44 44 03 E1 05 1E 76 D8 DD [email protected]..
    00D0: 97 54 29 5A DC B5 7B F8 B6 9D AC 29 6F 73 FC 0E .T)Z.......)os..
    00E0: 74 AD C0 A6 AD 75 FC 85 D1 84 93 2D 90 AF BB 68 t....u.....-...h
    00F0: 1A 54 6C 7C 58 28 50 07 6F 17 8C D7 F1 99 D9 29 .Tl.X(P.o......)
    exception was: java.security.cert.CertificateException: Invalid Netscape CertType exte
    nsion
    CertificateException: java.security.cert.CertificateException: Invalid Netscape CertTy
    pe extension

  • Wrong key usage exception since 7u6

    Hi!
    I have completely signed (DigiCert) applet, which using mixed code (JOGL). It works well before release 7u6. After it, i have these exceptions:
    sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: java.security.InvalidKeyException: Wrong key usage
    at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)
    at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
    at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.cert.CertPathValidatorException: java.security.InvalidKeyException: Wrong key usage
    at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(Unknown Source)
    at sun.security.provider.certpath.PKIXCertPathValidator.doValidate(Unknown Source)
    at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown Source)
    at java.security.cert.CertPathValidator.validate(Unknown Source)
    ... 14 more
    Caused by: java.security.InvalidKeyException: Wrong key usage
    at java.security.Signature.initVerify(Unknown Source)
    at sun.security.provider.certpath.OCSPResponse.verifyResponse(Unknown Source)
    at sun.security.provider.certpath.OCSPResponse.<init>(Unknown Source)
    at sun.security.provider.certpath.OCSP.check(Unknown Source)
    at sun.security.provider.certpath.OCSPChecker.check(Unknown Source)
    ... 18 more
    In newest 6u35 and 7u5 it works OK.
    Any suggestions?

    We receive the same error message as described above by user 956556, when certificate validation (CRL, OCSP or both) is activated.
    The certificate is issued by "VeriSign Class 3 Code Signing 2010 CA"
    The extensions are:
    SEQUENCE :
    SEQUENCE :
    OBJECT IDENTIFIER : basicConstraints [2.5.29.19]
    OCTET STRING :
    SEQUENCE : ''
    SEQUENCE :
    OBJECT IDENTIFIER : keyUsage [2.5.29.15]
    BOOLEAN : 'ÿ'
    OCTET STRING :
    BIT STRING UnusedBits:7 : '80'
    SEQUENCE :
    OBJECT IDENTIFIER : cRLDistributionPoints [2.5.29.31]
    OCTET STRING : ''
    SEQUENCE : ''
    SEQUENCE : ''
    CONTEXT SPECIFIC (0) : ''
    CONTEXT SPECIFIC (0) : ''
    CONTEXT SPECIFIC (6) : 'http://csc3-2010-crl.verisign.com/CSC3-2010.crl'
    SEQUENCE :
    OBJECT IDENTIFIER : certificatePolicies [2.5.29.32]
    OCTET STRING :
    SEQUENCE :
    SEQUENCE :
    OBJECT IDENTIFIER :  [2.16.840.1.113733.1.7.23.3]
    SEQUENCE :
    SEQUENCE :
    OBJECT IDENTIFIER : cps [1.3.6.1.5.5.7.2.1]
    IA5 STRING : 'https://www.verisign.com/rpa'
    SEQUENCE :
    OBJECT IDENTIFIER : extKeyUsage [2.5.29.37]
    OCTET STRING :
    SEQUENCE :
    OBJECT IDENTIFIER : codeSigning [1.3.6.1.5.5.7.3.3]
    SEQUENCE :
    OBJECT IDENTIFIER : authorityInfoAccess [1.3.6.1.5.5.7.1.1]
    OCTET STRING :
    SEQUENCE :
    SEQUENCE :
    OBJECT IDENTIFIER : ocsp [1.3.6.1.5.5.7.48.1]
    CONTEXT SPECIFIC (6) : 'http://ocsp.verisign.com'
    SEQUENCE :
    OBJECT IDENTIFIER : caIssuers [1.3.6.1.5.5.7.48.2]
    CONTEXT SPECIFIC (6) : 'http://csc3-2010-aia.verisign.com/CSC3-2010.cer'
    SEQUENCE :
    OBJECT IDENTIFIER : authorityKeyIdentifier [2.5.29.35]
    OCTET STRING :
    SEQUENCE :
    CONTEXT SPECIFIC (0) : 'CF99A9EA7B26F44BC98E8FD7F00526EFE3D2A79D'
    SEQUENCE :
    OBJECT IDENTIFIER : netscape-cert-type [2.16.840.1.113730.1.1]
    OCTET STRING :
    BIT STRING UnusedBits:4 : '10'
    SEQUENCE :
    OBJECT IDENTIFIER : spcFinancialCriteriaInfo [1.3.6.1.4.1.311.2.1.27]
    OCTET STRING :
    SEQUENCE :
    BOOLEAN : '00'
    BOOLEAN : 'ÿ'

  • Certificate key usage in standalone CA

    I have a problem with a standalone sub CA.
    Certificate must be able to sign Outlook mails, encrypt them and sign Word documents, so in certqtp.inc I've changed rgAvailReqTypes parametr for my certificate:
    rgAvailReqTypes(0,FIELD_OID)="1.3.6.1.4.1.311.10.3.12, 1.3.6.1.5.5.7.3.4, 1.3.6.1.5.5.7.3.2, 1.3.6.1.4.1.311.10.3.4"
    After that key usage field of enrolled certificates have changed to "data ecnryption (20)", but I don't know why. So with this key usage I can sign documents, can ecnrypt mails, but can't sign them (key usage must contain digital signature).
    How to change key usage field in standalone CA ??

    Hi,
    Since you are using standalone CA, certificate templates won’t be used, therefore, you need to configure .inf file to achieve your goal.
    Here are some related links below I suggest you refer to:
    How do I set the keyUsage field in my offline, stand-alone root CA certificate to Critical=Yes?
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/406ce00d-5a29-483e-9b81-7d4867139dad/how-do-i-set-the-keyusage-field-in-my-offline-standalone-root-ca-certificate-to-criticalyes?forum=winserverDS
    How to make a stand-alone certification authority that is running Windows Server 2003 with Service Pack 1 or an x64-based version of Windows Server 2003 compliant with ISIS-MTT version 1.1
    http://support.microsoft.com/kb/888180
    Certificate Services - Key Usage missing from IPSecIntermediateOffline Certificate
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/3f96b352-5542-4bb0-b5ae-3ca096d16478/certificate-services-key-usage-missing-from-ipsecintermediateoffline-certificate?forum=winserversecurity
    Best Regards,
    Amy Wang

  • No Signature of Method Error when trying to set Bind Variable Groovy Expr

    I am trying to set a Bind variable on my view object to equal the output of a function defined in the the EntityImpl.java that corresponds to that bind variable.
    I set the value of my bind variable to be = adf.object.getMyServiceType()
    Where the name of the view object I am currently in is called GridSwSoftwareServiceView.xml and the Entity object is called GridSwSoftwareService.java and the EntityImpl file is called GridSwSoftwareService.java.
    I am seeing this error:
    No signature of method: oracle.jbo.common.VariableImpl$VariableExprValueSupplier.getMyServiceType() is applicable for argument types: () values: []
    Does anyone know what this error means?
    I was trying to follow an example from this doc: http://www.oracle.com/technology/products/jdev/11/how-tos/groovy/introduction_to_groovy.pdf
    Edited by: user10791986 on May 21, 2010 2:50 PM

    Looks like a bug... :(
    It works fine as a View Object attribute expression but it fails miserably once added as an expression to the bind variable. In this case, here is a work-around:
    Define the method as static in your EntityImpl.java :
    public static String getMyServiceType() {
    return "EBSO R12";
    Then access it by fully qualifying it with the package and class :
    com.yourpackage.EntityImpl.getMyServiceType()
    Edited:
    On a second thought, I am wondering if the expression is valid since the Entity hasn't yet constructed at that point.... That explains why it works when made static.
    Nick
    Edited by: Nick Haralabidis on May 21, 2010 5:16 PM

  • X509 certifcate key usage

    Hi, How do I determine if a X508v3 ccertifate is a client or server certificate?
    I can't find any documentation describing the difference.

    Certificate can have extended key usage constraint that says it can be used for
    client or server authentication only.
    See rfc 3280: http://rfc-3280.rfc-index.net/rfc-3280-41.htm
    Pavel.
    "Dave Gray" <[email protected]> wrote:
    >
    Hi, How do I determine if a X508v3 ccertifate is a client or server certificate?
    I can't find any documentation describing the difference.

  • Using a digital signature-base method to get tcUtilityFactory

    In OIM API usage guide it is sais that:
    "The entity using the APIs must maintain security of the private key for the signature. The private key is the basis for establishing trust between the two systems.
    Oracle Identity Manager must also know what certificates to trust. To trust a certificate, the signer of the certificate must be added as a trusted CA in .xlkeystore or in the keystore configured in the security section in the xlconfig.xml file on the server.
    So, if I want to obtain a copy of certificate for calling OIM API purposes, for which user I must create a certificate request? Or should it be the server certificate, issued for server OIM is running at?

    Most third party signature pads require two things. 
    1.  An Acrobat plug-in
    2.  A device driver to connect the plug-in to device data being used for the signture.
    Which third party Signature Pad are you using and which software are you using in conjunction with the Signature Pad.

  • .key file extension

    Hi, a friend is visiting and needs to open a power point on my mac. I downloaded file and tried to open in microsoft office ppt, however the file format is .key and I've no idea what that is or what to do with it, all I know is I can't open it!! Help please???

    Hi,
    according to this http://www.fileinfo.com/extension/KEY the .key file could be one of three possibilities.
    The (to me) only viable possibility seems to be that it is a Keynote file made with Apple Keynote app.
    You can download the free trial of it here http://www.apple.com/iwork/
    Regards
    Stefan

  • Invalid key predicate error while running http method get via tcode /IWFND/MAINT_SERVICE

    Hi,
    I am facing an error which says "Invalid Key predicate"while running http method get via tcode /IWFND/MAINT_SERVICE.
    The same works fine for sdata .The SICF nodes are active.But when the url has odata it does not seem to work as expected .This is the url I am trying to execute.
    /sap/opu/odata/sap/QMLSINSPECTIONLOT/MATERIALDETAIL(MaterialNumber='1706',FROMDATE='20120303',TODATE='20120708')?$format=xml
    (does not work -error invalid predicate)
    /sap/opu/sdata/sap/QMLSINSPECTIONLOT/MATERIALDETAIL(MaterialNumber='1706',FROMDATE='20120303',TODATE='20120708')?$format=xml(works fine)
    Could you help me with this error?
    Regards,
    Ann

    Ann,
    FROMDATE is a date field? Then you need to specify while providing value.
    Example: Check it here.
    How to use OData Date filter query to filter data from OData NetWeaver Gateway Service?
    Thanks
    Krishna

  • Keynote hides .key file extension on save - feature or bug?

    I haven't been able to track anything down about this in the forum...
    I've created a new file in Keynote '09, and saved it with the standard .key extension. When I open the file, edit it, and "save" it, Keynote hides the extension. If I go to the file in the Finder, select it and show info, and un-check "hide extension", the .key reappears as expected. But the next time I save it in Keynote, Keynote hides the extension again.
    I know that the new file format is really a .zip file, so that's why I'm wondering if this is supposed to be a feature even though it seems like a bug.
    Anyone have any insight on this?

    I've seen this in the past... someone else has posted it before and I tried the same thing. I think it IS a bug, so you should report it here.
    http://www.apple.com/feedback/keynote.html

  • Need advice for Fn key usage in Motion.

    I am just beginning my usage of Motion 4 and working through Mark Spencer's book. The book keeps referring you to use the Fn keys. But mine don't work the way they are supposed to. I went into System prefs and selected the use all Fn keys and when I go back into the program to use them I press the fn key and the appropriate Fn key (ex. F5 to open the project pane) and all I get is a beep and nothing happens. If I just use the F-F8 procedure it will just add an f or a 5 etc, into the area at the bottom for the current time. Or if I hit the Fn-F8 it opens iTunes. I know I can work it out by using the long way around. But I know it is easier to use the function keys from experience in the CS4 suites. Is there anything I am not trying or something anyone can recommend to make these work properly?
    Thanks,
    Scott

    That's what I have been counting on. However, when I press F5 for example, it takes whatever is on the canvas and replaces the bounding box with a red rectangle. I am somewhat proficient on a Mac but this is the first issue I have come across.

  • How to reference Key figure in (BAdI) IF_EX_RSR_OLAP_BADI~COMPUTE method?

    Hi,
    I am a new bee to the ABAP world.
    I am writing a BAdI implementation (Definition name: RSR_OLAP_BADI) for a 'Virtual KeyFigure' named D_TAX1.
    I dont know how to set the value for key figure D_TAX1 in BADI implementation COMPUTE method (IF_EX_RSR_OLAP_BADI~COMPUTE).
    D_TAX1 is a virttual key figure I had added in DSO.
    I want to populate the value in BADI compute method (IF_EX_RSR_OLAP_BADI~COMPUTE).
    I haven't written any method implementation for IF_EX_RSR_OLAP_BADI~DEFINE.
    Is it mandatory that I need to write some thing there? I haven't declared any attributes either.
    I want to set tax amount to the D_TAX1 virtual key figure based on the amount (another key figure in DSO).
    I don't know if I need to write this, but the class name in BAdI is: : ZCL_IM_VAL_IMPL.
    I really appreciate your help in this matter.
    Thank you.
    Sekhar

    Thank you for your answers.
    I have added the following code to the methods DEFINE, INITIALIZE & COMPUTE methods.
    method IF_EX_RSR_OLAP_BADI~DEFINE.
      DATA: l_s_chanm TYPE rrke_s_chanm,
          l_kyfnm TYPE rsd_kyfnm.
      FIELD-SYMBOLS:
          <l_s_chanm> TYPE rrke_s_chanm.
    Insert Code
    CASE i_s_rkb1d-infocube.
      WHEN 'D_DSOIC1'.                                "DSO name
        l_s_chanm-chanm = 'D_CST1'.              "Characteristic
        l_s_chanm-mode = rrke_c_mode-read.
        APPEND l_s_chanm TO c_t_chanm.
        APPEND 'D_TAX1' TO c_t_kyfnm.          "D_TAX1 is a newly added Virtual KeyFigure
    ENDCASE.
    ENDMETHOD. "if_ex_rsr_olap_badi~define
    [In the following INITIALIZE method, I didn't change any thing. I used the INITIALIZE method from the CL_EXM_IM_RSR_OLAP_BADI as is]
    method IF_EX_RSR_OLAP_BADI~INITIALIZE.
      DATA: l_global_name TYPE string.
      FIELD-SYMBOLS:
            <l_global>    TYPE i,
            <l_s_sfc>     TYPE rrkg_s_sfc,
            <l_s_sfk>     TYPE rrkg_s_sfk.
    there's no need to change this method
    Just create attributes for each charactersitic
    with name P_CHA_<characteristic> TYPE i.
    and constants for each key figure with name
    P_KYF_<key figure> TYPE i.
      CLASS cl_exm_im_rsr_olap_badi DEFINITION LOAD.
    get field postions for characteristics in structure
      LOOP AT i_th_sfc ASSIGNING <l_s_sfc>
           WHERE user_exit NE rrke_c_mode-none.
    field name in structure is keyreturnnm
    name of the global variable
        CONCATENATE 'P_CHA' <l_s_sfc>-chanm
            INTO l_global_name
            SEPARATED BY '_'.
    fill the global variable
        UNASSIGN <l_global>.
        ASSIGN (l_global_name) TO <l_global>.
        CHECK <l_global> IS ASSIGNED.
        <l_global> = cl_exm_im_rsr_olap_badi=>get_field_position_d(
                                           i_fieldnm = <l_s_sfc>-keyreturnnm
                                           i_s_data  = i_s_data ).
      ENDLOOP.
    get field positions for key figures in structure
      LOOP AT i_th_sfk ASSIGNING <l_s_sfk>
           WHERE value_returnnm IS NOT INITIAL.
    name of the global variable
        CONCATENATE 'P_KYF' <l_s_sfk>-kyfnm
            INTO l_global_name
            SEPARATED BY '_'.
    fill the global variable
        UNASSIGN <l_global>.
        ASSIGN (l_global_name) TO <l_global>.
        CHECK <l_global> IS ASSIGNED.
        <l_global> = cl_exm_im_rsr_olap_badi=>get_field_position_d(
                                           i_fieldnm = <l_s_sfk>-value_returnnm
                                           i_s_data  = i_s_data ).
      ENDLOOP.
    endmethod.
    METHOD if_ex_rsr_olap_badi~compute.
      FIELD-SYMBOLS <fs_d_tax1> TYPE ANY.
      FIELD-SYMBOLS <fs_d_cst1> TYPE ANY.
      ASSIGN COMPONENT p_kyf_d_tax1 OF STRUCTURE c_s_data TO <fs_d_tax1>.
      ASSIGN COMPONENT p_cha_d_cst1 OF STRUCTURE c_s_data TO <fs_d_cst1>.
      <fs_d_tax1> = 10.
    ENDMETHOD.
    When I display the virtual key figure D_TAX1 in the query, it is not populated with value 10.
    Can you guys please tell me what I need to change?
    I haven't written any code in GET_FIELD_POSITION_D (in the example class CL_EXM_IM_RSR_OLAP_BADI, this method is implemented).
    I appreciate your suggestions and help.
    Thank you,
    Sekhar

  • Could anyone tell me what usage of the Thread.dumpStack(); method?

    I am looking the java api , and found one method in the Thread.
    The method is public static void dumpStack().
    and the api description is "Prints a stack trace of the current thread. This method is used only for debugging. " .
    is there anyone to tell me exactly on what situation the method is used.
    it's better that there is a sample to show that.
    i have write a sample program. as following , but i still don't exactly understand the usage of this method.
    code:
    public class ThreadDumpStack {
    public ThreadDumpStack() {
    public static void main(String[] args) {
    ThreadDumpStack threadDumpStack1 = new ThreadDumpStack();
    System.out.println(threadDumpStack1.hello());
    Thread.currentThread().dumpStack();
    System.out.println(threadDumpStack1.string());
    public int hello () {
    int i = 10;
    int j =10;
    return i+j;
    public String string() {
    String a = "hello";
    String b ="world";
    return a + " " + b;
    result:
    java.lang.Exception: Stack trace
         at java.lang.Thread.dumpStack(Thread.java:1071)
         at api.ThreadDumpStack.main(ThreadDumpStack.java:21)
    20
    hello world

    It is for when you have got a large complex application, which is not working (as in running, but returning the wrong value, or getting into an ever lasting loop). You can then use this to work out what your application is doing.

Maybe you are looking for

  • Pass Multiple Prompt Values Dynamically in a Publication

    Hello I have a dynamic list for list for my Publications of a Web Intelligence Document. The dynamic list has the following columns names ID Name Email Zone and the Web Intelligence document has the columns: Zone Sales Value I can't use Profiles beca

  • Best Practice to generate UUIDs in a Cluster-Server Environment

    Hi all, I just need some inputs over the best practices to generate UUIDs in typical internet world where there are multiple servers/JVMs involved for load balancing or traffic distribution etc. I know JAVA is shipped with very efficient UUID generat

  • Does label template copy work at all?

    Hi, i hadn't time to investigate if this is a known problem, i must dash in 5 minutes, however i tried both on apex.oracle.com and on my local apex instance, both version 3.0.1, and i can't get the "label template copy" to work. I click on the copy i

  • How can I transfer my photos and videos from Palm Treo 750 to iMac OS X 10.9.5?

    My old Palm Treo 750 which does not have any service has very special photos and videos I would like to put on my iMac OS X 10.9.5. I plugged the phone into the USB adapter and the phone is not recognized. Can anyone give me direction?

  • Load API with SQL Loader

    Hi: Does somebody know if it is possible to upload data using an API in SQL Loader? Or SQL Loader is limited only to INSERT statements? I need to bulk a lot of employees and their usernames and resposibilities. They are almost 200 employees. What I w