DTO Plugin
  1. DTO Plugin
  2. GPDTO-1

toDTO conversion fails on references

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Grails 1.2.0M3

      Description

      The toDTO conversion seems to fail if a domain object has references to other objects.

      The stacktrace is:

      Caused by: java.lang.ClassNotFoundException: company.db.SomeDomainObject_$$_javassist_23DTO
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at DtoGrailsPlugin.mapDomainInstance(DtoGrailsPlugin.groovy:125)
      at DtoGrailsPlugin.this$2$mapDomainInstance(DtoGrailsPlugin.groovy)
      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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1049)
      at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:923)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:880)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:997)
      at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:923)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:880)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
      at DtoGrailsPlugin$_addDtoMethods_closure7.doCall(DtoGrailsPlugin.groovy:104)

      it seems to work for me in one case though where the domain objects are not in the same package. Not sure if that means anything.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Peter Ledbrook
            Reporter:
            Michael Legart
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: