Tuesday, December 7, 2010

Installation Websphere application Server

Hello Everyone,

Today we will disscuss about Installing IBM WebSphere Application Server, Sorry guys am not able to provide you screen shots
but following steps are sufficient for Installing WAS sucessfully.

Please find following steps to installing Websphere application server.

Step 1 Run launchpad.sh file from Websphere media.

Step 2 From the left of the launchpad choose the link Websphere Application Server Installation.

Step 3 Then click on the link Launch the installation wizard for the Websphere Application Server in the right side.

Step 4 Then click on the link Launch the installation wizard for the Websphere Application Server in the right side

Step 5 On the Welcome page press the Next button.

Step 6 Accept the license agreement and press the Next button.

Step 7 Once the system passes the prerequisite checks press the Next button.

Step 8 Leave the box for installing the sample applications unchecked and press the Next button.

Step 9 Leave the default installation directory as shown above and press the Next button.

Step 10 Leave the box for Enable administrative security checked.

Step 11 Press the Next button when your screen matches the one shown above.

Step 12 On the Installation Summary screen press the Next button to begin the installation. The installation will take some time.

Step 13 Once the installation is complete, click on the link for the AboutThisProfile.txt file.

Step 14 In the file that is opened, note the Profile name, Node name, and Host name.

Step 15 Close the test file showing the profile information.

Step 16 When the installation is complete press the Finish button. This will launch the First Steps console.

Step 17 Click the link for Installation verification. This will take some time.

Step 18 Make sure that you get a message that the verification is succeeded and completed.

Step 19 Close the verification window.

Step 20 In the First Steps window, click the link for Stop the Server.

Step 21 You will get the message “Server server1 stop completed”. Then close the window that showed the output of stopping the server.

Step 22 Click Exit on the First Steps window.

Step 23 Close the installation launchpad if it is still open.


I hope it will help you while installing IBM Websphere Application Server,

Enjoy working with Middleware.....

Regards,
Ajinkya

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

Thursday, October 28, 2010

How to Secure and Unsecure the AS Control 10g Console and Agent

I would like to share some methods secure and unsecure Oracle Application server control,,,

Securing Oracle AS control is very easy task...

So lets discuss, How to Secure and Unsecure the AS Control 10g Console and Agent Securing the AS Control Application

To secure the AS Control, follow these steps:

Step 1. Stop the AS Control

$ emctl stop iasconsole

Step 2. Secure the AS Control

$ emctl secure iasconsole

Step 3. Start AS Console again

$ emctl start iasconsole

Unsecuring the AS Control Application

To unsecure the AS Control, follow these steps:

Step 1. Stop the AS Control $ emctl stop iasconsole

Step 2. Update AS Control's standalone OC4J container to support unsecure port in

$ORACLE_HOME/sysman/j2ee/config/emd-web-site.xml

Change the following line:

" display-name="Oracle Enterprise
Manager iAS Console Website" secure="true">

Into:

" display-name="Oracle Enterprise
Manager iAS Console Website" secure="false">

Step 3. In the same file (emd-web-site.xml), you also need to modify the ssl-config
section at the bottom of the file

Change the following line:

keystore-password="%EMD_KEYSTORE_PASSWORD%" />

Into:

keystore-password="%EMD_KEYSTORE_PASSWORD%" />

Step 4. Update AS Control Local Management Agent to support the unsecure HTTP protocol.

The EMD_URL property in $ORACLE_HOME/sysman/config/emd.properties needs to
get switched back to the HTTP (non-secure) protocol.

Change:

EMD_URL=https://:/emd/main

Into:

EMD_URL=http://:/emd/main

Step 5. Update the standAloneConsoleURL property of oracle_ias target.

Edit the file $ORACLE_HOME/sysman/emd/targets.xml to change the
StandaloneConsoleURL property of oracle_ias target to switch back to the
HTTP (non-secure) protocol.

Change the following lines:

" ...> ...
VALUE="https://:/emd/console"/>

Into:

" ...> ...
VALUE="http://:/emd/console"/>

Step 6. Start the AS Control Application: $ emctl start iasconsole



I hope this help you in securing and unsecuring em console...

This activity comes very rarely.. but you can do it on test for R & D as i did :D

Regards,
Ajinkya

Tuesday, October 26, 2010

Configuration and deletion Oracle report server

As i started blogging few days back i have done some activities long back those activities m posting for you..

Now we will disscuss about how to configure report server in oracle Application server 10g.
We already have in-built report server but some client needs seprate report server for their application.
I came accross the same requirement few months back.

Here i am posting configuration and deletion of report server in oracle application server.


REPORT SERVER INSTALLATION for 10g:

Before installation stop all opmnctl services and

Then go through the cmd

E:\orabi\bin>addnewservertarget.bat servername

Servername whatever name you want, according you for example: samba

After that what we have to do update the dcmctl.bat file
Why this is so because this file will update the previous server and permit to add new target.
For this how to do there is cmd

E:\orabi\dcm\bin\dcmctl.bat updateconfig –ct opmn –v –d

It will create new server samba with .conf extension and you can see while open to it
By E:\orabi\report\conf\samba.conf

If you want to create instance synchronously, see next cmd

E:\orabi\dcm\bin\dcmctl.bat resyncinstance -v -d

Start the opmn services: opmn startall

Then check the status

You will see no. of instance what you have been created earlier
How many servers/instance are running on application server.
Afterthat open the samba.conf and do some changes
Put this code in comment like this way

< !--security id="rwSec" class="oracle.reports.server.RWSecurity">
< property name="securityUserid" value="tyKAUY845QnJ4GymcUvVwFjmIX0EZy6JDFeaf4mScBswXC9PiMkf86WKPq+DKuupojsfKr1fOcJwzVgaGFN0e0Smu1YPcHtzVwQjeEDc/+5h0n0qdlljjRPO7J6uLinuxAx8MaKeE3v+LyJlWPBuEgD91BDmzYWt3TjPvtpJfU0LlH/BxFyo18wlVfZNzeMojC3fOr84" confidential="yes" encrypted="yes"/>






Why we do this change:

This one time changes will gives better performance no need to change each and every time. it is related to SSO(Single Sign-On)
Above all cmd are configured the report server.






Following steps are for deleting report server from oracle application server configuration :


Steps for deleting report server:

Step 1: stop opmn
Step 2: stop EM console
Step 3: take a backup of opmn.xml
Step 4: Open opmn.xml.. there must be a entry related to your reports server. carefully delete that whole tag.
Step 5: Then do opmnctl validate opmn.xml to validate your opmn.xml.
Step 6: take a backup of targets.xml.
Step 7: open targets.xml.. There must be a entry for your reports server in that. Delete that whole tag from there.
Step 8: start opmn
Step 9: start EM Console.

How to change Weblogic Admin password ?

As I am working on different Middlewares. Oracle Weblogic Server is one of them.

Once I forgot my Weblogic admin password, i tried some time and then i have got solution for the same.

Thanks for the Oracle Metalink.

Following are the steps to recover an admin user when you have lost an administrator's password.

In my case i have created a userid "Weblogic" with a password "weblogicadmin123"

This post is for both Windows and Unix as well :

Step 1. From UNIX prompt cd to the WebLogic domain directory and run setEnv.cmd/setEnv.sh

Make sure your environment gets set correctly, check that WL_HOME is set. If not trying running setEnv.sh like this:

. ./setEnv.sh (there is a dot "." then a space then ./setEnv.sh)

Create an initialization file for the default authenticator

java weblogic.security.utils.AdminAccount adminuser weblogic .

Don't forget to add the "." it is needed.

This should produce a DefaultAuthenticatorInit.ldift in the domains directory.

Step 2. Delete the DefaultAuthenticatormyrealmInit.initialized from /webserv/DomainName/WebLogicAdmin/ldap

Step 3. Once you delete this file and try to start the admin server it gets recreated using the DefaultAuthenticatorInit.ldift file as a template.

Step 4. Rename the boot.properties file.

Step 5. Edit the setEnv.cmd/setEnv.sh file and change:

WLS_USER­=weblogic

WLS_PW=weblogicadmin123

Step 6. Reboot the admin server.

Step 7. Put the boot.properties file back to it's original name and change so it looks like the one below:

username­=weblogic

password=weblogicadmin1234

Step 8. Restart the admin server and those values will then get encrypted.

Step 9. You can now go into the console and fix the system password if you wish or keep using the adminuser account.

To fix the system password from the console, logon as adminuser and navigate to:

Security / Realms / myrealm / users - Click on system, Next to Password click on Change. Enter the new password and click apply.

Monday, October 25, 2010

configure Jboss and Apache in cluster mode....

I have done some techniqal R & D on Apache and JBoss in clustering mode.

System Requirement :

Operating System :

RHEL 5.4 in cluster mode. both have same configuration.
Jboss Application Server V4
Apache Server

I'll give steps how to implement JBOSS and Apache(cluster mode) in RHEL cluster mode.


--->Install JBoss as follows :

step 1:go to the directory where the JBoss installer zip file (jboss-as-distribution-6.0.0.20100429-M3.zip) is situated
$ mkdir jbossinstallationdir
$ cd jbossinstallationdir
jar -xvf jboss-4.2.2.GA.zip

--->ask system admin to install linux OS completely so that Apache is also installed with it


--->download apache-tomcat connectors for jboss integration with apache


--->install the mod_jk.so as below :

Step 1:
Change to the connector installation directory> cd $CONNECTOR_HOME/jk/native


Step 2:
Run the build command> ./buildconf.sh


Step 3:
Run the configure command to link it to apache> ./configure --with-apxs=/usr/local/apache/bin/apxs


Step 4:
Make the package> make


Step 5:
Install the package> make install

Step 6:
verify if the mod_jk.so has been installed in the Apache modules directory /usr/lib/httpd/modules



--->configure Apache with mod_jk.so


step 1 :Add this line at the very bottom in /etc/httpd/conf :

# Include mod_jk configuration file
Include conf/mod-jk.conf



Step 2: Create the modjk config



Under /etc/httpd/conf, create mod-jk.conf and populate it as follows:


# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so

# Where to find workers.properties
JkWorkersFile conf/workers.properties

# Where to put jk logs
JkLogFile logs/mod_jk.log

# Set the jk log level [debug/error/info]
JkLogLevel info

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

# JkOptions indicates to send SSK KEY SIZE
# Notes:
# 1) Changed from +ForwardURICompat.
# 2) For mod_rewrite compatibility, use +ForwardURIProxy (default since 1.2.24)
# See http://tomcat.apache.org/security-jk.html
JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories

# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"

# Mount your applications
JkMount /__application__/* loadbalancer
# Let Apache serve the images
JkUnMount /__application__/images/* loadbalancer

# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties

# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
# Note: Replaced JkShmFile logs/jk.shm due to SELinux issues. Refer to
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225452
JkShmFile run/jk.shm

# Add jkstatus for managing runtime data

JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1




Note - mod_jk is ready to forward requests to JBoss instances. We need now to setup the workers



Step 3: Configuring workers



Under /etc/httpd/conf, create workers.properties and populate it as follows:

# Define list of workers that will be used
# for mapping requests
# The configuration directives are valid
# for the mod_jk version 1.2.18 and later
#
worker.list=loadbalancer,status


# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=node1.mydomain.com
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.prepost_timeout=10000 #Not required if using ping_mode=A
worker.node1.connect_timeout=10000 #Not required if using ping_mode=A
worker.node1.ping_mode=A #As of mod_jk 1.2.27
# worker.node1.connection_pool_size=10 (1)

# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host= node2.mydomain.com
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.prepost_timeout=10000 #Not required if using ping_mode=A
worker.node2.connect_timeout=10000 #Not required if using ping_mode=A
worker.node2.ping_mode=A #As of mod_jk 1.2.27
# worker.node1.connection_pool_size=10 (1)

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2

# Status worker for managing load balancer
worker.status.type=status



Important Note : Replace vales of worker.node1.host and worker.node2.host with actual server node hostname or ip-addresses.

Step 4 :copy workers.properties.minimal to /etc/httpd/conf

Note - This file contains the workers names

Step 5: Create the URI to worker map file



Create a uriworkermap.properties file in the /etc/httpd/conf directory. This file should contain the URL mappings you want Apache to forward to Tomcat. The format of the file is /url=worker_name. To get things started, paste this example into the file you created:

# Simple worker configuration file
#

# Mount the Servlet context to the ajp13 worker
/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/myapp/*=loadbalancer
!/myapp/images/*=loadbalancer
/admin/*=wlb
/manager/*=wlb
/jsp-examples/*=wlb
/servlets-examples/*=wlb
/examples/*=wlb

This will configure mod_jk to forward requests for the /jmx-console, /web-console and /myapp contexts to JBoss Web. The '!' at the beginning of the last line results in the URLs for the images dir in the myapp context not being forwarded. Instead httpd will handle them directly (which means they must be available on the httpd server).



Step 6: Restart Apache



Step 7:

Note : In node1 and node2 , do the following

* In JBoss 5, it's $JBOSS_HOME/server/all/deploy/jbossweb.sar/server.xml


(In the examples above, replace /all/ with the name of the AS configuration you are running.)




Locate the element and add an attribute jvmRoute:


.


The jvmRoute attribute value must match the name specified in workers.properties.



In the server.xml file, make sure that the AJP 1.3 Connector is uncommented, e.g.:




emptySessionPath="true" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" connectionTimeout="600000" maxThreads="200"/>

step 8 :Go to $JBOSS_HOME/server/all/deploy/jboss-web.deployer/META-INF/jboss-service.xml file (replace /all with your own server name). Locate the element with a name of UseJK, and set its value to true:

true

Step 10: Restart JBoss AS.



Step 11: Access the JBoss AS web-console through Apache by browsing to http://localhost/web-console and you should see the JBoss web console page.

configuration Apex with Oracle DB 11g R2......

Today I come across one requirement which is configuration of Oracle Application Express on oracle DB 11g R2.

First we will talk about Oracle Application Express (i.e. Apex):

Oracle Application Express (Oracle APEX) is a rapid web application development tool for the Oracle database. Using only a web browser and limited programming experience, you can develop and deploy professional applications that are both fast and secure. Oracle APEX is a fully supported, no cost option of the Oracle database.

Oracle Application Express Architecture features:

Forms Conversion [3.2] – Enables the loading of Oracle Forms source into an Oracle Application Express project and generate an initial APEX application.

Interactive Reports [3.1] – An innovative new technology that allows end users to customize reports. By putting more power in the hands of users it reduces development time and effort while simultaneously enhancing application functionality.

Web Services Integration [3.1] – Ability to easily integrate with services through either built-in Web service support or through lower level PL/SQL UTL_HTTP package calls.

Optional Runtime-Only Deployment [3.1] – Ability to install just a runtime APEX environment via SQL scripts for production environments, minimizing installed footprint and increasing security.

PDF Printing [3.0] – Integrate with Report Server (Oracle BI Publisher, Apache FOP, or XSL-FO) to produce PDF, XLS, HTML outputs. Can define multiple report queries and load custom RTF or XSL-FO templates.

Flash Charts [3.0] – Create professional charts using Adobe Flash

MS Access Migration [3.0] – Use SQL Developer Migration Workshop to migrate the Access schema and data. Then migrate the Access Forms, Reports and Queries using APEX to generate a first-cut design

Implementation Oracle Application Express(APEX) on Oracle DB 11g R2 on windows :

Step 1:

Go to Following path(i.e, Apex path) :

C:\>cd C:\app\Administrator\product\11.1.0\db_1\apex

Step 2:

Connect Database from following path with Sys user :

C:\app\Administrator\product\11.1.0\db_1\apex>sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 22 11:45:56 2010

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode,log_mode,database_role from v$database;

NAME OPEN_MODE LOG_MODE DATABASE_ROLE

--------- ---------- ------------ ----------------

11gDB READ WRITE NOARCHIVELOG PRIMARY

Step 3 :

Run following Script apxconf.sql and answer questionnaires for the same :

SQL> @apxconf.sql

PORT

----------

8080

Enter values below for the XDB HTTP listener port and the password for the Application Express ADMIN user.

Default values are in brackets [ ].

Press Enter to accept the default value.

Enter a password for the ADMIN user [] ADMIN

Enter a port for the XDB HTTP listener [ 8080] 8080

...changing HTTP Port

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Session altered.

...changing password for ADMIN

PL/SQL procedure successfully completed.

Commit complete.

SQL> $ HOSTNAME

oracledb

To find workspace name and Apex user run following query :

SQL> SELECT WORKSPACE_NAME FROM APEX_WORKSPACE_APEX_USERS;

WORKSPACE_NAME

--------------------------------------------------------------------------------

INTERNAL

SQL> desc APEX_WORKSPACE_APEX_USERS

Name Null? Type

----------------------------------------- -------- ----------------------------

WORKSPACE_ID NOT NULL NUMBER

WORKSPACE_NAME NOT NULL VARCHAR2(255)

FIRST_SCHEMA_PROVISIONED NOT NULL VARCHAR2(30)

USER_NAME NOT NULL VARCHAR2(100)

EMAIL VARCHAR2(240)

DATE_CREATED NOT NULL DATE

DATE_LAST_UPDATED NOT NULL DATE

AVAILABLE_SCHEMAS NUMBER

IS_ADMIN VARCHAR2(3)

IS_APPLICATION_DEVELOPER VARCHAR2(3)

SQL> select user_name,workspace_name from APEX_WORKSPACE_APEX_USERS;

USER_NAME

--------------------------------------------------------------------------------

WORKSPACE_NAME

--------------------------------------------------------------------------------

ADMIN

INTERNAL

And run following url to get apex CONSOLE:

HTTP://LOCALHOST:8080/apex

and enjoy development with apex..