Sunday, September 21, 2014

Using the Camera In iOS 8 with Swift

There are many examples out there that solidly explain how to use a camera using Objective-C. They can be found here, here, and many other places. The one thing I had not yet seen was how exactly to use it when using the new Swift Language that Apple recently released.

Below is the code that can be used, and there are a two changes to note that have come with the iOS 8 SDK.  The first is UIImagePickerControllerSourceType  where before you would access it by calling UIImagePickerControllerSourceTypeCamera now you call  UIImagePickerControllerSourceType.Camera . The second has more to do with strings different types, CFString vs NSString so to deal with this little issue the following code exists:

let compResult:CFComparisonResult = CFStringCompare(mediaType as NSString!, kUTTypeImageCFStringCompareFlags.CompareCaseInsensitive)
        if ( compResult == CFComparisonResult.CompareEqualTo ) {

Other than that there are the obvious differences between Objective-C and Swift. I hope this helps.

Example Code:

import UIKit
import CoreData
import MobileCoreServices

class CameraVC: UIViewController,UINavigationControllerDelegate,UIImagePickerControllerDelegate {

    @IBOutlet weak var cameraView: UIImageView!
    override func viewDidLoad() {

        // Do any additional setup after loading the view, typically from a nib.
    override func viewWillAppear(animated: Bool) {
    override func didReceiveMemoryWarning() {
        // Dispose of any resources that can be recreated.
    // MARK: - Action Methods
    @IBAction func takePhoto(sender: AnyObject) {
        if (UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera)){
            var picker = UIImagePickerController()
            picker.delegate = self
            picker.sourceType = UIImagePickerControllerSourceType.Camera
            var mediaTypes: Array<AnyObject> = [kUTTypeImage]
            picker.mediaTypes = mediaTypes
            picker.allowsEditing = true
            self.presentViewController(picker, animated: true, completion: nil)
            NSLog("No Camera.")
    // MARK: - Delegate Methods
    func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: NSDictionary!) {
        NSLog("Did Finish Picking")
        let mediaType = info[UIImagePickerControllerMediaType] as String
        var originalImage:UIImage?, editedImage:UIImage?, imageToSave:UIImage?
        // Handle a still image capture
        let compResult:CFComparisonResult = CFStringCompare(mediaType as NSString!, kUTTypeImage, CFStringCompareFlags.CompareCaseInsensitive)
        if ( compResult == CFComparisonResult.CompareEqualTo ) {
                editedImage = info[UIImagePickerControllerEditedImage] as UIImage?
                originalImage = info[UIImagePickerControllerOriginalImage] as UIImage?
                if ( editedImage == nil ) {
                    imageToSave = editedImage
                } else {
                    imageToSave = originalImage
                NSLog("Write To Saved Photos")
                cameraView.image = imageToSave
                // Save the new image (original or edited) to the Camera Roll
                UIImageWriteToSavedPhotosAlbum (imageToSave, nil, nil , nil)

        picker.dismissViewControllerAnimated(true, completion: nil)
    func imagePickerControllerDidCancel(picker: UIImagePickerController) {
        picker.dismissViewControllerAnimated(true, completion: nil)


Mule: No SQL Strategy found Issue in SQL Server


I was working on a Mule ESB process, when I came upon an error.

Root Exception stack trace:
java.lang.IllegalArgumentException: No SQL Strategy found for SQL statement: USE XXX_ServiceNow; SELECT LastEventId,LastEventTime FROM dbo.EVENTS_TRACKING;
at com.mulesoft.mule.transport.jdbc.sqlstrategy.EESqlStatementStrategyFactory.create(
at org.mule.transport.jdbc.JdbcMessageDispatcher.doSend(
at org.mule.transport.AbstractMessageDispatcher.process(
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

I will admit this was one of the first times I had worked with SQL Server. I typically use everything except it, but I digress. I was attempting a simple query from a table, but getting back "No SQL Strategy..."


I had seen this error before, and what it means is that there essentially no SQL plan to be executed. In the original state. I was technically performing two operations.
1. Specifying which database to use.
2. Querying the table.
To solve my problem I needed to combine these two statements into a single statement.

The resulting code looked something like this:
SELECT <FieldName1>, <FieldName2>
FROM <DatabaseName>.<SchemaName>.<TableName>

Friday, August 22, 2014

JCA-11622 using the DbAdapter with OSB 11g


If you are using the DbAdapter with OSB 11g (specifically, you may experience the following Java exception in the osb_server1.out log file:
jca-transport-application-error xmlns="" xmlns:xsi=""><jca-transport-error-message>Invoke JCA outbound service failed with application error</jca-transport-error-message><jca-runtime-fault-detail><eis-error-code xsi:nil="true"/><eis-error-message xsi:nil="true"/><exception> servicebus:/WSDL/CreateOrderProvABCSImpl/WSDL/ShipmentOrder [ Order_ptt::insert(OmOrderCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: Could not create/access the TopLink Session.This session is used to connect to the datastore.Caused by java.lang.NullPointerException.; nested exception is:BINDING.JCA-11622Could not create/access the TopLink Session.This session is used to connect to the datastore.Caused by java.lang.NullPointerException.You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling


Even though the references in the OSB project were correct, the references in the actual .JCA file were not. I’m not sure why the original developer had incorrect references in the actual .JCA file, but OSB was more tolerant and did not seem to care. OSB does care.

1. Ensure that the highlighted references below are valid and correct in your .JCA file:
<?xml version="1.0" encoding="UTF-8"?><con:jcaEntry xmlns:con="">    WRONG: <con:jca><![CDATA[<adapter-config name="Order" adapter="Database Adapter" wsdlLocation="Order.wsdl" xmlns="">
    RIGHT: <con:jca><![CDATA[<adapter-config name="Order" adapter="Database Adapter" wsdlLocation="ShipmentOrder.wsdl" xmlns="">

  <connection-factory location="eis/DB/EBS" UIConnectionName="InstanceDetails" adapterRef=""/>  <endpoint-interaction portType="Order_ptt" operation="insert">    <interaction-spec className="oracle.tip.adapter.db.DBWriteInteractionSpec">      <property name="DescriptorName" value="Order.OmOrder"/>      <property name="DmlType" value="insert"/>      WRONG: <property name="MappingsMetaDataURL" value="Order-or-mappings.xml"/>
      RIGHT: <property name="MappingsMetaDataURL" value="ShipOrderToplink.xml"/>
      <property name="DetectOmissions" value="true"/>      <property name="GetActiveUnitOfWork" value="false"/>    </interaction-spec>  </endpoint-interaction> </adapter-config>]]></con:jca>    <con:jcaDependency>        WRONG: <con:wsdlRef wsdlLocation="ShipOrder.wsdl" ref="OrderConfirmProvABCSImpl/WSDL/ShipmentOrder"/>
        RIGHT: <con:wsdlRef wsdlLocation="ShipmentOrder.wsdl" ref="OrderConfirmProvABCSImpl/WSDL/ShipmentOrder"/>
        WRONG: <con:toplinkRef toplinkFile="ShipOrder-or-mappings.xml" ref="OrderConfirmProvABCSImpl/Toplink/ShipOrderToplink"/>
        RIGHT: <con:toplinkRef toplinkFile="ShipOrderToplink.xml" ref="OrderConfirmProvABCSImpl/Toplink/ShipOrderToplink"/>

Applicable Versions:

  • Oracle Service Bus (OSB) 11g ( 


Sunday, August 10, 2014

"java.lang.OutOfMemoryError: PermGen space" when starting SOA Suite 11g with Java 7


When starting up SOA Suite 11g running Java 7, you may experience multiple errors in the .out file:
<Aug 9, 2014 9:26:32 PM EDT> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.OutOfMemoryError: PermGen space
Exception in thread "Timer-1"Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Timer-1"Exception in thread "[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'"Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'"Exception in thread "[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'"Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'"

<Aug 9, 2014 10:18:10 PM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "CoordinatorPortTypeServlethttp" failed to preload on startup in Web application: "wls-wsat.war".java.lang.OutOfMemoryError: PermGen space        at java.lang.ClassLoader.defineClass1(Native Method)        at java.lang.ClassLoader.defineClass(        at        at        at$100(        Truncated. see log file for complete stacktrace>


The PermGen needs to be increased if you are running SOA Suite 11g on Java 7 (e.g., java.runtime.version = 1.7.0_60-b19).

1. Log in to the WebLogic Server Administration Console

2. Navigate to "Server > soa_server1 > Configuration > Server Start"

3. Under the 'Arguments' field, add the following:
-XX:PermSize=1024M -XX:MaxPermSize=1024M
4. Save, apply changes, and restart the SOA server.

Applicable Versions:

  • Oracle WebLogic Server 11g (10.3.x)
  • Oracle SOA Suite 11g (11.1.1.x)
  • Java 7 (1.7.x)


Thursday, July 24, 2014

Limit number of retained log files in WebLogic Server 11g

There are numerous log files in Oracle WebLogic Server 11g and ideally what you would want to do is ensure that the number of rotated log files are controlled. For example, you may have already taken the steps to rotate the log files as they grow to a certain size. This is a great first step, but what you also want to do is control how many of those rotated files you wish to retain, otherwise your file system will likely get filled up over time if you don't manually delete them.

1. Log in to the WebLogic Server Administration Console

2. Repeat the instructions below for all managed servers

3. Navigate to "Server > (managed server) > Logging > General"

4. Set the following values:
Limit number of retained files: Enabled
Files to retain: 30

Minimum severity to log: Warning

Severity Level (Log File): Warning

Severity Level (Standard Out): Error

Severity Level (Domain Log Broadcaster): Error

Severity Level (Memory Buffer): Error
5. Navigate to "Server > (managed server) > Logging > HTTP"

6. Set the following values:
Limit number of retained files: Enabled
Files to retain: 30
7. Navigate to "Server > (managed server) > Logging > Data Source" (new in option in current releases)

8. Set the following values:
Limit number of retained files: Enabled
Files to retain: 30
9. For domain level logging properties, navigate to "soa_domain > Configuration > Logging"

10. Set the following values:
Limit number of retained files: Enabled
Files to retain: 30

Applicable Versions:
  • Oracle WebLogic Server 11g (10.3.x)

Friday, June 20, 2014

BEA-387026 encountered after upgrading to OSB 11g (


When you have an OWSM policy attached to an OSB 11g proxy service, this typically works fine. But after upgrading to OSB 11g PS6 (, you may experience the following error in the logs:
<Jun 19, 2014 6:34:21 PM EDT> <Error> <OSB Security> <BEA-387026> <An internal web service security error occurred [error-code: InternalError, message-id: 5630667683963361529-6593aaf0.146aae8a55c.-4741, proxy: SalesOrder/ProxyService/SalesOrder, target: null, operation: null]--- Error message:nulljava.lang.NoSuchMethodError: com/bea/wli/sb/security/wss/WssInboundContext.setRequestMessage(Ljavax/xml/soap/SOAPMessage;Ljava/lang/Class;Ljavax/xml/soap/MessageFactory;)V        at        at        at


1. Log in to the WebLogic Server Administration Console

2. Untarget "OWSM Policy Support in OSB Initializer Aplication" from the osb_cluster and AdminServer

3. Shutdown osb_server1, osb_server2, and AdminServer

4. Run these commands on the first node of your cluster (modify directories accordingly):
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server1/tmp 
rm -rf * 
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server1/cache 
rm -rf *
5. Run these commands on the second node of your cluster (modify directories accordingly):
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server2/tmp 
rm -rf * 
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server2/cache 
rm -rf *
6. Startup Admin_Server, osb_server1, osb_server2

7. Target "OWSM Policy Support in OSB Initializer Aplication" from osb_cluster and AdminServer

8. Shutdown osb_server1, osb_server2, and AdminServer

9. Run these commands again on the first node of your cluster (modify directories accordingly):
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server1/tmp 
rm -rf * 
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server1/cache 
rm -rf *
10. Run these commands again on the second node of your cluster (modify directories accordingly):
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server2/tmp 
rm -rf * 
cd /u01/app/oracle/middleware/user_projects/domains/osb_domain/servers/osb_server2/cache 
rm -rf *
11. Startup Admin_Server, osb_server1, osb_server2

Applicable Versions:

  • Oracle Service Bus (OSB) 11g (


Thursday, June 19, 2014

Unable to retrieve composite detail in EM Fusion Middleware Control


When logging in to the Oracle Enterprise Manager 11g Fusion Middleware Control console to view the details of the SOA composite, you might receive the following error when you click on the composite:
Unable to retrieve composite detail.
The composite X is not available. This could happen because either the composite has been undeployed or soa-infra has not yet loaded this composite.

The soa_server1.out log file will show this error:
<Jun 19, 2014 12:00:23 PM EDT> <Error> <Default> <J2EE JMX-46336> <MBean operation access denied.
  MBean: oracle.soa.config:name=soa-infra,j2eeType=CompositeLifecycleConfig,Application=soa-infra
  Operation: getDefaultComposite(java.lang.String)
Detail: Access denied. Required roles: Admin, Operator, Monitor, executing subject: principals=[]
java.lang.SecurityException: Access denied. Required roles: Admin, Operator, Monitor, executing subject: principals=[]

Even though the stack trace above claims otherwise, in Oracle SOA Suite 11g (, you must grant the user 'Administrators' role to the user. Could be a bug.

Applicable Versions:

  • Oracle SOA Suite 11g (

Monday, May 26, 2014

Adam Savage at Collaborate 14

Adam Savage, best known as the co-host of "MythBusters" on the Discovery Channel, appeared at Collaborate 14 in Las Vegas as one of the Keynote Speakers on Tuesday, April 9th. Adam is also a longtime special-effects artist, fabricator, model maker and general dreamer-upper who has worked on films such as Galaxy Quest and the Matrix sequels as well as Episodes I and II of the Star Wars series.

In his presentation, he spoke mainly on the fundamental ideas many people have about both art and science, how the two subjects are similar and why the two have been twin propellers pushing us forward as a species. Adam believes that art and science are more alike than people originally perceive, that both subjects are expressed in ways which are unique and thought provoking, and they are both a reflection of our progress as a species. He compares the two, saying there are high and low points with each, and somewhere in the middle is where we usually place ourselves. Adam stressed that nothing is too obscure or beyond our understanding. Art and science are very much a part of who we are as people and a society, and continued knowledge of both is the only way we can actively improve our way of life. Adam explained how art is a direct response to what happens in the science world, and that they work hand in hand for us to explain who we are and what we are doing, and the more self generating ideas you come up with the more you can come up with. He encouraged the audience to pay attention to patterns, participate and question everything. 

Closing his hour, he answered questions in length about his time on "Mythbusters" and the relationship he has with the co-star Jamie Hyneman. He explains that their differences help their scientific process by pushing their ideas forward until they have covered every angle and every possible outcome. "Mythbusters" is the perfect example of how working as a team helps to develop the best practices and outcomes. He warns that science is still unpredictable, and it is difficult to eliminate every variable in every situation. He describes the approach he has to science, looking at it from different perspectives until it makes sense in his own head, a practice he learned from watching his father paint. This process helps him respect the importance of working as a team and collaborating together.

Saturday, May 17, 2014

Considering speaking at UKOUG Tech 14? Why I travel overseas to attend UKOUG every year

I have been traveling to attend the UKOUG Tech Conference every year for the past 3 years. Not only is this at my own expense, there is lost income and time away from family to travel internationally from the United States to attend the event.

Why do I do it? It's simple.
  • Presentations are top-notch. Less sales-centric and more technology focused. Much preferred over Oracle OpenWorld.
  • I try to present as much as I can. I love sharing my experiences with others and the registration fee is waived by being a presenter.
  • Individual one-on-one time with Oracle Product Managers/Directors who fly in from the United States, whom I never would have been able to spend time with at Oracle OpenWorld because of the craziness there.
  • Being in December, just a few short months after Oracle OpenWorld, you get to attend many of those presentations.

I am going again this year and submitted 2 abstracts (and hope they are accepted!). Contrary to popular belief, you don't need to be an expert or a seasoned presenter. Simply talk about a single use case, a performance tuning tip you ran into, high level design your team came up with, anything... and in any Oracle technology area.

It's fun. You'll learn. And you'll be surprised at the number of people sharing your experiences and wanting to know more. If you attend, hit me up on LinkedIn and let's meet.

Submit an abstract. Go for free. Learn & network.


Monday, April 21, 2014

COLLABORATE14: A week in review

The week of COLLABORATE organized by some of the most dedicated people was filled with many presentations of varying quality. The event took place at the Venetian Palazzo and Sands Expo Center in Las Vegas, Nevada. While there are many uncountable events, people, presentations, and slot machines I am going to just highlight a few of my experiences on my first trip to Las Vegas.

My first and probably favorite of all the presentations was "RAC Attack!" Provided by the group at this session was a hands-on interactive help session for learning how to setup a two node RAC database. As a disclaimer I don't profess or market myself as a DBA, but I do like to have some what of an understanding of the systems that I use even if my useage of them only touches the surface. Setting up this cluster provided a good insight of what DBAs work with on a daily basis. The group provided much help where ever it was needed, but the instructions they had laid out in the first place were very descriptive and helpful. They tried to have us emulate the setup as if we wouldn't have direct access, which is typical in most settings. Often times a Unix/Linux administrator will have done a lot of the beginning work and have approved programs install, appropriate ports opened, and necessary sudoers access provided. In lieu of needing to emulate the Linux Admin role in addition to the DBA role all security was uprooted: firewall disabled and selinux disabled. The group incentivized people to get engaged by awarding attendees with T-Shirts and at the end providing those who had made it the furthest with prizes. Overall I would call it a rewarding experience, this helped me understand what my colleagues in the DBA role deal with on a daily basis as well as provided a good insight into some of the workings of the Oracle Database product.

More updates may appear here as time progresses.

Tuesday, April 15, 2014

My failed Google Glass experience

At the Collaborate 14 conference, @hdost lent me his Google Glass to try out for a bit.

AHMED: Okay Glass. Call John Doe. (I tried someone I knew was in his address book.)

GOOGLE GLASS: (Nothing happened.)

AHMED: (I see a menu that is now giving me options of what to say.)

AHMED: Okay Glass. Make a call.

AHMED: Hey Harold, it says "Mom" here in the dropdown.

GOOGLE GLASS: (Starts dialing Mom.)

AHMED: Cancel!

AHMED: Google Glass cancel!

AHMED: Okay Glass, cancel call!!!

Fortunately, Harold quickly ended the call from his phone. It would appear I need a little more practice before trying it out in the real world!

I thought I was cool until I accidentally started dialing Harold's mom

Monday, April 14, 2014

Harold Dost III now an Oracle ACE Associate

Harold Dost III, Senior Consultant at Raastech, is now an Oracle ACE Associate!

Becoming a member of the Oracle ACE Program highlights an individual's excellence and technical proficiency. Harold joins an elite group of about 460 individuals, including Raastech's Ahmed Aboulnaga (Oracle ACE), to be recognized as Oracle enthusiasts and advocates. Harold's impressive credentials, 6+ years of experience working in the Oracle community, and enthusiasm to contribute on higher levels are qualities that validate his merit in becoming an Oracle ACE Associate. Congratulations Harold!

Anyone in the Oracle Technology and Applications communities is eligible to apply for consideration, or nominate someone, for one of the following tiers: Oracle ACE Associate, Oracle ACE, or Oracle ACE Director.

Harold can be found on Twitter at @hdost.

Oracle ACE Program:

"Crazy or Courageous?": Impressive C-level presentation on the importance of branding and selling a project

Last week, while attending Collaborate 14 in Las Vegas, one of the sessions I attended was Crazy or Courageous? Lessons Learned From Making it Happen by Patrick Ott from Amway. Patrick shared his experience during the first global implementation of Oracle E-Business Suite at Amway across 31 European markets. This was a C-level presentation, targeting managers and especially managers outside of IT.

Patrick Ott, Operations Directory, Amway

* Disclaimer though. Raastech, the company I work for, currently supports Amway in a consulting capacity, and I have personally met Patrick in passing several times over the course of the project but have not directly worked with him.

Patrick talked about the challenges of selling the Oracle E-Business Suite solution to company executives, employees, and their customers. The job was made more challenging after what was considered an unsuccessful rollout of a similar solution several years earlier.

Here are a few personal takeaways from the presentation.

Selling to Upper Management

To get their attention, you have to convince the executives and the board that they're either sitting on a gold mine... or about to fall off a cliff.

The Spinning Plates Example

The project management team sometimes felt like the guy trying to keep the spinning plates balanced, always jumping back and forth making sure when things appear that they're about to collapse, bringing them back on track.

A Single Dashboard Slide

Project statuses to the executives were kept under 5 slides. The main project dashboard slide was in fact one page, depicted very simply and in easy to understand graphs, at the expense of detail obviously. By doing so, it allowed management to drill deeper into each of the status areas by asking questions. This level of interactivity could not have been achieved going through a 50 slide project update.

Branding a Project

How can you get everyone to feel passionate and proud about their involvement in a project? The same way people pay ridiculous amounts for Starbucks coffee instead of the generic brand. It's partly about branding. It was not the rebranding of the "ATLAS" project, as it's called, that made the project successful, but it was one of the aspects of convincing the executives, board, employees, and customers that things this time were different... which they were.

Old Logo
New Logo

Overall, it was a very good presentation by a very competent presenter who clearly understands the challenges it takes to make the rollout of a global enterprise project successful. His examples were impressive and completely relatable, highlighting how project success is not always about technology, but about people as well.

Sunday, April 13, 2014

Two minor problems with Collaborate 14

Note: I paid full price to attend Collaborate 14 and it was absolutely worth the cost of admission.

It was an excellent conference, excellent venue, much improved presentations, and overall an extremely well organized conference. I highly recommend it, and most definitely recommend it over Oracle OpenWorld.

With that being said, I highlight below the two biggest problems I personally found with the conference.

Problem #1: Limited exhibition booth time

Collaborate 14 is a 5 day conference, from April 7 to April 11. The exhibition hall was only open for 2 days, and for a period of 4 hours each day, from 10:45am to 3:15pm. The exhibitors lose an hour dedicated to lunch, so there's essentially only 6 hours to roam the vendor booths. That's 6 hours total for a 5 day conference!

Bad planning? Intentional? Either way it doesn't matter. Personally I was disappointed and the vendors I talked to weren't too happy either. I would have liked to spend more time socializing and engaging with the vendors, as well as spend more time at the Oracle stands.

Ahmed roaming the exhibition halls, happy at something, though he's not sure what exactly.

Problem #2: Late publishing of agenda causes presenter planning challenges

Many presenters were unsure what day they were presenting, so they were unsure when to book their travel, opting to stay for the entire 5 days, not by choice. Now granted as an organizer I would love/encourage/plead with presenters to stick around for the entire conference, it's unfair to some of them who may have other commitments. Give them the choice I say.

Don't read too much into these criticisms. I merely raise them to highlight areas of improvement and they reflect my opinion alone (although a lot of people I met agreed or shared similar concerns). This was an excellent conference and I will surely be back next year. I had a blast, I learned a lot, and I met some old and new colleagues. Hats off to the IOUG, OAUG, and Quest for once again organizing a great conference.

Saturday, April 12, 2014

4 under-recognized presentations at Collaborate 14

I attended many, many sessions last week at Collaborate 14. Big data. OEM Grid Control. Cloud. SOA. Engineered systems. Many were great. Few were disappointing. Attendance among the presentations were mixed. Some were a full house while others had only a few in attendance.

In today's blog post, I highlight four presentations in particular which were extremely impressive but lacked the turnout that they deserved.

Some presentations were early in the morning; clearly a major disadvantage for a conference taking place in Las Vegas. Others were later in the afternoon, a time when people were just getting ready to enjoy the evening and great weather. Some of the presentation titles could have definitely been made to be more attractive (judge for yourself below). And in one case, the name of the well known presenter was not in the agenda on the mobile app. Marketing also has something to do with it, and perhaps the presenters spreading the word a bit in advance might have helped.

These four presentations were all standout presentations, and I give each of them a 10 out of 10. Let me explain why.

An Alternative to Exadata for Large Scale ERP Deployments
Cliff Burgess, Director of Information Technology, Gentex Corporation

Cliff talks about their experience at Gentex and why they upgraded the commodity hardware running Oracle E-Business Suite R12 instead of moving to Exadata. Typically you don't find too many anti-Exadata presentations out there, so it was refreshing to see a different perspective.

What I learned:
  • Exadata is not just hardware, it's also software so don't forget about the ongoing support cost.
  • Who administers Exadata? The Oracle DBA? System administrator? Network admin? Storage admin? Training is clearly an issue.
  • Though Oracle sells Exadata as a means to stop finger pointing among the various administrators, this clearly was not a factor for Gentex.
  • On their commodity hardware, Gentex increased their CPUs by 50% but their RAM by 1000%. This was clearly to get as much power as possible while controlling Oracle licensing costs, which is licensed by the core.
  • To minimize licensing cost, Gentex went with the highest end CPUs at the time.
  • Given enough time and effort, you may be able to prove that Exadata performance gains may not be drastically better than commodity hardware for OLTP based transactions, something that Gentex confirmed themselves through an extensive POC.
It was a great presentation with some good insight on how Gentex saved $2 million by not moving to Exadata yet were able to resolve their performance issues with their E-Business Suite R12 environment.

Fusion Middleware-Heart of Fusion Applications, Tips and Tricks to Maintain, Install a Successful Fusion Application Install Base
Manoj Machiwal, Consulting Director, Jade Global

Manoj talks about what it takes to install Oracle Fusion Applications, an extremely new topic area. I'll be honest with you. I didn't have high hopes for this presentation, but as the presentation progressed, I realized that this one was a hidden gem.

What I learned:
  • Fusion Apps requires a lot of the Fusion Middleware infrastructure, such as the application server, identity management, and integration products.
  • Other Fusion Middleware products such as OBIEE and WebCenter Portal are optional.
  • Users are now stored in an external directory (i.e., the concept of FND_USERS no longer exists).
  • The Fusion Apps Vision instance requires 8 CPUs, 220 GB of memory, and 2 TB of disk!

Well done Manoj. Sorry I had to leave the presentation a little early, but what I saw was impressive.

Real-World Cloud & On-premise ERP Integration Simplified with Oracle SOA Suite
Vikas Anand, Senior Product Director, Oracle

Vikas talks about cloud integration and walks through a demo of a two-way integration between and E-Business Suite using the new Salesforce Adapter. I attended this presentation at the last Oracle OpenWorld conference, but this one had a few new interesting twists. If you're interested in knowing why I think highly of this presentation, see my review of that OpenWorld presentation.

What's new that I learned this time around:
  • Session managed to the external service provides (e.g., is fully managed by the adapter (i.e., the SalesForce Adapter).
  • The adapter supports the ability to provide a response interface for Salesforce events to invoke.
  • The BMC Software use case, on how their CIO gave a directive to move the majority of their services to the cloud, was interesting (and scary!).

I know it doesn't seem like much, but remember, the majority of the content was similar to what was presented last October at OpenWorld, so check out my last review to find out more.

Human Task and ADF: How-to
Harold Dost III, Senior Consultant, Raastech

Harold presents a live demo creating an ADF based form to handle Human Tasks in Oracle SOA Suite 11g. Unfortunately, both the presentation and the abstract should have had some reference to Oracle SOA Suite 11g, as Human Task is one of the many components of this suite.

What I learned:
  • You do not have to rely on the awful BPM Worklist to be the UI that users navigate to manage workflow actions.
  • The ADF custom developed workflow management forms can be hosted externally or embedded within the BPM Worklist.
  • Seeing a live (working) demo and walkthrough is always welcome and enhances the understanding.

This is a presentation that's mostly geared towards Oracle SOA Suite developers or those who rely on Human Task for workflow purposes. Since it's an area I specialize in, it is of particular interest to me.

There you have it. Four under-recognized yet excellent presentations at Collaborate 14, and ones that I'm extremely glad I attended.

Thursday, April 10, 2014

Ahmed Aboulnaga interviewed in Oracle Magazine

Ahmed Aboulnaga, Technical Director at Raastech, appeared in the March/April issue of Oracle’s flagship magazine. With a subscribership of around 550,000, Oracle Magazine provides unique viewpoints on business and technology. The Peer-to-Peer article, on page 27, by Blair Campbell titled "All for One", features Ahmed (Oracle ACE) alongside Lakshmi Sampath (Oracle ACE) from Dell and  Bjoern Rost (Oracle ACE Director) from Portrix Systems and highlights the different ways groups can motivate and inspire.

Ahmed, having 18 years experience working with Oracle products, discusses why whiteboards are his favorite tool for fostering teamwork and collaboration, where he would like to see Oracle go in the future, and more. Below is a link to the current issue.
Link to current issue:

To subscribe to Oracle Magazine:

Link to digital edition (subscription required):

Tuesday, March 25, 2014

Upgrading to Oracle SOA Suite 11g PS6 ( Do this.

Do you need to make any code changes after applying the Oracle SOA Suite 11g PS6 ( patchset?

Yes, this upgrade requires a few code modifications. So search for the following terms in your code to see if you are affected:
  • setProperty
  • out.header.wsse_Security

Issue 1: setProperty function requires strings now

If you are using the setProperty function, you need to force the variable to be a string.

After the patchset, this no longer works:
Instead, force the variable into a string, in this example $ReplyToAddress:

Issue 2: Using out.header in an XSL transform may not work

After the patchset, you can no longer set the outbound security header in an XSL transformation as follows:
select="mhdr:setProperty('out.header.wsse_Security/wsse:Security/wsse:UsernameToken/wsse:Username', $Username)"/>

Move the logic into the Mediator .mplan file instead:
  <copy target="$" value="$"/> 
  <copy target="$out.header.a_ReplyTo/a:ReplyTo/a:Address" value="$"/> 
  <copy target="$" value="$"/> 

Applicable Versions:
  • Oracle SOA Suite 11g (

Monday, February 24, 2014

ORAMED-01201 after upgrading to Oracle SOA Suite 11g PS6


We received this XSL/DVM error when we upgraded to Oracle SOA Suite 11g PS6 (
ORAMED-01201:[Error in transform operation]Error occurred while transforming payload using "xsl/QueryCustomer_To_CustomerTransaction.xsl" for target part "payload".Possible Fix:Review the XSL or source payload. Either the XSL defined does not match with the payload or payload is invalid. Cause:XML-22044: (Error) Extension function error: Error invoking 'lookupValue':'oracle.tip.dvm.exception.DVMValidationException: The DVM Document is invalid Please fix the DVM Document and ensure the document confirms to the xsd'


It turns out that a developer did a global search-and-replace, changing "http" to "https" in order to update multiple URLs in a DVM. He did not realize that this also changed the protocol in the namespace URL, which was obviously an error on his part.

However, this ORAMED-01201 error never showed up with previous versions of Oracle SOA Suite 11g, and only started up after we upgraded to So it seems that previous versions of Oracle SOA Suite 11g were tolerant of namespace errors, but not the latest PS6 patchset. This is a good thing actually.

The namespace was accidentally changed to "https". This worked in but not
<?xml version='1.0'?><dvm name="Customer" xmlns="
Finally corrected it after upgrading to
<?xml version='1.0'?><dvm name="Customer" xmlns="


1. Double-check your namespace in the DVM.

Applicable Versions:
  • Oracle SOA Suite 11g (

Wednesday, January 8, 2014

ATLRUG Presentation: Solr and Sunspot

Tonight I presented at the Atlanta Ruby User's Group more affectionately known as ATLRUG. I have been attending for a while, and I finally took the initiative to make a presentation. The presentation itself was about using the Solr server with the Sunspot gem.  I would like to thank everyone who was there, and for all the positive feedback. For anyone looking for a copy of the slides, here they are.

Monday, December 23, 2013

Recap of Raastech's Fusion Middleware and Cloud Presentations @ MOUS

On November 13, 2013, Raastech gave two different presentations at the 6th Annual MOUS Conference at Schoolcraft College in Livonia, MI. The Michigan Oracle Users Summit (MOUS) conducts annual conferences with approximately 300+ attendees and is a representation of four regional user groups; MI-OAUG, SEMOP, BTU, and Hyperion.

Best Practices for Infrastructure Tuning of Oracle Fusion Middleware Components

Arun Reddy, Technical Director at Raastech, explained the common infrastructure best practices for Installations, Patching, Administration, Deployments, and Security.

During the presentation he offered information about planning your environment based on key business factors, implementing the best practices, automating tasks, securing environments, and the need for a backup and recovery plan.

His presentation can be downloaded here.

Cloud Concepts - Everything you Wanted to Know but Were Afraid to Ask

Ahmed Aboulnaga, Technical Director at Raastech, and Javier Mendez, Principal Consultant at Raastech, teamed up during their professed "introductory" presentation on Cloud Concepts.

Ahmed began by describing the confusion and hype associated with Cloud Computing. He also explained how virtualization laid the foundation for the cloud, and the difference between the two. Javier explained the purpose and consumers of Cloud services. He discussed the differences in various service and deployment models.

The presentation offered a great assessment of the pros and cons of cloud concepts.

 Their presentation can be downloaded here.

Sunday, December 22, 2013

High quality Facebook photos are not really high quality

Friends, colleagues, and the rest of the Internet seem to believe that by uploading "high quality" images to Facebook means that it is truly saved in high quality. This is not the case. In Facebook terms, "high quality" is Facebook's way of telling us that "it's just higher quality than what we had before".

There are 3 things you should be aware of to understand the impact of uploading high quality photos to Facebook.

Facebook has a maximum resolution of 2048x2048.

Facebook "high quality" images are maxed out at 2048x2048. For example, if you upload an image or photo that is 4340x3568 in size, Facebook will reduce it to 2048x1684 even if the "high quality" checkbox is checked.

Facebook compression reduces image size.

For example, if you upload an image which is 310,773 bytes in size in compressed format, Facebook further compresses it to 88,717 bytes, even with the "high quality" checkbox checked. This is advantageous in that it reduces the amount of disk space required by Facebook as well as the bandwidth needed to download such images, but it has a direct effect on the quality of the image.

Facebook compression reduces image quality.

Take a look at this photo. The one on the left is the original and the one on the right is the uploaded Facebook version. Note that both the color quality and detail have been reduced on the Facebook version, leading to a photo that is generally poorer in quality.

Here is the same image, zoomed in onto the shirt collar. The one on the left is the original photo while the one on the right is the uploaded Facebook version (recall that this photo is uploaded with the "high quality" setting). The reduction in detail and the effects of compression are obvious.


Facebook is great for sharing photos with your mom or uploading selfies that you won't care much about a year from now. Currently, Facebook reports that 350 million photos are uploaded every day. Thus, the limit on image size imposed by Facebook as well as its high compression routines are understandable.

But under no circumstance should you use Facebook to backup your photos. And under no circumstance should you share photos on Facebook for the purpose of professional collaboration.

Tuesday, November 26, 2013

Troubleshooting 12c Cloud Control Performance Issues

Oracle 12c Cloud Control certainly has some great features that we are now taking advantage of. Specifically, the Oracle Fusion Middleware Plugins have been of great service to our project. Like many others, however, we experienced a huge drop in performance between 11g Grid Control and 12c Cloud Control after our upgrade. The issues we had were specific to navigating the Database Instance and Performance pages. It was not uncommon to see below database and performance pages hang for 20 minutes. To make matters worse, the entire application would hang if a couple of the DBA's were on at the same time.

What's the problem? I logged into the WebLogic Server Administration Console where our 12c Cloud Control is deployed and looked at the threads (Servers > EMGC_OMS1 > Monitoring > Threads). I noticed there were many stuck threads when we were accessing the DB Instance and Performance pages. I did a thread dump and saw a lot of the following:
"[STUCK] ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'" waiting for lock oracle.jdbc.driver.T4CConnection@6e72e5f2 BLOCKED
If the other threads weren't stuck, they would be soon. The only other threads running were executing SQL queries on the database. The next obvious step was to check the database. I ran an AWR report for the time the application was hanging and found this:

Physical ReadsExecutionsReads per Exec %TotalElapsed Time (s)%CPU%IOSQL IdSQL ModuleSQL Text

4,217,94414,217,944.004.79453.9973.9325.85f58fb5n0yvr7c EM Realtime Connection select 'uptime' stat_type, rou...

1 execution running for over 7 minutes from EM? That is not good!

Here is the full SQL (formatted)

SELECT 'uptime' stat_type,
       ROUND ( (SYSDATE - startup_time) * 24) v1,
       NULL v2,
       version v3,
       NULL v4
  FROM v$instance
SELECT 'total_sga',
       SUM (VALUE) / 1024 / 1024 v1,
       NULL v2,
       NULL v3,
       NULL v4
  FROM v$sga
SELECT 'storage',
       SUM (NVL (f.total_gb, 0) - NVL (s.used_gb, 0)) v1,
       NULL v2,
       NULL v3,
       NULL v4
  FROM dba_tablespaces t,
       (  SELECT tablespace_name,
                 SUM (NVL (bytes, 0)) / (1024 * 1024 * 1024) total_gb
            FROM dba_data_files
        GROUP BY tablespace_name) f,
       (  SELECT tablespace_name,
                 SUM (NVL (bytes, 0)) / (1024 * 1024 * 1024) used_gb
            FROM dba_segments
        GROUP BY tablespace_name) s
 WHERE     t.tablespace_name = f.tablespace_name(+)
       AND t.tablespace_name = s.tablespace_name(+)
       AND t.contents != 'UNDO'
       AND NOT (t.extent_management = 'LOCAL' AND t.contents = 'TEMPORARY')
SELECT 'sysmetric',
       SUM (
             WHEN metric_name = 'Average Active Sessions' THEN VALUE
             ELSE 0
       SUM (CASE WHEN metric_name = 'Session Count' THEN VALUE ELSE 0 END) v2,
       NULL v3,
       NULL v4
  FROM v$sysmetric
       AND metric_name IN ('Average Active Sessions', 'Session Count')
  SELECT 'addm_findings',
         COUNT (*) v1,
         f.task_id v2,
         NULL v3,
         NULL v4
    FROM dba_advisor_findings f
   WHERE     f.task_id =
                (WITH snaps
                      AS (SELECT /*+ NO_MERGE */
                                MAX (s.snap_id) AS end_snap,
                                 MAX (v.dbid) AS dbid
                            FROM DBA_HIST_SNAPSHOT s, V$DATABASE v
                           WHERE s.dbid = v.dbid)
                 SELECT MAX (t.task_id) AS task_id
                   FROM dba_addm_tasks t, snaps s, dba_addm_instances i
                  WHERE     t.dbid = s.dbid
                        AND t.begin_snap_id = s.end_snap - 1
                        AND t.end_snap_id = s.end_snap
                        AND t.how_created = 'AUTO'
                        AND t.requested_analysis = 'INSTANCE'
                        AND t.task_id = i.task_id
                        AND i.instance_number =
                               SYS_CONTEXT ('USERENV', 'INSTANCE'))
         AND f.parent = 0
         AND (f.filtered IS NULL OR f.filtered <> 'Y')
GROUP BY f.task_id

I ran the query using TOAD and found that it took between 9 and 18 minutes to complete depending on the database instance. After looking at the execution plan, I saw why. There was a NESTED LOOP over a 136,000 row result-set. The nested loop was okay, processing each row at about 8ms...but 136,000 times? Something wasn't right. After some searching, I stumbled on the following note from Oracle Support (Doc ID 1528334.1). It seemed to describe our scenario perfectly, however, it did not resolve our issue and the query performance did not improve. 

Interestingly, the problem was not happening in our OMS repository database. When I took a look at the same query's execution plan, I noticed that instead of the nested loop there was a hash join of two full table scans. This seemed more efficient. Why aren't they using the same plan? As a test, I decided to copy the existing plan from our repository and propagate the changes to some of our other database instances using the SQLT Diagnostic Tool. You can download this from Oracle Support (SQLT Diagnostic Tool (Doc ID 215187.1)). 

To create the sql profile from the repository instance, use the following script after downloading SQLT: coe_xfr_sql_profile.sql 

START coe_xfr_sql_profile.sql [SQL_ID] [PLAN_HASH_VALUE];

This will create a script similar to this one (coe_xfr_sql_profile_&&sql_id._&&plan_hash_value..sql) which you can then run on your database instances. In our case, the following SQL_ID and PLAN_HASH_VALUE were used (f58fb5n0yvr7c 2336039161). Once generated, I ran the sql script on some of the other instances and tested the results. 

old plan: 13 minutes
new plan: 9 seconds

HUGE difference. Now, to test out the application...

Wow, the DB Instance and Performance pages actually came up (about 10 seconds or so). The concurrency issues were gone as well! All is well again! I logged in to our Admin Console and noticed there were no more stuck threads or warnings. Everything was working great... but I could do better. I like things to go FAST and the few seconds of waiting just bother me. I'm not going to recommend the next steps. If this solved your issue, wonderful! I'm glad it helped.

From the explain plan, I could see that the bulk of the work was parsing the query that populates the dba_segments view. The offending SQL?

SELECT tablespace_name, SUM (NVL (bytes, 0)) / (1024 * 1024 * 1024) used_gb
FROM dba_segments
GROUP BY tablespace_name

What if we create a local version of dba_segments as a Materialized View? Why not? The DBSNMP schema is the one running the query so lets give it a try. As the SYS user, run the following:



   SELECT owner,
            DECODE (BITAND (segment_flags, 131072),
                    131072, blocks,
                    (DECODE (BITAND (segment_flags, 1),
                             1, DBMS_SPACE_ADMIN.segment_number_blocks (
          * blocksize,
          DECODE (BITAND (segment_flags, 131072),
                  131072, blocks,
                  (DECODE (BITAND (segment_flags, 1),
                           1, DBMS_SPACE_ADMIN.segment_number_blocks (
          DECODE (BITAND (segment_flags, 131072),
                  131072, extents,
                  (DECODE (BITAND (segment_flags, 1),
                           1, DBMS_SPACE_ADMIN.segment_number_extents (
          DECODE (buffer_pool_id,  1, 'KEEP',  2, 'RECYCLE',  'DEFAULT'),
          DECODE (flash_cache,  1, 'KEEP',  2, 'NONE',  'DEFAULT'),
          DECODE (cell_flash_cache,  1, 'KEEP',  2, 'NONE',  'DEFAULT')
     FROM sys.sys_dba_segs;

Want to know how fast it runs now?

Old plan: 9 seconds
New plan: 284msecs

And the application? Faster than ever! Don't let your MV get stale. Make sure you create a job to refresh the MV at the frequency you see fit. I hope this helps.