Hi guys,
    not sure if it's a Grails or CXF issue so I'm posting on both user's list.

I have the following ServiceAdvisorShift grails domain class (see below) that 
is being returned to the front end using the CXF grails plugin. Everything 
worked fine until I wanted to add a GORM afterInsert event. Once I add the 
afterInsert event, I get the following JAXB exception : 
2010-11-03 14:43:38,679 [http-8080-1] WARN  
org.apache.cxf.phase.PhaseInterceptorChain  - Interceptor has thrown exception, 
unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: class 
com.vrmtechnologies.ServiceAdvisorShift$_closure1 nor any of its super class is 
known to this context.

Anyone running into issue ?

Regards,

Martin


@XmlAccessorType(XmlAccessType.FIELD)
class ServiceAdvisorShift {
        static auditable = true
        
        // Setup the relationships      
        @XmlTransient ServiceAdvisor serviceAdvisor
        static belongsTo = [ServiceAdvisor]
                        
        Date startTime
        Date endTime
        
        def afterInsert = {
            //  .. do something
        }

        static mapping = {
                startTime type:'timestamp'
                endTime type:'timestamp'
        }

        static constraints = {
                serviceAdvisor(nullable:false)
                startTime(nullable:false)
                endTime(nullable:false)
        }
}

Martin Saucier
Solutions Architect | VRM Technologies Ltd.
T: 506.874.8906
F: 506.851.5458
E: [email protected]
http://www.vrmtechnologies.com

Reply via email to