Thursday, October 2, 2014

Update weblogic keystores and SSL tab keystore location and password using WLST

We can use WLST to update identity and trust keystore location and password for admin and manager server under Configuration --> Keystores tab. It will also update Private Key Alias and Private Key Passphrase under Configuration --> SSL tab.

So I will create a function keystoreSSLSetup which will have below input arguments

Input Parameter Description
serverName Name of Admin or Managed Server where update is required
CustIdentityKeyStoreName  Identity Keystore containing the private and public key of the server 
CustIdentityKeyStorePassPhrase Password of Identity Keystore
CustTrustKeyStoreFileName Trust keystore containing CA certificates
CustServerPrivateKeyAlias Alias/name of the private key stored in identity keystore
CustServerPrivateKeyPassPhrase Password for private key. (Generally it is kept same as password of identity keystore)
domainHome Absolute path of domain

We will also encrypt the password for security reasons.

Now the function will look like below:

def keystoreSSLSetup(serverName,CustIdentityKeyStoreName,CustIdentityKeyStorePassPhrase,CustTrustKeyStoreFileName,CustServerPrivateKeyAlias,CustServerPrivateKeyPassPhrase,domainHome):  
    try:
        print "Setup KeyStore and SSL"
        cd ("/Servers/" + serverName)
        CustIdentityKeyStorePassPhraseEncrypted = encrypt (CustIdentityKeyStorePassPhrase, domainHome)
        set ("KeyStores", "CustomIdentityAndCustomTrust")
        set ("CustomIdentityKeyStoreFileName", CustIdentityKeyStoreName)
        set ("CustomIdentityKeyStorePassPhrase", CustIdentityKeyStorePassPhrase)
        set ("CustomIdentityKeyStorePassPhraseEncrypted", CustIdentityKeyStorePassPhraseEncrypted)
        set ("CustomIdentityKeyStoreType", "JKS")
        set ("CustomTrustKeyStoreFileName", CustTrustKeyStoreFileName)
        set ("CustomTrustKeyStorePassPhrase", CustIdentityKeyStorePassPhrase)
        set ("CustomTrustKeyStorePassPhraseEncrypted", CustIdentityKeyStorePassPhraseEncrypted)
        set ("CustomIdentityKeyStoreType", "JKS")
        print "Keystore Setup Successful"
        cd ("SSL/"+ serverName)
        set ("ServerPrivateKeyAlias", CustServerPrivateKeyAlias)
        set ("ServerPrivateKeyPassPhrase", CustServerPrivateKeyPassPhrase)
        CustServerPrivateKeyPassPhraseEncrypted = encrypt (CustOutboundPrivateKeyPassPhrase, domainHome)
        set ("ServerPrivateKeyPassPhraseEncrypted", CustServerPrivateKeyPassPhraseEncrypted)
        print "SSL Setup Successful"  
    except Exception, e:
        print e
        print "Error while trying to Setup KeyStore and SSL!!!"
        dumpStack()
        raise
        cancelEdit('y')
        activateTheChanges()
        disconnectFromServer()      
        exit() 

Thursday, August 7, 2014

Puppet Installation on Linux Master and Node

Master Machine OS - Red Hat Enterprise Linux Server release 6.3 (Santiago)
Client Machine OS - Red Hat Enterprise Linux Server release 6.3 (Santiago)

Reference URL - https://puppetlabs.com

Thursday, February 6, 2014

Undeploying SOA Composite is taking longer time

Issue :- When undeploying a soa composite through Jdeveloper/WLST/EM console, it is taking longer time than usual.

Cause:- Based on the diagnostic log file, undeployment is stuck when it is trying to remove data from MDS during undeployment. 

If you tail the diagnostic log file while un-deployment is in progress, you will see that it get stuck at line containing the string "Removing command lock for". The next step during undeployment after command lock has been removed is removing data from MDS. When checked at Database side, a DELETE SQL query on MDS_COMPONENTS can be seen executing for long time.

Fix:- Execute force gather statistics on MDS Schema.

exec dbms_stats.gather_schema_stats (ownname=>'SOADomain_MDS',estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,block_sample=>FALSE,method_opt=>'FOR ALL COLUMNS SIZE AUTO',granularity=>'ALL',cascade=>true,no_invalidate=>false,options=>'gather') ;

Monday, January 27, 2014

FabricInvocationException weblogic.jms.common.InvalidDestinationException

HTML Generator Sample Page

ERROR:- <Error> <oracle.soa.bpel.engine.ws> <BEA-000000> <got FabricInvocationException weblogic.jms.common.InvalidDestinationException: [JMSClientExceptions:055144]Destination must be a topic, JMSModule!mycompany.dev.queue.Process.ErrorMessage.Routing

CAUSE:- The issue occurred due to incorrect setting of JMS Adapter Outbound Connection Pool. "mycompany.dev.queue.Process.ErrorMessage.Routing" is a queue created in JMSModule. However the outbound connection pool created at JMS Adapter to interact with this queue has IsTopic set as TRUE. This means it is searching for a TOPIC by the name "mycompany.dev.queue.Process.ErrorMessage.Routing" and not a queue.

SOLUTION:- If you are creating JMS Adapter Outbound Connection Pool for QUEUE, set isTopic= FALSE. If you are creating JMS Adapter Outbound Connection Pool for TOPIC, set isTopic= TRUE.

oracle.xml.parser.schema.XSDException: Can not build schema

HTML Generator Sample Page ERROR:- SampleBPELProcess.bpel:2211: error: query "/ns7:create" is invalid, because oracle.xml.parser.schema.XSDException: Can not build schema 'urn:sobject.enterprise.soap.sforce.com' located at 'urn:sobject.enterprise.soap.sforce.com.__OAUX_GENXSD_.TOP.XSD' [Cause=Can not build schema 'urn:sobject.enterprise.soap.sforce.com' located at 'urn:sobject.enterprise.soap.sforce.com.__OAUX_GENXSD_.TOP.XSD']

CAUSE:- We faced this error during deployment of SampleBPELProcess through JDeveloper. When looked into the log file we found got below log snippet

"Global Type declaration/definition of name '{urn:sobject.enterprise.soap.sforce.com}CSE_Assignment__c' are duplicated at the following locations:

oramds:/deployed-composites/default/SampleBPELProcess_rev2.0.0/SFDCDevEnterpriseWsdl.wsdl [line#: 3739]
oramds:/apps/wsdls/sfdc/SFDCDevEnterpriseWsdl.wsdl [line#: 3738]
There are at least two of them looking different:
oramds:/deployed-composites/default/SampleBPELProcess_rev2.0.0/SFDCDevEnterpriseWsdl.wsdl [difference starting at line#:3774]
oramds:/apps/wsdls/sfdc/SFDCDevEnterpriseWsdl.wsdl [difference starting at line#:3773]"

When verified the WSDL at both the location, they were NOT identical. Thus resulting in the issue.

SOLUTION:- Make sure both the WSDLs are identical in MDS. Now try deployment.