Deployment of JSR 268 Producer Fails With java.lang.NullPointerException at com.bea.wsrp.producer.adapter.javaportlet.JavaPortletLoader.undeployPortletApp (Doc ID 1513321.1)

Last updated on OCTOBER 25, 2016

Applies to:

Oracle WebCenter Portal - Version 11.0.0.0 and later
Information in this document applies to any platform.

Symptoms

A JSR 268 producer has been configured to use a database preference store to store its preference values. A java.lang.NullPointerException occurs when deploying this producer to a custom managed server created with the WebCenter template oracle.wc_custom_portal_template_11.1.1.jar as per instructions in <Document 1339004.1>, 'Tutorial: Creating WebLogic Managed Servers for Deployment of Custom WebCenter Portal Applications or WebCenter Producer Applications for Oracle WebCenter R11 (PS3/PS4/PS5)'.

Full java stack :

[03:24:21 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application SampleProducerApp1_application1 on WC_CustomServicesProducer.: [HTTP:101216]Servlet: "com.bea.wsrp.producer.container.ProducerServlet" failed to preload on startup in Web application: "SampleProducerApp1".
java.lang.NullPointerException
    at com.bea.wsrp.producer.adapter.javaportlet.JavaPortletLoader.undeployPortletApp(JavaPortletLoader.java:614)
    at com.bea.portlet.container.AppContainer.undeployPortletApp(AppContainer.java:239)
    at com.bea.portlet.container.AppDeployer.ensureRedeploy(AppDeployer.java:283)
    at com.bea.portlet.container.AppContainer.ensureRedeploy(AppContainer.java:498)
    at com.bea.wsrp.producer.adapter.javaportlet.JavaPortletAdapter.ensureRedeploy(JavaPortletAdapter.java:142)
    at com.bea.wsrp.producer.container.init.PortalInitializer.init(PortalInitializer.java:18)
    at com.bea.wsrp.producer.container.ProducerEndPoint.init(ProducerEndPoint.java:191)
    at com.bea.wsrp.producer.container.ProducerEndPoint.initialize(ProducerEndPoint.java:126)
    at com.bea.wsrp.producer.container.ProducerServlet.reinitInternal(ProducerServlet.java:101)
    at com.bea.wsrp.producer.container.ProducerServlet.initInternal(ProducerServlet.java:83)
    at com.bea.wsrp.producer.container.ProducerServlet.access$200(ProducerServlet.java:54)
    at com.bea.wsrp.producer.container.ProducerServlet$ServletLifecycleListenerImpl.init(ProducerServlet.java:1203)
    at com.bea.netuix.util.ServletLifecycleListener.initOrReinitInternal(ServletLifecycleListener.java:131)
    at com.bea.netuix.util.ServletLifecycleService.addServletLifecycleListener(ServletLifecycleService.java:252)
    at com.bea.netuix.util.ServletLifecycleService.addServletLifecycleListener(ServletLifecycleService.java:182)
    at com.bea.wsrp.producer.container.ProducerServlet.init(ProducerServlet.java:78)
    at javax.servlet.GenericServlet.init(GenericServlet.java:241)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1981)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1955)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1874)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

The datasource was defined in the web.xml :

  <resource-ref>
    <res-ref-name>jdbc/portlet/CustomServicesProducerDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
  <env-entry>
    <env-entry-name>oracle/portal/wsrp/server/persistentStore</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>Database</env-entry-value>
  </env-entry>

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms