Topic
  • 4 replies
  • Latest Post - ‏2009-06-11T18:21:09Z by SystemAdmin
SystemAdmin
SystemAdmin
6040 Posts

Pinned topic RAD 7: Error in "Prepare For Deployment" - EJB project created in WSAD 5.

‏2008-01-26T22:44:31Z |
Hi,
We are migrating our code form WSAD 5.1.2 to RAD 7. Oh! what a painful experience. The simple projects like Web and other Java projects are easy to do and we able to run them on WAS 6 but EJB projects are real pain in the neck.

I am able to import the EJB projects (of Session and Entity beans). The EJB project is using WAS 5 jars in the classpath. I have made the relevant changes also for the Bean to table mappings (Map.xmimap file), but moment I run the "Prepare For Deployment" command it throws following exception:

com.ibm.etools.ejbdeploy.plugin.InternalErrorGenerationException: Error generating findByPrimaryKeyWithReadAhead query for bean User (Abstract schema name=User). Error=java.lang.NullPointerException null at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCache.initReadAheadQueries(Unknown Source) at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCache.initQueryCache(Unknown Source) at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheHelper.<init>(Unknown Source) at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.initQueries(Unknown Source) at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.init(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.doExecute(Unknown Source) at com.ibm.etools.ejbdeploy.EJBDeployer.execute(Unknown Source) at org.eclipse.jst.j2ee.internal.deploy.J2EEDeployOperation.deploy(Unknown Source)

We are stuck at the moment - I have recreated the mapping etc hundred times but it still doesn't work. Interestingly, it works to an extent when I export the EJB jar and run the ejdeploy utility ("C:\Program Files\IBM\SDP70\runtimes\base_v61\bin") from command line. It generates relevant EJB classes but along with it there are host of compilation errors. This could be due the class path which is pointing to WAS 5 runtime lib rather than WAS 6? Not sure.

Any Help will be more than welcome.
Updated on 2009-06-11T18:21:09Z at 2009-06-11T18:21:09Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6040 Posts

    Re: RAD 7: Error in "Prepare For Deployment" - EJB project created in WSAD

    ‏2008-02-07T16:31:01Z  
    I am getting a different error now after recreating my Mapping file...
    Any one any ideas?

    !ENTRY org.eclipse.jst.j2ee 4 0 2008-02-07 16:25:06.236
    !MESSAGE Deploying cdaAdminEJB
    !SUBENTRY 1 2008-02-07 16:25:06.236
    !MESSAGE J2EEDeployOperation_2_UI_
    !SUBENTRY 1 org.eclipse.jst.j2ee 4 4 2008-02-07 16:25:06.236
    !MESSAGE Deployment from com.ibm.etools.ejbdeploy.EJBDeployer had errors:

    !STACK 0
    java.lang.NullPointerException
    at com.ibm.etools.ejbdeploy.properties.ResourceProperties.getGenerationFolder(Unknown Source)
    at com.ibm.etools.ejbdeploy.exec.sqlj.SQLJOperation.getAntScriptFile(Unknown Source)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.validateEdit(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.doExecute(Unknown Source)
    at com.ibm.etools.ejbdeploy.EJBDeployer.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)
  • SystemAdmin
    SystemAdmin
    6040 Posts

    Re: RAD 7: Error in "Prepare For Deployment" - EJB project created in WSAD

    ‏2008-02-11T13:23:47Z  
    I am getting a different error now after recreating my Mapping file...
    Any one any ideas?

    !ENTRY org.eclipse.jst.j2ee 4 0 2008-02-07 16:25:06.236
    !MESSAGE Deploying cdaAdminEJB
    !SUBENTRY 1 2008-02-07 16:25:06.236
    !MESSAGE J2EEDeployOperation_2_UI_
    !SUBENTRY 1 org.eclipse.jst.j2ee 4 4 2008-02-07 16:25:06.236
    !MESSAGE Deployment from com.ibm.etools.ejbdeploy.EJBDeployer had errors:

    !STACK 0
    java.lang.NullPointerException
    at com.ibm.etools.ejbdeploy.properties.ResourceProperties.getGenerationFolder(Unknown Source)
    at com.ibm.etools.ejbdeploy.exec.sqlj.SQLJOperation.getAntScriptFile(Unknown Source)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.validateEdit(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.doExecute(Unknown Source)
    at com.ibm.etools.ejbdeploy.EJBDeployer.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)
    I am able to run the ejbdeploy from the workspace as well but by hook and crook.

    1) Uncheck "Build Automatically"
    2) Remove the EJB from EAR.
    3) On EJB project "Update EAR libraries"
    4) Run "Prepare for Deployment"
    5) Add the EJB back to EAR project and deploy it on the server

    Not ideal but it is doing the job, the ear and EJBs are getting deployed.
  • SystemAdmin
    SystemAdmin
    6040 Posts

    Re: RAD 7: Error in "Prepare For Deployment" - EJB project created in WSAD

    ‏2008-08-26T13:36:18Z  
    I am able to run the ejbdeploy from the workspace as well but by hook and crook.

    1) Uncheck "Build Automatically"
    2) Remove the EJB from EAR.
    3) On EJB project "Update EAR libraries"
    4) Run "Prepare for Deployment"
    5) Add the EJB back to EAR project and deploy it on the server

    Not ideal but it is doing the job, the ear and EJBs are getting deployed.
    Hi

    I have migrated the code from WSAD to RAD 7.0 with Application server 6.1 in RAD 7.0. I am getting following error while deploy (select EJB project --> right click, select prepare for deployment ) project in RSA.

    Error message

    Deployment from com.ibm.etools.ejbdeploy.EJBDeployer had errors:
    Error During generation of deployment code : null

    Is there any problem in the app server or need to install any fixes?
    i tried the steps that you posted but is not working out, though it worked in my friends machine.
    Could any have face same problem? pls let me know workaround.

    Thanks in Advance
  • SystemAdmin
    SystemAdmin
    6040 Posts

    Re: RAD 7: Error in "Prepare For Deployment" - EJB project created in WSAD

    ‏2009-06-11T18:21:09Z  
    I am able to run the ejbdeploy from the workspace as well but by hook and crook.

    1) Uncheck "Build Automatically"
    2) Remove the EJB from EAR.
    3) On EJB project "Update EAR libraries"
    4) Run "Prepare for Deployment"
    5) Add the EJB back to EAR project and deploy it on the server

    Not ideal but it is doing the job, the ear and EJBs are getting deployed.
    puneet, I tried your steps but it did not work for me. I am trying other random things, hopefully one will work! what a pain !