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

com.sun.jdi.InvocationException occurred invoking method.

2011-11-14 
com.sun.jdi.InvocationException occurred invoking method.映射文件hibernate-mapping packagecom.zd

com.sun.jdi.InvocationException occurred invoking method.
映射文件
<hibernate-mapping package="com.zdvictory.wjj.pricesend.view" default-lazy="true">
  <class name="PcServerObject" table="PC_SERVER_OBJECT" dynamic-insert="true" dynamic-update="true">
  <id name="so_id" column="SO_ID">
  <generator class="uuid.hex">
  </generator>
  </id>
  <property name="so_servicename" column="SO_SERVICENAME"/>
  <property name="so_linktel" column="SO_LINKTEL"/>
  <property name="so_linkfax" column="SO_LINKFAX"/>
  <property name="so_linkmail" column="SO_LINKMAIL"/>
  <property name="so_linkaddress" column="SO_LINKADDRESS"/>
  <property name="so_medium" column="SO_MEDIUM"/>
  <property name="so_class" column="SO_CLASS"/>
   
  <set name="pcDataHistoryRefers" lazy="true" inverse="true">
  <key column="so_id"></key>
  <one-to-many class="PcDataHistoryRefer" />
  </set>
   
  </class>
</hibernate-mapping>

<hibernate-mapping package="com.zdvictory.wjj.pricesend.view" default-lazy="true">
  <class name="PcDataHistoryRefer" table="PC_DATA_HISTORY_REFER" dynamic-insert="true" dynamic-update="true">
  <id name="dhr_id" column="DHR_ID">
  <generator class="uuid.hex">
  </generator>
  </id>
  <property name="so_id" column="SO_ID"/>
  <property name="dhr_medium" column="DHR_MEDIUM"/>
  <property name="dhr_referstate" column="DHR_REFERSTATE"/>
  <property name="dhr_refertime" column="DHR_REFERTIME"/>
  <many-to-one name="pcServerObject" column="so_id"/>
  </class>
</hibernate-mapping>

action里面的方法
public String list() throws Exception {
//今日发送情况
List sendList=getPcServerObjectService().findPcServerObject();

  request.setAttribute("sendList", sendList);
  return SUCCESS;
}

jsp页面取值
<%List sendList=(List)request.getAttribute("sendList"); 
  int amount=sendList.size();
  for(int j=0;j<amount;j++){
  PcServerObject pcServerObject=(PcServerObject)sendList.get(j);
  if(pcServerObject!=null){
  %>
  <tr bgcolor="#ffffff">
<td align="center"><%=j+1 %></td>
<td><%switch(pcServerObject.getSo_class()){
case 0:out.print("国家");break;
case 1:out.print("省级");break;
case 2:out.print("媒体");break;
case 3:out.print("市场");break;
} %></td>
<td><%=pcServerObject.getSo_servicename() %></td>
<%String referTime="";
for(Iterator iter=pcServerObject.getPcDataHistoryRefers().iterator();iter.hasNext();){
PcDataHistoryRefer pdhr=(PcDataHistoryRefer)iter.next();
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
String cTime=format.format(Calendar.getInstance().getTime());


referTime=pdhr.getDhr_refertime();
if(cTime.equals(referTime.substring(0,10))){
%>

<%
}
}
%>
<td align="center"><span class="tableItem1">√</span></td>
<td align="center"><span class="tableItem1">√</span></td>
<td align="center"><span class="tableItem1">√</span></td>
 
<td><%if("传真".equals(pcServerObject.getSo_medium())){out.print(pcServerObject.getSo_linkfax());}
else{out.print(pcServerObject.getSo_linkmail());}
%></td>
<td align="center"></td>
</tr>
  <%}
  }%>


这句报错:Iterator iter=pcServerObject.getPcDataHistoryRefers().iterator();iter.hasNext();

错误如题:com.sun.jdi.InvocationException occurred invoking method.

请教高手。。。


[解决办法]
default-lazy="false">
[解决办法]
<hibernate-mapping package="com.zdvictory.wjj.pricesend.view" default-lazy="true"> 

热点排行