4 Replies Latest reply on Mar 11, 2008 8:48 AM by vekoslav vekič

    Groovy Support

    Mike Maul Newbie

      I'm having a problem getting groovy support jboss-seam-2.1.0-SNAPSHOT working.


      First the example groovybooking app seems to be missing appication.xml, I constructed one



      <?xml version="1.0" encoding="UTF-8"?>
      
      <application xmlns="http://java.sun.com/xml/ns/javaee"
      
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      
                   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
      
                   version="5">
      
      
          <display-name>Seam Booking</display-name>
      
      
          <module>
      
              <web>
      
                  <web-uri>jboss-seam-groovy.war</web-uri>
      
                  <context-root>/jboss-seam-groovy</context-root>
      
              </web>
      
          </module>
      
      
          <module>
      
              <ejb>jboss-seam-groovy.jar</ejb>
      
          </module>
      
      
          <module>
      
              <ejb>jboss-seam.jar</ejb>
      
          </module>
      
      
      </application>



      Which results in on ant deploy to jboss-4.2.2.GA


      Caused by: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
      
              at java.lang.ClassLoader.defineClass1(Native Method)
      
              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
      
              at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      
              at java.security.AccessController.doPrivileged(Native Method)
      
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      
              at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:682)
      
              at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:662)
      
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:200)
      
              at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
      
              at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
      
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:527)
      
              at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
      
              at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      
              at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:580)
      
              at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      
              at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      
              at java.lang.Class.getDeclaredFields0(Native Method)
      
              at java.lang.Class.privateGetDeclaredFields(Class.java:2232)
      
              at java.lang.Class.getDeclaredFields(Class.java:1715)
      
              at org.jboss.seam.Component.initMembers(Component.java:543)
      
              at org.jboss.seam.Component.<init>(Component.java:257)
      
              at org.jboss.seam.Component.<init>(Component.java:219)
      
              at org.jboss.seam.init.Initialization.addComponent(Initialization.java:975)
      
              ... 139 more



      Secondly I simply tried implementing a action bean as a groovy class in a seam-gen'd project in eclipse. However my groovy classes do not make it over durring deploy ment nor does the groovy-all.jar make it over.


      Just wondering if there is something that I'm missing here...


      Thanks

        • 1. Re: Groovy Support
          Pete Muir Master

          groovybooking is a war example so it doesn't need application.xml - try running the default target ant jbosswar.restart.

          • 2. Re: Groovy Support
            Mike Maul Newbie

            Better, however now I'm seeing groovy related ant tasks kicking-off however I'm now getting


            15:28:19,906 ERROR [[/jboss-seam-groovy]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
            
            java.lang.IllegalArgumentException: No such deployment strategy org.jboss.seam.deployment.GroovyHotDeploymentStrategy
            
                    at org.jboss.seam.deployment.HotDeploymentStrategy.createInstance(HotDeploymentStrategy.java:126)
            
                    at org.jboss.seam.init.Initialization.createHotDeploymentStrategy(Initialization.java:647)
            
                    at org.jboss.seam.init.Initialization.scanForHotDeployableComponents(Initialization.java:628)
            
                    at org.jboss.seam.init.Initialization.init(Initialization.java:562)
            
                    at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
            
                    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
            
            


            • 3. Re: Groovy Support
              Pete Muir Master

              Yup. I just fixed that problem in trunk. There seems to be another problem though with Security rules though - we'll get that fixed.

              • 4. Re: Groovy Support
                vekoslav vekič Newbie

                I'm facing the same issue. Is there a way for a quick fix in an existing project? I tried downloading nightly builds, but they're somehow not as stable as i expected.. thanks..