Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-651

Errai UI has become a server-side dependency, but should be client-only

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.0.M1, 2.4.1.Final
    • Fix Version/s: 3.0.0.M2
    • Component/s: ErraiUI
    • Labels:
      None

      Description

      Errai UI was originally a client-only dependency, and for good reason: it contains a lot of client-only code (such as GWT widgets) that depend on parts of GWT that are not typically available on the server-side classpath of an Errai app.

      Now it is necessary to deploy errai-ui.jar to the server, because it contains Locale, a portable type. But this causes problems with app startup because Hibernate and Weld discover these client-only widget types and complain about them:

      18:17:03,497 WARN  [org.jboss.modules] (weld-worker-3) Failed to define class org.jboss.errai.ui.client.widget.LocaleListBox in Module "deployment.errai-tutorial.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/errai/ui/client/widget/LocaleListBox (Module "deployment.errai-tutorial.war:main" from Service Module Loader)
      	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [wildfly-weld-8.0.0.Beta1.jar:8.0.0.Beta1]
      	at org.jboss.weld.bootstrap.BeanDeployer.loadClass(BeanDeployer.java:106) [weld-core-impl-2.1.0.CR1.jar:2013-09-26 16:53]
      	at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:94) [weld-core-impl-2.1.0.CR1.jar:2013-09-26 16:53]
      	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:62) [weld-core-impl-2.1.0.CR1.jar:2013-09-26 16:53]
      	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:60) [weld-core-impl-2.1.0.CR1.jar:2013-09-26 16:53]
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) [weld-core-impl-2.1.0.CR1.jar:2013-09-26 16:53]
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) [weld-core-impl-2.1.0.CR1.jar:2013-09-26 16:53]
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
      	at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
      Caused by: java.lang.NoClassDefFoundError: com/google/gwt/user/client/ui/ValueListBox
      	at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_25]
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:792) [rt.jar:1.7.0_25]
      	at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final]
      	... 20 more
      Caused by: java.lang.ClassNotFoundException: com.google.gwt.user.client.ui.ValueListBox from [Module "deployment.errai-tutorial.war:main" from Service Module Loader]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]
      	... 24 more
      
      18:17:03,500 INFO  [org.jboss.weld.Bootstrap] (weld-worker-3) WELD-000119: Not generating any bean definitions from org.jboss.errai.ui.client.widget.LocaleListBox because of underlying class loading error: Type com.google.gwt.user.client.ui.ValueListBox from [Module "deployment.errai-tutorial.war:main" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  jfuerth Jonathan Fuerth
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: