xwf001 2011-06-24 22:20
浏览 240
已采纳

SSH小程序tomcat部署错误提示

[color=red]严重: Exception starting filter OnlineFilter
java.lang.Error: Unresolved compilation problems:
Syntax error, annotations are only available if source level is 5.0[/color] The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, long)
The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, int)
The type Map is not generic; it cannot be parameterized with arguments
Syntax error, parameterized types are only available if source level is 5.0
ForumInit.settings cannot be resolved
ForumInit.settings cannot be resolved
The method updateCache(String[]) in the type Cache is not applicable for the arguments ()
Syntax error, parameterized types are only available if source level is 5.0
The type Map is not generic; it cannot be parameterized with arguments
Syntax error, parameterized types are only available if source level is 5.0
The type Map is not generic; it cannot be parameterized with arguments
Syntax error, parameterized types are only available if source level is 5.0
The type Map is not generic; it cannot be parameterized with arguments
The type Map is not generic; it cannot be parameterized with arguments
Syntax error, parameterized types are only available if source level is 5.0
The operator > is undefined for the argument type(s) Integer, int
The operator > is undefined for the argument type(s) Integer, int
Type mismatch: cannot convert from int to Integer
Type mismatch: cannot convert from Short to short
Type mismatch: cannot convert from Byte to byte
The operator > is undefined for the argument type(s) Short, int
The method setAttribute(String, Object) in the type HttpSession is not applicable for the arguments (String, short)
The method setAttribute(String, Object) in the type HttpSession is not applicable for the arguments (String, byte)
The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, boolean)
Type mismatch: cannot convert from Boolean to boolean
ForumInit.settings cannot be resolved
The type Map is not generic; it cannot be parameterized with arguments
Syntax error, parameterized types are only available if source level is 5.0
The type HashMap is not generic; it cannot be parameterized with arguments
Syntax error, parameterized types are only available if source level is 5.0
Syntax error, parameterized types are only available if source level is 5.0
The type Map is not generic; it cannot be parameterized with arguments
The method executeQuery(String, String[]) in the type DataBaseService is not applicable for the arguments (String)

[color=red]at cn.jsprun.filter.OnlineFilter.<init>(OnlineFilter.java:37)[/color]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:255)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

2011-6-24 21:29:27 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2011-6-24 21:29:27 org.apache.catalina.core.StandardContext start
严重: Context [/jsprungbk] startup failed due to previous errors
log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
2011-6-24 21:29:30 org.apache.catalina.core.ApplicationContext log
信息: Initializing WebApplicationContext for Struts ActionServlet 'action', module ''
2011-6-24 21:29:36 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-6-24 21:29:36 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2011-6-24 21:29:36 org.apache.catalina.startup.Catalina start
信息: Server startup in 9476 ms

我确定我的myeclipse中project-Compiler compliance setting设置的是5.0,也导入了Java ee 5的包
另外我还没写任何filter,不明白为什么会有Exception starting filter OnlineFilter
标红的cn.jsprun.filter.OnlineFilter.(OnlineFilter.java:37)这个包我也很确定没有主观导入过
我不记得自己是不是下载过jsprun的东西

cn.jsprun.filter.OnlineFilter.(OnlineFilter.java:37)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
这种点击出错代码段的话提示source not found

  • 写回答

1条回答 默认 最新

  • fmjsjx 2011-06-24 23:56
    关注

    为什么要导入javaee的包?tomcat的lib中本身就提供了javaee-api,你手动导入反而会导致出错。至于jsprun什么的,可能是tomcat自己的包,不用管它,把javaee-api从/WEB-INF/lib下去掉吧。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘