2013-03-25 106 views
1

我想在我的項目中添加GXT。爲此,我跟着 setting up your first ext gwt project in eclipsejava.lang.NoClassDefFoundError:com/google/gwt/core/ext /生成器

我的Java打造專業化路徑給出的所有步驟是這樣的

Java build Path

我的XML文件是

<?xml version="1.0" encoding="UTF-8"?> 

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" 
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt- module.dtd"> 
<module rename-to='hellogxt'> 
<!-- Inherit the core Web Toolkit stuff.      --> 
<inherits name='com.google.gwt.user.User'/> 


<inherits name='com.google.gwt.user.theme.clean.Clean'/> 

<inherits name="com.extjs.gxt.ui.GXT" /> 
<!-- Specify the app entry point class.       --> 
<entry-point class='com.hello.gxt.client.HelloGXT'/> 

<!-- Specify the paths for translatable code     --> 
<source path='client'/> 
<source path='shared'/> 

</module> 

我得到這個錯誤

lLoading modules 
    com.hello.gxt.HelloGXT 
    Loading inherited module 'com.hello.gxt.HelloGXT' 
    Loading inherited module 'com.extjs.gxt.ui.GXT' 
     [ERROR] Unexpected error while processing XML 
     java.lang.NoClassDefFoundError: com/google/gwt/core/ext/Generator 
at java.lang.ClassLoader.findBootstrapClass(Native Method) 
at java.lang.ClassLoader.findBootstrapClassOrNull(Unknown Source) 
at java.lang.ClassLoader.loadClass(Unknown Source) 
at java.lang.ClassLoader.loadClass(Unknown Source) 
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) 
at java.lang.ClassLoader.loadClass(Unknown Source) 
at com.google.gwt.dev.cfg.ModuleDefSchema$ClassAttrCvt.convertToArg(ModuleDefSchema.java:884) 
at com.google.gwt.dev.util.xml.HandlerArgs.convertToArg(HandlerArgs.java:64) 
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:221) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:347) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68) 
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418) 
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:322) 
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:493) 
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:347) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68) 
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418) 
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:322) 
at com.google.gwt.dev.cfg.ModuleDefLoader.load(ModuleDefLoader.java:242) 
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:192) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) 
at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:1017) 
at com.google.gwt.dev.DevMode.loadModule(DevMode.java:557) 
at com.google.gwt.dev.DevMode.doStartup(DevMode.java:443) 
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1083) 
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) 
at com.google.gwt.dev.DevMode.main(DevMode.java:311) 
    [ERROR] Line 12: Unexpected exception while processing element 'inherits' 
    com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) 
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:325) 
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:493) 
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:347) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68) 
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418) 
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:322) 
at com.google.gwt.dev.cfg.ModuleDefLoader.load(ModuleDefLoader.java:242) 
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:192) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) 
at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:1017) 
at com.google.gwt.dev.DevMode.loadModule(DevMode.java:557) 
at com.google.gwt.dev.DevMode.doStartup(DevMode.java:443) 
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1083) 
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) 
at com.google.gwt.dev.DevMode.main(DevMode.java:311) 
    [ERROR] Failure while parsing XML 
    com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) 
at  com.google.gwt.dev.util.xml.DefaultSchema.onHandlerException(DefaultSchema.java:58) 
at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66) 
at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66) 
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:240) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:347) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68) 
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418) 
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:322) 
at com.google.gwt.dev.cfg.ModuleDefLoader.load(ModuleDefLoader.java:242) 
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:192) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) 
at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:1017) 
at com.google.gwt.dev.DevMode.loadModule(DevMode.java:557) 
at com.google.gwt.dev.DevMode.doStartup(DevMode.java:443) 
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1083) 
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) 
at com.google.gwt.dev.DevMode.main(DevMode.java:311) 
    [ERROR] Unexpected error while processing XML 
    com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:371) 
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200(ReflectiveParser.java:68) 
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:418) 
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:322) 
at com.google.gwt.dev.cfg.ModuleDefLoader.load(ModuleDefLoader.java:242) 
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:192) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) 
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) 
at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:1017) 
at com.google.gwt.dev.DevMode.loadModule(DevMode.java:557) 
at com.google.gwt.dev.DevMode.doStartup(DevMode.java:443) 
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1083) 
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) 
at com.google.gwt.dev.DevMode.main(DevMode.java:311) 
    [ERROR] shell failed in doStartup method 

som ebody幫我解決了這個問題。

在此先感謝

回答

-3

你應該在你的類路徑GXT-2.2.5-gwt2.jar和GXT-2.2.5-gwt22.jar和GXT-2.2.5-gwt17.jar。

+1

不,這是錯誤的(我不確定它是否可以解決問題)。根據你使用的是哪個版本的GWT,你的類路徑中應該有* 1 *這三個jar。由於問題顯示了最新的GWT(2.5.1),只能使用* gxt-2.2.5-gwt22.jar文件。 – 2013-03-25 17:24:39

+0

我添加了所有的罐子。但仍然有同樣的錯誤.. seee修改後的圖像 – GameBuilder 2013-03-25 17:31:25

+0

@HoucernBerrayans:添加了所有3個罐子:但錯誤是一樣的。 – GameBuilder 2013-03-25 17:35:16