我正在使用GWT 2.4和gquery-dnd-bundle 1.0.4,以便可以使用拖放節點構建樹。我遇到了一個惱人的bug(http://code.google.com/p/gwtquery-plugins/issues/detail?id=6)。其要點是我需要保證文件「gquery-dnd-bundle-1.0.4.jar」在我的WEB-INF/lib目錄中的gwt-servlet.jar文件之前由運行時的類加載器加載。控制JAR如何在類路徑中加載的順序
我該如何保證?
我正在使用Eclipse Indigo和GWT Web應用程序項目(如果有用的話)。
這裏是我看到
[ERROR] [draganddroptree] - Errors in 'jar:file:/C:/Documents%20and%20Settings/E18538/workspace/DragAndDropTree/war/WEB-INF/lib/gquery-dnd-bundle-1.0.4.jar!/gwtquery/plugins/droppable/client/gwt/DragAndDropCellTree.java'
[ERROR] [draganddroptree] - Line 24: The type com.google.gwt.user.cellview.client.CellTreeNodeView is not visible
[ERROR] [draganddroptree] - Line 86: CellTreeNodeView cannot be resolved to a type
[ERROR] [draganddroptree] - Line 87: The constructor DragAndDropCellTreeNodeView<T>(DragAndDropCellTree, CellTreeNodeView<?>, TreeViewModel.NodeInfo<T>, Element, T) refers to the missing type CellTreeNodeView
[ERROR] [draganddroptree] - Unable to load module entry point class com.cme.draganddroptree.client.DragAndDropTree (see associated exception for details)
[ERROR] [draganddroptree] - Failed to load module 'draganddroptree' from user agent 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1' at localhost:4490
我使用的是tomcat的一個非常舊的版本,但是IIRC它按字母順序掃描罐子名稱。也許現在已經改變了。 –
這可能是這種情況,雖然你不能保證它會一直工作。 –
它並沒有說[這裏[(http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html)),但我懷疑**/WEB-INF/lib/*。你的web應用程序的jar將意味着任何東西,但字母順序。 –