• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent: Really weird CMP mapping problem with WSAD 4 and WAS 4

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>com.ibm.etools.ejbdeploy.EJBDeploymentException
java.lang.NullPointerException
at com.ibm.etools.ejbdeploy.strategies.RDBStrategy.getFieldTypeName(RDBStrategy.java:112)
at com.ibm.etools.ejbdeploy.strategies.SetterStrategy.visitAttributeMap(SetterStrategy.java:91)
at com.ibm.etools.ejbdeploy.strategies.RDBVisitor.visitMapping(RDBVisitor.java:52)
at com.ibm.etools.ejbdeploy.strategies.AttributeMapVisitor.run_(AttributeMapVisitor.java:37)
at com.ibm.etools.ejbdeploy.strategies.Visitor.doit(Visitor.java:33)
at com.ibm.etools.ejbdeploy.generators.mb.PersisterCreateMBGenerator.run(PersisterCreateMBGenerator.java:107)
at com.ibm.etools.codegen.BaseGenerator.runDependents(BaseGenerator.java:205)
at com.ibm.etools.java.codegen.JavaMethodGenerator.getBody(JavaMethodGenerator.java:288)
at com.ibm.etools.java.codegen.JavaMethodGenerator.generateMethod(JavaMethodGenerator.java:251)
at com.ibm.etools.java.codegen.JavaMethodGenerator.calculateMergeResults(JavaMethodGenerator.java:114)
at com.ibm.etools.java.codegen.JavaMethodGenerator.calculateMergeResults(JavaMethodGenerator.java:101)
at com.ibm.etools.java.codegen.JavaMemberGenerator.analyze(JavaMemberGenerator.java:38)
at com.ibm.etools.codegen.BaseGenerator.analyzeChildren(BaseGenerator.java:48)
at com.ibm.etools.codegen.BaseGenerator.primAnalyze(BaseGenerator.java:180)
at com.ibm.etools.codegen.BaseGenerator.analyze(BaseGenerator.java:39)
at com.ibm.etools.java.codegen.JavaMemberGenerator.analyze(JavaMemberGenerator.java:42)
at com.ibm.etools.codegen.BaseGenerator.analyzeChildren(BaseGenerator.java:48)
at com.ibm.etools.codegen.BaseGenerator.primAnalyze(BaseGenerator.java:180)
at com.ibm.etools.codegen.BaseGenerator.analyze(BaseGenerator.java:39)
at com.ibm.etools.java.codegen.JavaCompilationUnitGenerator.analyze(JavaCompilationUnitGenerator.java:90)
at com.ibm.etools.codegen.BaseGenerator.analyzeChildren(BaseGenerator.java:48)
at com.ibm.etools.codegen.BaseGenerator.primAnalyze(BaseGenerator.java:180)
at com.ibm.etools.codegen.BaseGenerator.analyze(BaseGenerator.java:39)
at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.deployCMP(EJBDeployOperation.java:184)
at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.run(EJBDeployOperation.java:587)
at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doit(EJBDeployOperation.java:228)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.invokeDeployment(BatchExtension.java:744)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:904)
at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute(BatchDeploy.java:129)
at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:68)
at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:248)
 
Michael Laufer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, the whole story is a bit longer ;-))
Hi,
I've a really weird problem with the CMP mapping in WSAD 4.0.2 and WAS 4.0.3(4).
We've migrated a couple of weeks ago our application from VAJ 4 to WSAD 4.0.2 and
our application runs within the IDE without any problem.
But the problem comes up when we try to create an automated build process.
We've added one (!!!) CMP attribute to an existing entity bean in WSAD, all the other CMP
beans are still the same as in VAJ 4.
The mapping feature from WSAD created therefore the
following entry in the mapping file map.mapxmi:

<nested xmi:id="Mapping_1">
<inputs xmi:type="RDBSchema:RDBColumn" href="META-INF/Schema/BD2Entity_DB2ADMIN_BUSINESSENTITY.tblxmi#RDBColumn_1"/>
<outputs xmi:type="ejb:CMPAttribute" href="META-INF/ejb-jar.xml#CMPAttribute_1"/>
<typeMapping href="JavatoDB2UDBNT_V71TypeMaps.xmi#int-INTEGER"/>
</nested>

this entry is definitely a bit more generic than the entries that are from VAJ 4, e.g.:
<nested xmi:id="BusinessEntity_customerNumber_AttributeMap">
<inputs xmi:type="RDBSchema:RDBColumn" href="META-INF/Schema/BD2Entity_DB2ADMIN_BUSINESSENTITY.tblxmi#BUSINESSENTITY_CUSTOMERNUMBER"/>
<outputs xmi:type="ejb:CMPAttribute" href="META-INF/ejb-jar.xml#BusinessEntity_customerNumber"/>
</nested>

But I thought that's no problem ;-)) since it seemed to me just as a different kind of mapping.
Unfortunately we're not able to create the deployed code for WAS with the command line tool ejbdeploy with the new mapping.

We're always getting the following exception in the creation process of the deployed code:
>com.ibm.etools.ejbdeploy.EJBDeploymentException
java.lang.NullPointerException
at com.ibm.etools.ejbdeploy.strategies.RDBStrategy.getFieldTypeName(RDBStrategy.java:112)
........

An the really weird thing about the whole story is the fact that everything works fine,
when I change the above entry from WSAD to the old VAJ pattern, i.e. I've changed

<nested xmi:id="Mapping_1">
<inputs xmi:type="RDBSchema:RDBColumn" href="META-INF/Schema/BD2Entity_DB2ADMIN_BUSINESSENTITY.tblxmi#RDBColumn_1"/>
<outputs xmi:type="ejb:CMPAttribute" href="META-INF/ejb-jar.xml#CMPAttribute_1"/>
<typeMapping href="JavatoDB2UDBNT_V71TypeMaps.xmi#int-INTEGER"/>
</nested>

to
<nested xmi:id="BusinessEntity_version_AttributeMap">
<inputs xmi:type="RDBSchema:RDBColumn" href="META-INF/Schema/BD2Entity_DB2ADMIN_BUSINESSENTITY.tblxmi#BUSINESSENTITY_VERSION"/>
<outputs xmi:type="ejb:CMPAttribute" href="META-INF/ejb-jar.xml#BusinessEntity_version"/>
<typeMapping href="JavatoDB2UDBNT_V71TypeMaps.xmi#int-INTEGER"/>
</nested>
and of course I've also changed the corresponding xmi id in the file BUSINESSENTITY.tblxmi from RDBColumn_1 to BUSINESSENTITY_VERSION.

And the result has really blown me away, the generation of the deployed code for the corresponding CMP bean runs
successfully !!!
Am I getting something totally wrong here or what the hell ....

Any help is really appreciated since I'm working on this problem since over three days and we really
need a solution (workaround) to get an automated build process for the code developed with WSAD 4.0.2.
Since we're going to have plenty of more CMP changes in the next weeks it's really
essential for me to understand the handling.
Are we missing any steps in WSAD???
Thanks in advance.
Michel

May the force be with us !!
 
Michael Laufer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Help, where are my xml phrases in my post above??
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Michael,
Put a space between the opening angle bracket "<" and the first word in each XML element. It's quite readable that way.
Kyle
P.S. Have you seen this article and its sequel?
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic