亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

課程源碼運行不了

點南放入購物車,出現以下錯誤:

ype?Exception report

message

description?The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception


root cause

java.lang.Error: Unresolved compilation problems:
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
Map.Entry cannot be resolved to a type
The method entrySet() from the type HashMap<Items,Integer> refers to the missing type Map$Entry
Map.Entry cannot be resolved to a type

entity.Cart.<init>(Cart.java:1)
servlet.CartServlet.addToCart(CartServlet.java:110)
servlet.CartServlet.doPost(CartServlet.java:72)
servlet.CartServlet.doGet(CartServlet.java:49)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


note?The full stack trace of the root cause is available in the Apache Tomcat/7.0.2 logs.

Apache Tomcat/7.0.2


正在回答

1 回答

問題:項目能正常啟動,但在系統登錄時卻報錯!MyEclipse 報錯問題。

原因:由于電腦上安裝了多個JDK版本,而MyEclipse IDE 使用默認版本,使得 IDE 的Compiler Compliance level 與 Installed JREs 版本不對應而導致錯誤。

解決方案:將 IDE 的Compiler Compliance level 與 Installed JREs 版本修改為一致。(例如:Compiler Compliance level 使用1.5時,Installed JREs版本則使用jdk1.5.0 )


?


0 回復 有任何疑惑可以回復我~
#1

夜深千丈燈 提問者

非常感謝!
2015-07-13 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
JAVA遇見HTML——Servlet篇
  • 參與學習       160612    人
  • 解答問題       1093    個

本門課程在JSP課程的基礎上,深入介紹Servlet的基礎知識

進入課程

課程源碼運行不了

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號