5 Replies Latest reply: Sep 3, 2011 3:36 PM by lukas lukasz RSS

    Problem loading Vaadin applications in AS7

    Cloves Almeida Newbie

      This is related do JIRA issue #AS7-708.

       

      When deploying Vaadin application, AS7 is requiring gwt-user.jar to be deployed. The jar is not needed at runtime, but if not supplied, it throws:

       

      Caused by: java.lang.LinkageError: Failed to link com/vaadin/terminal/gwt/client/ui/VTree (Module \"deployment.auge-base.ear:main\" from Service Module Loader)

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)

                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)

                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)

                at org.jboss.modules.Module.loadModuleClass(Module.java:588)

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)

                at java.lang.Class.forName0(Native Method)

                at java.lang.Class.forName(Class.java:247)

                at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)

                at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)

                at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)

                at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:370)

                at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:351)

                at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:280)

                at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)

                at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)

                at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)

                at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)

                at java.lang.Class.getAnnotation(Class.java:3029)

                at java.lang.Class.isAnnotationPresent(Class.java:3042)

                at org.jboss.seam.international.status.TypedStatusMessageBundleExtension.detectBundleInjectionTargets(TypedStatusMessageBundleExtension.java:66)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)

                at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)

                at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)

                at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)

                at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)

                ... 18 more

      Caused by: java.lang.NoClassDefFoundError: com/google/gwt/event/dom/client/FocusHandler

                at java.lang.ClassLoader.defineClass1(Native Method)

                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

                at java.lang.ClassLoader.defineClass(ClassLoader.java:616)

                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)

                ... 52 more

      Caused by: java.lang.ClassNotFoundException: com.google.gwt.event.dom.client.FocusHandler from [Module \"deployment.auge-base.ear:main\" from Service Module Loader]

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)

       

       

      This "eager class loading" was considered a bug in Glassfish 3.0.0 and fixed in 3.0.1 as per this forum thread:

       

      http://vaadin.com/forum/-/message_boards/view_message/246561

        • 1. Re: Problem loading Vaadin applications in AS7
          lukas lukasz Newbie

          I have got the same problem as you ?? any idea ??

          • 2. Re: Problem loading Vaadin applications in AS7
            Cloves Almeida Newbie

            I workedaround it by using release 7.0.1.Final and including the gwt-user.jar into the package alongside vaadin.jar. Seems to be working fine.

            • 3. Re: Problem loading Vaadin applications in AS7
              lukas lukasz Newbie

              i have got in pom.xm :

                <dependency>
                        <groupId>com.vaadin</groupId>
                        <artifactId>vaadin</artifactId>
                        <version>6.5.0</version>
                      </dependency>
              
                       <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-user</artifactId>
                        <version>2.1.1</version>
                        <scope>provided</scope>
                   </dependency>
              

                         

              And problem still exiest ? my project build and deploy fine in jboss as7

              Cloves Almeida wrote:

               

              I workedaround it by using release 7.0.1.Final and including the gwt-user.jar into the package alongside vaadin.jar. Seems to be working fine.

              My error :

               

              18:28:00,260 WARN  [org.jboss.modules] (http--127.0.0.1-8080-2) Failed to define class com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler$ShortcutActionHandlerOwner in Module "deployment.shop.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler$ShortcutActionHandlerOwner (Module "deployment.shop.war:main" from Service Module Loader)
                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
                  at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
                  at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
                  at org.jboss.modules.Module.loadModuleClass(Module.java:588)
                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
                  at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_20]
                  at java.lang.ClassLoader.defineClass(ClassLoader.java:634) [:1.6.0_20]
                  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [:1.6.0_20]
                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
                  at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
                  at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
                  at org.jboss.modules.Module.loadModuleClass(Module.java:588)
                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
              
              • 4. Re: Problem loading Vaadin applications in AS7
                Cloves Almeida Newbie

                Try with vaddin 6.6.5 and gwt-user 2.3.0. These are the versions I'm working with

                • 5. Re: Problem loading Vaadin applications in AS7
                  lukas lukasz Newbie
                  Jea its working thx very much thanks