Does (2) apply to all extensions ? Looks like it might have broken the
original binding-feed as Rome does not support cloning. Below is an
exception trying to run sample-feed-aggregator-webapp.
org.osoa.sca.ServiceRuntimeException:
java.lang.reflect.InvocationTargetException
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.copy(PassByValueInterceptor.java:219)
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:110)
org.apache.tuscany.sca.binding.feed.provider.FeedBindingListenerServlet.doGet(FeedBindingListenerServlet.java:203)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.tuscany.sca.host.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:102)
org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:91)
root cause
java.lang.reflect.InvocationTargetException
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.copy(PassByValueInterceptor.java:217)
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:110)
org.apache.tuscany.sca.binding.feed.provider.FeedBindingListenerServlet.doGet(FeedBindingListenerServlet.java:203)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.tuscany.sca.host.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:102)
org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:91)
root cause
java.lang.CloneNotSupportedException: Cannot clone a class
com.sun.syndication.feed.atom.Feed object
com.sun.syndication.feed.impl.CloneableBean.beanClone(CloneableBean.java:153)
com.sun.syndication.feed.impl.ObjectBean.clone(ObjectBean.java:87)
com.sun.syndication.feed.WireFeed.clone(WireFeed.java:76)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.copy(PassByValueInterceptor.java:217)
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:110)
org.apache.tuscany.sca.binding.feed.provider.FeedBindingListenerServlet.doGet(FeedBindingListenerServlet.java:203)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.tuscany.sca.host.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:102)
org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:91)
On Fri, Feb 22, 2008 at 1:46 PM, Raymond Feng <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I did some debugging and it turned out that the problem is caused by the
> PassByValueInterceptor.copy(). The interface is remotable and Abdera's
> object model doesn't conform to the JAXB default Java2WSDL mapping, neither
> does it implement java.io.Serializable.
>
> There are a few things we can do:
>
> 1) Have the feed service binding provider to indicate that it allows pass by
> reference as the feed data is exchanged over HTTP and pass-by-value is
> achieved on the transport. (This is related to the ongoing discussion on
> pass-by-value).
>
> 2) Adjust the PassByInterceptor to use clone() to copy if none of the
> registered databindings can handle it and data implements Cloneable.
> (Abdera's object model implements Cloneable).
>
> 3) Add a new databinding for Abdera's Feed Object Model. This way, we will
> have better control for the data transformation as well as copy.
>
> I'll check in a fix for 1 & 2 to get you going and refactor it when the PBV
> discussion is settled.
>
> Thanks,
> Raymond
>
>
>
> ----- Original Message -----
> From: "Luciano Resende" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, February 21, 2008 5:27 PM
> Subject: Databinding exceptions ? Abdera model objects missing no-arg
> default constructor. was Re: Support for Atom using Apache Abdera
>
>
> >I have started making progress on the porting binding-feed-atom to use
> > Apache Abdera, but trying to make a end-to-end invocation to retrieve
> > a collection, I have started to get some exceptions. After some debug,
> > this is looking to me related to databinding transformations requiring
> > default no-arg constructors. Could someone with more experience on
> > the databinding framework give me some hints here, is this indeed the
> > databinding transformations happening during the invocation, and any
> > possible workaround.
> >
> > SEVERE: Servlet.service() for servlet /customer/* threw exception
> > java.lang.IllegalArgumentException:
> > com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 25 counts of
> > IllegalAnnotationExceptions
> > org.apache.abdera.model.Collection is an interface, and JAXB can't
> > handle interfaces.
> > this problem is related to the following location:
> > at org.apache.abdera.model.Collection
> > at public org.apache.abdera.model.Collection
> > org.apache.abdera.parser.stax.FOMSource.getCollection()
> > at org.apache.abdera.parser.stax.FOMSource
> > at org.apache.abdera.parser.stax.FOMFeed
> > org.apache.abdera.model.Collection does not have a no-arg default
> > constructor.
> > this problem is related to the following location:
> > at org.apache.abdera.model.Collection
> > at public org.apache.abdera.model.Collection
> > org.apache.abdera.parser.stax.FOMSource.getCollection()
> > at org.apache.abdera.parser.stax.FOMSource
> > at org.apache.abdera.parser.stax.FOMFeed
> >
> >
> > On Wed, Feb 20, 2008 at 3:37 PM, Jean-Sebastien Delfino
> > <[EMAIL PROTECTED]> wrote:
> >> Luciano Resende wrote:
> >> [snip]
> >>
> >> > I'll start by copying the current binding-feed
> >> > module
> >> [snip]
> >>
> >> I made a few minor changes to binding-feed today as I'm trying to use it
> >> to provide ATOMPub access to the contribution workspace that I'm working
> >> on.
> >>
> >> The changes are in SVN r629625, r629626, r629651, r629652 and provide
> >> support for passing Hrefs and ids in new ATOM entries.
> >>
> >>
> >> --
> >> Jean-Sebastien
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende
> > http://lresende.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]