Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Generate deployed code for Entity Bean in AE

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using AE 4.0. I have a ejb jar file that was created in WSAD. The jar file has only entity beans and deployed code has already been generated. I have successfully deployed the EJBs (in the format of an ear file of course) and tested it.

Everything sounds fine till this point, right? OK, here comes the problem. I wanted to see how to generate deployed code using AAT, so I opened jar file in AAT and tried to generate deployed code. I got the following exception:
Starting workbench.
Creating the project.
Creating EJB Project...
Creating EJB Project... Opening: /Deployed_EnitityBeanOnly.jar.
Creating EJB Project...
Creating EJB Project... Setting classpath...
Creating EJB Project...
Updating.
Importing Jar..
Importing file..
Updating.
An unexpected exception was thrown. Halting execution.
Shutting down workbench.
Error importing jar: Error importing Module File.
>com.ibm.etools.ejbdeploy.EJBDeploymentException (Error importing jar: Error importing Module File.)
com.ibm.etools.wft.util.WFTWrappedException: Error importing Module File
IWAJ0215E Stack trace of nested exception:
java.lang.NullPointerException
at com.ibm.ejs.models.base.extensions.ejbext.impl.EJBJarExtensionImpl.containsFinderDescriptors(EJBJarExtensionImpl.java:64)
at com.ibm.etools.commonarchive.impl.EJBJarFileImpl.reflectFinderDescriptorsIfNecessary(EJBJarFileImpl.java:251)
at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.reflectFinderHelperMetaDataIfPossible(EJBJarImportOperation.java:203)
at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.save(EJBJarImportOperation.java:239)
at com.ibm.etools.archive.j2ee.operations.J2EEImportOperation.importModuleFile(J2EEImportOperation.java:225)
at com.ibm.etools.archive.j2ee.operations.J2EEImportOperation.execute(J2EEImportOperation.java:136)
at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.execute(EJBJarImportOperation.java:84)
at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation$1.run(HeadlessJ2EEOperation.java:56)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1197)
at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation.run(HeadlessJ2EEOperation.java:70)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.importJar(BatchExtension.java:638)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:849)
at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute(BatchDeploy.java:122)
at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:60)
at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:240)
I am not sure if this is because my jar file already has deployed code or what. Any suggestion is welcomed. Thanks!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to add entity id in ejb-jar.xml
for example:
...
<entity id="UserLogin_1">
...
</entity>
....
Then in ibm-ejb-jar-ext.xmi file, you need to point to the ID. like:
<finderMethodElements xmi:id="MethodElement_1" name="findByUserID" parms="int" type="Home">
<enterpriseBean xsi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#UserLogin_1"/>
</finderMethodElements>
Hope this help you. Good Luck!
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic