ClassLoader.getResource return null

By W.ZH Mar 2010

See also ;
classloader and classpath


In Weblogic server, When I try to call ClassLoader.getSystemResource(“AAA.jar”) from a EJB project, not an web application, always return null. i paste my jar to the domain’s lib, JRE’s lib, bin folder,  jdk’s bin/lib folder, but still this jar can not be found.


It is very hard to understand that lib in the domain not be picked up to look up for jar. So the way is to find which fold WLS try  to lookup when u want to add a new jar to your system.


You can input an empty “” to the getter to see what the default folder that WLS try to search for jars.

System.out.println (ClassLoader.getSystemResource (“”));

this.getClass().getClassLoader().getResource(“” ));

this.getClass().getClassLoader().getSystemResource(“” ));

Haha.. then i get that WLS try to load from wls ‘s common/lib folder… paste my AAA.jar to that folder , then system find the jar file as a resource.

Refer to :



classloader and classpath

Some sample code to get class path , from which jar it is loaded:

private void printclasspath(Class cls) {

Class klass = cls;

URL location =

klass.getResource(‘/’ + klass.getName().replace(‘.’, ‘/’) +


System.out.println(” location is  ” + location.getFile());


private String getPath(Class cls) {

String cn = cls.getName();

String rn = cn.replace(‘.’, ‘/’) + “.class”;

String path = getClass().getClassLoader().getResource(rn).getPath();

int ix = path.indexOf(“!”);

if (ix >= 0) {

return path.substring(0, ix);

} else {

return path;



Common Cmd in Linux

 To list the folder size  du- hs /your/folder
  To list free memory  free -t –m
 to list all the process:  ps -ef      or    ps -Af
 To do a remote copy from A to B server  scp -r userA@ userB@
 check linux version  uname -a
 List disk space  df -h
 To  find file and delete them  : find all CVS hidden fodler and remove them  find ./ -name CVS -exec rm -rf {} \;




QuickTest Professional


i am just doc this tool here as it might be used any project for UI testing. Beside the Selenium, this is a web UI automation testing tools developed by HP but widely used in the Oracle ADF project testing.

Because it can support the add-in extension, it supplies a lot ability to test the advance web UI by JAVA and .NET. And test script can make you do the function and regression test.




How to change configurable values in Oracle Service Bus projects

By W.ZH July 2011


You know, in the SOA composite application, when u do the deployment, you can compose a config plan file to dynamically change some data and values in the BPEL projects to meet your server IP/Port and other environment. Does OSB project has similar feature? Such as you have a PS point to a BS, Business Service created from a WSDL which is from a developing server IP and port, so when you go the deploy this OSB project to the production server, how to change this IP and port info?


OSB has similar feature called Customization File:  From OSB manage console:

System Administration –>Customization –>

Find & Replace

Create Customization File

Execute Customization File

You can Create a Customization File for your project. It is a XML file, open it and you see many resources can be changed.

You change this file’s data , and then you can Execute your Customization File, then new values will be applied to your project.

This Customization File also can be used in the WLST, when you try to import the OSB project into the OSB server by WLST py file, you can also use a Customization File

to replace your project data and make it imported to OSB server with new settings. I will have another article to introduce the WSLT import OSB project.


How to change IP/host and other varibles for SOA application deployment

By W.Zh Jan 2011


When I create a soa compisite application, which mostly includes some WS call, needs the wsdl end point host, port for URL… then your BPEL process run against the WS. But when u deploy from jdevelpoer you found you can not change your WSDL host and port info, as all these ip and port are used in the composite.xml in the app… It can not change after u deploy.  So u can not deploy to a new server to run the WS end point.


In fact, this is a very basic issue in SOA, but initially we think this is very hard thing. SOA developer guide introduces something called configuration plan file. In fact it is a XML can let u replace these variables in the composite.xml for different deployment. You can read the SOA dev guide 41.6 chapter to use the jdev to create and edit the configplan file.  When u deploy from Jdev, u can refer to use what config plan file for a deployment.

When u deploy from WLS EM console UI, in the SOA admin guide chapter 5, you can point to use a config plan file to define this deployment uses what plan file to replace these variables.

Based on this plan file, you can also use OUI to collect the user input for these replaces, in the OUI install steps, and then u change the plan file content in OUI and make your application installtion can fit user’s server enviroment. And also if you deploy from ant, you can use the plan file too.

This is very useful!.

ADF Business Components Service relation to normal WS

By W.Zh Oct 2011

ADF Business Components Service in the fusion dev guide is the web service interface that exposed from a BC Application Module. But BC Service is not a normal web service. It has more features than a normal webservice.

  1. For a normal web service, if you want access from your java code, in Jdev, you can create a static client proxy code call this WS. If you have the BC service, you still can do this way. This means you can invoke BC service like others normal WS in your java application code.
  2. If you have one ADF web application to invoke another BC service remotely, then best way to access the BC Service, is not through the java WS static proxy code to call it. You should use the oracle.jbo.client.svc.ServiceFactory to invoke the BC service. You get more benefit by this way. See the chapter 41 of the “Oracle Fusion Applications Developer’s Guide”.
  3. If you have one SOA composite application, you want to invoke a BC service remotely, you have two choices here for  SOA access the external WS service,  one is called “ADF-BC service”. This one is dedicated for BC service, another one called “Web Service”. Of course, the best way to use the “ADF-BC service”.
  4. By “ADF-BC service” and oracle.jbo.client.svc.ServiceFactory you can invoke the BC service, and you also can access the SDO objects which exposed via this service. So you can change these SDO data, and save to DB. Do not need to call some method in service interface method to do that. You have to refer to fusion dev guide to see how to use this.  In SOA, there are something called “entity variables” in BPEL can use SDO object from partner links (Such as ADB-BC links).


Some examples to create BC service and consumed by a SOA application, and entity variables.





error in deploy “Error during portlet export”

By W.ZH Aug 05 2009

When you doing the deploy for your webcenter project (not your portlet project, this is your portlet consumer.), you might get error something like this :

Deploying 3 profiles…

[10:47:26 AM] Exporting portlet metadata and customizations.

[10:47:29 AM] Error during portlet export. Portlets will not be available in the target application.


Reason: Could because your producer connection failed. so the producer export will fail as dead producer. make sure your portlet producer is alive and try to deploy again.

Solution :

Scheduled Process Management in Fusion Applications

By W.ZH Feb 2012



In my last article ESS-01050 error when you try to create a new scheduled process, I have shown one issue you may face in the scheduled process management; we can simply say the reason for that issue: Scheduled processes are confined by user and your role; you cannot see other user’s process. But system level, when you create a process, will detect the duplication process cross the user context. This is the reason you see that error message.

After you use the Scheduled processes page for a while you may find it have some limitations here. You can do create new process/resubmit/Put On Hold/Cancel/Release Process/View Log

Currently I do not try out on the Resubmit/Release Process feature yet, but I suppose they are not an update feature. We need some basic knowledge about the ESS here (Oracle Oracle Enterprise Scheduler Service). This scheduled process UI in fact use the ESS as the backend to trigger the job by the timer scheduled. For example, a daily job run at 5AM, when it will run tomorrow, at today 8AM, you will see its status is “Wait”, when it starts run at the time of tomorrow 5AM, you will see the status is “running”, after it is finished it normally shows “Succeeded”.

When it is in “wait” status, you can use the button to cancel it, then it will change to “cancelled” status, but as it is a daily job, so system will auto create a new job with default status “wait”. This new job scheduled to run at the day after tomorrow 5AM. So you must be very careful at here. As there is no update feature, such as, for this example, if you want to run this job today immediately, how can you do this?

You cannot create a new process with same task, as system does not allow duplicate task. You cannot change this current exist scheduler to let it can run immediately as system UI has no such feature. In fact, you stuck at here.


Because there is no change scheduler ability, at least I do not find it now.


You can use the EM to solve this issue, this need the WLS admin user account. All the Scheduled processes are the schedule jobs in the ESS server. Log into your EM for your domain management, under the ESS, you will see how to manage the scheduled jobs, each job with ID that can be matched to FA UI page. For a daily job, you can only change the schedule by going to the root job to change the whole schedule. Each daily is just a sub-job under the root job.  I think I do not need to detail all the feature in the ESS admin ability, you need to refer the ESS user/dev guide for that.

Manage Product Groups

Manage Product Groups


By W.ZH May 2012

There is one page in the Fusion Applications set up part called “Manage Product Groups”. I just list some notes I found here when using this page about the Product Group (PG):

  1. One user can open this page and create a PG. By default when you create it, this PG is set as locked status.
  2. Before a PG is publish/edit, it should be locked first.
  3. If a PG is locked, then other user cannot unlocked, only locker self can unlock it.
  4. If a PG is in unlocked status, other users can lock it.
  5. If you want to do publish for this PG, you must be the locker for this PG. and only the locked PG can be published. If you are not the locker but try to publish it, you will see one error “You must lock the product groups that you want to publish. (QSC-375031)”   A bit confused, but that means only the locker can publish this PG.
  6. You can have many PGs in the list, when you try to do publish at this page, it will publish all the PGs that are locked by yourself in the list. Not only one.
  7. Access this UI need a  role of sales_catalog_admin which is part of crm admin role.