MFT Notification Template Variable “TARGETNAME” is not coming in email

Issue–> If your familiar with using post transfer notification in MFT , then you might have faced this issue.

In Email template file if you add the target name and target endpoint reference, then you wont get those details in your Email and some times you will get below error.

Error–> Variable %%TARGETNAME%% is not getting resolved.

Solution –> For solving this issue , Oracle has provided a patch.

Patch # 24901957

Advertisements

MFT File rename function failing with, ‘Error occurred while moving or renaming a file after sending’ in SOA Suite 12.2.1.0.0

Issue –> When we are using rename function using SFTP remote , we will get the below error.

Error –> 

<Error> <oracle.soa.adapter.ftp> <BEA-000000> <Exception while setting up session
BINDING.JCA-11443
Adapter internal error.
Adapter internal error.
The adapter has become unstable. This could be because of incorrect parameters supplied to the adapter. The parameter: {0} had value: {1}
Please make sure that SFTP has been setup correctly.

at oracle.tip.adapter.ftp.SshImpl.SSHSessionImpl.setContext(SSHSessionImpl.java:1510)
at oracle.tip.adapter.ftp.SshImpl.SSHSessionImpl.setUpPasswordSocketConnection(SSHSessionImpl.java:268)
at oracle.tip.adapter.ftp.SshImpl.SSHSessionImpl.<init>(SSHSessionImpl.java:204)
at oracle.tip.adapter.ftp.SshImpl.SshImplFactory.getSshImpl(SshImplFactory.java:26)
at oracle.tip.adapter.ftp.SFTPManagedConnection.setupSftpConnection(SFTPManagedConnection.java:138)
at oracle.tip.adapter.ftp.SFTPManagedConnection.<init>(SFTPManagedConnection.java:63)
at oracle.tip.adapter.ftp.FTPManagedConnectionFactory.createManagedConnection(FTPManagedConnectionFactory.java:264)
at oracle.tip.adapter.ftp.FTPConnectionManager.allocateConnection(FTPConnectionManager.java:45)

Solution –>  For this oracle has provided the below patch.

Patch 22534593

1. Ensure that you have taken a backup of your system before applying the recommended patch.
3. Apply the patch in a test environment.
4. Retest the issue.
5. Migrate the solution as appropriate to other environments.

How to Export and Import ESS jobs in different Environments in SOA Suite 12.2.1.0.0

In this post we will see how to Export and Import ESS jobs in different Environments in SOA Suite 12.2.1.0.0.

Follow the below steps to export and import .

Export –>

1)  In the ‘source’ environment export ESS jobs and metadata to a zip file.

cd $SOA_HOME/common/bin
./wlst.sh
connect(‘weblogic’,’password’,’t3://adminserver_hostname:adminserver_port’);

exportMetadata(application=’EssNativeHostingApp’, server='<ess_dev_manged_server>’, toLocation=’/temp/EssDevExport.zip’);

Import –>

2)  Now Import EssDevExport.zip into the (Test/Uat/Production) environment from the export file created in step 1.

cd $SOA_HOME/common/bin
./wlst.sh
connect(‘weblogic’,’password’,’t3://adminserver_hostname:adminserver_port’);
importMetadata(application=’EssNativeHostingApp’, server='<ess_production_manged_server>’, fromLocation=’/tmp/EssExport.zip’);

The sequence named [XXXXXX] is setup incorrectly. Its increment does not match its pre-allocation size

Issue –> If you are using oracle sequence in DB adapter , then you will get the below error.

Error –> Exception while invoking com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=Exception occurred when binding was invoked. Exception occurred during invocation of JCA binding: “JCA Binding execute of Reference operation ‘insert’ failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [Loxxx.Xxtestg]. Caused by Exception [EclipseLink-7027] (Eclipse Persistence Services – 2.6.1.v20150916-55dc7c3): org.eclipse.persistence.exceptions.ValidationException Exception Description: The sequence named [XXXXX] is setup incorrectly. Its increment does not match its pre-allocation size.. Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. “. The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. ,code=null ,detail= Exception Description: The sequence named [XXXX] is setup incorrectly. Its increment does not match its pre-allocation size.}

Solution –> This issue occurs because DbAdapter by default sets pre-allocation size to 50. This should match with Database Sequence’s increment size.

If my DB sequence increment size is 1 then db adapter pre -allocation size shoud be 1.

For changing this value you have to follow the below steps.

Login weblogic console –> Go to deployments –> DB adapter –> Configuration tab –> outbound connection pool –> and open your connection factory.

connectionfactory.JPG

You can see the value for sequencePreallcoationSize as 50, change it to 1.

Press ENTER to actually change it. Click on Save button.

Go to Deployment, select dbAdapter and click on Update and then Activate.

Steps to change no.reply@oracle.com to a different email address in MFT notifications

In MFT, when ever you receive a notification it comes by default from no.reply@oracle.com

Example:

On 5/8/2016 8:23 PM, no.reply@oracle.com wrote:
 Event Details:
 Artifact Type: Transfer
 Deployment Type: Single
 Artifact Name: InTransfer
 User: weblogic 
For changing default email address from no.reply@oracle.com to some other email address we have to follow to below steps.
1.Login to EM console , under the MFT folder, select mft-app
2. Click on “More MFT Configuration Properties…”
3. Go to operations tab
4. Click “addproperty”
5. Provide the following values:
key: defaultFromEmailAddressForNotification
value: the emailaddress you want
6. Click invoke then return
mftnotification
7. To make sure the property was created, click getproperty , in the key field enter: defaultFromEmailAddressForNotification and hit invoke, on the return value section you will see the value of that property.
After updating the above values we need to restart the server to reflect the changes.

Invoke REST Services from SOA Suite 12.2.1.0.0

In my previous post we saw how to create a REST service using SOA Suite 12.2.1.0.0.

To view my previous post ClickHere

To invoke REST services we will use WADL file of the REST service. In our previous version of SOA Suite we use the HTTP bindings to invoke the REST service but in SOA Suite 12c we have REST binding to invoke the REST services.

We have created a composite with a BPEL process .Now we will add reference to the composite to invoke REST service.

To add reference to composite file, drag REST bindings from component palette.

Provide the name and select the checkbox “Reference will be invoked by components using wsdl interfaces” and click on Next.

invokerest

In resources window click on + button of “configuration shortcut” and select the “Add resources and operation mappings based on WADL service”.

invokerest1

It will open the WADL chooser window , select the WADL file it will automatically fill all the columns like operation, resource path, http verb and complete.

invokerest2.jpg

Now click on Finish , it will ask you you to have the local copy of all files, select all check boxes and click on OK.

invokerest3.jpg

Now wire the BPEL process with REST reference. And your composite looks like this.

invokerest4

Now inside the BPEL process add a invoke activity to invoke the REST service and assign input to it .

invokerest5

compile this service and deploy it to the server. Now we will either test this service from HTTP analyzer or from EM console

Test it from EM console, open the deployed composite and click on test. Provide input and test the service. You can see success response in response tab. If we open the instance we will find the new service successfully invoked the REST service and got the response.

invokerest6

Creating JMS server, JMS module, JMS Connection Factory and JMS Queue through WLST

In this post we will see how to Creating JMS server, JMS module, JMS Connection Factory and JMS Queue using wlst scripts.

Create a directory in your system and create a properties file with below information and name it as “JMSconfig.properties“.

# 1 – ENTER Server Connection details
server.url = t3://localhost:7001
username = weblogic
password = welcome1

# 2 – ENTER JMSServer details
jms.server.name = TEST_JMSServer
store.name = TEST_JDBCStore
tragated.jms.server.name = AdminServer

# 3 – ENTER  SystemModule Details
system.module.name = TEST_JMSModule
tragated.system.module.name = AdminServer

# 4 – ENTER  ConnectionFactory Details
connection.factory.name = TEST_ConnectionFactory
connection.factory.jndi.name = jms/TEST_CF

# 5 – ENTER  Unit Of Order Details
unit.of.order.value = 1

# 6 – ENTER  SubDeployment & Queue Details
queue.sub.deployment.name = Sub_TEST_Queue
queue.name = TEST_Queue
queue.jndi.name = jms/TEST_Q

Now in the same directory create a new file for JMS script with below script and name it as “JMSConfig.py

from java.io import FileInputStream
import java.lang
import os
import string

propInputStream = FileInputStream(“domain.properties”)
configProps = Properties()
configProps.load(propInputStream)

# 1 – Connecting details
serverUrl = configProps.get(“server.url”)
Username = configProps.get(“username”)
Password = configProps.get(“password”)

# 2 – JMSServer details
jmsServerName = configProps.get(“jms.server.name”)
storeName = configProps.get(“store.name”)
tragatedJMSServerName = configProps.get(“tragated.jms.server.name”)

# 3 – SystemModule Details
systemModuleName = configProps.get(“system.module.name”)
tragatedSystemModuleName = configProps.get(“tragated.system.module.name”)

# 4 – ConnectionFactory Details
connectionFactoryName = configProps.get(“connection.factory.name”)
ConnectionFactoryJNDIName = configProps.get(“connection.factory.jndi.name”)

# 5 – Unit Of Order Details
unitOfOrderValue = configProps.get(“unit.of.order.value”)

# 6 – SubDeployment & Queue Details
queueSubDeploymentName = configProps.get(“queue.sub.deployment.name”)
queueName = configProps.get(“queue.name”)
queueJNDIName = configProps.get(“queue.jndi.name”)

redirect(‘wlst.log’,’false’)

# 1 – Connecting to the Destination
connect(Username,Password,serverUrl)

edit()

# 2 – JMSServer details
print “================== JMSSever ===================”
startEdit()
cmo.createJMSServer(jmsServerName)
print “Created a JMSServer !!”
cd(‘/Deployments/’+jmsServerName)
cmo.setPersistentStore(getMBean(‘/JDBCStores/’+storeName))
print “PersistentStore has been set for the JMSServer !!”
set(‘Targets’,jarray.array([ObjectName(‘com.bea:Name=’+tragatedJMSServerName+’,Type=Server’)], ObjectName))
print “Targeted the JMSServer !!”
activate()
print “”

# 3 – SystemModule Details
print “================== SystemModule ===================”
startEdit()
cd(‘/’)
cmo.createJMSSystemResource(systemModuleName)
print “Created a SystemModule !!”
cd(‘/SystemResources/’+systemModuleName)
set(‘Targets’,jarray.array([ObjectName(‘com.bea:Name=’+tragatedSystemModuleName+’,Type=Server’)], ObjectName))
print “Targeted the SystemModule !!”
activate()
print “”

# 4 – ConnectionFactory Details
print “================== ConnectionFactory ===================”
startEdit()
cd(‘/JMSSystemResources/’+systemModuleName+’/JMSResource/’+systemModuleName)
cmo.createConnectionFactory(connectionFactoryName)
cd(‘/JMSSystemResources/’+systemModuleName+’/JMSResource/’+systemModuleName+’/ConnectionFactories/’+connectionFactoryName)
cmo.setJNDIName(ConnectionFactoryJNDIName)
print “Created a ConnectionFactory !!”
cd(‘/JMSSystemResources/’+systemModuleName+’/JMSResource/’+systemModuleName+’/ConnectionFactories/’+connectionFactoryName+’/SecurityParams/’+connectionFactoryName)
cmo.setAttachJMSXUserId(false)
cd(‘/JMSSystemResources/’+systemModuleName+’/JMSResource/’+systemModuleName+’/ConnectionFactories/’+connectionFactoryName)
cmo.setDefaultTargetingEnabled(true)
print “Targeted the ConnectionFactory !!”
activate()
print “”

# 5 – Unit Of Order Details
print “================== Unit Of Order ===================”
startEdit()
cd(‘/JMSSystemResources/’+systemModuleName+’/JMSResource/’+systemModuleName+’/ConnectionFactories/’+connectionFactoryName+’/DefaultDeliveryParams/’+connectionFactoryName)
cmo.setDefaultUnitOfOrder(unitOfOrderValue)
print “Changed Unit Of Order !!”
activate()
print “”

# 6 – SubDeployment & Queue Details
print “================== SubDeployment & Queue ===================”
startEdit()
cd(‘/SystemResources/’+systemModuleName)
cmo.createSubDeployment(queueSubDeploymentName)
print “Created a SubDeployment for Queue !!”
cd(‘/JMSSystemResources/’+systemModuleName+’/JMSResource/’+systemModuleName)
cmo.createQueue(queueName)
print “Created a Queue !!”
cd(‘/JMSSystemResources/’+systemModuleName+’/JMSResource/’+systemModuleName+’/Queues/’+queueName)
cmo.setJNDIName(queueJNDIName)
cmo.setSubDeploymentName(queueSubDeploymentName)
cd(‘/SystemResources/’+systemModuleName+’/SubDeployments/’+queueSubDeploymentName)
set(‘Targets’,jarray.array([ObjectName(‘com.bea:Name=’+jmsServerName+’,Type=JMSServer’)], ObjectName))
print “Targeted the Queue to the created subdeployment !!”
activate()
print “”

cmd = “rm -f wlst.log”
os.system(cmd)

To use this script, we need to edit the properties file at the top of the program.

Now place both the properties and python file  in the server location(cd /your/fmwhome/wlserver/server/bin/)

Set the domain environment by running the below command.

cd /your/fmwhome/wlserver/server/bin/> setDomainEnv.cmd

Now run the python script with below command.

/your/fmwhome/wlserver/server/bin/>  java weblogic.WLST JMSConfig.py