As I dragged the APEX application in the Cart as well, I thought I would find it in my APEX Builder, but it wasn't there, so you have to manually import your APEX application.
Step 6: Review (and try to recompile) all invalid database objects
And here is the biggest catch with the Oracle Cloud: some database packages are not available in the Oracle Public Cloud. So for example I recompiled one of my packages and got this error:
So after reviewing my code, following packages I used are not working in the Oracle Cloud:
- I used this to hash the password
- I used it to calculate timings
- I used it for crlf (character linefeed)
- I used it to send out mails with attachments
Step 7: Make your code "Oracle Public Cloud"-compatible
So this basically means that all the package calls I do, that don't work, I will need to either remove or rewrite to something that does work.
For example the DBMS_UTILITY package I don't really need anymore as you can get timings native in APEX today, so not necessary to calculate yourselves.
The call to UTL_TCP for just the character linefeed I can remove too.
UTL_SMTP is interesting... in 2006 (and later in 2008), when I wrote some part of the application, there wasn't the apex_mail package yet that supported attachments, so that is why I had to use utl_smtp and write everything myself... but even using the apex_mail package wouldn't work as sending mails from the database in general is not supported in the Oracle Cloud. So the only way to solve that issue, is to integrate with a service (for example MailChimp) that sends emails for you.
And showing the images I wouldn't really code anymore using my own procedure either, as you can now use the native BLOB (image) support in APEX.
So that leaves me with DBMS_OBFUSCATION_TOOLKIT which I need to replace by something else that works in the Oracle Cloud.
There might be some code flying around in your application which should have been in packages (but isn't) or other components of the APEX app that are not compatible, for example some third party plugins which need some specific filesystem files and folders which you can't create in the Oracle Public Cloud.
To identify the code that should be in packages and which might not be compatible I use the APEX Advisor to find those and I did! When you upload your profile picture in DGTournament I create a thumbnail on the fly with ORDSYS.ORDIMAGE... and it looks like that's something you can't use either in the Oracle Public Cloud. It actually remembers me of one of my conversations with the Oracle team during my beta testing; I really would love to see Intermedia and Locator support in the Oracle Cloud as many of my applications are using that... the answer was it might come in the future, but it's not available yet.
For the rest you just need to go through your application and test it...
Step 9: Enjoy the Oracle Public Cloud
Once you have everything running and everything is compatible, you can enjoy the Oracle Public Cloud... Click this link to see DGTournament in action in the Oracle Public Cloud. (note that I didn't correct all incompatibilities yet and didn't upload all external files it needs)
In my next blog posts I will talk about other things like the performance, doing the maintenance etc. ... and my last post will be a conclusion.