IBM Support

NullPointerException during deployment of an EJB project

Troubleshooting


Problem

When you select Prepare for deployment for an EJB project, you see "Error during generation of deployment code: null."

Symptom

The following NullPointerException is displayed:

java.lang.NullPointerException                                    
 at com.ibm.ObjectQuery.crud.schema.ClassMap.getBeanName(Unknown Source)
 at com.ibm.ObjectQuery.crud.schema.ClassMap.asn(Unknown Source)
 at com.ibm.ObjectQuery.crud.schema.DataStoreMap.build(Unknown Source)
 at com.ibm.ObjectQuery.crud.schema.DataStoreMap.initialize(Unknown Source)
 at com.ibm.ObjectQuery.crud.schema.DataStoreMap.<init>(Unknown Source)
 at com.ibm.ObjectQuery.crud.schema.DataStoreMap.singletonFor(Unknown Source)
 at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.generateQueries(Unknown Source)
 at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.getClassMapsForBackend(Unknown Source)
 at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.invokeCodeGeneration(Unknown Source)
 at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doRun(Unknown Source)
 at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.run(Unknown Source)
 at com.ibm.etools.ejbdeploy.EJBDeployer.visit(Unknown Source)
 at com.ibm.etools.ejbdeploy.EJBDeployer.visit(Unknown Source)
 at com.ibm.etools.ejbdeploy.EJBDeployer.doExecute(Unknown Source)
 at com.ibm.etools.ejbdeploy.EJBDeployer.execute(Unknown Source)
 at com.ibm.ws.sca.runtime.core.deployer.SCAJ2EEDeployer.execute(Unknown Source)
 at org.eclipse.jst.j2ee.internal.deploy.J2EEDeployOperation.deploy(Unknown Source)
 at org.eclipse.jst.j2ee.internal.deploy.J2EEDeployOperation.execute(Unknown Source)
 at org.eclipse.jst.j2ee.internal.actions.J2EEDeployAction$1.run(Unknown Source)
 at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)

Cause

The required mapping between the back-end database and the enterprise beans has not been defined.

Diagnosing The Problem

The following is an example (specific to DB2) of a file in which errors can occur in the WebSphere Integration Developer Problems view:
<Workspace>\<Project_Name>\ejbModule\META-INF\backends\DB2UDBNT_V82_1\Map.mapxmi

Resolving The Problem

Use one of the following approaches to map the enterprise beans to database tables. Note that you might need to redeploy the application after following the steps.


Generating a meet-in-the-middle mapping

http://www.ibm.com/support/knowledgecenter/SSRTLW_8.5.1/com.ibm.ejbdeploy.doc/topics/temapmm.html


Generating a bottom-up mapping using an existing EJB project

http://www.ibm.com/support/knowledgecenter/SSRTLW_8.5.1/com.ibm.ejbdeploy.doc/topics/temapbuejbproject.html

Generating a bottom-up mapping using an existing database

http://www.ibm.com/support/knowledgecenter/SSRTLW_8.5.1/com.ibm.ejbdeploy.doc/topics/temapbu.html

Generating a top-down mapping

http://www.ibm.com/support/knowledgecenter/SSRTLW_8.5.1/com.ibm.ejbdeploy.doc/topics/temaptd.html

[{"Product":{"code":"SSBN76","label":"WebSphere Dynamic Process Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"WebSphere Integration Developer","Platform":[{"code":"PF033","label":"Windows"}],"Version":"6.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"","label":""}],"Version":"7.5.4","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21439109