Monday, December 28, 2009

Oracle Wallet Manager(OWM) :Exception in thread "main" java.lang.UnsatisfiedLinkError: owm2

Recently, we encounter the error as below in the Oracle Wallet Manager,

Exception in thread "main" java.lang.UnsatisfiedLinkError: owm2 (No such file or directory)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:993)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:962)
at java.lang.System.loadLibrary(System.java:465)
at oracle.security.wallet.NZNative.(NZNative)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at oracle.security.admin.wltmgr.owma.OwmaApp.init(OwmaApp)
at oracle.sysman.emSDK.client.appContainer.WebApplication.launch(WebApplication.java:3446)
at oracle.sysman.emSDK.client.appContainer.WebApplication.main(WebApplication.java:3327)

To try to fix this error, we try to set the path for LD_LIBRARY_PATH to $ORACLE_HOME/lib but still the error persists. In the end , we found out that the error is due to the JDK , which we have upgrade from the existing 1.5 JDK to 1.6 JDK 64bit.

To fix it, we change the path in the file $ORACLE_HOME/bin/owm
JRE_HOME=/ApplTop/ias10gr2/app/product/10.1.3/jdk/jre
to JRE_HOME=/ApplTop/ias10gr2/app/product/10.1.3/jdk.orig/jre/ (Points back to original 1.5 JDK)

Monday, October 19, 2009

SQL Server 2000 - The process could not execute 'sp_replcmds'

Recently, in SQL Server 2000 we encounter the error
" The process could not execute 'sp_replcmds' " and also
" Timeout expired (Source: ODBC SQL Server Driver (ODBC); Error number: 0)"
this is due to recent password changed.

To solved this , right click the Distributor -> choose configure Publisher and
distributor properties and choose -> Click on the Publishers/Distributors and the "..." in the lists below and then set the sa passsword.



Replication information
http://www.replicationanswers.com/Transactional.asp

Thursday, October 08, 2009

How to install Oracle Client or Oracle Database into debian

Here are some of the links that you can follow to install the oracle client or Oracle xe on the debian

Oracle: Database for Debian installation guide
http://www.togaware.com/linux/survivor/Oracle_Database.html

Installing Oracle XE on Debian
http://www.debian-administration.org/articles/430

Installing Oracle XE on Debian
http://mediakey.dk/~cc/howto-install-oracle-on-debian/

Tuesday, August 18, 2009

Oracle Forms -REP-56055 exceeded max connections allowed Oracle Reports Error

If you encounter the error, REP-56055 exceeded max connections allowed Oracle Reports Error then you need to increased the number of database connection in the reports configuration file.



1. Goto $ORACLE_HOME/reports/conf/ , find your server report name e.g. TestReport.conf

2. find the connection maxConnect= and set it to a higher values.

3. Restart the reports services .



There is also a possibilities that after you increase to high value on the maximum database connection , the error still persists.



If so, then if your reports takes a long time to generated out and has many pages the possibilities are that the number of session in 1 reports engine more than the reports engine can handled.



Then you need to changed the engineid , engine id="rwEng" engLife="50" to lesser values such as 5 and increase your maxEngine from 1 to higher value like 5.

Monday, August 17, 2009

Oracle Application Server - Java OutOfMemory , Analyzing the javacore dump



  1. Download the IBM Thread & Monitor Dump Analyzer for Java at http://www.alphaworks.ibm.com/tech/jca


  2. Follow the guide in How to Diagnose Java Resource Starvation http://java.sys-con.com/node/921279?page=0,1


  3. Use the JDK 1.5 to run the jca.jar and open the javacore*.txt file with all the same thread file name. e.g. javacore147902.xxxxx.txt


  4. In the Compare Monitors of the tool, you will noticed the blocked by 1. Clicked the blocked for more information. In the state, “Monitor”, the action is “Owns Monitor Lock on Heap Lock” , that means it is currently owning the lock when the dump is initiated.


  5. Notice the last thread information on the detail. If the information is something like below, then it is possible that your application is logging to many data in the logs file and caused the locking issue.




  6. at
    java.util.AbstractCollection.toString(AbstractCollection.java(Compiled Code))at
    java.lang.String.valueOf(String.java(Compiled Code))at
    java.lang.StringBuffer.append(StringBuffer.java(Compiled Code))at
    org.apache.commons.lang.builder.ToStringStyle.appendDetail(ToStringStyle.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringStyle.appendInternal(ToStringStyle.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringStyle.append(ToStringStyle.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringBuilder.append(ToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(ToStringBuilder.java(Compiled
    Code))



  7. In our case, the logging is set by the Log4j , which we found out that the settings is set to full debug mode, we changed it to WARN mode. "log4j.rootLogger=DEBUG, app" to "log4j.rootLogger=WARN, app" , more information at here http://www.laliluna.de/log4j-tutorial.html


  8. After this, our application server java core dump is greatly reduce.

Thursday, July 16, 2009

Oracle Application Server - Java OutOfMemory Issue

If your Oracle application server 10.1.2 or Oracle Forms encounter the Java OutOfmemory issue, then you may need to changed your OC4J container java option in the opmn.xml to increase the heap memory. Add the following below , the start parameters and in the java-options.


data id="java-options" value="-Xms1024m -Xmx2048m -Xss256k "


The Xms specified the start of the heap memory , Xmx , specified the maximum memory settings for the java container. the Xss specified to set the maximum native stack size for any thread.





Starts from the 512m for the memory settings and the xss128k until the issue can be resolved.

After that, dcmctl updateconfig to update the configuration.





For more information, on the using of this Java parameters, please refer to



Fine-Tuning Memory Usage of 32-Bit Java on AIX

http://www.ibmsystemsmag.com/print/print.aspx?print_page=%2Faix%2Foctobernovember04%2Ftechnicalcorner%2F6643printp1.aspx&string_referer=/aix/octobernovember04/technicalcorner/6643p2.aspx



Forum on Java Outofmemory issue,

http://www.ibm.com/developerworks/forums/message.jspa?messageID=13853385



Metalink Note : 298551.1

OPMN and Process Monitoring



Metalink Note : 823504.1

What are the minimum and maximum sizes recommended for Java heap configuration for OC4J?

Running dbms_scheduler within a timing interval

To run a statspack snap within a scheduled timing , you can use the below, it will start the job at 8 am and run until 8pm from monday until friday.


exec dbms_scheduler.create_job(JOB_NAME => 'JOB_STATSPACK_SNAP',job_type=> 'PLSQL_BLOCK', JOB_ACTION => 'BEGIN STATSPACK.SNAP; END; ', START_DATE => trunc(sysdate) + 8/24 , REPEAT_INTERVAL => 'FREQ=HOURLY; BYDAY=MON,TUE,WED,THU,FRI; BYHOUR=8,9,10,11,12,13,14,15,16,17,18,19,20', ENABLED => TRUE, AUTO_DROP =>FALSE, COMMENTS =>'Statpacks snap') ;

another example , would be below running in between the time 8am til 8pm with interval 15 mins


exec dbms_scheduler.create_job(JOB_NAME => 'JOB_STATSPACK_SNAP',job_type=> 'PLSQL_BLOCK', JOB_ACTION => 'BEGIN STATSPACK.SNAP; END; ', START_DATE => trunc(sysdate) + 8/24 , REPEAT_INTERVAL => FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI,SAT,SUN; BYHOUR=8,9,10,11,12,13,14,15,16,17,18,19;BYMINUTE=0,15,30,45', ENABLED => TRUE, AUTO_DROP =>FALSE, COMMENTS =>'Statpacks snap') ;

To check if your calendar string is correct , you can use below to do this.


declare
L_start_date TIMESTAMP;
l_next_date TIMESTAMP;
l_return_date TIMESTAMP;
begin
l_start_date := trunc(SYSTIMESTAMP);
L_RETURN_DATE := L_START_DATE;
for ctr in 1..100 loop
DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING(
'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI; BYHOUR=8,20',
l_start_date, l_return_date, l_next_date
);
dbms_output.put_line('Next Run on: '
to_char(l_next_date,'mm/dd/yyyy hh24:mi:ss')
);
l_return_date := l_next_date;
end loop;
end;
/