我遵循了他们网站上最新的 Errai 入门指南。
基本上,对于我创建的扩展 Composite 的每个 Java 类(即所有 Errai @Templated 控制器类),当我使用时,都会抛出类似于以下错误mvn clean gwt:run
[INFO] WARN [org.jboss.modules] Failed to define class com.justinvesting.client.local.pages.NamePage in Module "deployment.errai-test.war:main" from Service Module
Loader: java.lang.LinkageError: Failed to link com/justinvesting/client/local/pages/NamePage (Module "deployment.errai-test.war:main" from Service Module Loader)
[INFO] at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [wildfly-weld-8.1.0.Final.jar:8.1.0.Final]
[INFO] at org.jboss.weld.bootstrap.BeanDeployer.loadClass(BeanDeployer.java:106) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
[INFO] at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:94) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
[INFO] at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:62) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
[INFO] at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:60) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
[INFO] at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
[INFO] at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
[INFO] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_60]
[INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
[INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
[INFO] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
[INFO] Caused by: java.lang.NoClassDefFoundError: com/google/gwt/user/client/ui/Composite
[INFO] at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_60]
[INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_60]
[INFO] at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules-1.3.3.Final.jar:1.3.3.Final]
[INFO] ... 19 more
[INFO] Caused by: java.lang.ClassNotFoundException: com.google.gwt.user.client.ui.Composite from [Module "deployment.errai-test.war:main" from Service Module Loader
但是,这似乎并没有真正停止应用程序的编译和运行。完成后,我仍然可以成功访问我的 Errai GWT 应用程序。但是我创建的类越多,这个堆栈跟踪的时间就越长!
有任何想法吗?