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 !!