Friday, September 13, 2013

keytool error: java.lang.Exception: Input not an X.509 certificate

Problem Statement:-

While importing .pem format certificate in weblogic keystore using keytool command error was thrown as below
keytool error: java.lang.Exception: Input not an X.509 certificate



Background:-


I converted .p7b to .pem format using below command
openssl pkcs7 -print_certs -in ABC.p7b -inform der -out ABC.pem

and then tried importing it using keytool command 
keytool -importcert -alias ABC -file ABC.pem -keystore demoidentity.jks -storepass password

Cause:-

ABC.pem contains extra lines as highlighted below

subject=/serialNumber=6npr-psjxdqgGUW/7AUAFQC-27Xr/C=US/ST=California/L=Sunnyvale/O=ABC/CN=b2btest.abc.net
issuer=/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA
-----BEGIN CERTIFICATE-----

Solution:-
Remove ALL the occurrence of highlighted line in the pem file and re-try.
 

 

Wednesday, September 11, 2013

weblogic.management.DeploymentException: Bind operation failed

Error:-

weblogic.management.DeploymentException: Bind operation failed: eis/jms/CommonXA, weblogic.management.DeploymentException: Resource Adapter with JNDIName: eis/jms/CommonXA already deployed
        at weblogic.connector.deploy.JNDIHandler.bindConnectionFactory(JNDIHandler.java:219)
        at weblogic.connector.outbound.RAOutboundManager.activatePool(RAOutboundManager.java:1076)
        at weblogic.connector.outbound.RAOutboundManager.activate(RAOutboundManager.java:183)


Cause:-

The JNDI "eis/jms/CommonXA" already exists under a resource adapter and you are trying to create a new JNDI with the same JNDI name i.e. "eis/jms/CommonXA"

Solution:-

1. Delete the newly created JNDI and then create it with a different JNDI name
2. Delete the existing JNDI

A JNDI name should be UNIQUE across the DOMAIN.