Tuesday, November 30, 2010

While applying patch on Oracle Application server OIDLDAPD COULD NOT BE STARTED AFTER APPLYING DB PSR 10.1.0.5

Hello Everyone,

We have face some issues after upgrading Oracle Application Server from 10.1.2.0.2 to 10.1.2.3.0 on solaris platform, i was not able to LDAPBIND on the same server.
I found that after upgrading DB, some infrastructure services like OID and OC4J_Security components gets down.

We have found some metalink documents for the same. we use the following workaround to resolve the issue .


Reference :

OIDLDAPD COULD NOT BE STARTED AFTER APPLYING DB PSR 10.1.0.5
ODIHRAGENT: SYMBOL LPMATTERM: REFERENCED SYMBOL NOT FOUND


The following is only applicable with installations where Oracle Internet Directory (OID) is installed. (e.g., Identity Management home, or a full Infrastructure home). This will not be applicable on Mid-Tier installations, or where there is a non-colocated Infrastructure, where the Metadata Repository is in a separate home.

The oidldapd could not be started after applying DB Patch Set 10.1.0.5 to AS 10.1.2.0.2 in Solaris. This may also have a symptom of OC4J_SECURITY not starting, or /oiddas not accessible. The DB 10.1.0.5 Patchset will otherwise seem successful. This issue will only arise while attempting to startup and use Oracle Application Server OID components.This may be prevented before the patchset installation, or fixed after the patchset installation, using the following methods:

Scenario I. Optional:

Before the installation of the 10.1.0.5 patchset, back up the "libldapclnt10.a" file:


> cp -p $ORACLE_HOME/lib32/libldapclnt10.a $ORACLE_HOME/lib32/libldapclnt10.a_10.1.2.0.2

Restore it after applying DB Patch Set 10.1.0.5, and go to Step II-5, below.

> mv $ORACLE_HOME/lib32/libldapclnt10.a_10.1.2.0.2 $ORACLE_HOME/lib32/libldapclnt10.a

Scenario II. If not able to perform Optional Step I, (DB 10.1.0.5 Patchset already installed to AS 10.1.2.0.2 home, and libldapclnt10.a not backed up), then follow the full workaround:


Step 1. Take the following file from AS 10.1.2.0.2 CD #1 ("Disk1"):

stage/Component/oracle.rsf.ldap_rsf/10.1.2.1.0/1/DataFiles/lib.1.1.jar

Step 2. Execute the following command for getting "libldapclnt10.a0":

> jar xvf lib.1.1.jar

Step 3. Back up the "libldapclnt10.a":

> mv $ORACLE_HOME/lib32/libldapclnt10.a $ORACLE_HOME/lib32/libldapclnt10.a_10.1.0.5

Step 4. Copy the "libldapclnt10.a0":

> cp -p libldapclnt10.a0 $ORACLE_HOME/lib32/libldapclnt10.a

Step 5. You will need to edit the $ORACLE_HOME/bin/relink script with the following:

a.) Update $ORACLE_HOME/ldap/lib/ to $ORACLE_HOME/ldap/lib32

b.) Ensure make points to correct location of make executable on the OS

Before:

MAKE="/usr/bin/make" # full path to make

After:

#MAKE="/usr/bin/make" # full path to make
MAKE="/usr/ccs/bin/make" # full path to make

Step 6. Run the following command to relink:

cd $ORACLE_HOME/ldap/lib32

make -f ins_ldap.mk install

Scenario III. Possible: (If using OID ports below 1024, ownership and permissions may need to be edited): After a relink, OID executables (e.g., oidmon, oidldapd,oidrepld) will be set back to oracle ownership and permissions will be changed.This will prevent OID from starting if OID ports in use are below 1024. The oidldapd must be owned by root with oracle group ownership.

Setting the ownership/permissions back to the way it was after the initial install is typically done by re-running root.sh as root. However, the Database Patchset renames the original root.sh to root.sh.old, and it leaves a root.sh in its place that does not correct the OID executables.

To fix this, manually cat or vi the root.sh.old and search for "oid" (lowercase), and then manually apply all the chmod's and chown's changes to the oid executables listed in root.sh.old. The exact items may differ on installation types, so your root.sh.old is the best location to validate.

Permissions for oidldapd, oidmon, and oidrepld should be as follows:

-rwsr-x--- 1 root dba 2570620 May 23 12:34 oidldapd
-rws------ 1 oracle dba 2662384 May 23 12:34 oidmon
-rws------ 1 oracle dba 2704172 May 23 12:34 oidrepld

Commands to obtain proper permissions:

chmod 4750 oidldapd
chmod 4700 oidmon
chmod 4700 oidrepld

Note: This bug and stated workarounds were provided by Oracle Development at the time of the issue. Since the Oracle Internet Directory Support team is continually seeing different situations.


We have solve the issues with this workaraound, hope it will help you..... :)

Enjoy Working with middlewares and Administration.


Regards,
Ajinkya Vichare

How to change database character set :

Hello Everyone,

Today i came accross one warning (i.e change your character set to AL32UTF8) while running RCU for SOA metadata repository.

I have serached it on web and i found one solution for the same, as i am doing R & D test so i tried on that database,

And it works for me,


This article gives a overview of methods to change the database character set step by step :

Step 1. Check NLS_CHARACTERSET

Connect to user SYS or SYSTEM

SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';

Parameter Value
NLS_CHARACTERSET TH8TISASCII

If you want to change NLS_CHARACTERSET from TH8TISASCII to AL32UTF8,

Step 2. Connect to user SYS

Step 3. Update value

> UPDATE PROPS$ SET VALUE$ = 'AL32UTF8' WHERE NAME = 'NLS_CHARACTERSET';

> COMMIT;

Step 4. Restart database

> SHUTDOWN IMMEDIATE;

> STARTUP;

Step 5. Check NLS_CHARACTERSET

Connect to user SYS or SYSTEM

> SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';

Parameter Value
NLS_CHARACTERSET AL32UTF8

This works me fine for me, any suggestion on the same are welcome..

Waiting for your suggestion on the same.


Thank you

Regards,
Ajinkya Vichare

Thursday, November 25, 2010

Changing the password of Application Express internal ADMIN account

Hi Everyone,

Today I come across oracle Application Express (APEX) (version 3.0.1) issue.
One of my client has forget his internal ADMIN account password.

So to change the password without knowing the old password, I login as SYS into the Database Server and run the following script.

SQLPLUS> @C:\oracle_home\apex\apxxepwd.sql new_password

Where “C:\oracle_home\apex” is APEX_HOME directory.

I have check the exact working of the above script now we will discuss about :

What this script is doing is as follows:

First it changes the current schema to “FLOWS_030000″

alter session set current_schema = FLOWS_030000;

The set the security group id and and user name using wwv_flow_security package as follows:
wwv_flow_security.g_security_group_id := 10;
wwv_flow_security.g_user := ‘ADMIN’;

The change the status as “import in progress” using wwv_flow_security package
wwv_flow_security.g_import_in_progress := true;

Then get the internal user id of the “ADMIN” with a security group of 10.
for c1 in (select user_id
from wwv_flow_fnd_user
where security_group_id = wwv_flow_security.g_security_group_id
and user_name = wwv_flow_security.g_user) loop

Then edit the user using wwv_flow_security package as follows:
wwv_flow_fnd_user_api.edit_fnd_user(
p_user_id => c1.user_id,
p_user_name => wwv_flow_security.g_user,
p_web_password => ‘&1′,
p_new_password => ‘&1′);
end loop;

The change the status back to normal using wwv_flow_security package
wwv_flow_security.g_import_in_progress := false;


That way i have changed my APEX Admin internal password without knowing my old password,
for this i have take some forums and blogs reference. Thnx 2 them..
I hope it will help you in such situations.

Regards,
Ajinkya Vichare

Tuesday, November 23, 2010

How to Deal with OutOfMemoryError.

Hi Everyone,

In Middleware Technologies we always come accross OutOfMemoryErrors ( especially WebSphere Application Server and Weblogic Application Server).
We will talk about the possible causes and how to deal with Memory leak.

There are three possible causes for an OutOfMemoryError.

The first is that the JVM has a real memory leak, caused by a bug in the internal implementation of the JVM heap management. This is extremely unlikely. All JVMs are tested very strenuously for this, and it would be the absolute top priority bug if anyone found such a bug.So you can pretty much eliminate this possibility.

The second possible cause of an OutOfMemoryError is that you simply haven't got enough memory available for the workings of your application.

There are two possible solutions to this situation, either increase the available JVM heap size, or decrease the amount of memory your application needs.

Increasing the available JVM heap size is simply done with the -Xmx parameter to the JVM. If you still have the memory problem because you have already increased this parameter as much as possible (up to available RAM, don't exceed real system memory or your application will page and crawl to a halt), then you need to reduce the amount of memory being used by your application.

Reducing application memory may be simple, you may just be allowing some collections to be too big, for example using many large buffers. Or it can be complex, requiring you to reimplement some classes, or even redesign the application.

Reader James Stauffer has pointed out that with some JVMs (e.g. the Sun JVMs), there is also a "Perm" space which holds JVM structures and class objects. If you are using a very large number of classes, it is possible to run out of space in "Perm" space, and you may need to increase the size of that space, e.g. with the Sun JVM using the -XX:PermSize and -XX:MaxPermSize options.

The third possible cause of an OutOfMemoryError is the most common, unintentional object retention. You are hanging on to objects without realizing it and this is causing your heap to grow and grow until you have nothing spare.

Dealing with an OutOfMemoryError:

Is it an internal JVM bug? Extremely unlikely. Highest priority JVM bug if true (so how come no one else has found it yet?)

Not enough memory for actual application needs?

Two options: Increase the maximum heap size with -Xmx parameter (or Perm space size with -XX:MaxPermSize); or Decrease the amount of memory needed by using smaller collections/caches/tables/objects/..., i.e. by tuning object sizes, by redesign, and by reimplementation Unintentional object retention? Find the root object holding on to the unintentionally retained objects, and change it to release those objects.

A summary of the procedure is Wait until the application has reached the steady state, where you would expect most new objects are temporary objects that can be garbage collected; typically this is after all the application initializations have finished. Force a garbage collection, and take an object snapshot of the heap. Do whatever work it is that is causing unintentionally retained objects. Force another garbage collection and then take a second object snapshot of the heap.

Compare the two snapshots to see which objects have increased in number from the first snapshot to the next. Because you forced garbage collections before the snapshots, the objects left should all be objects referenced by the application, and comparing the two snapshots should identify exactly those newly created objects that are being retained by the application. Using your knowledge of the application, determine from the snapshot comparison which of the objects are being unintentionally retained.

Track back-references to find which objects are referencing the unintentionally retained objects, until you reach the root object that is causing the problem.


I hope it will help you to overcome from outofmemory errors.

Regards,
Ajinkya

Tuesday, November 9, 2010

Display the Images in Forms using oracle Application server

Hello Everyone,

Today we will disscuss on Displaying images in forms using oracle application server.
In application there are lots of images which is very hectic to manage,
For that we make an jar file an import it to oracle application server.

It works for me.. i hope it will work you too...

Display the Images in Forms using oracle Application server:

This document describes how to implement gif/jpg icons on buttons for Forms
using Oracle Application Server. This is done by defining
a virtual directory containing the icons and directing the Forms Runtime to
use that directory.


When running an Oracle Forms10g application the icon files used must be in
a web enabled format such as JPG or GIF (GIF is the default format) (This is
unlike older versions of forms running in client-server mode when the file
format is .ico.)

Icon image files can either be retrieved by Forms as individual files on the
file system or from a Java Archive (JAR file). If an application uses lots of
icon images it is recommended that they are stored in a JAR file to reduce the
number of HTTP round trips.


Steps:

Below are the Steps for displaying the Images on Oracle Application server10g:



Step 1) Determine the physical location of the icons on your web server. For this example,
assume that the icons are stored in D:\Myfiles\icons.

Step 2) Create the virtual directory in the forms.conf file that point to the location of
your Forms10g icons. This file is located in:

$ORACLE_HOME\forms\server\forms.conf

To define a virtual directory forms/icons, use the following syntax:

# Virtual path for ICONS (used to show icons in a form )
AliasMatch ^/forms/icons/(..*) "D:\Myfiles/icons/$1"


Below is an example of the forms.conf after it has been modified to include the
/forms/icons virtual directory.

# Virtual path mapping for Forms Java jar and class files (codebase)
AliasMatch ^/forms/java/(..*) "E:\APP/forms/java/$1"
# Virtual path for JInitiator downloadable executable and download page
AliasMatch ^/forms/jinitiator/(..*) "E:\APP/jinit/$1"
# Virtual path for runform.htm (used to run a form for testing purposes)
AliasMatch ^/forms/html/(..*) "E:\APP/tools/web/html/$1"

# Virtual path for ICONS (used to show icons in a form )
AliasMatch ^/forms/icons/(..*) "D:\Myfiles/icons/$1"


Step 3) Direct forms to use the /forms/icons
virtual directory when running on the web by
modifying the Registry.dat file in the
$ORACLE_HOME\forms\java\oracle\forms\registry

directory. Note that for UNIX, both the path name and file name are case sensitive. You
must specify "Registry.dat".

Modify the default.icons.iconpath entry as follows:

default.icons.iconpath=http:///forms/icons/

If the URL used to bring up forms on the web is:
http://hostname:7778/forms/frmservlet

Then the entry required for the Registry.dat will be:

default.icons.iconpath=http://hostname:7778/forms/icons
default.icons.iconextension=gif

Step 4) Now use EM Website to:
a) Restart the OC4J-BI-Forms Instance
b) Restart the BI-FORMS HTTP Server Instance.




Step 5) Verify that the virtual directory has been defined properly and that the icons can be
viewed in a browser. Assuming that exeqry.gif exists in the D:\Myfiles\icons directory,
the following URL should show the icon:

http://hostname:7778/forms/icons/exeqry.gif



Step 6) Check the form :

http://hostname:7778/forms/frmservlet?form=D:\Testcases\F10g\ICON_CHECK.fmx



After doing this still you are facing the problem in displaying the Images on Oracle Application Server ;

Do following testing and some solutions are provided below:

Solutions/Testing:
Testing and workarounds for the same..in case of any issues given below..

Icons do not appear in the browser using the URL:

  • Verify that you are using the correct machine name and port for the OC4J_BI_Forms object.
  • Check the virtual directory name to make sure that there are no typographica errors.
  • Check for typographical errors in the forms.conf for the virtual directory.
  • Check the name of the icon on the file system. If the file is saved as
  • Exeqry.gif, then it will not be found using the URL

http://hostname:7778/forms//exeqry.gif

When icons do not appear on the form:

1) Test to see that the icon appears on your form by running the form. If the icon does not appear:
  • Check the Registry.dat for typographical errors for the "default.icons" entries.
  • Verify the name specified in the "Icon Filename" property of the form matches the case of the icon on the file system.
  • If the property contains "EXEQRY", but the icon on the file system is named exeqry.gif, the icon will not appear when you run the form.

2) If icons are still not appearing on the form try these suggestions:
a) Close all of your existing, running forms and browser windows.

Delete all the old cached files from

For JInitiator 1.3.1.X:
Go to Control Panel->JInitiator 1.3.1.X->Cache Tab ->Click Clear Cache


Clear the browser cache:
------------------------
For IE : Tools menu->Internet Option->Delete all files

Close all your browser sessions and open a new browser window. Execute
the URL to bring up from the Form Builder runtime or from the browser.


b) Disable applet caching by setting or adding the jinit_appletcache="off"
in the HTML files:
$ORACLE_HOME/forms/server/base.htm
$ORACLE_HOME/forms/server/basejini.htm
$ORACLE_HOME/forms/server/basejpi.htm
$ORACLE_HOME/forms/server/baseie.htm

Close all your browser sessions and open a new browser window. Execute
the URL to bring up from the Form Builder runtime or from the browser.


All the best..

Regards,
Ajinkya Vichare

Monday, November 8, 2010

Weblogic Errors and Solutions

I have came accross following errors while working on weblogic Server. i have found workaround for the same.


Error :Weblogic.server.ServiceFailureException: Error initializing Embedded LDAP Server -java.lang.ClassCastException:com.octetstring.vde.backend.BackendRoot

Solution : remove ldap folders from /Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/data/ and try restarting weblogic servers


Error : com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte

Solution :

Step 1. Change encrypted passwords to cleartext passwords.

The username/password encryptions can be re-generated for the domain/machine combination by changing the encrypted values to clear text values and rebooting the server.

The files that need to be changed are:

In the domain directory:

boot.properties (boot.properties may not be present. If it's not present, no need to do anything with it)

config.xml

The values in boot.properties will look something like:

username={3DES}pxyIL8dxDy1JnDPs+i3dDA==
password={3DES}pxyIL8dxDy1JnDPs+i3dDA==

Change them to your cleartext username/password like:

username=user1
password=password1

And then the config.xml values will look something like:

PasswordEncrypted="{3DES}pxyIL8dxDy1JnDPs+i3dDA=="CredentialEncrypted="{3DES}944KTXGlE7JuekQFWdG18t2sAaDIBIIudll3xYv8CjU="

Change them to:

Password="password1"
Credential="password2"

You may also have to change the password values in your application-config.xml file, if they exist in there.

Just look for the same {3DES} encryption value that you changed in the config.xml and boot.properties files and change those value(s) to cleartext also,if they exist.

They may or may not exist depending on your application.

Your application-config.xml file is located in the /user_projects/applications//META-INF directory.

For example, the password might look something like:

AdminPassword="{3DES}pxyIL8dxDy1JnDPs+i3dDA=="

Change it to:

AdminPassword="password1"

Make sure you reboot the server after any of these changes.

Step 2. Reset the Embedded LDAP Credential.

If you're receiving the Embedded LDAP JSAFE_PaddingException you'll need to reset the Embedded LDAP Credential in the WebLogic Server Console.

In the console under the domain, go to Security and click on the Embedded LDAP tab.

Set the credential to anything you want and confirm it. Apply the changes and reboot the server.

step 3. Create a new domain on the new machine using the Configuration Wizard.

Step 4. Use the EncryptDomainString Utility to generate the new encrypted passwords.


I hope it'll help you in such situation....

Be happy

Regards,
Ajinkya

Tuesday, November 2, 2010

How to configure Weblogic Server with HTTP server

How to configure Weblogic Server with HTTP server :

Step 1. Install WebLogic Server and define server listening on port 7001.

Step 2. Install Apache HTTP server 2.2.

Step 3. Download the WebLogic Apache plug-in from:

http://www.oracle.com/technology/products/weblogic/index.html

Step 4. Unzip and copy:

$Weblogic_domain\wlserver_10.3\server\plugin\win\32\mod_wl_22.so to apache_home/modules directory


Step 5. Add the following to httpd.conf file by substituting the values for IP addresses and ports for your environment:

LoadModule weblogic_module modules/mod_wl_22.so


<
IfModule mod_weblogic.c>

WebLogicCluster node1_ip:port,node2_ip:port

>


<
Location /webui>

SetHandler weblogic-handler

>


<
Location /ormconsole>

SetHandler weblogic-handler

>


Step 6. Restart Apache and all WebLogic servers.



hope it will help.....

Regards,
Ajinkya

Renewed webutil jar files after upgrading Oracle AS 10.1.2.x

Hello Everyone,

We all came accross the scenario like after upgrading oracle application server from version 10.1.2.0.2 to 10.1.2.x webutil fuctionality dosenot works in Application.
Becasue we need to upgrade webutil jar also according to oracle application server version i.e. 10.1.2.x.

So will disscuss about steps to renew webutil jar files.

Steps to find renewed webutil jar files from patch (5983622 for application) :

STEP 1. Unzip the patchfile (i.e 5983622 (application patch) ) to a folder.

STEP 2. Open a shell or a CMD window on your OAS server.

STEP 3. Ensure that the ORACLE_HOME environment variable is correctly pointing to
your IAS 10.1.2 instance.

You can check this with the command :

On Linux/Unix:
echo $ORACLE_HOME

On Windows:
echo %ORACLE_HOME%

STEP 4. Add in the PATH environment variable the path to jdk\bin from your IAS
installation:

For Linux/Unix:
export PATH=$PATH:$ORACLE_HOME/jdk/bin

For Windows:
set PATH=%PATH%;%ORACLE_HOME\jdk\bin

STEP 5. Go to folder
Patch1012x/Disk1/stage/Patches/oracle.developer.forms.builder/10.1.2.3.0/1/DataFiles/
(for Linux/Unix)

OR

Patch1012x\Disk1\stage\Patches\oracle.developer.forms.builder\10.1.2.3.0\1\DataFiles\
(for Windows)

STEP 6. Here you would have a file webutil.jar containing a file frmwebutil.jar
(Linux/Unix) or a file webutil.2.2.jar containing a file frmwebutil.jar0 (Windows) .

To check if the file is the right one run the following command and you should see the files in the archive and the size of frmwebutil.jar (Linux/Unix) or frmwebutil.jar0 (Windows):

Linux/Unix:
jar tvf webutil.jar
will show: 282640 Mon Oct 09 22:45:58 EEST 2006 frmwebutil.jar (in 10.1.2.2)

Windows:
jar tfv webutil.2.2.jar
will show: 282645 Thu Oct 12 07:01:44 EEST 2006 frmwebutil.jar0 (in 10.1.2.2)

STEP 7. Extract the file from the JAR archive:

Linux/Unix:
jar xf webutil.jar forms/java/frmwebutil.jar

Windows:
jar xf webutil.2.2.jar frmwebutil.jar0

This should create a file frmwebutil.jar (Linux/Unix) or frmwebutil.jar0 (Windows) in the folder:

Patch1012x/Disk1/stage/Patches/oracle.developer.forms.builder/10.1.2.3.0/1/DataFiles/

STEP 8. Make a backup of frmwebutil.jar from the IAS 10.1.2.x installation.

The frmwebutil.jar is located in ORACLE_HOME/forms/java.

For Linux/Unix:
mv $ORACLE_HOME/forms/java/frmwebutil.jar $ORACLE_HOME/forms/java/frmwebutil.jar.old

For Windows:
ren %ORACLE_HOME%\forms\java\frmwebutil.jar %ORACLE_HOME%\forms\java\frmwebutil.jar.old

STEP 9. Copy and rename the file that you extracted to ORACLE_HOME/forms/java.

For Linux/Unix:
mv frmwebutil.jar $ORACLE_HOME/forms/java/frmwebutil.jar

For Windows:
ren frmwebutil.jar0 %ORACLE_HOME%\forms\java\frmwebutil.jar

After moving those file sign frmwebutil.jar and check your application as follows :

for Windows :
sign_webutil.bat ORACLE_HOME\forms\java\frmwebutil.jar

For Linux :
sign_webutil.sh $ORACLE_HOME\forms\java\frmwebutil.jar


Note : also move extracted webutilbase.htm,webutiljini.htm and webutiljpi.htm file to specified location i.e. $ORACLE_HOME/forms/server/.

And run your forms firstly with administrator user to install JINITIATOR again...

I hope it will work for u..

Regards,
Ajinkya