websphere portal - Unable to access WCM library -
i trying access wcm(web content management) library, working fine portal application. requirement access same library enterprise application deployed on was(webspher application server). works fine on localhost, when deployed on development server giving me below error-
stack trace com.ibm.websphere.servlet.error.servleterrorreport: java.lang.illegalstateexception: wcm repository not registered wcm_api @ com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter(webappfilterchain.java:152) @ com.ibm.ws.webcontainer.filter.webappfilterchain._dofilter(webappfilterchain.java:77) @ com.ibm.ws.webcontainer.filter.webappfiltermanager.dofilter(webappfiltermanager.java:908) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:934) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:502) @ com.ibm.ws.webcontainer.servlet.servletwrapperimpl.handlerequest(servletwrapperimpl.java:179) @ com.ibm.wsspi.webcontainer.servlet.genericservletwrapper.handlerequest(genericservletwrapper.java:121) @ com.ibm.ws.jsp.webcontainerext.abstractjspextensionservletwrapper.handlerequest(abstractjspextensionservletwrapper.java:259) @ com.ibm.ws.webcontainer.webapp.webapprequestdispatcher.include(webapprequestdispatcher.java:686) @ com.bowstreet.webapp.engine.pageprocessor.jsppageprocessor.requestjsppage(jsppageprocessor.java:321) @ com.bowstreet.webapp.engine.pageprocessor.jsppageprocessor.processpage(jsppageprocessor.java:207) @ com.bowstreet.webapp.engine.actions.pageaction.callaction(pageaction.java:101) @ com.bowstreet.webapp.engine.webappaccessimpl.processpage(webappaccessimpl.java:228)
i using ibm websphere application , portal server 6.1. below code snippet-
// retrieve repository repository repository = wcm_api.getrepository(); try{ // workspace current user workspace workspace = repository.getsystemworkspace(); workspace.login(); // set library workspace.setcurrentdocumentlibrary(workspace.getdocumentlibrary("mylibrary")); // find content name documentiditerator contentiterator = workspace.findbyname(documenttypes.content,"mykey"); system.out.println("key:: contentiterator="+contentiterator); //find contents if (contentiterator.hasnext()){ system.out.println("key:: inside if ="); content content=(content)workspace.getbyid(contentiterator.nextid(),true); system.out.println("getwcmurl:: content="+content.getname()); richtextcomponent txtcomp= (richtextcomponent)content.getcomponentbyreference("text"); if(txtcomp.getrichtext()!=null){ cntmsg = txtcomp.getrichtext(); } } } catch(exception e){ system.out.println("getwcmurl:: error:"+e.getmessage()); }
please help...
at time of writing this, ibm web content management v6.1 no longer supported (end of life sept 2014), should have upgraded. ibm keeps 3 versions (current + 2 previous) supported @ time.
with said, error can occur, if application starts prior web content management servlet starting. need set startup weighting higher 30. http://www-01.ibm.com/support/docview.wss?uid=swg21656128
without access whole source code , full stack trace it's little difficult see when code being triggered. source of error, server on code has been deployed on. must deployed portal server , not application server.
Comments
Post a Comment