Wednesday, June 26, 2013

Shutting down Android Debug Bridge server... Deployment cancelled.




while trying to deploy ADF mobile apps i got this error

[06:22:49 PM] Shutting down Android Debug Bridge server...
[06:22:49 PM] Deployment cancelled.
[06:22:49 PM] ---- Deployment incomplete ----.
[06:22:49 PM] Cannot run program ""C:\Software\Android\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\aapt"": CreateProcess error=2, The system cannot find the file specified
[06:22:49 PM] CreateProcess error=2, The system cannot find the file specified

The solution is specified in the following location

https://blogs.oracle.com/onesizedoesntfitall/entry/adf_mobile_deploying_to_android

Tuesday, June 25, 2013

New button is deactivated in Jdeveloper





I was trying to set up Jdeveloper at my local machine and faced this issue.

The jdeveloper installed correctly but it was not allowing to create/delete any thing.






In order to resolve this issue

Go to Tools-Preferences-Roles and make select the default role

This will ask for a jdeveloper restart.

Once it is restarted you will be able to see all the buttons active

Thursday, June 20, 2013

FTP/FILE Adapter

Set the File adapter to process files based on their creation date/time:-

First of all you need to apply patch 6445656 -ALLOW FILE PROCESSING BY CREATION DATE

Now in the WSDL of the file adapter set the following

ActivationSpec="oracle.tip.adapter.file.inbound.FileActivationSpec"
Sorter="oracle.tip.adapter.file.sorter.TimestampSorterAscending"

to sort the files in ascending order

or

ActivationSpec="oracle.tip.adapter.file.inbound.FileActivationSpec"
Sorter="oracle.tip.adapter.file.sorter.TimestampSorterDescending

to sort the files in descending orders.

You also need to model your bpel process.
Make the BPel process a synchronous process and

Set Number of threads in bpel/system/services/config/pc.properties to "1"

This setting will allow the files to be sorted as per their date/time stamp.

This feature has been added as a feature in 10.1.3.3 MLR#14 onwards

If you want to use the same feature in FTP adapter you need to do some extra settings.

In the inbound activation you need to set useNlst="true"

This parameter tells the adapter to use LIST command to get filenames in a list. Thus the adapter can capture the tiemstamp, size information during the inbound listing.


So your entry should look like this

ActivationSpec="oracle.tip.adapter.ftp.inbound.FTPActivationSpec"
DeleteFile="true"
IncludeFiles=".*\.txt"
PollingFrequency="60"
MinimumAge="0"
useNlst="true"
Sorter="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"

Here again you need to Edit file SOA_HOME\bpel\system\services\config\pc.properties and change
oracle.tip.adapter.file.numProcessorThreads=1

If you are using ESB you need to edit file SOA_HOME\integration\esb\config\pc.properties.

If you don't have this property file you can just reanme the pc.properties.esb to pc.properties and make the changes there

====================================================================================

Controlling the name of the Archieved file in FTP adapter :-

The FTP adapter by defalut add the timestamp to the file created so that if the ftp adapter is creating a file of same name it can be distinguished easily from the previous file.

You need to model your bpel process,Make it as a synchronous bpel process

Use synchronous read feature to read the file and then move it to the archive folder

use the header mechanism to use the same file name

In order for a FTP adapter to move file to remote archive directory, specify
UseRemoteArchive="true" in the adapter wsdl (as an attribute of the jca:operation)

Deploy your process.
====================================================

The date format for the XML element that has to be used with file adapter should be in the following format YYYY-MM-DDTHH:mm:ss

========================================================

Obtain the size of files

In the file|FTPAdapterInboundHeader.wsdl make an entry for size

<element name="InboundFileHeaderType">
<complexType>
<sequence>
<element name="Name of FIle" type="string"/>
<element name="Directory of file" type="string"/>
<element name="Size of file" type="string"/>
</sequence>
</complexType>
</element>


Now Create a variable to read the size element published from the inbound and assign it to some output variable to display the result.

=============================================

configure number of threads for file/ftp adapter

FOR bpel SOA_HOME\bpel\system\service\config. Set the value for oracle.tip.adapter.file.numProcessorThreads in pc.properties file. By default, it is set to 4.
For esb rename SOA_HOME\integration\esb\config\pc.properties.esb to pc.properties. Set the value for oracle.tip.adapter.file.numProcessorThreads.

Namespace conflict in include and import in XSD




Namespace is a important concept in Schema.

One need to understand the basic difference in the two as

Include is used when the target schema has the same targetnamespace as source schema

Import is used when target schema has a different targetnamesapce as source schema


The example below will clarify the difference and will give a basic idea on namespaces too

Employee.xsd
================

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.example.org"
targetNamespace="http://raj.com"
xmlns:raj="http://raj.com"
elementFormDefault="qualified">
<xsd:element name="Employees">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="header_Id" type="xsd:integer"/>
<xsd:element name="Employee" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name" maxOccurs="unbounded" type="xsd:string"/>
<xsd:element name="Age" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>




OtherEmployee.xsd
==================

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.example.org"
targetNamespace="http://raj.com"
xmlns:raj="http://raj.com"
elementFormDefault="qualified">
<xsd:element name="Employees" type="raj:employeeType"/>

<xsd:complexType name="employeeType">
<xsd:sequence>
<xsd:element name="header_Id" type="xsd:integer"/>
<xsd:element name="Employee" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name" maxOccurs="unbounded" type="xsd:string"/>
<xsd:element name="Age" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

</xsd:schema>


Manager.xsd
============

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://anil.com"
xmlns:Mang="http://anil.com"
xmlns:raj="http://raj.com"
elementFormDefault="qualified">
<xsd:import namespace="http://raj.com"
schemaLocation="OtherEmployees.xsd"/>
<xsd:element name="Manager">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="EmployeeType" type="raj:employeeType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>


OtherManager.xsd
================

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://raj.com"
xmlns:Mang="http://raj.com"
elementFormDefault="qualified">
<xsd:include schemaLocation="OtherEmployees.xsd"/>
<xsd:element name="Manager">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="EmployeeType" type="Mang:employeeType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>


Just copy paste the above xsd in your local machine and you should be able to understand about types also in xsd.

A good example is also published in following

http://www.liquid-technologies.com/Reference/XmlDataBinding/source/HowTo/WorkingWithMultipleSchemas.htm

Tuesday, June 18, 2013

How to seed oracle demo user community





I had a big time issue following the above doc and then i followed the following blog

https://blogs.oracle.com/middleware/entry/installing_seeded_users_for_bpm_11113_on_linux

If you have a managed server then make sure that you are specifying the soa_server1 in target or whatever the name of your server.

Make sure that JAVA_HOME is pointed to your jdk directory and not JRE JAVA_HOME=C:/JDK





Just from my experience the following code and not didn't work for me

Download the code "workflow-001-DemoCommunitySeedApp" from https://java.net/projects/oraclesoasuite11g/pages/HW

http://docs.oracle.com/cd/E28280_01/admin.1111/e10226/appx_users.htm



This will work only if you remove the following code from build.xml file