Friday, August 15, 2014

WebCenter: Content Presenter and Secured images

In WebCenter we use sitestudio and content presenter to show content from UCM. This blog could be useful for you if you find following behavior
1. Content presenter is not able to show images
2. You are able to see images sometime but not always
3. One browser shows images but other is not able to show
4. You are able to see images but your friend is not or vice versa.

Answer of all these problems lies in they way images are accessed using content presenter.

If we do F12 and see the url of image generated by content presenter, we found that its a direct URL to content server. For example

http://<server-name>:16200/cs/idcplg?IdcService=GET_FILE&dDocName=MY_Image&RevisionSelectionMethod=LatestReleased

This url is directly pointing to content server. Now content server can only give images if either of this is true
1. Image document is public. (Immediate solution but not feasible in for secured images)
2. You are explicitly logged into content server (may in another tab) and you have access to image document. (Cause which is responsible why we see images sometime)
3. You have SSO enabled so that your webcenter session can be used to access content server. (Best solution)

In above three cases you will be able to see image otherwise you would not.

Disclaimer: Any views or opinions presented in this blog are solely those of the author and do not necessarily represent those of the company.

Saturday, August 9, 2014

Jdeveloper and Disk space issue

Recently I was running out of disk space and then I thought of analyzing it. I found that one of my middleware home (which I use frequently) is much bigger than others. WinDirStat shows that there are few hprof files in my middleware-home/jdeveloper/jdev/bin directory, which are taking lots of space. (3GB each around).

hprof files gets generated whenever jvm crashes or jdev shows outofmemory error. All heap information is dumped in hprof file and its size is generally same as your jdev memory size. That is why they are so huge.

These files can be used to analyze jvm crash but most of the time we are not interested in that untill its happening too frequently. We can delete them safely, which should give us lots of disk space back.


Another thing you may want to change it system directory location from C drive to some other location. For that you can set JDEV_USER_DIR environment variable. 

Disclaimer: Any views or opinions presented in this blog are solely those of the author and do not necessarily represent those of the company.

Friday, August 8, 2014

ADF Mobile: Issues faced while migrating from 11.1.2.4 to 12.1.3.0

Till 11.1.2.4 it was ADF Mobile and from 12.1.3.0 it is Mobile Application Framework (MAF). In this blog I am just writing few issues that I have faced while migrating one of my ADF mobile (11.1.2.4) project to MAF.

====================================================================
Issue 1:
Error: Unable to copy to output directory, D:\<file-path>\ApplicationController\src\META-INF\adfmf-skins.xml not found    ApplicationController.jpr    D:\<file-path>\ApplicationController    ApplicationController.jpr


Error: Unable to copy to output directory, D:\<file-path>\ViewController\src\META-INF\adfmf-feature.xml not found    ViewController.jpr    D:\<file-path>\ViewController    ViewController.jpr

Solution: https://community.oracle.com/thread/3579575
a. Remove .data directory
b. Do a clean build as there is no adfmf-skins.xml. Its changed to maf-skins.xml

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

Issue 2: Skin (css file) developed in 11.1.2.4 is not picked
Solution: Use version Id with 12.1.3 to define your skins and also to refer oracle provided base skins, which you are extending.
See bottom of this blog to set correct entries of maf-skin.xml and maf-config.xml

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

Issue 3: Error (Line 22, Column 48): Attribute allowDeviceAccess not defined on element adfmf:featureReference
Solution: remove allowDeviceAccess attribute from maf-application.xml

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

Issue 4:
Unable to load resource JSON file
/data/data/com.company.AbsenceManagemetn/files/baseProfiles/profile.json
Empty Response
Error: a profile is required to set up the base page

Solution: Problem with skin configuration in maf-skins.xml file. Start using skin versioning
See bottom of this blog to set correct entries of maf-skin.xml and maf-config.xml


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

Issue 5: KXmlUtil.loadFromXml Unexpected element - HTML Expected schema
Solution: Redeploy apk and use that.

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

Issue 6: The custom authentication page does not have credentials field.
Solution: This issue only occurs if we have created custom login page in 11.1.2.4 by copying adf-mobile-provided-login-pages-and-js. We need to again copy new login page and customize that as per our need. 


=========================================================
Correct way of extending skins in MAF

Disclaimer: Any views or opinions presented in this blog are solely those of the author and do not necessarily represent those of the company.