Solution for no connections available for: Discussion Forum oracle.webcenter.collab.share.NotFoundException

Requirement- I am working on webcenter spaces application. I am getting this error in spaces server log.Why i am getting this.

error look like –

 <oracle.webcenter.collab.announcement.view.backing.AnnouncementUtil> <WCS-04014> <no connections available for: Discussion Forum
oracle.webcenter.collab.share.NotFoundException: no connections available for: Discussion Forum
        at oracle.webcenter.collab.share.SessionFactoryUtils.lookupConnectionNames(SessionFactoryUtils.java:121)
        at oracle.webcenter.collab.share.SessionFactoryUtils.findDefaultConnection(SessionFactoryUtils.java:172)
        at oracle.webcenter.collab.announcement.view.backing.AnnouncementUtil.doExtAppCheck(AnnouncementUtil.java:196)
        at oracle.webcenter.collab.announcement.view.backing.AnnouncementActionHandler.doInitializeMiniView(AnnouncementActionHandler.java:139)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(Unknown Source)
        at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)

Solution – I don’t want this error in my log.And in my spaces application , i am using custom task flow and using as jar in webcenter spaces application.I am not using discussion service.Why we getting that.

By default if you installed WebCenter Spaces, you should have already 3 other Managed Servers like WC_Collab WC_Utils and WC_Portlets, start WC_Collab (or WC_Collaboration in > 11.1.1.6).By default WebCenter Spaces is expecting a discussion connection since most of the spaces templates require discussion services, but if you created your own Space Template you should not face this error.Also you should be able to configure the WebCenter Spaces with Discussion even if you are not willing it, since it already comes with the WebCenter installation, so solution will be creating the discussion connection in Enterprise manager (EM).

-> Start WC_Collaboration server in weblogic console as depicted in picture below –

wc_colloboration1

-> In Linux navigate under oracle home with following path –
oracle/Middleware/user_projects/domains/ucm_domain/bin/
Use this command – cd oracle/Middleware/user_projects/domains/ucm_domain/bin/
And run this command – ./startManagedWebLogic.sh WC_Colloaboration
-> Please hit url i.e. http://ipaddress:8890/owc_discussions , if you see page of community forum like below, that specify ,server for WC_Colloaboration is running

-> Login into http://ipaddress:7001/em as weblogic
-> Expand webcenter and then webcenter spaces and right click, select service configuration.

serviceConfiguration1

-> Select Discussion and Announcement

discussion1

-> Click Add and fill information as below

AddConnection

-> Please checked Active Connection checkbox and restart server.
-> Run OCC application, discussion forum error will not come again.

That is all. we are done

BTW , this is 300 post of Techartifact… long way to go… thanks everyone for supporting…

happy learning with Vinay in techartifact…

Oracle ADF certification

Yesterday, I had given the Oracle Application Development Framework 11g Essentials exam (1Z0-554). I passed it and I am now an Application Development Framework Implementation specialist.
Tricky questions were based on ADF BC (Business Components) & ADF UI. Having BC experience is a must for taking the exam. There were 79 questions that i had to answer in 105 minutes .Passing percentage 61%. I completed in around 75 minutes. The questions were above standard and i enjoyed the test .There are few question of Many to many relationship between Table as well.

Tips for new candidates -Tricky question based on life cycle .Focus on ADF BC. Reuse example

For more details, check this:http://www.oracle.com/partners/en/knowledge-zone/middleware/adf-exam-page-322499.html

O_Certified Specialist_clr

Soon i will posting more article not questions for sure , which helps for preparation of this exam.

Happy leaning with Vinay Kumar in Techartifact…..

How to create custom component in Webcenter Content (UCM)

Requirement – How to Create a UCM custom component

Solutions- Please follow the below steps –

Starting the componentWizard – CD to the path where the component wizard is.
[[email protected] ~]$ cd /oracle/Middleware/user_projects/domains/ucm_domain/ucm/cs/bin // this path will of your weblogic domain
[[email protected] bin]$ ./ComponentWizard

1. Goto Options -> Add
You get the below window.
Fill in the component Name. Click OK.

111

You get below screen.
Custom component gets created here (path may be different for you)
/oracle/ecm/ucm_domain/ucm/cs/custom
The component is created and you can add resources by clicking Add.

222

1. Select service. Click next.

333

Fill in the Name of the Service, Service class, Template. Fill in access levels.
Add actions by clicking on Add.

444

5555

Click OK. Click Finish.

Similarly Add a Resource.

666

image

Resources created
demo_component_resource.htm
demo_component_service.htm
demo_component.hda

Modify the resource.htm as below. Give the Service name, handler name and search order.
The handler name is the fully qualified name of the java file where the service method (printTheName()) is created.

Place the compiled java class file in the classes folder inside the custom component.
cs/custom/demo_component/classes/de/xyz/ucm/service

7777

8888

9999

Build the component to create the manifest.hda file. Demo_component.zip is created that can now be installed on other UCM and used.
Build by clicking on Build.

10000

1212212121212

Enable the component.

1313131313

Hit the browser with the service Name and required parameters
http://192.168.0.118:16200/cs/idcplg?IdcService=PRINT_THE_NAME&IsJava=1&dDocName=HO051621920
My java code is as below. (Calls a standard UCM service from my custom service)

package de.xyz.ucm.service;

import java.io.File;
import java.io.IOException;
import intradoc.common.ExecutionContext;
import intradoc.common.LocaleUtils;
import intradoc.common.Log;
import intradoc.common.ServiceException;
import intradoc.common.SystemUtils;
import intradoc.data.DataBinder;
import intradoc.data.DataException;
import intradoc.data.DataResultSet;
import intradoc.data.ResultSet;
import intradoc.data.Workspace;
import intradoc.provider.Provider;
import intradoc.provider.Providers;
import intradoc.server.Service;
import intradoc.server.ServiceData;
import intradoc.server.ServiceHandler;
import intradoc.server.ServiceManager;
import intradoc.server.UserStorage;
import intradoc.shared.SharedObjects;
import intradoc.shared.UserData;

public class PrintingNames extends ServiceHandler{
	public void printTheName() throws DataException, ServiceException
	{
		
	Log.info("Start printing name"+ true);
	String Docname = m_binder.getLocal("dDocName");
	String serviceName = "DOC_INFO_BY_NAME";
    String userName = m_binder.getLocal("dUser");
    Log.info("environment "+m_binder.getEnvironment());
    Log.info("shared obj val"+SharedObjects.getEnvironmentValue("IntradocServerPort"));
	DataBinder requestBinder = new DataBinder();
	requestBinder.putLocal("dDocName", Docname);
	requestBinder.putLocal("IdcService", serviceName);
	
	
	executeService(requestBinder,"sysadmin",false);	
    final ResultSet docinforesultset = requestBinder.getResultSet("DOC_INFO");
    DataResultSet docinfodataresultset = (DataResultSet)requestBinder.getResultSet("DOC_INFO");

 
	DataResultSet result = new DataResultSet();
	result.copy(docinforesultset);
	
	m_binder.putLocal("Message", "Name printed");
	m_binder.addResultSet("demo_resultset1", docinforesultset);
	m_binder.addResultSet("demo_resultset2", docinfodataresultset);
	Log.info("Finished printing name");

	}
	
	public void executeService(DataBinder binder, String userName, boolean suppressServiceError)
	        throws DataException, ServiceException
	    {       
	        ServiceException error;
	        Workspace workspace = getSystemWorkspace();
	        String cmd = binder.getLocal("IdcService");
	        if(cmd == null)
	            throw new DataException("!csIdcServiceMissing");
	        ServiceData serviceData = ServiceManager.getFullService(cmd);
	        if(serviceData == null)
	            throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
	        Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
	        UserData fullUserData = getFullUserData(userName, service, workspace);
	        service.setUserData(fullUserData);
	        binder.m_environment.put("REMOTE_USER", userName);
	        error = null;
	        try
	        {
	            service.setSendFlags(true, true);
	            service.initDelegatedObjects();
	            service.globalSecurityCheck();
	            service.preActions();
	            service.doActions();
	            service.postActions();
	            service.updateSubjectInformation(true);
	            service.updateTopicInformation(binder);
	      
	        }
	        catch(ServiceException e)
	        {
	            error = e;
	        }
	        finally{
	        service.cleanUp(true);
	        workspace.releaseConnection();
	        }
	        if(error != null)
	            if(suppressServiceError)
	            {
	                error.printStackTrace();
	                if(binder.getLocal("StatusCode") == null)
	                {
	                    binder.putLocal("StatusCode", String.valueOf(error.m_errorCode));
	                    binder.putLocal("StatusMessage", error.getMessage());
	                }
	            } else
	            {
	                throw new ServiceException(error.m_errorCode, error.getMessage());
	            }
	        return;
	    }
	
	public UserData getFullUserData(String userName, ExecutionContext cxt, Workspace ws)
	        throws DataException, ServiceException
	    {
	        if(ws == null)
	            ws = getSystemWorkspace();
	        UserData userData = UserStorage.retrieveUserDatabaseProfileDataFull(userName, ws, null, cxt, true, true);
	        ws.releaseConnection();
	        return userData;
	    }
	
	public static Workspace getSystemWorkspace()
    {
        Workspace workspace = null;
        Provider wsProvider = Providers.getProvider("SystemDatabase");
        if (wsProvider != null)
        {
            workspace = (Workspace) wsProvider.getProvider();
        }
        return workspace;
    }
}

Happy coding with Vinay Kumar in Techartifact…..