What does your full configuration look like? > <entry key="passwordCallbackRef" value-ref="cryptoProperties" />
Are you passing the Crypto Properties file through for this key? It should be the CallbackHandler... Colm. On Wed, May 7, 2014 at 9:10 PM, Giriraj Bhojak <girira...@gmail.com> wrote: > Here is my wss4j keystore properties file: > > org.apache.ws.security.crypto.merlin.keystore.file=Key.jks > org.apache.ws.security.crypto.merlin.keystore.password=pass!32 > org.apache.ws.security.crypto.merlin.keystore.type=jks > org.apache.ws.security.crypto.merlin.keystore.alias=aliasOne > org.apache.ws.security.crypto.merlin.keystore.private.password=password > > I get following error: > > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) > Caused by: org.apache.ws.security.WSSecurityException: WSHandler: *application > provided null or empty password* > at > org.apache.ws.security.handler.WSHandler.getPasswordCB(WSHandler.java:1048) > at > org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:43) > > I am using wss4j 1.6.13 and CXF 2.7.8. > > If I supply a password callback handler: <entry key="passwordCallbackRef" > value-ref="cryptoProperties" />, then it works properly while unit testing. > > But I am running into class cast exceptions when I use the callback > handler in the deployed app: > Caused by: java.lang.ClassCastException: > org.apache.ws.security.WSPasswordCallback incompatible with > org.apache.ws.security.WSPasswordCallback > > > Hence I am trying to set > 'org.apache.ws.security.crypto.merlin.keystore.private.password' to actual > password. > > I see String password = getPassword(requestData.getMsgContext()); in > org.apache.ws.security.handler.WSHandler.getPasswordCB(String, int, > CallbackHandler, RequestData). But *getPassword *returns null. > I don't know how to set password in the *requestData.getMsgContext().* > > Can someone please help me figure out what's wrong here? > > Thanks, > Giriraj. > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com