Tuesday, March 12, 2013

JCA File Adapter Gotchas

Problem 1
Using the polling feature of the file adapter the file was only getting picked up once. If the composite is shutdown and re-activated it the file was processed. The same was true when the composite was redeployed. A quick comparison with an working composite that was polling for a file revealed the  problem existed in the file path.

Solution 1
The path in the troubled composite looked similar to /the/path/to/the/folder/ , however in the healthy composite it looked like /the/path/to/the/folder . The problem in this case was the trailing slash. After removing the slash and redeploying the polling file adapter behaved as expected.

Problem 2
In the same process the output is written to a file, however the date fields seemed to be represented incorrectly. Instead of getting 20130306 as expected; I was instead getting 20130366. The issue in this case was rather obvious.

Solution 2
The pattern that was being used was %yyyyMMDD%_glelements_incr.xml the problem as observed existed in the day fields for days the characters should actually be lowercase; as a result the pattern should look like this: %yyyyMMdd%_glelements_incr.xml

Oracle SOA Suite

No comments: