net.sf.dozer.util.mapping.MappingException: java.lang.NoSuchMethodException: net.sf.dozer.util.mapping.vo.collections.UserGroup.<init>()

dozer | goeldner | 9 years ago
  1. 0

    Collections are mapped twice, entries get duplicated

    dozer | 9 years ago | goeldner
    net.sf.dozer.util.mapping.MappingException: java.lang.NoSuchMethodException: net.sf.dozer.util.mapping.vo.collections.UserGroup.<init>()
  2. 0

    TopCoder Forums

    topcoder.com | 12 months ago
    javax.persistence.PersistenceException: org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
  3. 0

    get called, but set isn't

    dozer | 9 years ago | jamesclinton
    net.sf.dozer.util.mapping.MappingException: java.lang.NoSuchMethodException: com.xxx.domain.Role.<init>()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    According to your documentation, the published book "The Definitive Guide to Grails" and the published book "Groovy In Action" both Groovy and Grails has built- in support for the java.net.URL class. Unfortunately, when I create a simple domain class (inside grails-app/domain): class LinkData { String lnkName String lnkDescrip URL lnkURL } I get the following failure when I attempt to compile: [groovy] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.net.URL]: No default constructor found; nested exception is java.lang.NoSuchMethodException: java.net.URL.<init>() [groovy] org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.net.URL]: No default constructor found; nested exception is java.lang.NoSuchMethodException: java.net.URL.<init>() [groovy] java.lang.NoSuchMethodException: java.net.URL.<init>() [groovy] at java.lang.Class.getConstructor0(Class.java:2647) [groovy] at java.lang.Class.getDeclaredConstructor(Class.java:1953) [groovy] at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) [groovy] at org.codehaus.groovy.grails.commons.GrailsClassUtils.getPropertyValueOfNewInstance(GrailsClassUtils.java:233) [groovy] at org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainConfigurationUtil.getAssociationMap(GrailsDomainConfigurationUtil.java:198) [groovy] at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass.establishDomainClassRelationship(DefaultGrailsDomainClass.java:410) [groovy] at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass.establishRelationships(DefaultGrailsDomainClass.java:254) [groovy] at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass.<init>(DefaultGrailsDomainClass.java:106) [groovy] at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.configureLoadedClasses(DefaultGrailsApplication.java:171) [groovy] at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.<init>(DefaultGrailsApplication.java:154) [groovy] at org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.afterPropertiesSet(GrailsApplicationFactoryBean.java:57) [groovy] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1091) [groovy] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396) [groovy] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) [groovy] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) [groovy] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) [groovy] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) [groovy] at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) [groovy] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252) [groovy] at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:30) [groovy] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190) [groovy] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) [groovy] at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:497) [groovy] at org.mortbay.util.Container.start(Container.java:72) [groovy] at org.mortbay.http.HttpServer.doStart(HttpServer.java:753) [groovy] at org.mortbay.util.Container.start(Container.java:72) [groovy] at gjdk.org.mortbay.jetty.Server_GroovyReflector.invoke(Unknown Source) [groovy] at groovy.lang.MetaMethod.invoke(MetaMethod.java:111) [groovy] at ...Many unnecessary lines omitted for brevity... run-app:watch-context: Apparently, due to the fact that (at least in the JDK 5) there is no default constructor for the URL class, it appears to be impossible to define such a class in Groovy. Unless I am mistaken (and I am a newbie so I very well could be) this means that it is impossible to utilize the URL class from within Groovy or Grails. This is a major inadequacy that must be fixed in the release before too many people run into it... I have tried various ways of initializing the URL class on declaration, but none of these worked. I do not believe too many people will like Grails if they run into this fundamental problem...

    Grails JIRA | 10 years ago | RB3
    java.lang.NoSuchMethodException: java.net.URL.<init>()
  6. 0

    Multipart file upload with Spring: NoSuchMethodException: ...CommonsMultipartFile.<init>()

    Stack Overflow | 2 years ago
    java.lang.NoSuchMethodException: org.springframework.web.multipart.commons.CommonsMultipartFile.<init>()

  1. empt-ak 1 times, last 1 month ago
  2. Luka 12 times, last 2 months ago
  3. andyglick 28 times, last 2 months ago
  4. ruifung 1 times, last 3 months ago
  5. Shadd518 1 times, last 4 months ago
8 more registered users
47 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoSuchMethodException

    net.sf.dozer.util.mapping.vo.collections.UserGroup.<init>()

    at java.lang.Class.getConstructor0()
  2. Java RT
    Class.getDeclaredConstructor
    1. java.lang.Class.getConstructor0(Class.java:2647)
    2. java.lang.Class.getDeclaredConstructor(Class.java:1953)
    2 frames
  3. net.sf.dozer
    TestCumulativeCollectionMapping.testMappingInterface
    1. net.sf.dozer.util.mapping.util.DestBeanCreator.newInstance(DestBeanCreator.java:138)
    2. net.sf.dozer.util.mapping.util.MappingUtils.throwMappingException(MappingUtils.java:91)
    3. net.sf.dozer.util.mapping.util.DestBeanCreator.newInstance(DestBeanCreator.java:142)
    4. net.sf.dozer.util.mapping.util.DestBeanCreator.create(DestBeanCreator.java:85)
    5. net.sf.dozer.util.mapping.MappingProcessor.mapCustomObject(MappingProcessor.java:445)
    6. net.sf.dozer.util.mapping.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:414)
    7. net.sf.dozer.util.mapping.MappingProcessor.mapFromFieldMap(MappingProcessor.java:309)
    8. net.sf.dozer.util.mapping.MappingProcessor.mapField(MappingProcessor.java:255)
    9. net.sf.dozer.util.mapping.MappingProcessor.map(MappingProcessor.java:224)
    10. net.sf.dozer.util.mapping.MappingProcessor.mapCustomObject(MappingProcessor.java:451)
    11. net.sf.dozer.util.mapping.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:414)
    12. net.sf.dozer.util.mapping.MappingProcessor.addOrUpdateToList(MappingProcessor.java:741)
    13. net.sf.dozer.util.mapping.MappingProcessor.addOrUpdateToList(MappingProcessor.java:774)
    14. net.sf.dozer.util.mapping.MappingProcessor.mapListToList(MappingProcessor.java:643)
    15. net.sf.dozer.util.mapping.MappingProcessor.mapCollection(MappingProcessor.java:516)
    16. net.sf.dozer.util.mapping.MappingProcessor.mapOrRecurseObject(MappingProcessor.java:405)
    17. net.sf.dozer.util.mapping.MappingProcessor.mapFromFieldMap(MappingProcessor.java:309)
    18. net.sf.dozer.util.mapping.MappingProcessor.mapField(MappingProcessor.java:255)
    19. net.sf.dozer.util.mapping.MappingProcessor.map(MappingProcessor.java:224)
    20. net.sf.dozer.util.mapping.MappingProcessor.processSuperTypeMapping(MappingProcessor.java:938)
    21. net.sf.dozer.util.mapping.MappingProcessor.map(MappingProcessor.java:208)
    22. net.sf.dozer.util.mapping.MappingProcessor.map(MappingProcessor.java:136)
    23. net.sf.dozer.util.mapping.MappingProcessor.map(MappingProcessor.java:110)
    24. net.sf.dozer.util.mapping.DozerBeanMapper.map(DozerBeanMapper.java:94)
    25. net.sf.dozer.util.mapping.collections.TestCumulativeCollectionMapping.testMappingInterface(TestCumulativeCollectionMapping.java:57)
    25 frames