Monthly Archives: February 2012

JPS-01520: Cannot initialize identity store


oracle.security.jps.service.idstore.IdentityStoreException: JPS-01520: Cannot initialize identity store.

<IdentityStoreUtil> <getIdentityStoreFactory> Cannot initialize identity store.
<PageUtils> <getUserName> Failed to get user name

If you happen to get the error while running the weblogic server then the possible cause can be to add the entry in config.xml (\Users\username\AppData\JDeveloper\system11.1.1.5.37.60.13\DefaultDomain\config\config.xml)

<listen-address>localhost</listen-address>

that is the localhost is missing.

related forum is

https://forums.oracle.com/forums/thread.jspa?threadID=2177694

Advertisements

Jdeveloper Design Time issue fix


In Jdeveloper 11.1.2 we often see that the designer is going off and looks clumsy without the ‘WYSIWYG’ feature during the design time. The jspx or jsff designer in Jdeveloper will show as

To fix this we directly go and delete this directory o.j2ee.jsplib in

C:\Documents and Settings\ USER_NAME\ApplicationData \JDeveloper\system11.1.2.0.38.60.17

Thanks to the blogger

For other version, if the file or folder does not exist then go to o.j2ee and delete or move – jsp-faces-tags-cache.xml and jsp-libraries.xml. Also delete .wlLib folder if it exists. If nothing works delete the system folder.

also make sure that the ‘Execute Tags in JSP Visual Editor’ is checked for adf components

updates from a collegue
If you have a class reference in your application folder that cannot be loaded this problem might occur

possible fixes

change

oracle.adf.view.rich.security.FRAME_BUSTING
<param-value>differentDomain</param-value>

To:

<param-name>org.apache.myfaces.trinidad.security.FRAME_BUSTING</param-name>
<param-value>differentOrigin</param-value>

or

change the class .adf/META-INF/services/oracle.adf.view.rich.context.ExceptionHandler
or rename this file oracle.adf.view.rich.context.ExceptionHandler

Jdeveloper 11.1.1.6 released


Jdeveloper 11.1.1.6 released..

http://www.oracle.com/technetwork/developer-tools/jdev/index-088099.html

ADF JavaScript Partitioning


Most of the performance issue at the client side for the ADF application is related to large number of client side scripting files getting download which increases the download time and relatively degrading the performance of the application. Breaking up the JavaScript into small chunks will result in modularity but will increase the round trip.

To resolve this ADF Faces Framework comes up with a concept of partitioning of the huge JavaScript at the client side based on the components used in the pages. That means only limited number of scripts required for the page is loaded at the client which will increase the performance drastically.

ADF Faces groups the components JavaScript files into two groups namely partitions and features. These two groups are defined separately in two configuration files i.e. adf-js-features.xml and adf-js-partitions.xml.

The default files are location at

C:\oracle\Middleware\oracle_common\modules\oracle.adf.view_11.1.1\ adf-richclient-impl-11.jar\

If the application is loaded without using an explicit partitions then adf will use the configuration settings defined in the above specified files and does the partition.
By default, the partitioning is enabled for performance which can be disabled using the initial parameter in web.xml

<context-param>
<param-name> oracle.adf.view.rich.libraryPartitioning.ENABLED</param-name>
<param-value>false</param-value>
</context-param>

Or

<context-param>
 oracle.adfinternal.view.rich.libraryPartitioning.ENABLED
</param-name>
<param-value>false</param-value>
</context-param>

Or

<context-param>
<param-name>oracle.adf.view.rich.libraryPartitioning.DISABLED</param-name>
<param-value>true</param-value>
</context-param>

Or

<context-param>
<param-name>oracle.adfinternal.view.rich.libraryPartitioning.DISABLED</param-name>
<param-value>true</param-value>
</context-param>

Now we will see how to create these files
•    Create adf-js-partitions.xml in public_html/WEB-INF folder of your application
•    Create adf-js-features.xml in src/META-INF folder of your application
•    The skeleton of these files looks like

adf-js-partitions.xml

<?xml version="1.0" encoding="utf-8"?>
xmlns="http://xmlns.oracle.com/adf/faces/partition">
<partition>
<partition-name>dnd</partition-name>
<feature>AdfDropTarget</feature>
</partition>
</partitions>

<partitions> – root tag to define partitions, all partitions are defined inside this
<partition> – define the partition, any number of partition is allowed
<partition-name> – name of the partion. For example the javascript will be loaded as dnd-11.1.1.4.js
<feature> – hook reference to the particular feature that defines to load the javascript for the component

adf-js-features.xml

<?xml version="1.0" encoding="utf-8"?>
xmlns="http://xmlns.oracle.com/adf/faces/feature">
<feature>
<feature-name>AdfDropTarget</feature-name>
oracle/adf/view/js/dnd/AdfBasicDropTarget.js
<feature-dependency>AdfDragAndDrop</feature-dependency>
</feature>
<feature>
<feature-name>AdfDragAndDrop</feature-name>
oracle/adfinternal/view/js/laf/dhtml/rich/AdfDhtmlDnDContext.js
</feature>
</features>

<features> – root tag for the features, all features are defined inside this
<feature> – define the feature, any number of feature is allowed
<feature-name> – name of the feature that has to be referenced from the partition file
<feature-class> – javascript class for the component
<feature-dependency> – name of the feature which is extended by the javascript class

Sample:

When you don’t have these files in place then the loaded scripts are

When you replicate the default content in your configuration files then the partition will be

Let’s have the partitions which defines only two partition forcomponent. It’s better to have AdfBootStrap and AdfCore as part of the partitions as these are the basic components and JavaScript to render some of the key components. You are free to research on these components to come up with your own core and booting features. You can get the base AdfBootStrap and AdfCore partitions and features configurations from

The partition file with the configuration and hook looks like

And the corresponding features are defined as

And when you run your page in internet explored 8 with Developer Tools on (F12) you can see in the script section that our partition is available as a separate script

Troubleshooting:

If we refer to an invalid feature in the partition then we will get

References:

http://docs.oracle.com/cd/E24382_01/web.1112/e16181/af_arch.htm#CHDDEAJH
http://docs.oracle.com/cd/E12839_01/apirefs.1111/e12046/oracle/adf/view/js/component/rich/input/package-summary.html
http://docs.oracle.com/cd/E25054_01/web.1111/b31973/ap_config.htm#BABCJIDJ
http://adfcodebits.blogspot.com/2012/01/bit-34-using-javascript-partitioning.html

You can download the pdf file of this from here

Referring custom libraries in jdev 10.1.3.4


I recently happened to work on jdeveloper 10.1.3.4 and was given a task of bringing up the server. The project was using the custom libraries which the embedded oc4j was complaining that it could not find saying

Caused by: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.ibm.as400.access.AS400JDBCDriver
 at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:283)
 at oracle.oc4j.sql.DataSourceConnectionPoolImpl.<init>(DataSourceConnectionPoolImpl.java:108)
 at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:99)
 … 13 more

This was very challenging for me because this is the first time I ran an ADF application on Jdeveloper 10g. I searched on the forum with this error and could easily find that the fix is to copy the library to

..\jdevstudio10134\j2ee\home\applib

This is just for information as this could be helpful for newbie who is still working with Jdeveloper 10g

out of Space for Code Cache for Adapters


If you are facing issues like ‘Out of Space for Code Cache for Adapters’ in Jdeveloper 11.1.1.5 then you must do this changes as discussed in this forum post

Set – JVM Options : XX:ReservedCodeCacheSize=128m in setDomainEnv.sh