又一个新问题
"fctR.ejbgrpx": ERROR: Error parsing 'ejb-jar.xml' line 128: The content of element type "relationship-role-source" is incomplete, it must match "(description?,ejb-name)".
我在做两个实体BEAN的关联时报错
  <relationships>
        <ejb-relation>
            <ejb-relation-name>cmp-fctecm</ejb-relation-name>
            <ejb-relationship-role>
                <description>cmp</description>
                <ejb-relationship-role-name>cmpRelationshipRole</ejb-relationship-role-name>
                <multiplicity>one</multiplicity>
                <relationship-role-source />
                <cmr-field>
                    <description>fctecm</description>
                    <cmr-field-name>fctecm</cmr-field-name>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <description>fctecm</description>
                <ejb-relationship-role-name>fctecmRelationshipRole</ejb-relationship-role-name>
                <multiplicity>one</multiplicity>
                <relationship-role-source />
                <cmr-field>
                    <description>cmp</description>
                    <cmr-field-name>cmp</cmr-field-name>
                </cmr-field>
            </ejb-relationship-role>
        </ejb-relation>
    </relationships>
我把<relationship-role-source />替换成<relationship-role-source>
<ejb-nam>cmpT</ejb-name>
</relationship-role-source>也不行

解决方案 »

  1.   

    第一个问题,是你在影射实体bean时,数据类型有问题,你把BigDecimal类型的修改成double或者其他的数据类型就可以了。
      

  2.   

    这句代码与误吧:home = (ContHome) PortableRemoteObject.narrow(
             ctx.lookup("ContHome"), ContHome.class);
    narrow的第一个参数应该就是Object obj = ctx.lookup("Cont");
    中的obj 啊,改为
    home = (ContHome) PortableRemoteObject.narrow( obj , ontHome.class);
    试试看看
      

  3.   

    "fctR.ejbgrpx": ERROR: Error parsing 'ejb-jar.xml' line 128: The content of element type "relationship-role-source" is incomplete, it must match "(description?,ejb-name)".
    我在做两个实体BEAN的关联时报错
      <relationships>
            <ejb-relation>
                <ejb-relation-name>cmp-fctecm</ejb-relation-name>
                <ejb-relationship-role>
                    <description>cmp</description>
                    <ejb-relationship-role-name>cmpRelationshipRole</ejb-relationship-role-name>
                    <multiplicity>one</multiplicity>
                    <relationship-role-source />
                    <cmr-field>
                        <description>fctecm</description>
                        <cmr-field-name>fctecm</cmr-field-name>
                    </cmr-field>
                </ejb-relationship-role>
                <ejb-relationship-role>
                    <description>fctecm</description>
                    <ejb-relationship-role-name>fctecmRelationshipRole</ejb-relationship-role-name>
                    <multiplicity>one</multiplicity>
                    <relationship-role-source />
                    <cmr-field>
                        <description>cmp</description>
                        <cmr-field-name>cmp</cmr-field-name>
                    </cmr-field>
                </ejb-relationship-role>
            </ejb-relation>
        </relationships>
    我把<relationship-role-source />替换成<relationship-role-source>
    <ejb-nam>cmpT</ejb-name>
    </relationship-role-source>也不行
      

  4.   

    写了个实体BEAN,写的CLIENT。JAVA是可以运行的,可是把相同的代码嵌入JSP时,,他总在找BEAN的时候抛出异常,如果JSP调用CLIENT。JAVA,也同样
    是不是我的配置还是有问题啊