Search This Blog

Monday, March 28, 2016

How to find out which jar file is loading the class I am looking for ??

In SOA add the following java code to BPEL Java embeding activity 

++++
System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
        try {


System.out.println(Class.forName("oracle.tip.adapter.ftp.SFTPClient").getProtectionDomain().getCodeSource().getLocation());

        }
        catch(Exception e1)
        {
         e1.printStackTrace();
        }

System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ");
+++

Result :

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
file:/apps/erikad1/aerikad1/app_ECTH/ecthd0runtime/SOA/domain/ECTH_SOA_Domain/servers/ECTH_SOA1/stage/FtpAdapter1/FtpAdapter.rar
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


You can also add the flag 

export JAVA_OPTIONS="-verbose:class". This writes all the class loading
information to the standard out file.

This displays messages like

[Loaded oracle.tip.adapter.ftp.SFTPAgent from
file:/apps/erikad1/aerikad1/app_ECTH/ecthd0runtime/SOA/domain/ECTH_SOA_Domain/servers/ECTH_SOA1/stage/FtpAdapter1/FtpAdapter.rar]
[Loaded oracle.tip.adapter.ftp.SFTPClient from
file:/apps/erikad1/aerikad1/app_ECTH/ecthd0runtime/SOA/domain/ECTH_SOA_Domain/servers/ECTH_SOA1/stage/FtpAdapter1/FtpAdapter.rar]
[Loaded oracle.tip.adapter.file.outbound.FileLister from
file:/apps/erikad1/aerikad1/app_ECTH/ecthd0soa/fmw/SOA/soa/connectors/FileAdapter.rar]


Use different user directories for different Jdeveloper versions

In my system I have 4 jdev versions installed , jdev 11.1.1.7 , jdev 11.1.1.9 , jdev 12.1.3 and jdev 12.1.3

by default when i create a new application or project it is creating under the directory C:\JDeveloper\mywork
this is causing too much confusions for me in opening up the projects.

First create user environment variable's

JDEV1117_USER_HOME=d:\myjdevwork\jdev1117
JDEV1119_USER_HOME=d:\myjdevwork\jdev1119
JDEV1213_USER_HOME=d:\myjdevwork\jdev1213
JDEV1221_USER_HOME=d:\myjdevwork\jdev1221

Open the file D:\jdev1117\jdeveloper\jdev\bin\jdev.boot

and comment the variable ide.user.dir.var and add the following 

#ide.user.dir.var = JDEV_USER_HOME,JDEV_USER_DIR
ide.user.dir.var = JDEV1117_USER_HOME

Do the same for jdev 12.1.3 
D:\soa12cqs\jdeveloper\jdev\bin\jdev.boot

#ide.user.dir.var = JDEV_USER_HOME,JDEV_USER_DIR

ide.user.dir.var = JDEV1213_USER_HOME