Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 508811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:56:46+00:00 2026-05-13T06:56:46+00:00

When I define (using axis 1.4 an wss4j) in client-config.wsdd for WSDoAllSender and WSDoAllReceiver

  • 0

When I define (using axis 1.4 an wss4j) in client-config.wsdd for WSDoAllSender and WSDoAllReceiver different signaturePropFiles where I have different key stores defined with different certificates, I’m able to have different certificates for sending and receiving. But when I use the same signaturePropFiles’ with the same keystore. I get this message when I try to send a message:

  org.apache.ws.security.components.crypto.CryptoBase -- Cannot find key for alias: [monit] in keystore of type [jks] from provider [SUN version 1.5] with size [2] and aliases: {other, monit}
- Error during Signature: ; nested exception is:
        org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is:
        java.lang.Exception: Cannot find key for alias: [monit]
org.apache.ws.security.WSSecurityException: Error during Signature: ; nested exception is:
        org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is:
        java.lang.Exception: Cannot find key for alias: [monit]
        at org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:60)
        at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:202)
        at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:168)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at cz.xxx.opf.model.wsclient.ModelWebServiceSoapBindingStub.getStatus(ModelWebServiceSoapBindingStub.java:213)
        at cz.xxx.opf.wsgemonitor.monitor.util.MonitorUtil.checkStatus(MonitorUtil.java:18)
        at cz.xxx.opf.wsgemonitor.monitor.Test02WsMonitor.runTest(Test02WsMonitor.java:23)
        at cz.xxx.opf.wsgemonitor.Main.main(Main.java:75)
Caused by: org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is:
        java.lang.Exception: Cannot find key for alias: [monit]
        at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:721)
        at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:780)
        at org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:57)
        ... 15 more
Caused by: java.lang.Exception: Cannot find key for alias: [monit]
        at org.apache.ws.security.components.crypto.CryptoBase.getPrivateKey(CryptoBase.java:214)
        at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:713)
        ... 17 more

How to have two certificates for wss4j in the same keystore? why it cannot find my certificate there when i have two certificates in one keystore.

I have the same password for both certificates regarding PWCallback (CallbackHandler)

My properties file:

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin 
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=keystore
org.apache.ws.security.crypto.merlin.keystore.alias=monit
org.apache.ws.security.crypto.merlin.alias.password=***
org.apache.ws.security.crypto.merlin.file=key.jks

My client-config.wsdd:

  <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <globalConfiguration>  
  <requestFlow>
   <handler name="WSSecurity" type="java:org.apache.ws.axis.security.WSDoAllSender">
        <parameter name="user" value="monit"/>
        <parameter name="passwordCallbackClass" value="cz.xxx.opf.common.ws.PWCallback"/>
        <parameter name="action" value="Signature"/>
        <parameter name="signaturePropFile" value="monit.properties"/>
        <parameter name="signatureKeyIdentifier" value="DirectReference" />
        <parameter name="mustUnderstand" value="0"/>
   </handler>
     <handler type="java:org.apache.axis.handlers.JWSHandler">
        <parameter name="scope" value="session"/>
     </handler>
     <handler type="java:org.apache.axis.handlers.JWSHandler">
        <parameter name="scope" value="request"/>
        <parameter name="extension" value=".jwr"/>
     </handler>
   </requestFlow>
   <responseFlow>  
        <handler name="DoSecurityReceiver" type="java:org.apache.ws.axis.security.WSDoAllReceiver">
            <parameter name="user" value="other"/>  
            <parameter name="passwordCallbackClass" value="cz.xxx.opf.common.ws.PWCallback"/>
            <parameter name="action" value="Signature"/>
            <parameter name="signaturePropFile" value="other.properties"/>
            <parameter name="signatureKeyIdentifier" value="DirectReference" />  
        </handler>  
   </responseFlow>

 </globalConfiguration>

 <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender">  

 </transport>
</deployment>

Listing from keytool:
keytool -keystore monit-key.jks -v -list

Enter keystore password:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 2 entries

Alias name: other
Creation date: Jul 22, 2009
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
....

Alias name: monit
Creation date: Oct 19, 2009
Entry type: trustedCertEntry
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:56:46+00:00Added an answer on May 13, 2026 at 6:56 am

    I solved that months ago and if any one need it. problem was that I didn’t have private key in keystore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some template function and I want to call it using define in
I have attached the entire code which I am using but the x-axis label
I'm implementing a SOAP client using Apache Axis 2. Since the SOAP client must
I am using define in my project. My js code woks when I don't
One can remove all calls to printf() using #define printf . What if I
I'd like to be able to define lambdas using common Lisp syntax, in Clojure.
I define a tabs using JQuery <div id=tabs> <ul> <li><a href=#tabs-1>Tab 1</a></li> <li><a href=#tabs-2>Tab
I'm using following define to make my setup script flexible according to the build
I'm trying to define a function using template template parameters (I just want to
I'm creating a CustomizableIntroPart for my Eclipse application. I define my pages using XHTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.