[jira] [Reopened] (DIGESTER-153) Add Constructor support to ObjectCreateRule
[ https://issues.apache.org/jira/browse/DIGESTER-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Tripodi reopened DIGESTER-153: - sorry for bugging again on this, unfortunately there still is a case where the lazy loader fails ;( When classes have not the default empty constructor, CGLIB complains {code} java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given at net.sf.cglib.proxy.Enhancer.emitConstructors(Enhancer.java:721) at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:499) at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285) at org.apache.commons.digester3.ObjectCreateRule.createLazyProxy(ObjectCreateRule.java:283) at org.apache.commons.digester3.ObjectCreateRule.begin(ObjectCreateRule.java:262) at org.apache.commons.digester3.Digester.startElement(Digester.java:1350) {code} you can test it simply by removing the empty constructor in {{org.apache.commons.digester3.TestBean}} Thanks a lot for your help in advance! > Add Constructor support to ObjectCreateRule > --- > > Key: DIGESTER-153 > URL: https://issues.apache.org/jira/browse/DIGESTER-153 > Project: Commons Digester > Issue Type: Improvement >Affects Versions: 3.2 >Reporter: Simone Tripodi >Assignee: Simone Tripodi > Fix For: 3.2 > > > As shown in the past, the stack method of Digester has some [limitations > |http://markmail.org/message/wick27gw6n5weqk2] for fully support the > Constructors - it basically cannot use elements in the body as constructor > arguments - but it could support arguments extracted from attributes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (DIGESTER-153) Add Constructor support to ObjectCreateRule
[ https://issues.apache.org/jira/browse/DIGESTER-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Tripodi reopened DIGESTER-153: - Unfortunately the LazyLoader still fails under certain circumstances: imagine an XML snippet like: {code} true 5.5 {code} and the mapped bean is of the type {code} class MyBean { private float floatProperty; public MyBean( double doubleProperty, boolean booleanProperty ) ... } {code} what happens is that not all constructor parameters are correctly collected because the object is created in the {{begin()}} method when {{toplevel/bean}} matches. I don't know at that oint if it is possible creating a Stub that simply collects methods that can be called when invoking the {{end()}} method when {{toplevel/bean}} element is closed... > Add Constructor support to ObjectCreateRule > --- > > Key: DIGESTER-153 > URL: https://issues.apache.org/jira/browse/DIGESTER-153 > Project: Commons Digester > Issue Type: Improvement >Affects Versions: 3.2 >Reporter: Simone Tripodi >Assignee: Simone Tripodi > Fix For: 3.2 > > > As shown in the past, the stack method of Digester has some [limitations > |http://markmail.org/message/wick27gw6n5weqk2] for fully support the > Constructors - it basically cannot use elements in the body as constructor > arguments - but it could support arguments extracted from attributes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (DIGESTER-153) Add Constructor support to ObjectCreateRule
[ https://issues.apache.org/jira/browse/DIGESTER-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Tripodi reopened DIGESTER-153: - I just thought that using CGLIB to proxy Object creation, the {{ObjectCreationRule}} would fully support arguments coming from everywhere. Need some time to give tries. > Add Constructor support to ObjectCreateRule > --- > > Key: DIGESTER-153 > URL: https://issues.apache.org/jira/browse/DIGESTER-153 > Project: Commons Digester > Issue Type: Improvement >Affects Versions: 3.2 >Reporter: Simone Tripodi >Assignee: Simone Tripodi > Fix For: 3.2 > > > As shown in the past, the stack method of Digester has some [limitations > |http://markmail.org/message/wick27gw6n5weqk2] for fully support the > Constructors - it basically cannot use elements in the body as constructor > arguments - but it could support arguments extracted from attributes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira