2014. december 16., kedd

Oracle - Version of Applications

1. Use System Administration responsibility
2. Select Oracle Applications Manager > Applications Usage

3. You can see the version of the desired application in the Patch set column.

2014. november 19., szerda

Oracle - Trace, FND Debug Log, FND Diagnostics

I. Trace

Type 1
1. Set Initialization SQL Statement - Custom Profile Option at User level:
BEGIN
fnd_ctl.fnd_sess_ctl(
'',''
,'TRUE','TRUE','LOG'
, 'ALTER SESSION SET TRACEFILE_IDENTIFIER=''TEST'' EVENTS=''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12''' ); 
END;
2. Find the trace file(s)
3. Use tkprof <input_file_name>.trc <output_file_name>.prf in $ORACLE_HOME folder and enjoy the readable output :-)

Advantage: more detailed trace file.
Disadvantage: the user has to sign out before the Profile Option setting and then sign in again.

Type 2
1. Set Utilities:Diagnostics Profile Option to Yes at User Level.
2. Go to Help > Diagnostics > Trace and select Trace with Binds and Waits

3. A note appears where you will find your trace file.

Advantage: the user doesn't have to sign out, the settings have effect immediately.
Disadvantage: less detailed trace file.

II. FND Debug Log
1. Set the following Profile Options at User level:
1.1. Set FND: Debug Log Enabled to Yes
1.2. Set FND: Debug Log Level to 1 if you would like to use it in code as C_LEVEL_STATEMENT or
1.3. Set FND: Debug Log Level to Statement
1.4. Set FND: Debug Log Module to %

2. Query log_sequence -> &1st_value
select max(log_sequence)
from fnd_log_messages;

3. Do what you would like to debug.
4. Query log_sequence again -> &2nd_value
5. Query your debug log:
SELECT substr(module,1,70), MESSAGE_TEXT, timestamp, log_sequence
from fnd_log_messages
where log_sequence between &1st_value AND &2nd_value
ORDER BY log_sequence;

6. Set the Profile Options back to the original values.

III. FND Diagnostics
1. Set FND: Diagnostics Profile Option to Yes at User level.
2. Click "Diagnostics" tool menu.
3. Select "Show Log on screen" in Diagnostic field and "Statement" in Log Level field and click "Go" button.

4. Do about what you would like to have the log. The log will be displayed at the bottom of the screen.
5. Turn off logging: click "Diagnostics" tool menu, select "Show Log on screen" in Diagnostic field and "Turn off screen logging" in Log Level field and click "Go" button.
6. Set FND: Diagnostics Profile Option to No at User level.

2014. október 27., hétfő

Oracle - Enable Record History in OAF

1. Set FND: Record History Enabled Profile Option to Yes at Site level
2. Set Personalize Self-Service Defn Profile Option to Yes at User level
3. Set FND: Personalization Region Link Enabled Profile Option to Yes at User level

4. Click on Personalize Page

5. Click on Edit

6. Find Record History Enabled and set to true at the desired level

See more details here.

2014. szeptember 12., péntek

Maven - Webapps, Build Failure

1. mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
2. mvn clean package

BUILD FAILURE

a) error: annotations are not supported in -source 1.3
b) error: package javax.servlet does not exist

SOLUTION

Include to the pom.xml the following:
a)
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
        <source>1.6</source>
        <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

b)
<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.0.1</version>
  <scope>provided</scope>
</dependency>

jQuery - Refresh a div content

If you would like to refresh the content of div_2 when the content of div_1 is changed you can use the following:

jQuery(window).load(function(){
        initialize();
});


rDisplay = function(){
    var lDivId = "div_2";
    jQuery('#' + lDivId).load(location.href+' #' + lDivId);
}


initialize = function(){  
    var div = document.getElementById ("div_1");
    if (div.addEventListener) {
        div.addEventListener ('DOMSubtreeModified', rDisplay, false);
    }
}


You can find more details here.
It's worth to read.

2014. július 16., szerda

JIRA - Internet Explorer 11 feels itself Mozilla :-)

In IE11

jQuery.browser.mozilla returns true
jQuery.browser.msie returns undefined
jQuery.browser.safari returns undefined

You can read more about it here.



Solution instead of using the above:

Query the user agent string by using window.navigator.userAgent which is
  • in Mozilla: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0,
  • in Chrome: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36,
  • in IE11: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko,
and find for the following strings:
  • in Mozilla - "Firefox",
  • in Chrome - "Chrome",
  • in IE11 - "Trident".
Note: you can search for "Trident" to identify Internet Explorer since IE9.

For example:
var ua = window.navigator.userAgent;
console.log(ua);
var msie = ua.indexOf("Trident"); // -1 if not found
console.log(msie);

Hurrah for IE11 again! ;-)

Oracle - Symptoms of Output Post-processor (OPP) problem

1. Post-processing of request <request_id> failed at <date> <time> with the error message:
The Output Post-processor is running but has not picked up this request.
No further attempts will be made to post-process this request, and the request will be marked
with Warning status.
Setting the profile option Concurrent: OPP Response Timeout to a higher value may be necessary.

Solution: ask the Database Administrator(s) to have a look :-)

2. Beginning post-processing of request <request_id> on node <node> at <date> <time>.
Post-processing of request <request_id> failed at <date> <time> with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.

OPP service log:
...Output file was found but is zero sized - Deleted
...java.lang.reflect.InvocationTargetException
...
...Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

Possible Reason: too large output file.
Possible Solution: submit the request again with more specific parameters (e.g. smaller date range).

2014. július 4., péntek

Oracle - Relationship between material transactions - orders, attachments - ap_invoices

select mmt.source_code           
         , mmt.transaction_id
         , oh.order_number           
  from mtl_material_transactions mmt                       
         , oe_order_headers_all oh         
where 1 = 1                                      
    and mmt.transaction_reference = oh.header_id (+)
    and mmt.transaction_id = <transaction_id>

 select aia.invoice_num
         , fad.*
  from fnd_attached_docs_form_vl fad
         , ap_invoices_all aia
where 1 = 1
    and aia.invoice_id = fad.pk1_value
    and aia.invoice_num = '<invoice_number>';

JIRA - Javascript is not loaded in Internet Explorer

1. Copy your test.js script to the following folder: /opt/apps/jira/apache-tomcat/atlassian-jira/includes/js,
2. Use jQuery.getScript in the given field description in the project's Field Configuration.

<script type="text/javascript">
  if (jQuery.browser.mozilla){
     jQuery.getScript("../includes/js/test.js")
       .done(function(script, textStatus) {
       console.log( "Loading javascript '../includes/js/test.js': " + textStatus );
     })
       .fail(function(jqxhr, settings, exception) {
       console.log("Loading javascript '../includes/js/test.js': " + exception);
     })
   }
   else if (jQuery.browser.msie || jQuery.browser.safari){
    jQuery.getScript("../includes/js/test_IE.js")
       .done(function(script, textStatus) {
       console.log( "Loading javascript '../includes/js/test_IE.js': " + textStatus );
     })
       .fail(function(jqxhr, settings, exception) {
       console.log("Loading javascript '../includes/js/test_IE.js': " + exception);
     })
   }
</script>



You could see in the browser's console that
"Loading javascript '../includes/js/test.js': success " in Firefox,
"Loading javascript '../includes/js/test_IE.js': success " in Chrome and IE.
Later in IE you got
"Loading javascript '../includes/js/test_IE.js': Not Found "
error but ONLY in IE. It worked well in Chrome.

It is a known issue, you can read more details here (in IE8 and IE9 the URL rewriting is not supported - in IE11 the javascript is loaded successfully).

Working well in ALL browsers changing the filepath of the javascript.
Instead of using
jQuery.getScript("../includes/js/test.js")
you have to use
jQuery.getScript("/jira/includes/js/test.js").

Easy :-)