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.


Monday, June 24, 2013

<EJB> <BEA-010026><Exception occurred during commit of transaction Name

Error:-

<Error> <EJB> <BEA-010026><Exception occurred during commit of transaction Name=[EJB com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean.handleInvoke(java.lang.
String,boolean)],Xid=BEA1-11A31559DD40A4092BE4(257133113),Statxus=Rolled back. [Reason=javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = AIADataSourceDS],numReplie
sOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds left=60,NonXAServerResourceInfo[WL_JDBC_LLR_POOL.SOADataSource]=(ServerResourceInfo[WL_JDBC_LLR_POOL.SOADataSource]

Root Cause:- 

 Data source "AIADataSourceDS" is non-XA data source using "oracle.jdbc.OracleDriver" driver. "Supports Global Transactions" was enabled to support Global Transaction by the non-XA data sources. When you select Supports Global Transactions, you must also select the protocol for WebLogic Server to use for the transaction branch when processing a global transaction. There are three protocols for this-
  • Logging Last Resource
  • Emulate Two-Phase Commit
  • One-Phase Commit  
However in this case, none of the above protocol was selected.

Solution:-

There are two solutions for this based on the requirement

1. If your requirement is to support global transaction using nonXA datasource then select any of the above protocol. Save and activate your changes. Restart the servers to which the data source was targeted.

2. If your requirement is to support local transaction then uncheck "Supports Global Transactions". Save and activate your changes. Restart the servers to which the data source was targeted.