Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Invalid Jar file.No JavaBean available for import

Hi All,

Im having problem when im creating the model for my command bean.It gives error saying 'Invalid jar file.No JavaBean available for import.'

My Java class is as follows:

public class MyGetEmpCommandBean {

private String emp_Id;

private GetEmpEntityLocal[] collResponse;

GetEmpSessionLocalHome localhomeInt = null;

GetEmpSessionLocal localcompInt = null;

public MyGetEmpCommandBean() {

try {

InitialContext ctx = new InitialContext();

localhomeInt =

(GetEmpSessionLocalHome) ctx.lookup(

"localejbs/EmpSessionBean");

localcompInt = localhomeInt.create();

//localcompInt.addAll(localhomeInt.findAllResponses(strUser,strLocation,ForMonth));

} catch (Exception namingException) {

namingException.printStackTrace();

}

}

public void Execute() {

// localcompInt.addAll(localhomeInt.findAllResponses(strUser,strLocation,ForMonth));

try {

//int len = localcompInt.bMGetResponses(getStrLocation(),getForMonth(),getStrUser()).length;

collResponse =localcompInt.bMGetResponses(getEmp_Id());

} catch (Exception e) {

e.printStackTrace();

return;

}

}

/**

  • @return

*/

public GetEmpEntityLocal[] getCollResponse() {

try {

this.Execute();

return collResponse;

}catch (Exception e) {

e.printStackTrace();

return null;

}

}

/**

  • @return

*/

public String getEmp_Id() {

return emp_Id;

}

/**

  • @param locals

*/

public void setCollResponse(GetEmpEntityLocal[] locals) {

collResponse = locals;

}

/**

  • @param string

*/

public void setEmp_Id(String string) {

emp_Id = string;

}

}

Is there anything in the java class..What could be the possible error..

Any help would be appreciated..

Thanks and Regards,

Sonal

Former Member
Not what you were looking for? View more on this topic or Ask a question