Sunday, July 10, 2016

Regenerate the DemoIdentity.jks and DemoTrust.jks keystores

Regenerate the DemoIdentity.jks and DemoTrust.jks keystores

By default, WebLogic Server is configured with two keystores:

DemoIdentity.jks—Contains a demonstration private key for WebLogic Server. This keystore contains the identity for WebLogic Server.
DemoTrust.jks—Contains the trusted certificate authorities from the WL_HOME\server\lib\DemoTrust.jks and the JDK cacerts keystores. This keystore establishes trust for WebLogic Server.

These keystores are located in the WL_HOME\server\lib directory. 

 NOTE: We do not use the demonstration keystores in a production environment. 



Let’s See  how we can regenerate the DemoIdentity.jks and DemoTrust.jks keystores.

1.Re-generating DemoIdentity.jks

Set Class Path by running below 

. <WL_HOME>/server/bin/setWLSEnv.sh (Unix) (use the 'dot' to run the script in the same shell)
Execute this command to generate identity entities (certificate plus key):
java utils.CertGen -keyfilepass DemoIdentityPassPhrase -certfile democert -keyfile demokey -strength 1024

NOTE: This would create the files in the present working directory.

Execute this command to import the identiy entities into Java Keystore:
java utils.ImportPrivateKey -keystore DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -keyfile demokey.pem -keyfilepass DemoIdentityPassPhrase -certfile democert.pem -alias demoidentity

NOTE: This would create "DemoIdentity.jks" in the present working directory.

Confirm that the certificate (along with key) is imported:
keytool -list -v -keystore DemoIdentity.jks

 2.Re-generating DemoTrust.jks


Set Class Path by sourcing setWLSEnv.sh

. <WL_HOME>/server/bin/setWLSEnv.sh (Unix) (use the 'dot' to run the script in the same shell)

Execute below  command to import the Demo CA into DemoTrust.jks:

keytool -importcert -trustcacerts -alias wlscertgencab -keystore DemoTrust.jks -storepass DemoTrustKeyStorePassPhrase -file <WL_HOME>\server\lib\CertGenCA.der


NOTE: This would create "DemoTrust.jks" in the present working directory if there is no file named "DemoTrust.jks" present there. However, if there is any such keystore file already present in the present directory, then it would simply import the certificate as a trusted entry into this keystore file. A path can also be prefixed to the keystore name in the command argument "-keystore" above such that the keystore is created at the specified location instead of in present working directory.



Tuesday, February 16, 2016

Exception Description: Cannot acquire data source [jdbc/BeamNonJTADataSource].


 Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.BeamNonJTADataSource'. Resolved 'jdbc'; remaining name 'BeamNonJTADataSource'


After Applying below patches we see that error in BAM Log files and BAM wont come up.

Another issue is in admin console bam status  will  show starting.

Patch 21885138 (BP4),22524811(BP5)

Patch 22144497 : MERGE REQUEST ON TOP OF SOA BP 12.1.3.0.4 FOR BUGS 21438873 21488819 21883560 
Patch 22144471 : MERGE REQUEST ON TOP OF SOA BP 12.1.3.0.4 FOR BUGS 19154446 21466129 
Patch 22190179 : MERGE REQUEST ON TOP OF SOA BP 12.1.3.0.4 FOR BUGS 22144523 22127760 
Patch 22237005 : MERGE REQUEST ON TOP OF SOA BP 12.1.3.0.4 FOR BUGS 21238852 21418640 
Patch 20484519 - BAM 12c Performance / Scalability 
Patch 20835861 - EMS : Status shown in the UI is not correct 
Patch 20744648 - Collapsed List header alignment not aligning to Left fully. 
Patch 22013059 - Add DataObject Metadata Caching to Improve Performance 


Please do the following to start BAM  Server.

  1. Create a new Generic Data Source called BamNonJTADataSource using the JNDI Name jdbc/BeamNonJTADataSource.
  2. Specify Oracle's Driver (Thin) for Instance connections; Version:Any as the Database Driver.
  3. Make sure the Supports Global Transactions checkbox is unchecked.
  4. Copy the Database Name, Host Name, Port, Database User Name and Password from the existing BamDataSource Data Source.
  5. Target the new Data Source to all servers in the BAM cluster or to the single BAM Server if not in a clustered environment.

  Refer to this document for detailed instructions:

  http://www.oracle.com/technetwork/middleware/bam/community/instruct-patch-20484519-2479103.pdf