Re: [2.0.5] no write methods....
On Tuesday 15 April 2008, Benson Margulies wrote: > Aegis doesn't know from DAO and Domain objects. It just knows that you > want to map a class to XML. It requires a way to both retrieve and set > a field. Dan, is JAXB more permissive here? If so, I guess we could > change Aegis to permit Java->XML and throw on XML->Java. Well, JAXB CAN be more permissive as you can tell jaxb to completely ignore the getter/setters and access the fields directly. That's actually the default if you annotate the field with the @XmlElement annotation instead of the getter. Since most people annotate the field instead of the methods, it will normally access the field directly. However, if you DON'T put @XmlElement annotations on things, then the default behavior for JAXB would be exactly the same. It wouldn't find a public property named "version" as there wouldn't be a setter available. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: [2.0.5] no write methods....
Aegis doesn't know from DAO and Domain objects. It just knows that you want to map a class to XML. It requires a way to both retrieve and set a field. Dan, is JAXB more permissive here? If so, I guess we could change Aegis to permit Java->XML and throw on XML->Java.
Re: [2.0.5] no write methods....
Hmm, I guess this is working as designed. On Tue, Apr 15, 2008 at 12:58 PM, Mick Knutson <[EMAIL PROTECTED]> wrote: > I just tried that, and it works. > > On Tue, Apr 15, 2008 at 8:33 AM, Benson Margulies <[EMAIL PROTECTED]> > wrote: > > > Hmm, I'll look at that. This rings a portion of a bell. > > > > On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp <[EMAIL PROTECTED]> wrote: > > > > > > > > It might be due to the setVersion method being protected, not public. > > > Thus, it might not see it as a propery as there aren't public getters > > > and setters. Not really sure though. > > > > > > Dan > > > > > > > > > On Tuesday 15 April 2008, Benson Margulies wrote: > > > > I've never heard of @Version. I very much doubt that Aegis sees it. > > > > > > > > What version of CXF are you using? Could you please post a > > > > self-contained test case to Jira? > > > > > > > > > > > > On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson < > [EMAIL PROTECTED]> > > > > > > > > wrote: > > > > > I am getting this error now: > > > > > > > > > > *INFO: Interceptor has thrown exception, unwinding now > > > > > java.lang.RuntimeException: > > > > > org.apache.cxf.aegis.DatabindingException: No write method for > > > > > property {http://domain.baselogic.com}version in class > > > > > com.baselogic.domain.Address > > > > >at > > > > > > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > > > >ataReader.java:92) at > > > > > > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > > > >ataReader.java:44) * > > > > > Here is my address object and versioned objects: > > > > > > > > > > *Address:* > > > > > [EMAIL PROTECTED] > > > > > @Table(name = "address") > > > > > public class Address extends IdentifiedObject implements > > > > > Serializable { > > > > > > > > > >private static final long serialVersionUID = > > > > > 3617859655330969141L; protected String address; > > > > >protected String city; > > > > >protected String province; > > > > >protected String country; > > > > >protected String postalCode; > > > > > > > > > >public Address() { > > > > >} > > > > > > > > > >public Address(Long id) { > > > > >setId(id); > > > > >} > > > > > > > > > > * > > > > > > > > > > *VersionedObject: > > > > > [EMAIL PROTECTED] > > > > > public class VersionedObject implements Serializable { > > > > >private static final long serialVersionUID = 1L; > > > > > > > > > >protected Integer version; > > > > > > > > > >@Version > > > > >public Integer getVersion() { > > > > >return version; > > > > >} > > > > > > > > > >protected void setVersion(Integer version) { > > > > >this.version = version; > > > > >} > > > > > > > > > > } > > > > > * > > > > > > > > > > > > > > > So what is the issue with @Version? > > > > > When I remove this set/get method, everything is fine. > > > > > > > > > > > > > > > > > > > > -- > > > > > Thanks, > > > > > Mick Knutson > > > > > > > > > > http://www.baselogic.com > > > > > http://www.blincmagazine.com > > > > > http://www.linkedin.com/in/mickknutson > > > > > http://www.djmick.com > > > > > http://www.myspace.com/mickknutson > > > > > http://www.myspace.com/BLiNCMagazine > > > > > http://tahoe.baselogic.com > > > > > --- > > > > > > > > > > > > -- > > > J. Daniel Kulp > > > Principal Engineer, IONA > > > [EMAIL PROTECTED] > > > http://www.dankulp.com/blog > > > > > > > > > -- > Thanks, > Mick Knutson > > http://www.baselogic.com > http://www.blincmagazine.com > http://www.linkedin.com/in/mickknutson > http://www.djmick.com > http://www.myspace.com/mickknutson > http://www.myspace.com/BLiNCMagazine > http://tahoe.baselogic.com > --- >
Re: [2.0.5] no write methods....
But if I have a DAO and a Domain Object in the same package, yet the Domain Object has a protected setVersion, why would there be an error? I do not want the version for be public. Only the getter. On Tue, Apr 15, 2008 at 10:00 AM, Benson Margulies <[EMAIL PROTECTED]> wrote: > Hmm, I guess this is working as designed. > > On Tue, Apr 15, 2008 at 12:58 PM, Mick Knutson <[EMAIL PROTECTED]> > wrote: > > > I just tried that, and it works. > > > > On Tue, Apr 15, 2008 at 8:33 AM, Benson Margulies <[EMAIL PROTECTED] > > > > wrote: > > > > > Hmm, I'll look at that. This rings a portion of a bell. > > > > > > On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > It might be due to the setVersion method being protected, not > public. > > > > Thus, it might not see it as a propery as there aren't public > getters > > > > and setters. Not really sure though. > > > > > > > > Dan > > > > > > > > > > > > On Tuesday 15 April 2008, Benson Margulies wrote: > > > > > I've never heard of @Version. I very much doubt that Aegis sees > it. > > > > > > > > > > What version of CXF are you using? Could you please post a > > > > > self-contained test case to Jira? > > > > > > > > > > > > > > > On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson < > > [EMAIL PROTECTED]> > > > > > > > > > > wrote: > > > > > > I am getting this error now: > > > > > > > > > > > > *INFO: Interceptor has thrown exception, unwinding now > > > > > > java.lang.RuntimeException: > > > > > > org.apache.cxf.aegis.DatabindingException: No write method for > > > > > > property {http://domain.baselogic.com}version in class > > > > > > com.baselogic.domain.Address > > > > > >at > > > > > > > > > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > > > > >ataReader.java:92) at > > > > > > > > > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > > > > >ataReader.java:44) * > > > > > > Here is my address object and versioned objects: > > > > > > > > > > > > *Address:* > > > > > > [EMAIL PROTECTED] > > > > > > @Table(name = "address") > > > > > > public class Address extends IdentifiedObject implements > > > > > > Serializable { > > > > > > > > > > > >private static final long serialVersionUID = > > > > > > 3617859655330969141L; protected String address; > > > > > >protected String city; > > > > > >protected String province; > > > > > >protected String country; > > > > > >protected String postalCode; > > > > > > > > > > > >public Address() { > > > > > >} > > > > > > > > > > > >public Address(Long id) { > > > > > >setId(id); > > > > > >} > > > > > > > > > > > > * > > > > > > > > > > > > *VersionedObject: > > > > > > [EMAIL PROTECTED] > > > > > > public class VersionedObject implements Serializable { > > > > > >private static final long serialVersionUID = 1L; > > > > > > > > > > > >protected Integer version; > > > > > > > > > > > >@Version > > > > > >public Integer getVersion() { > > > > > >return version; > > > > > >} > > > > > > > > > > > >protected void setVersion(Integer version) { > > > > > >this.version = version; > > > > > >} > > > > > > > > > > > > } > > > > > > * > > > > > > > > > > > > > > > > > > So what is the issue with @Version? > > > > > > When I remove this set/get method, everything is fine. > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Thanks, > > > > > > Mick Knutson > > > > > > > > > > > > http://www.baselogic.com > > > > > > http://www.blincmagazine.com > > > > > > http://www.linkedin.com/in/mickknutson > > > > > > http://www.djmick.com > > > > > > http://www.myspace.com/mickknutson > > > > > > http://www.myspace.com/BLiNCMagazine > > > > > > http://tahoe.baselogic.com > > > > > > --- > > > > > > > > > > > > > > > > -- > > > > J. Daniel Kulp > > > > Principal Engineer, IONA > > > > [EMAIL PROTECTED] > > > > http://www.dankulp.com/blog > > > > > > > > > > > > > > > -- > > Thanks, > > Mick Knutson > > > > http://www.baselogic.com > > http://www.blincmagazine.com > > http://www.linkedin.com/in/mickknutson > > http://www.djmick.com > > http://www.myspace.com/mickknutson > > http://www.myspace.com/BLiNCMagazine > > http://tahoe.baselogic.com > > --- > > > -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.linkedin.com/in/mickknutson http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---
Re: [2.0.5] no write methods....
I just tried that, and it works. On Tue, Apr 15, 2008 at 8:33 AM, Benson Margulies <[EMAIL PROTECTED]> wrote: > Hmm, I'll look at that. This rings a portion of a bell. > > On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp <[EMAIL PROTECTED]> wrote: > > > > > It might be due to the setVersion method being protected, not public. > > Thus, it might not see it as a propery as there aren't public getters > > and setters. Not really sure though. > > > > Dan > > > > > > On Tuesday 15 April 2008, Benson Margulies wrote: > > > I've never heard of @Version. I very much doubt that Aegis sees it. > > > > > > What version of CXF are you using? Could you please post a > > > self-contained test case to Jira? > > > > > > > > > On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson <[EMAIL PROTECTED]> > > > > > > wrote: > > > > I am getting this error now: > > > > > > > > *INFO: Interceptor has thrown exception, unwinding now > > > > java.lang.RuntimeException: > > > > org.apache.cxf.aegis.DatabindingException: No write method for > > > > property {http://domain.baselogic.com}version in class > > > > com.baselogic.domain.Address > > > >at > > > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > > >ataReader.java:92) at > > > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > > >ataReader.java:44) * > > > > Here is my address object and versioned objects: > > > > > > > > *Address:* > > > > [EMAIL PROTECTED] > > > > @Table(name = "address") > > > > public class Address extends IdentifiedObject implements > > > > Serializable { > > > > > > > >private static final long serialVersionUID = > > > > 3617859655330969141L; protected String address; > > > >protected String city; > > > >protected String province; > > > >protected String country; > > > >protected String postalCode; > > > > > > > >public Address() { > > > >} > > > > > > > >public Address(Long id) { > > > >setId(id); > > > >} > > > > > > > > * > > > > > > > > *VersionedObject: > > > > [EMAIL PROTECTED] > > > > public class VersionedObject implements Serializable { > > > >private static final long serialVersionUID = 1L; > > > > > > > >protected Integer version; > > > > > > > >@Version > > > >public Integer getVersion() { > > > >return version; > > > >} > > > > > > > >protected void setVersion(Integer version) { > > > >this.version = version; > > > >} > > > > > > > > } > > > > * > > > > > > > > > > > > So what is the issue with @Version? > > > > When I remove this set/get method, everything is fine. > > > > > > > > > > > > > > > > -- > > > > Thanks, > > > > Mick Knutson > > > > > > > > http://www.baselogic.com > > > > http://www.blincmagazine.com > > > > http://www.linkedin.com/in/mickknutson > > > > http://www.djmick.com > > > > http://www.myspace.com/mickknutson > > > > http://www.myspace.com/BLiNCMagazine > > > > http://tahoe.baselogic.com > > > > --- > > > > > > > > -- > > J. Daniel Kulp > > Principal Engineer, IONA > > [EMAIL PROTECTED] > > http://www.dankulp.com/blog > > > -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.linkedin.com/in/mickknutson http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---
Re: [2.0.5] no write methods....
Hmm, I'll look at that. This rings a portion of a bell. On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp <[EMAIL PROTECTED]> wrote: > > It might be due to the setVersion method being protected, not public. > Thus, it might not see it as a propery as there aren't public getters > and setters. Not really sure though. > > Dan > > > On Tuesday 15 April 2008, Benson Margulies wrote: > > I've never heard of @Version. I very much doubt that Aegis sees it. > > > > What version of CXF are you using? Could you please post a > > self-contained test case to Jira? > > > > > > On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson <[EMAIL PROTECTED]> > > > > wrote: > > > I am getting this error now: > > > > > > *INFO: Interceptor has thrown exception, unwinding now > > > java.lang.RuntimeException: > > > org.apache.cxf.aegis.DatabindingException: No write method for > > > property {http://domain.baselogic.com}version in class > > > com.baselogic.domain.Address > > >at > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > >ataReader.java:92) at > > > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > > >ataReader.java:44) * > > > Here is my address object and versioned objects: > > > > > > *Address:* > > > [EMAIL PROTECTED] > > > @Table(name = "address") > > > public class Address extends IdentifiedObject implements > > > Serializable { > > > > > >private static final long serialVersionUID = > > > 3617859655330969141L; protected String address; > > >protected String city; > > >protected String province; > > >protected String country; > > >protected String postalCode; > > > > > >public Address() { > > >} > > > > > >public Address(Long id) { > > >setId(id); > > >} > > > > > > * > > > > > > *VersionedObject: > > > [EMAIL PROTECTED] > > > public class VersionedObject implements Serializable { > > >private static final long serialVersionUID = 1L; > > > > > >protected Integer version; > > > > > >@Version > > >public Integer getVersion() { > > >return version; > > >} > > > > > >protected void setVersion(Integer version) { > > >this.version = version; > > >} > > > > > > } > > > * > > > > > > > > > So what is the issue with @Version? > > > When I remove this set/get method, everything is fine. > > > > > > > > > > > > -- > > > Thanks, > > > Mick Knutson > > > > > > http://www.baselogic.com > > > http://www.blincmagazine.com > > > http://www.linkedin.com/in/mickknutson > > > http://www.djmick.com > > > http://www.myspace.com/mickknutson > > > http://www.myspace.com/BLiNCMagazine > > > http://tahoe.baselogic.com > > > --- > > > > -- > J. Daniel Kulp > Principal Engineer, IONA > [EMAIL PROTECTED] > http://www.dankulp.com/blog >
Re: [2.0.5] no write methods....
It might be due to the setVersion method being protected, not public. Thus, it might not see it as a propery as there aren't public getters and setters. Not really sure though. Dan On Tuesday 15 April 2008, Benson Margulies wrote: > I've never heard of @Version. I very much doubt that Aegis sees it. > > What version of CXF are you using? Could you please post a > self-contained test case to Jira? > > > On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson <[EMAIL PROTECTED]> > > wrote: > > I am getting this error now: > > > > *INFO: Interceptor has thrown exception, unwinding now > > java.lang.RuntimeException: > > org.apache.cxf.aegis.DatabindingException: No write method for > > property {http://domain.baselogic.com}version in class > > com.baselogic.domain.Address > >at > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > >ataReader.java:92) at > > > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD > >ataReader.java:44) * > > Here is my address object and versioned objects: > > > > *Address:* > > [EMAIL PROTECTED] > > @Table(name = "address") > > public class Address extends IdentifiedObject implements > > Serializable { > > > >private static final long serialVersionUID = > > 3617859655330969141L; protected String address; > >protected String city; > >protected String province; > >protected String country; > >protected String postalCode; > > > >public Address() { > >} > > > >public Address(Long id) { > >setId(id); > >} > > > > * > > > > *VersionedObject: > > [EMAIL PROTECTED] > > public class VersionedObject implements Serializable { > >private static final long serialVersionUID = 1L; > > > >protected Integer version; > > > >@Version > >public Integer getVersion() { > >return version; > >} > > > >protected void setVersion(Integer version) { > >this.version = version; > >} > > > > } > > * > > > > > > So what is the issue with @Version? > > When I remove this set/get method, everything is fine. > > > > > > > > -- > > Thanks, > > Mick Knutson > > > > http://www.baselogic.com > > http://www.blincmagazine.com > > http://www.linkedin.com/in/mickknutson > > http://www.djmick.com > > http://www.myspace.com/mickknutson > > http://www.myspace.com/BLiNCMagazine > > http://tahoe.baselogic.com > > --- -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: [2.0.5] no write methods....
I've never heard of @Version. I very much doubt that Aegis sees it. What version of CXF are you using? Could you please post a self-contained test case to Jira? On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson <[EMAIL PROTECTED]> wrote: > I am getting this error now: > > *INFO: Interceptor has thrown exception, unwinding now > java.lang.RuntimeException: org.apache.cxf.aegis.DatabindingException: No > write method for property {http://domain.baselogic.com}version in class > com.baselogic.domain.Address >at > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:92) >at > > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:44) > * > Here is my address object and versioned objects: > > *Address:* > [EMAIL PROTECTED] > @Table(name = "address") > public class Address extends IdentifiedObject implements Serializable { > >private static final long serialVersionUID = 3617859655330969141L; >protected String address; >protected String city; >protected String province; >protected String country; >protected String postalCode; > >public Address() { >} > >public Address(Long id) { >setId(id); >} > > * > > *VersionedObject: > [EMAIL PROTECTED] > public class VersionedObject implements Serializable { >private static final long serialVersionUID = 1L; > >protected Integer version; > >@Version >public Integer getVersion() { >return version; >} > >protected void setVersion(Integer version) { >this.version = version; >} > > } > * > > > So what is the issue with @Version? > When I remove this set/get method, everything is fine. > > > > -- > Thanks, > Mick Knutson > > http://www.baselogic.com > http://www.blincmagazine.com > http://www.linkedin.com/in/mickknutson > http://www.djmick.com > http://www.myspace.com/mickknutson > http://www.myspace.com/BLiNCMagazine > http://tahoe.baselogic.com > --- >
[2.0.5] no write methods....
I am getting this error now: *INFO: Interceptor has thrown exception, unwinding now java.lang.RuntimeException: org.apache.cxf.aegis.DatabindingException: No write method for property {http://domain.baselogic.com}version in class com.baselogic.domain.Address at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:92) at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:44) * Here is my address object and versioned objects: *Address:* [EMAIL PROTECTED] @Table(name = "address") public class Address extends IdentifiedObject implements Serializable { private static final long serialVersionUID = 3617859655330969141L; protected String address; protected String city; protected String province; protected String country; protected String postalCode; public Address() { } public Address(Long id) { setId(id); } * *VersionedObject: [EMAIL PROTECTED] public class VersionedObject implements Serializable { private static final long serialVersionUID = 1L; protected Integer version; @Version public Integer getVersion() { return version; } protected void setVersion(Integer version) { this.version = version; } } * So what is the issue with @Version? When I remove this set/get method, everything is fine. -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.linkedin.com/in/mickknutson http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---