JB7的常見編譯錯誤!!

eagledad發表於2002-12-23
我在JB7下作了個CMP2。0 Bean,該BEAN 名為:TestPaper .在該BEAN 的HOME介面中定義了一個finder方法,在EJB-JAR.XML中定義如下:
// <query>
// <query-method>
// <method-name>findBytypeID</method-name>
// <method-params>
// <method-param>String</method-param>
// </method-params>
// </query-method>
// <ejb-ql>SELECT OBJECT(T) FROM TestPaper AS T WHERE T.typeID=?1</ejb-ql>
// </query>


在該BEAN的HOME介面如下:

package entbean;

import javax.ejb.*;
import java.util.*;

public interface TestPaperHome extends javax.ejb.EJBLocalHome {
public TestPaper create(String iD) throws CreateException;
public Collection findBytypeID(String typeID) throws FinderException;
public TestPaper findByPrimaryKey(String iD) throws FinderException;
}

但是在我用JB7編譯時出現以下錯誤提示資訊:(伺服器用的是WEBLOGIC7)

"Ent.ejbgrpx": ERROR: Error from ejbc: Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
"Ent.ejbgrpx":
"Ent.ejbgrpx": invalid query: In EJB TestPaper, for a query defined in the ejb-jar.xml file with a method signature, findBytypeID(String), we failed to find a corresponding method in the remote home interface, local home interface, or bean class that matches this signature. Note that class parameters such as java.lang.String must be fully qualified, thus 'String' would not match 'java.lang.String'.
"Ent.ejbgrpx": ERROR: ejbc found errors


哪位高手能指點一下嗎?

相關文章