一个含有EQL的部署为什么总不成功呢?

04-11-09 z_yu_yun

我在一个实体Bean中定义了一个查找方法,其jar文件如下所示,为什么部署时老出错呢?错误如下: Depends On Me: org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(a)FROM DrvBscI

nf AS a WHERE a.drivername = ?1'; - nested throwable: (java.lang.NoSuchMethodError)]

哪位高手能指点一下是怎么回事呢?

<?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>
  <display-name>EQLTest</display-name>
  <enterprise-beans>
    <entity>
      <display-name>DrvBscInf</display-name>
      <ejb-name>DrvBscInf</ejb-name>
      <home>eqltest.DrvBscInfRemoteHome</home>
      <remote>eqltest.DrvBscInfRemote</remote>
      <local-home>eqltest.DrvBscInfHome</local-home>
      <local>eqltest.DrvBscInf</local>
      <ejb-class>eqltest.DrvBscInfBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>eqltest.DrvBscInfPK</prim-key-class>
      <reentrant>False</reentrant>
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>DrvBscInf</abstract-schema-name>
      <cmp-field>
        <field-name>birthday</field-name>
      </cmp-field>
      <cmp-field>
        <field-name>driverid</field-name>
      </cmp-field>
      <cmp-field>
        <field-name>drivername</field-name>
      </cmp-field>
      <query>
        <query-method>
          <method-name>findMethod1</method-name>
          <method-params>
            <method-param>java.lang.String</method-param>
          </method-params>
        </query-method>
        <ejb-ql>
          <![CDATA[SELECT OBJECT(a)FROM DrvBscInf AS a WHERE a.drivername = ?1]]>
        </ejb-ql>
      </query>
    </entity>
  </enterprise-beans>
  <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>DrvBscInf</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>

<p>