当前位置: 代码迷 >> Java Web开发 >> java.lang.Error: Unresolved compilation problems: 
  详细解决方案

java.lang.Error: Unresolved compilation problems: 

热度:641   发布时间:2016-04-17 17:26:37.0
在线等 严重: Servlet.service() for servlet default threw exception
2011-8-3 5:34:03 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet default threw exception
java.lang.Error: Unresolved compilation problems
The type List is not generic; it cannot be parameterized with arguments <HeroList>
Syntax error, parameterized types are only available if source level is 5.0
The type ArrayList is not generic; it cannot be parameterized with arguments <HeroList>
Syntax error, parameterized types are only available if source level is 5.0

at com.game.web.service.impl.HeroListService.loadTopTen(HeroListService.java:203)
at com.game.web.action.ScoreListAction.topFirst(ScoreListAction.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)\

2011-8-3 5:34:03 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet default threw exception
java.lang.Error: Unresolved compilation problems: 
The type List is not generic; it cannot be parameterized with arguments <HeroList>
Syntax error, parameterized types are only available if source level is 5.0
The type ArrayList is not generic; it cannot be parameterized with arguments <HeroList>
Syntax error, parameterized types are only available if source level is 5.0

at com.game.web.service.impl.HeroListService.loadTopTen1(HeroListService.java:148)
at com.game.web.action.ScoreListAction.topFirst1(ScoreListAction.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

------解决方案--------------------
楼主你是不是传入 了非Integer类型
并且Servlet里面的包要是 
import java.util.List
------解决方案--------------------
  相关解决方案