我从我的代码中收到以下错误:
尝试在堆栈上拆分 long 或 double
我对这个错误的起源一无所知,也不知道如何调试它。这说明什么样的问题?我该如何解决?
[ERROR] [Mon May 23 14:29:46 IST 2011] [(class: org/apache/jsp/dashboard_jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Attempt to split long or double on the stack] [10.97.34.222] hddlntdsz2350 [ session not set ]
java.lang.VerifyError: (class: org/apache/jsp/dashboard_jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Attempt to split long or double on the stack
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:273)
问题代码:我创建了一个模型,如下所示
public class DashboardViewModel implements Serializable {
/** defalut serialization id */
private static final long serialVersionUID = 1L;
/**
* Collection representing all the services
*/
private Map<Long, ServiceCustomerModel> serviceDataMap;
}
在特定的 JSP 页面上,我正在执行以下操作。
for (Long serviceId : dashboardViewModel.getServices()) {
Service service = dashboardViewModel.getService(serviceId);
}
上述目标类中的getServices
方法如下。
public Set<Long> getServices() {
return this.serviceDataMap.keySet();
}
在jsp中包含上述代码时。我确实得到了错误。否则,它会起作用。
进一步调查:
我已使用以下代码片段更新了dashboard.jsp 文件。我无法确定原因,但此代码有效。
ArrayList<Long> test = new ArrayList<Long>();
test.addAll(dashboardViewModel.getServices());
for (long serviceId : test) {
Service service = dashboardViewModel.getService(serviceId);
}
这段代码对数据有什么影响吗?