Thursday, June 2, 2016

Change default /tmp path to other alternate tmp path for middleware installation

Some times when you install middleware component like oracle soa, weblogic etc. then it requires some temp space to extract content and install on the location but there may be case your /tmp directory is full or not having write permissin etc. (in my case there was no space in the tmp directory) you middleware installation stops in between.

Solution:

you can create a new directory as tmp only in some other location (/home/oracle/tmp) and map to the symbolic link of the directory /tmp (previously created).

Command : ln {source} {link}

i.e. ln -s /home/oracle/tml /tmp


Friday, May 13, 2016

Linux: SSH login without password

I was writing the custom shell scripts for starting and stopping the remote server and these scripts required to executed on the remote server itself using ssh. Now but everytime you run ssh command it ask for the password to avoid that I use the public key authentication without the pass phrase (well you should always use the pass phrase from the security perspective).

Steps to configure public key authentication

  • Create ssh public and private keys, i.e. run the command ssh-keygen -t rsa
  • Do not give the pass phrase if you do not want to enter password every time you do the ssh.
  • Add Keys to the server by using the command ssh-copy-id username@hostname
  • Enter the password for first time.
  • now connect the machine using ssh, you will directly connected to the machine without passing the password.

Wednesday, May 11, 2016

OER 12c: Configure oracle enterprise repository to browse and upload file from local system

I was working on the oracle enterprise repository 12.1.3, and trying to upload an asset in oer from my local machine. But in the submit asset window its only showing the file location url i.e. add a file by reference


Steps to configure file upload option

  • Open oer console i.e. http://<host>:<port>/oer in browser, login with admin user.
  • Go to Admin tab -> System Settings -> search for property cmee.server.paths.upload

  • set the location value to upload the file in submission upload directory i.e. /tmp/upload, as shown below

  • Save the setting and go to asset tab and try to create new asset. This time file upload option is visible.



Deployment Failed: XML-24500: (Error) Can not build schema 'http://www.springframework.org/schema/util' located at 'http://www.springframework.org/schema/util/spring-util.xsd'.

Today I was deploying soa composite for oracle enterprise repository on soa server and getting the following exception:

Deploying on partition "default" of "/Domain_base_domain/base_domain/AdminServer" ...
Deploying on "/Domain_base_domain/base_domain/AdminServer" failed!
There was an error deploying the composite on AdminServer: Deployment Failed: Error occurred during deployment of component: TimedEventClass to service engine: implementation.spring for composite: OERWorkflows: SCA Engine deployment failure.: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from URL [oramds:/deployed-composites/default/OERWorkflows_rev1.0/TimedEventClass.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 834; <Line 10 Column 834>: XML-24500: (Error) Can not build schema 'http://www.springframework.org/schema/tool' located at 'http://www.springframework.org/schema/tool/spring-tool-2.5.xsd'.


Cause

This problem comes in oracle product version 12.1.3.0.0 and on windows-7 64 bit system. It occurs due to the parameter -Doracle.xml.schema\Ignore_Duplicate_components=true has back slash in setDomainEnv.cmd file.

Solution

  1. Go to <DOMAIN_HOME>/bin/setDomainEnv.cmd
  2. Change -Doracle.xml.schema\Ignore_Duplicate_components=true to -Doracle.xml.schema/Ignore_Duplicate_components=true i.e. change back slash to forward slash.
  3. Restart the server.
Reference: check the oracle support document Doc ID 2092104.1

Saturday, March 19, 2016

Oracle API Gateway: How to rename ftp file name in OAG

I was working on a requirement in which I have to read a txt file from ftp directory and uploaded to the another ftp server, but the uploaded file name should be appended with the DateTime i,e suppose the file name is code_confuse_sheet.txt and then after uploading the name should change to code_confuse_sheet_20160319.txt
In this blog post I am going to show you how you can rename your ftp file name.

Note: I am not going to show end to end OAG policy and configuration, will show the code snippet and how to use it in your OAG policies.

Steps to rename ftp file name:

When you create FTP Poller listener then it reads the file from the ftp location and pass the file name in attribute ${ftp.file.name}
  • First step is to save the file name in local attribute say ftpfilename. This you can done by using Set Attribute Filter as shown below

  • After that alter the value of this attribute i.e. ftpfilename. This can be done by using Scripting Language Filter and configure as below

importPackage(Packages.com.vordel.trace);
importPackage(Packages.java.lang);
function invoke(msg)         {          
var file = msg.get("ftpfilename");
java.lang.System.out.println("Filename is " + file);
var splitstr =  file.substring(0,file.indexOf("."));
java.lang.System.out.println("Filename is after split " + splitstr);
var newFile = splitstr +"_20160319" + ".txt" ;
Trace.debug(file);
Trace.debug("End of scripting");
java.lang.System.out.println(file);
java.lang.System.out.println("New File Name " +newFile );
java.lang.System.out.println("End of scripting");
msg.put("ftp.file.name",newFile );
return true;

         }
Note: here I have hard coded the value of date just to show how you can add new string, you just change according to your usecase.
  • Use the file upload filter to upload the file and pass the name of the file as ${ftp.file.name}

  • Deploy and test the configurations.


Thursday, March 17, 2016

Oracle BPM 12c: how to change PAM repository path in oracle bpm

By default BPM tries to create a repository under the following path:

Oracle_Home\user_projects\domains\fmw_domain\bpm\bac\AdminServer\repositories

The following steps need to be performed to change the repository path
  • Login to 12c EM console.
  • Right click on soa-infra and go to Administration--> System MBean Browser.
  • Now click on the search icon and do an Attribute search for RespositotyPatch attribute.
  • The search results display a page showing the  BacNode MBean.
  • One can change the repository path by editing the RepositoryPath attribute on the BacNode Bean.

Oracle API Gateway: Configure Outbound one way ssl from OAG

In my previous post Oracle API Gateway: Configure Inbound one way ssl in OAG I showed you how to enable one way ssl in oracle application gateway for the inbound communication. In this blog post I am going to configure one way ssl certificate for outbound communication for example suppose you want to call a http service which is secured by SSL certificates.

Note: I don't have the ssl service so that I can show as an example but I will list down all the basic steps require to configure outbound ssl communication

Steps to configure outbound one way SSL in OAG:
  • Extract the Public Key cert
  • Import Certificate in OAG
  • Create Policy for SSL outbound connection in OAG
  • Create HTTP listener to consume this policy

Extract the Public Key cert
  • Go to Command Prompt or Putty --> run the command openssl s_client -connect HOSTNAME:PORT
  • The Key is printed on the screen, copy the key and save it to the file e.g. testcert.cer
Import Certificate in OAG
  • Go to Certificates and Keys --> certificates tab --> click on create/import
  • Click import to import the finacle certificate created above, and give some alias name e.g. testcert.cer

Create Policy for SSL outbound connection in OAG
  • Go to Policies --> Create container "Outbound" --> Add Policy "SSL"
  • Drag and drop Connect to URL filter, configure as below
  • Go to SSL Tab --> and select the finacle cert you have imported before like below
  • Click OK and Finish wizard
Create HTTP listener to consume this policy
  • Go to Listerners --> Oracle API Gateway --> Default Services --> Paths --> Add new Relative path and use the policy created above
  • Click OK and deploy all the configurations.

Known Issues:


Issue:

hostname verification error

Solution

Hostname verification should be disable. If the issue persist try to make machine hostname and CN name in the certificate same.