EJB问题,在线等待..............
Cango 2003-10-14 11:05:55 为什么我在CMP Bean中重载了一个ejbCreate方法:
public java.lang.String ejbCreate(java.lang.String accountno) throws CreateException {
setAccountno(accountno);
return null;
}
public java.lang.String ejbCreate(String accountno, String customer, Integer sex, Double account, String phone, String address, Date birthday, Date opendate) throws CreateException {
/**@todo Complete this method*/
setAccountno(accountno);
setCustomer(customer);
setSex(sex);
setAccount(account);
setPhone(phone);
setAddress(address);
setBirthday(birthday);
setOpendate(opendate);
return null;
}
public void ejbPostCreate(java.lang.String accountno) throws CreateException {
/**@todo Complete this method*/
}
public void ejbPostCreate(String accountno, String customer, Integer sex, Double account, String phone, String address, Date birthday, Date opendate) throws CreateException {
/**@todo Complete this method*/
}
为什么重载之后,就编译不过呢?????编译时的错误信息:
"DataCenter.jar": Spaces in the temporary directory path may cause WebLogic APPC utility to produce fatal compile errors.
"DataCenter.jar": D:\DevTools\j2sdk14\bin\javaw -classpath "E:\Work\echon\TestEJB\classes;D:\DevTools\bea\weblogic81\server\lib\weblogic_sp.jar;D:\DevTools\bea\weblogic81\server\lib\weblogic.jar;D:\DevTools\bea\weblogic81\server\lib\webservices.jar;D:\JdbcDriver\classes12.jar;D:\JdbcDriver\msbase.jar;D:\JdbcDriver\mssqlserver.jar;D:\JdbcDriver\msutil.jar;" weblogic.appc -keepgenerated -forceGeneration -compiler D:/DevTools/j2sdk14/bin/javac E:/Work/echon/TestEJB/DataCenter.jar.jar -output E:/Work/echon/TestEJB/DataCenter.jar
"DataCenter.jar": <2003-10-14 上午10时42分10秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Bank has a class cn.com.echon.kwl.datacenter.ejb.entity.BankBean that is in the classpath. This class should only be located in the ejb-jar file.>
"DataCenter.jar": <2003-10-14 上午10时42分10秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Bank has a class cn.com.echon.kwl.datacenter.ejb.entity.BankHome that is in the classpath. This class should only be located in the ejb-jar file.>
"DataCenter.jar": <2003-10-14 上午10时42分10秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Bank has a class cn.com.echon.kwl.datacenter.ejb.entity.Bank that is in the classpath. This class should only be located in the ejb-jar file.>
"DataCenter.jar": [J2EE:160121]Errors encountered while compiling module 'E:\Work\echon\TestEJB\DataCenter.jar.jar':
"DataCenter.jar": In EJB Bank, the create method create(java.lang.String,java.lang.String,java.lang.Integer,java.lang.Double,java.lang.String,java.lang.String,java.util.Date,java.util.Date) did not have a corresponding ejbPostCreate method in the bean class.
"DataCenter.jar": In EJB Bank, the local home create method ejbCreate(java.lang.String,java.lang.String,java.lang.Integer,java.lang.Double,java.lang.String,java.lang.String,java.util.Date,java.util.Date) did not have a corresponding ejbCreate method in the bean class, or the ejbCreate method in the bean class was not public.
但我昨天也试过同样的做法,也没问题,可就是今天重新做一遍就出现此问题了