Topic
  • 3 replies
  • Latest Post - ‏2018-08-30T12:26:01Z by AnishKV_IBM007
Amcoronel
Amcoronel
2 Posts

Pinned topic CNTR0031W: Error starting CMP bean

‏2015-10-08T17:02:09Z | ejb error jdni

I have the following error when I try the ´Integrating the Bonus entity bean'  part on the tutorial in infocenter. This when I try to launch the controller command created earlier. 

My DB2 instance is called INST1DB and I can´t seem to find the problem.

 

 

[10/8/15 9:18:48:732 MDT] 00000151 JDBCPersister W   CNTR0031W: Error starting CMP bean WC#WebSphereCommerceServerExtensionsData.jar#Bonus: 
 javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: jdbc/WebSphere Commerce DB2 DataSource INST1DB: First component in name WebSphere Commerce DB2 DataSource INST1DB not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4378)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1807)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1762)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1513)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:645)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:166)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:180)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at com.ibm.ws.cpi.JDBCPersisterFactoryImpl.create(JDBCPersisterFactoryImpl.java:114)
    at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.createCMP11Persister(EJBMDOrchestrator.java:1241)
    at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.finishBMDInit(EJBMDOrchestrator.java:1544)
    at com.ibm.ws.runtime.component.EJBContainerImpl.finishDeferredBeanMetaData(EJBContainerImpl.java:5066)
    at com.ibm.ws.runtime.component.EJBContainerImpl.initializeDeferredEJB(EJBContainerImpl.java:4875)
    at com.ibm.ejs.container.HomeOfHomes$1.run(HomeOfHomes.java:408)
    at com.ibm.ejs.container.HomeOfHomes$1.run(HomeOfHomes.java:406)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ejs.container.HomeOfHomes.getHome(HomeOfHomes.java:405)
    at com.ibm.ejs.container.HomeOfHomes.internalCreateWrapper(HomeOfHomes.java:1003)
    at com.ibm.ejs.container.EJSContainer.createWrapper(EJSContainer.java:5024)
    at com.ibm.ejs.container.WrapperManager.faultOnKey(WrapperManager.java:545)
    at com.ibm.ejs.util.cache.Cache.findAndFault(Cache.java:498)
    at com.ibm.ejs.container.WrapperManager.keyToObject(WrapperManager.java:489)
    at com.ibm.ejs.oa.EJSOAImpl.keyToObject(EJSOAImpl.java:553)
    at com.ibm.ejs.oa.EJSRootOAImpl.keyToObject(EJSRootOAImpl.java:271)
    at com.ibm.rmi.corba.ObjectManager.lookupServant(ObjectManager.java:106)
    at com.ibm.CORBA.iiop.ServerDelegate.getServant(ServerDelegate.java:311)
    at com.ibm.rmi.iiop.ORB.lookupLocalObject(ORB.java:634)
    at com.ibm.CORBA.iiop.ORB.lookupLocalObject(ORB.java:1468)
    at com.ibm.rmi.iiop.CDRReader.newObjRef(CDRReader.java:1310)
    at com.ibm.rmi.iiop.CDRReader.read_Object(CDRReader.java:1151)
    at com.ibm.rmi.iiop.CDRReader.read_Object(CDRReader.java:1115)
    at com.ibm.rmi.corba.IorURL.iorbytesToObjref(IorURL.java:105)
    at com.ibm.rmi.corba.IorURL.resolve(IorURL.java:93)
    at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3884)
    at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3262)
    at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3784)
    at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolveUnresolvedBinding(WsnOptimizedNamingImpl.java:1927)
    at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolve_binding(WsnOptimizedNamingImpl.java:1681)
    at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:583)
    at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2163)
    at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2810)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2806)
    at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
    at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2804)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1803)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1762)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1513)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:645)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:166)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:180)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at com.ibm.ivj.ejb.runtime.AbstractAccessBean.lookupAndCacheHome(AbstractAccessBean.java:229)
    at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getGlobalHome(AbstractAccessBean.java:221)
    at com.ibm.ivj.ejb.runtime.AbstractAccessBean.getHome(AbstractAccessBean.java:254)
    at com.ibm.commerce.extension.objects.BonusAccessBean.ejbHome(BonusAccessBean.java:116)
    at com.ibm.commerce.extension.objects.BonusAccessBean.instantiateEJB(BonusAccessBean.java:147)
    at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean._instantiate(AbstractEntityAccessBean.java:174)
    at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean.refreshCopyHelper(AbstractEntityAccessBean.java:309)
    at com.ibm.commerce.extension.objects.BonusAccessBean.refreshCopyHelper(BonusAccessBean.java:194)
    at com.ibm.commerce.sample.commands.MyControllerCmdImpl.getResources(MyControllerCmdImpl.java:143)
    at com.ibm.commerce.command.AbstractECTargetableCommand.checkResourcePermission(AbstractECTargetableCommand.java:167)
    at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:139)
    at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)
    at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:166)
    at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:236)
    at com.ibm.commerce.component.BaseComponentImpl.executeCommand(BaseComponentImpl.java:202)
    at com.ibm.commerce.component.WebAdapterComponentImpl.executeCommand(WebAdapterComponentImpl.java:46)
    at com.ibm.commerce.component.objimpl.WebAdapterServiceBeanBase.executeCommand(WebAdapterServiceBeanBase.java:58)
    at com.ibm.commerce.component.objects.EJSLocalStatelessWebAdapterService_ce749a4a.executeCommand(EJSLocalStatelessWebAdapterService_ce749a4a.java:31)
    at com.ibm.commerce.component.objects.WebAdapterServiceAccessBean.executeCommand(WebAdapterServiceAccessBean.java:160)
    at com.ibm.commerce.webcontroller.WebControllerHelper.executeCommand(WebControllerHelper.java:2778)
    at com.ibm.commerce.struts.BaseAction.invokeService(BaseAction.java:1516)
    at com.ibm.commerce.struts.BaseAction.executeAction(BaseAction.java:635)
    at com.ibm.commerce.struts.BaseAction.execute(BaseAction.java:150)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at com.ibm.commerce.struts.ECActionServlet.processRequest(ECActionServlet.java:231)
    at com.ibm.commerce.struts.ECActionServlet.doGet(ECActionServlet.java:172)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
    at com.ibm.commerce.struts.ECActionServlet.service(ECActionServlet.java:739)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
    at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:576)
    at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:250)
    at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:259)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1667)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1602)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:149)
    at com.ibm.commerce.campaigns.filter.CampaignsFilter.doFilter(CampaignsFilter.java:148)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
    at com.ibm.commerce.likeminds.filter.LikeMindsFilter.doFilter(LikeMindsFilter.java:183)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
    at com.ibm.commerce.dynacache.filter.CacheFilter$1.run(CacheFilter.java:390)
    at com.ibm.commerce.dynacache.filter.CacheFilter.doFilter(CacheFilter.java:553)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
    at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilterAction(RuntimeServletFilter.java:736)
    at com.ibm.commerce.webcontroller.RuntimeServletFilter.access$0(RuntimeServletFilter.java:523)
    at com.ibm.commerce.webcontroller.RuntimeServletFilter$1.run(RuntimeServletFilter.java:433)
    at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilter(RuntimeServletFilter.java:458)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:80)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:507)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3954)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:945)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1656)
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:546)
    at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2163)
    at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2810)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2806)
    at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
    at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2804)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1803)
    ... 128 more

  • AH2D_Arti_bajpai
    AH2D_Arti_bajpai
    1 Post

    Re: CNTR0031W: Error starting CMP bean

    ‏2017-04-21T08:30:11Z  

    Go to Server's Administration Console and update JNDI name 

    Applications --> Application Types --> WebSphere enterprise applications --> WC_<SERVERENV> --> Enterprise Java Bean Properties --> Provide default data source mapping for modules containing 1.x entity beans

    Update Target Resource JNDI Name in the appropriate input box,

    jdbc/WebSphere Commerce DB2 DataSource MyDBSource

     

    This will solve the issue .

     

  • Sreejith.kanneri
    Sreejith.kanneri
    164 Posts

    Re: CNTR0031W: Error starting CMP bean

    ‏2017-05-18T07:18:46Z  

    Go to Server's Administration Console and update JNDI name 

    Applications --> Application Types --> WebSphere enterprise applications --> WC_<SERVERENV> --> Enterprise Java Bean Properties --> Provide default data source mapping for modules containing 1.x entity beans

    Update Target Resource JNDI Name in the appropriate input box,

    jdbc/WebSphere Commerce DB2 DataSource MyDBSource

     

    This will solve the issue .

     

    It also happens when you change the Datasource name from WAS console but EJBs are deployed with a different datasource 

    Validate the EJB data source from the DMGR location . Correct it to the right one as mentioned in  Arti_bajpai's post and redeploy the EJB

    /opt/apps/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/<cellname>/applications/WC_DEMO.ear/deployments/WC_DEMO/WebSphereCommerceServerExtensionsData.jar/META-INF/ibm-ejb-jar-bnd.xmi

  • AnishKV_IBM007
    AnishKV_IBM007
    1 Post

    Re: CNTR0031W: Error starting CMP bean

    ‏2018-08-30T12:26:01Z  

    Go to Server's Administration Console and update JNDI name 

    Applications --> Application Types --> WebSphere enterprise applications --> WC_<SERVERENV> --> Enterprise Java Bean Properties --> Provide default data source mapping for modules containing 1.x entity beans

    Update Target Resource JNDI Name in the appropriate input box,

    jdbc/WebSphere Commerce DB2 DataSource MyDBSource

     

    This will solve the issue .

     

    Thisis perfect Answer : below steps fixed our same ejb issue.  Appreciating the steps and sanswer.

     

    Go to Server's Administration Console and update JNDI name 
    Applications --> Application Types --> WebSphere enterprise applications --> WC_<SERVERENV> --> Enterprise Java Bean Properties --> Provide default data source mapping for modules containing 1.x entity beans

    Update Target Resource JNDI Name in the appropriate input box, jdbc/WebSphere Commerce DB2 DataSource MyDBSource

     

    Below exception fixed by above steps , which was a big severe issue for our application.

    8/30/18 9:43:05:336 BST] 00000032 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/IBM/WebSphere/AppServer/profiles/NOPRESTG/logs/ffdc/server1_16c716c7_18.08.30_09.43.02.9181186183825591839526.txt com.ibm.ws.metadata.ejb.EJBMDOrchestrator.createCMP11Persister 527
    [8/30/18 9:43:07:609 BST] 00000032 EJBContainerI E   WSVR0068E: Attempt to start EnterpriseBean WC_NOPRESTG#WebSphereCommerceServerExtensionsData.jar#XPrescription failed with exception: com.ibm.ejs.container.ContainerException: ; nested exception is:
           com.ibm.websphere.cpi.CPIException: Persister creation failed.The bean's J2EEName is WC_NOPRESTG#WebSphereCommerceServerExtensionsData.jar#XPrescription. The data source name is WebSphere Commerce Oracle DataSource NOPRESTG.; nested exception is:
           javax.naming.NameNotFoundException: Context: pps_no_cell_dmgr/nodes/WC_NOPRESTG_node/servers/server1, name: WebSphere Commerce Oracle DataSource NOPRESTG: First component in name WebSphere Commerce Oracle DataSource NOPRESTG not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
     
    it was there since very begining.