hello
i need some help in EJB
DodAuthorisationHome dodAuthHome = (DodAuthorisationHome)PortableRemoteObject.narrow(context.lookup("DodAuthorisation"), DodAuthorisationHome.class);
DodAuthorisation dodAuthorisation;
now the first line shows the java.lang.ClassCastException
why it occurs tell me plsssssssssssss
-
java.lang.ClassCastException (4 messages)
- Posted by: vikas gupta
- Posted on: July 15 2005 03:39 EDT
Threaded Messages (4)
- java.lang.ClassCastException by sawan parihar on July 15 2005 04:26 EDT
- java.lang.ClassCastException by vikas gupta on July 15 2005 05:56 EDT
- java.lang.ClassCastException by Time PassX on July 15 2005 06:14 EDT
- Re: java.lang.ClassCastException by Malaka Silva on September 29 2006 02:31 EDT
-
java.lang.ClassCastException[ Go to top ]
- Posted by: sawan parihar
- Posted on: July 15 2005 04:26 EDT
- in response to vikas gupta
Hello Vikas,
Which app server you are using and can you post remote and home interface.
cheers. -
java.lang.ClassCastException[ Go to top ]
- Posted by: vikas gupta
- Posted on: July 15 2005 05:56 EDT
- in response to sawan parihar
Hello sir
i am using OC4J server
and
my home and remote interface are:--
package model.CMP;
import java.sql.Date;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
import java.sql.Timestamp;
public interface DodAuthorisation extends EJBObject
{
String getAuthorisationNo() throws RemoteException;
String getBrCode() throws RemoteException;
void setBrCode(String brCode) throws RemoteException;
String getInvoiceNo() throws RemoteException;
void setInvoiceNo(String invoiceNo) throws RemoteException;
Date getInvoiceDate() throws RemoteException;
void setInvoiceDate(Date invoiceDate) throws RemoteException;
double getInvoiceValue() throws RemoteException;
void setInvoiceValue(double invoiceValue) throws RemoteException;
double getRebookDays() throws RemoteException;
void setRebookDays(double rebookDays) throws RemoteException;
String getDelvBranch() throws RemoteException;
void setDelvBranch(String delvBranch) throws RemoteException;
String getPoNo() throws RemoteException;
void setPoNo(String poNo) throws RemoteException;
Date getPoDate() throws RemoteException;
void setPoDate(Date poDate) throws RemoteException;
String getCngrRefNo() throws RemoteException;
void setCngrRefNo(String cngrRefNo) throws RemoteException;
String getSafexRefNo() throws RemoteException;
void setSafexRefNo(String safexRefNo) throws RemoteException;
String getCnmtNo() throws RemoteException;
void setCnmtNo(String cnmtNo) throws RemoteException;
Date getAuthDate() throws RemoteException;
void setAuthDate(Date authDate) throws RemoteException;
double getAuthAmount() throws RemoteException;
void setAuthAmount(double authAmount) throws RemoteException;
char getFormCYn() throws RemoteException;
void setFormCYn(char formCYn) throws RemoteException;
double getDraftAmount() throws RemoteException;
void setDraftAmount(double draftAmount) throws RemoteException;
double getChequeAmount() throws RemoteException;
void setChequeAmount(double chequeAmount) throws RemoteException;
String getDraftFavourOf() throws RemoteException;
void setDraftFavourOf(String draftFavourOf) throws RemoteException;
String getChequeFavourOf() throws RemoteException;
void setChequeFavourOf(String chequeFavourOf) throws RemoteException;
String getDraftPayableAt() throws RemoteException;
void setDraftPayableAt(String draftPayableAt) throws RemoteException;
String getChequePayableAt() throws RemoteException;
void setChequePayableAt(String chequePayableAt) throws RemoteException;
char getCancel() throws RemoteException;
void setCancel(char cancel) throws RemoteException;
String getUserName() throws RemoteException;
void setUserName(String userName) throws RemoteException;
Date getEntDate() throws RemoteException;
void setEntDate(Date entDate) throws RemoteException;
String getModifyBy() throws RemoteException;
void setModifyBy(String modifyBy) throws RemoteException;
Date getModifyDate() throws RemoteException;
void setModifyDate(Date modifyDate) throws RemoteException;
}
***************************************
package model.CMP;
import javax.ejb.EJBHome;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.FinderException;
import java.util.Collection;
import java.sql.Date;
public interface DodAuthorisationHome extends EJBHome
{
DodAuthorisation findByPrimaryKey(String primaryKey) throws RemoteException, FinderException;
Collection findAll() throws RemoteException, FinderException;
DodAuthorisation create(String dauthorisation_No, String dbr_code, String dinvoice_no, Date dinvoice_date, double dinvoice_value, double drebook_days,String ddelv_branch, String dpo_no, Date dpo_date, String dcngr_ref_no, String dsafex_ref_no, String dcnmt_no, Date dauth_date, double dauth_amount, char dform_c_yn, double ddraft_amount, double ddcheque_amount, String ddraft_favour_of, String dcheque_favour_of, String ddraft_payable_at, String dcheque_payable_at,char dcancel,String duser_name, Date dent_date, String dmodify_by, Date dmodify_date) throws RemoteException, CreateException;
}
**************************************** -
java.lang.ClassCastException[ Go to top ]
- Posted by: Time PassX
- Posted on: July 15 2005 06:14 EDT
- in response to vikas gupta
Is your home interface bound in jndi using "DodAuthorisation", that'd be first thing I'd check in your ejb jar xml DD. -
Re: java.lang.ClassCastException[ Go to top ]
- Posted by: Malaka Silva
- Posted on: September 29 2006 02:31 EDT
- in response to vikas gupta
If you deploy ejb and jsp/servelet on the same server(JBOSS4.0.3) You do not need to copy client.jar files to the jsp's lib folder. If you do it'll give class cast exception.