IBM Support

NullPointerException during deployment of an EJB project

Technote (troubleshooting)


Problem(Abstract)

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


Cross reference information
Segment Product Component Platform Version Edition
Software Development Rational Application Developer for WebSphere Software 7.5.4

Document information

More support for: WebSphere Dynamic Process Edition
WebSphere Integration Developer

Software version: 6.2

Operating system(s): Windows

Reference #: 1439109

Modified date: 19 July 2010