Hi All,
i Get Error when i try to deploy and generate rmic code of
ejb module as "Cannot define correlation id b over a single-valued path expression balancecmpb" , i working on WSAD and database DB2.
There is a one-to-one relationship between two bean AddressCMPB and BalanceCMPB.
Query was "select object(o) from AddressCMPB as o,IN(o.balancecmpb) as b where o.ID=?1"
The ejb-jar is as following...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar id="ejb-jar_ID">
<display-name>NotToReleaseEJB</display-name>
<enterprise-beans>
<session id="SLSessionB">
<ejb-name>SLSessionB</ejb-name>
<home>not.to.release.ejb.session.SLSessionBHome</home>
<remote>not.to.release.ejb.session.SLSessionB</remote>
<ejb-class>not.to.release.ejb.session.SLSessionBBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<entity id="AddressCMPB">
<ejb-name>AddressCMPB</ejb-name>
<local-home>not.to.release.ejb.entity.AddressCMPBLocalHome</local-home>
<local>not.to.release.ejb.entity.AddressCMPBLocal</local>
<ejb-class>not.to.release.ejb.entity.AddressCMPBBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>not.to.release.ejb.entity.AddressCMPBKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>AddressCMPB</abstract-schema-name>
<cmp-field id="CMPAttribute_1075534727625">
<field-name>ID</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1075534727626">
<field-name>SSN</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1075534727627">
<field-name>NAME</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1075534727628">
<field-name>ADDRESS</field-name>
</cmp-field>
<ejb-local-ref id="EJBLocalRef_1076066303266">
<ejb-ref-name>ejb/BalanceCMPB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>not.to.release.ejb.entity.BalanceCMPBLocalHome</local-home>
<local>not.to.release.ejb.entity.BalanceCMPBLocal</local>
<ejb-link>BalanceCMPB</ejb-link>
</ejb-local-ref>
<query>
<description></description>
<query-method>
<method-name>findByID</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</query-method>
<ejb-ql>select object(o) from AddressCMPB o where o.ID = ?1</ejb-ql>
</query>
<query>
<description></description>
<query-method>
<method-name>ejbSelectID</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</query-method>
<ejb-ql>select o.ID from AddressCMPB o where o.ID=?1</ejb-ql>
</query>
<query>
<description></description>
<query-method>
<method-name>ejbSelectAddress</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</query-method>
<ejb-ql>select object(o) from AddressCMPB o where o.ID = ?1</ejb-ql>
</query>
<query>
<description></description>
<query-method>
<method-name>ejbSelectIDWithRelationBalanceCMPB</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</query-method>
<ejb-ql>select object(o) from AddressCMPB as o,IN(o.balancecmpb) as b where o.ID=?1</ejb-ql>
</query>
</entity>
<entity id="BalanceCMPB">
<ejb-name>BalanceCMPB</ejb-name>
<local-home>not.to.release.ejb.entity.BalanceCMPBLocalHome</local-home>
<local>not.to.release.ejb.entity.BalanceCMPBLocal</local>
<ejb-class>not.to.release.ejb.entity.BalanceCMPBBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>not.to.release.ejb.entity.BalanceCMPBKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>BalanceCMPB</abstract-schema-name>
<cmp-field id="CMPAttribute_1075556834266">
<field-name>ID</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1075556834312">
<field-name>BALANCE</field-name>
</cmp-field>
<ejb-local-ref id="EJBLocalRef_1076066303281">
<ejb-ref-name>ejb/AddressCMPB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>not.to.release.ejb.entity.AddressCMPBLocalHome</local-home>
<local>not.to.release.ejb.entity.AddressCMPBLocal</local>
<ejb-link>AddressCMPB</ejb-link>
</ejb-local-ref>
<query>
<description></description>
<query-method>
<method-name>findByid</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</query-method>
<ejb-ql>select object(o) from BalanceCMPB o where o.ID = ?1</ejb-ql>
</query>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<description></description>
<ejb-relation-name>AddressCMPB-BalanceCMPB</ejb-relation-name>
<ejb-relationship-role id="EJBRelationshipRole_1076066476578">
<ejb-relationship-role-name>balancecmpb</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>AddressCMPB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>balancecmpb</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role id="EJBRelationshipRole_1076066476594">
<ejb-relationship-role-name>addresscmpb</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>BalanceCMPB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>addresscmpb</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
</relationships>
<assembly-descriptor>
<method-permission>
<unchecked />
<method>
<ejb-name>AddressCMPB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>BalanceCMPB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>SLSessionB</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>
<container-transaction>
<method>
<ejb-name>AddressCMPB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>BalanceCMPB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>SLSessionB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
can you help me to solve the problem?
Thanks and Regards,
Biswajit Paria