Tuesday, August 28, 2012

I am Featured in Oracle Magazine September 2012 issue

Hi,

Its a great honor for me that my profile featured in Peer to Peer section of Oracle Magazine in September 2012 issue. I believe that issue will be main issue for Oracle Open World 2012 as well.

Check the following link Oracle Magazine Peer to Peer September 2012



I am thankful to all who supported through out my career so i can dream of this day and also to people who visited this blog and found it helpful.

P.S. Lot of people asking about the photo...Its Grand canyon Arizona i visited there after collaborate 2012 conference in Las Vegas.

Cheers,
Zeeshan Baig
Follow me Twitter @baigsorcl

Wednesday, July 18, 2012

Sharing Common Connections Between JDeveloper Machines

Hi,

In order to work in a team environment JDeveloper offers many small nuggets that can make our life easier and implement development standards.

In this post we will take a look how to export and import application servers, database connections from one  Jdeveloper machine to another. You can even store these connections in your source control system to share.

Resource Palette:

You will find common place for all connections in JDeveloper under Resource Palette. Click View menu and select Resource Palette




Exporting Connection:

Right click on your desired connection and choose Export, select which connections you want to export and provide the destination, click OK the resulting window will give you the status






Save the destination file to source control or network drive (optional):


For better teamwork i would recommend to store these connections in source control system as shown in the slide i have a folder in Visual SVN repository called Connections and under that the exported file from JDeveloper.






Importing a Connection into JDeveloper


Now developers can export the connections from source control system to their file system and import connections into JDeveloper.






There you go hope you find the post useful feel free to comment. More gold nuggets to follow.

Happy JDeveloping,
Zeeshan Baig






Friday, July 6, 2012

Solution to fix Exception java.lang.NoClassDefFoundError While running weblogic commands from console

Hi,

A quick one here. Most of us might experienced this when try to run weblogic.Deployer or any weblogic related command from console or shell prompt you see something like this

C:\>java weblogic.Deployer
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Deployer
Caused by: java.lang.ClassNotFoundException: weblogic.Deployer
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: weblogic.Deployer.  Program will exit.

The problem is NOT with your installation or configuration but actually java is not able to find classes related to weblogic

Solution:

The solution is to add the JAR file into the CLASSPATH variable.

C:\> set CLASSPATH=%CLASSPATH%;D:\Oracle\Middleware1035\wlserver_10.3\server\lib\weblogic.jar

Note:  Change above command as per your environment Linux or Windows also i saw some people add the location of the folder to Classpath which will not fix the issue you should provide the name of the JAR file as mentioned above.

You can see in the slide how the error gone by adding CLASSPATH to the environment.


Monday, July 2, 2012

My Presentation from Kscope 2012 Conference

Hi,

Kscope 2012 conference was a great event for me i am thankful to ODTUG management by providing me this opportunity also OTN who gave me opportunity to be on Fusion middleware panel during Lunch n Learn session.

You can view my presentation from Kscope from my slideshare account. I will post separate blog on the demo details.


Monday, June 4, 2012

My Interview featured in May 2012 OTN Harvest

Hi,

Its been a great honor for me to be featured in OTN Harvest Spotlight. I am thankful to Oracle to recognized my contribution and to all visitors of this blog by providing positive feedback which helps be keep going

You can find the digest online on Oracle’s website using following link http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#OtnHarvest


And download the issue http://www.oracle.com/technetwork/developer-tools/adf/learnmore/may2012-otn-harvest-1652358.pdf

Happy JDeveloping,
Zeeshan Baig

Wednesday, May 9, 2012

How to Change JDK used by Weblogic Server

Hi all,

Sometime it is required to switch JDK used by weblogic server for example from Sun to JRockit (which gives better performance). Another use case could be to switch from 32 to 64 bit JDK as well as latest supported JDK. To verify supported JDK version check Oracle FMW support matrix


In this post we will switch JDK from Sun to JRockit and i assume we are on Linux environment find same configuration file name with .CMD extension if you are on windows.

Installing new JDK:


First step is to install your desired JDK. Follow these steps to install

1. Download JRockit JDK from OTN

2. FTP the file to server and unzip it by running following command

$ unzip  jrockit_282V30318-01.zip

3. The file will be extracted with .bin extension, change the permission and make it executable.

$ chmod 755 jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64.bin

4. Install JRockit to your desired location (in my example i have xserver running).

Follow the wizard to complete the installation. I installed JRockit on /u01/Oracle/jrockit-r28.2.2


$ ./jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64.bin

Changing Weblogic Configuration to use new JDK

1. Shutdown all managed servers in Weblogic domain

2. Backup the following files
$MW_HOME/user_projects/domains/<domain  name>/bin/setDomainEnv.sh
$WL_HOME/common/bin/commEnv.sh

e.g.
$ cd  /u01/Oracle/Middleware/user_projects/domains/base_domain/bin
$ cp setDomainEnv.sh  setDomainEnv.sh.before_jdk_change

$ cd /u01/Oracle/Middleware/wlserver_10.3/common/bin
$ cp commEnv.sh  commEnv.sh.before_jdk_change

3. Edit setDomain.env file and find ${JAVA_HOME}
     Comment the JAVA_HOME entry


#JAVA_HOME="${JAVA_HOME}"
#export  JAVA_HOME


4. Add the following after this


# Added the following lines to change to JRockit JDK
JAVA_HOME="/u01/Oracle/jrockit-r28.2.2"
export  JAVA_HOME
JAVA_VENDOR="Oracle"
export JAVA_VENDOR



5. Search the following section in the file, specifically for "-Djrockit.optfile":


Note: This parameter usually gives warning of being obsolete
you will find


EXTRA_JAVA_PROPERTIES="-Dcommon.components.home=${COMMON_COMPONENTS_HOME}   -Djrf.version=11.1.1  
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger  
-Ddomain.home=${DOMAIN_HOME}  
-Djrockit.optfile=${COMMON_COMPONENTS_HOME}/modules/oracle.jrf_11.1.1/jrocket_optfile.txt  
-Doracle.server.config.dir=${ORACLE_DOMAIN_CONFIG_DIR}/servers/${SERVER_NAME}  
-Doracle.domain.config.dir=${ORACLE_DOMAIN_CONFIG_DIR} 
......"

remove the "-Djrockit.optfile" property:
-Djrockit.optfile=${COMMON_COMPONENTS_HOME}/modules/oracle.jrf_11.1.1/jrocket_optfile.txt

6. Save the file

7. Edit commEnv.sh file, find the following section

if [ -z "${JAVA_HOME}" -o -z "${JAVA_VENDOR}" ]; then


8. Add the following line after above section
JAVA_HOME="/u01/Oracle/jrockit-r28.2.2"
export JAVA_HOME
JAVA_VENDOR="Oracle"
export JAVA_VENDOR



9. Start Admin Server and confirm your changes by running following command

$  ps -ef | grep Admin

if you see something similar then your are good to start other managed servers
oracle   13927 13771  5 15:30 ?        00:03:58 /u01/Oracle/jrockit-r282.2/bin/java -jrockit -Xms2048m -Xmx2048m -Dweblogic.Name=AdminServer

Hope it help,
Zeeshan Baig