Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Grails-Spring-Events 1.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Ubuntu, Grails 2.0.0

      I tried with M2 and RC3

      Description

      Trying to build the plugin either in a project or alone doesn't work in Grails 2.0.0

      I basically get

      Error 2012-01-17 16:18:58,298 [Thread-8] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'asyncApplicationEventMulticaster': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [grails.plugin.springevents.GrailsApplicationEventMulticaster]: Constructor threw exception; nested exception is java.lang.NullPointerException

      Message: Error creating bean with name 'asyncApplicationEventMulticaster': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [grails.plugin.springevents.GrailsApplicationEventMulticaster]: Constructor threw exception; nested exception is java.lang.NullPointerException

      1. stacktrace.log
        19 kB
        Sébastien Testeau

        Activity

        Hide
        Sébastien Testeau added a comment -

        Pasting my version (groovy and jdk) i tested with jdk 7 and groovy 1.8.5 and errors are gone... (damn!)

        Show
        Sébastien Testeau added a comment - Pasting my version (groovy and jdk) i tested with jdk 7 and groovy 1.8.5 and errors are gone... (damn!)
        Hide
        Sébastien Testeau added a comment -

        All right, so it seem to be related to the jvm, weird stuff, when i use jdk 1.6 it doesnt work, when i use 1.7, it does.

        Show
        Sébastien Testeau added a comment - All right, so it seem to be related to the jvm, weird stuff, when i use jdk 1.6 it doesnt work, when i use 1.7, it does.
        Hide
        Peter Ledbrook added a comment -

        It could be specific to the OpenJDK 6. Can you try the Sun/Oracle JDK?

        Show
        Peter Ledbrook added a comment - It could be specific to the OpenJDK 6. Can you try the Sun/Oracle JDK?
        Hide
        Ian Stride added a comment -

        On Linux Mint 11, using OpenJDK 6, I can confirm that the problem exists. Switching to Oracle JDK 6, the problem disappears.

        OpenJDK

        java version "1.6.0_22"
        OpenJDK Runtime Environment (IcedTea6 1.10.4) (6b22-1.10.4-0ubuntu1~11.04.2)
        OpenJDK Client VM (build 20.0-b11, mixed mode, sharing)
        

        Oracle JDK

        java version "1.6.0_26"
        Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
        Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
        
        Show
        Ian Stride added a comment - On Linux Mint 11, using OpenJDK 6, I can confirm that the problem exists. Switching to Oracle JDK 6, the problem disappears. OpenJDK java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.4) (6b22-1.10.4-0ubuntu1~11.04.2) OpenJDK Client VM (build 20.0-b11, mixed mode, sharing) Oracle JDK java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
        Hide
        Phuong LeCong added a comment - - edited

        I recently upgraded to Grails 2.0 and also had this problem (Oracle JDK 1.6.0_22 on Windows x64) tracing through the source of the exception I found a reference to this bug GROOVY-5202 that seems to have been introduced after Groovy 1.8.2 and is fixed in 1.8.6. If I read the defect correctly the MetaClassImpl isn't finding the listener methods from AbstractApplicationEventMulticaster. As a workaround, I added the following methods to GrailsApplicationEventMulticaster:

        GrailsApplicationEventMulticaster.groovy
        public void addApplicationListener(ApplicationListener listener) {
        	super.addApplicationListener(listener)
        }
        
        public void addApplicationListenerBean(String listenerBeanName) {
        	super.addApplicationListenerBean(listenerBeanName)
        }
        
        public void removeApplicationListener(ApplicationListener listener) {
        	super.removeApplicationListener(listener)
        }
        
        public void removeApplicationListenerBean(String listenerBeanName) {
        	super.removeApplicationListenerBean(listenerBeanName)
        }
        
        Show
        Phuong LeCong added a comment - - edited I recently upgraded to Grails 2.0 and also had this problem (Oracle JDK 1.6.0_22 on Windows x64) tracing through the source of the exception I found a reference to this bug GROOVY-5202 that seems to have been introduced after Groovy 1.8.2 and is fixed in 1.8.6. If I read the defect correctly the MetaClassImpl isn't finding the listener methods from AbstractApplicationEventMulticaster . As a workaround, I added the following methods to GrailsApplicationEventMulticaster : GrailsApplicationEventMulticaster.groovy public void addApplicationListener(ApplicationListener listener) { super .addApplicationListener(listener) } public void addApplicationListenerBean( String listenerBeanName) { super .addApplicationListenerBean(listenerBeanName) } public void removeApplicationListener(ApplicationListener listener) { super .removeApplicationListener(listener) } public void removeApplicationListenerBean( String listenerBeanName) { super .removeApplicationListenerBean(listenerBeanName) }

          People

          • Assignee:
            Robert Fletcher
            Reporter:
            Sébastien Testeau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: