Oracle WebCenter Spaces

person Bijeshfolder_openWebCenterlocal_offer, , access_time October 25, 2010

I am building an enterprise portal on Oracle WebCenter for a client. The client requires quite a few custom portlets that enable their business functions. The plan is to build these custom applications using Oracle ADF as individual task flows that may later be consumed either by WebCenter Spaces or by a custom WebCenter application.

Extending WebCenter Spaces is no fun at all. The only resource to help integrate customizations into spaces is the Oracle Whitepaper – Extending WebCenter Spaces. To be honest, integrating into Spaces could end up being the most frustrating part of the whole process.

I have spent a few days now trying the custom project that accompanies the WebCenter Spaces. The default settings for deployment work extremely well. My first point of trouble was when I tried to undeploy the customizations. Once I did that, the Spaces app began to throw exceptions all over the place. It was looking for metadata related to a template that existed in the sample war – the custom war that I “undeployed”. Figured out that WebLogic wasn’t cleaning up correctly after an “undeploy”. I had to manually delete the caches to get Spaces back to its default. Details here.

The second point of trouble was when I wanted to deploy only the custom resource catalog from the sample project. I didn’t have the need for any of the other customizations, so I followed the whitepaper instructions on removing whatever I did not need. The project builds fine and deploys fine. Unfortunately, Spaces began to throw up a different set of exceptions. The user error simply says “Error occurred in getting the complete list of pages you can access. Please contact the administrator.” without saying anything useful. The actual exceptions in the log are ClassCastExceptions and NPEs.

After a lot of unnecessary detours, I have now managed to integrate a custom ADF task flow into the Personal Catalog on Spaces. The taskflow is deployed on the server as a shared library.

I shouldn’t have to create a custom version of a WAR to simply consume an application in the portal. I’m told that the next release of WebCenter (PS3) will make customizations and skinning easier. Keeping fingers crossed!

Self Note: Useful Links

Managing Portlet Producers
Adding Portlets to pages

Comments

  1. Hi Bijesh,
    I am having problems getting my ADF task flow to show up in default catalog of spaces. I deployed my task flow as a jar on the WLS_Spaces server but it does not show up in the spaces catalog. I know, I need to add an entry in default-catalog.xml, but I don’t find this file on my installation. Can you please let me know how to make my task flow show up in the default spaces resources catalog. Your help would be greatly appreciated.

  2. Kumar,

    Did you read the “Extending WebCenter Spaces” whitepaper? It explains how to deploy customizations to WebCenter spaces and also includes a sample project for extending the resource catalog. In any case, let me see if I put a post in on essential steps to get task flows to display on the default catalog.

  3. Bijesh,

    Thank you very much for your quick response. I saw the white paper and it says, I need to add an entry in default-catalog.xml which I am not able to find in my webcenter installation folder. Do I need to create this xml? If so, where should I create it? My installation is the plain vanilla installation done following Oracle installation steps.

    Problem-2: I tried deploying the “ExtendWebCenterSpaces” on my remote weblogic server and am getting the following error:

    weblogic.Deployer$DeployerException: weblogic.deploy.api.tools.deployer.DeployerException: Task 16 failed: [Deployer:149026]redeploy application webcenter on WLS_Spaces.
    Target state: redeploy failed on Server WLS_Spaces
    java.lang.NoClassDefFoundError: org/apache/xml/dtm/ObjectFactory$ConfigurationError

    Can you please let me know how to fix this?

    Thank you,

    Kumar.

  4. Kumar,

    The whitepaper’s sample workspace contains a project called CustomResourceCatalog. In this project, you will see how they have customized the resource catalog. If required, you may use the original (“default”) resource catalog from the SourceFiles folder in the sample workspace and add to it.

    I have been hitting that error myself. Haven’t found a solution yet. One workaround is to stop WLS_Spaces managed server and then run the Ant task. Start the server after the ant task completes.

  5. Hi Bijesh,

    I am getting the same error as you got “he user error simply says “Error occurred in getting the complete list of pages you can access. Please contact the administrator.””, after doing everything as the white paper.

    Can you please let me know what was the detour that you followed to achieve the target , to display the taskflow in resource catalog.

  6. Subash,

    To be honest I didn’t actually figure out the source of this particular error. My actual customisation includes only a custom resource catalog which adds a task flow that I built.

    I think this particular error originates from CustomPagesAndGroupSpacesListTaskflows. Try deploying the customisation after removing this project from the final build (there’s an example in the whitepaper) and also remove the custom task flow from the resource catalog in CustomResourceCatalog project. Also before deploying this, I would suggest you delete the deployment that you tried (not the default custom.webcenter.spaces) from Weblogic.

  7. Bijesh,

    Did you ever try to access the webcenter spaces API? I am trying to access the spaces APIs from one of my taskflows and am able to query the groups (public, all, etc). But, when I try to access the pages in any of the groups it simply returns an empty array (though there are pages in the group space)! Any help in this regard is appreciated.

    Here is my code that tries to access the pages:

    MDSSession mdsSess = (MDSSession)ADFContext.getCurrent().getMDSSessionAsObject();
    PageServiceConfig config = new PageServiceConfig(“Test Space”);
    PageService pageService = PageServiceFactory.createInstance(config);

    List pagesList = pageService.getAllPages();
    if(pagesList != null)
    {
    System.out.println(“Got pagesList, size: “+pagesList.size());
    for(PageDef page:pagesList)
    {
    System.out.println(“Next page name: “+page.getName() +”, desc: “+page.getDesc());
    }
    }

    Thank you,

    Kumar.

  8. Kumar,

    I think the problem is the PageServiceConfig object. Try something like the following:

    List pageList, allPages;
    MDSSession mdsSess =
    (MDSSession)ADFContext.getCurrent().getMDSSessionAsObject();
    String DEFAULT_SCOPE = “defaultScope”;

    PageServiceConfig config = new PageServiceConfig(mdsSess, DEFAULT_SCOPE);

    PageService mPageService = PageServiceFactory.createInstance(config);

    pageList = mPageService.getPageList();

  9. Hey Bijesh,

    Thanks for the tip regarding the error: “Error occurred in getting the complete list of pages you can access. Please contact the administrator.”

    It seems there is indeed a few things wrong in the default extendwebcenterspaces project. I removed all refrences apart from the ones I am using (skin and site template) from internal-targets.xml, re-deployed and all worked fine!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>