我正在使用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将意味着任何东西,但字母顺序。 –