首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

ejb3对象导入struts后,为空。解决思路

2012-03-17 
ejb3对象导入struts后,为空。public class NewVehicleAction extends ActionSupport{private Vehicle vehic

ejb3对象导入struts后,为空。
public class NewVehicleAction extends ActionSupport{

private Vehicle vehicle;

@InjectEJB(name="grp/EntityInheritanceDAO")
private EntityInheritanceDAO entityInheritanceDAO;


public String execute() throws Exception{
//if (entityInheritanceDAO==null)
//return ERROR;
//else
entityInheritanceDAO.initializeDate(); /////////执行到此处,
/////////////////////////////////////////////////////////由于entityInheritanceDAO为空,所以报错
return SUCCESS;

.................下略

请问该如何办,注入的对象是不是怎样才不为空?

[解决办法]
别的代码和配置呢

热点排行