Hi,
I'm trying to deploy two cmp entity beans (TradeInstance and TradeGroup), both
having a compound primary key. The TradeInstancePK-class uses the cmp fields tradeId
and versionNo, TradeGroupPK uses the fields groupType and groupId.
I also have a many to many relation between the two beans. When i deploy i get
an exception complaining about the key-columns i set in the relationship-role-maps.
I use weblogic 8.1.
i'm new to CMP, if anyone could give me hint how to correctly write the relationship
role maps, that would be very nice, thanks.
I also attached ejb-jar. xml and weblogic-cmp-jar.xml

The Exception:
.....
Unable to deploy EJB: ext_til_mock_ejb.jar from ext_til_mock_ejb.jar:

[EJB:011017]Error while reading 'META-INF/weblogic-cmp-jar.xml'. The error was:

Role 'Trade-BelongsTo-TradeGroup' of relationship 'Trade-Group' contains an invalid
key-column value of 'GroupId'. The key-column must specify a primary key column
in the related bean. However, there is no primary key column named 'GroupId' defined
in the related bean 'TradeGroup' or else 'GroupId' is not being recognized due
to case mismatch.

Role 'Trade-BelongsTo-TradeGroup' of relationship 'Trade-Group' contains an invalid
key-column value of 'GroupType'. The key-column must specify a primary key column
in the related bean. However, there is no primary key column named 'GroupType'
defined in the related bean 'TradeGroup' or else 'GroupType' is not being recognized
due to case mismatch.

Role 'TradeGroup-Has-Trades' of relationship 'Trade-Group' contains an invalid
key-column value of 'TradeId'. The key-column must specify a primary key column
in the related bean. However, there is no primary key column named 'TradeId' defined
in the related bean 'TradeInstance' or else 'TradeId' is not being recognized
due to case mismatch.

Role 'TradeGroup-Has-Trades' of relationship 'Trade-Group' contains an invalid
key-column value of 'VersionNo'. The key-column must specify a primary key column
in the related bean. However, there is no primary key column named 'VersionNo'
defined in the related bean 'TradeInstance' or else 'VersionNo' is not being recognized
due to case mismatch.
..
at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompi ler.java:255)
......

ejb-jar.xml:


Test
test


TradeGroup
test.TradeGroupLocalHome
test.TradeGroupLocal
test.TradeGroupBean
Container
test.TradeGroupPK
False
2.x
TradeGroupBean
groupType
groupId


TradeInstance
test.TradeInstanceLocalHome
test.TradeInstanceLocal
test.TradeInstanceBean
Container
test.TradeInstancePK
False
2.x
TradeInstanceBean
tradeId
versionNo
tradeMessage




Trade-Group

Trade-BelongsTo-TradeGroup
Many

TradeInstance


groups
java.util.Collection



TradeGroup-Has-Trades
Many

TradeGroup


trades
java.util.Collection




..
..
..
..
..




weblogic-cmp-jar.xml:




TradeGroup
jdbc/tcs

TradeGroup

groupId
GroupId


groupType
GroupType






TradeInstance
jdbc/tcs

TradeInstance

tradeId
TradeId


tradeMessage
TradeMessage


versionNo
VersionNo






Trade-Group
TradeGroupJoin

Trade-BelongsTo-TradeGroup


GroupId
GroupId


GroupType
GroupType




TradeGroup-Has-Trades


TradeId
TradeId


VersionNo
VersionNo





DropAndCreate
Oracle