You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Martin Saucier <ma...@vrmtechnologies.com> on 2010/11/03 19:51:46 UTC
Using CXF with Grails problem with GORM Events (afterInsert)
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: martin.saucier@vrmtechnologies.com
http://www.vrmtechnologies.com
Re: Using CXF with Grails problem with GORM Events (afterInsert)
Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 03 November 2010 2:51:46 pm Martin Saucier wrote:
> 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 ?
I would have NO idea on this. This is probably something you would need to
ask on the Grails lists to see if there is a way to add the XmlTransient onto
the internally generated _closure1 fields and such.
Dan
>
> 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: martin.saucier@vrmtechnologies.com
> http://www.vrmtechnologies.com
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog