You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Steve Wells <we...@gmail.com> on 2006/12/18 01:52:53 UTC
Squeeze adapter issue with Beanform
Hiya,
I've just been trying to get beanform 0.7 working, but get what appears to
be a clash with the BeanPropertySqueezer and my own Cayenne squeezer.
Cutdown error is:
Error building service tapestry.data.DataSqueezerTerminator: Error at
jar:file:/G:/JavaTools/apache-tomcat-5.5.20/temp/4-web/WEB-INF/lib/tapestry-
framework-4.1.1-20061217.194907-31.jar!/META-INF/tapestry.data.xml, line 49,
column 64: Unable to update property squeezeAdaptors of object
DataSqueezer[adaptors=<AdaptorRegistry[org.apache.cayenne.DataObject=<SingletonProxy
for application_hivemodule.CayenneAdapter(org.rz.squeezer.IDataObjectAdapter)>]>]:
java.lang.reflect.InvocationTargetException
[ +/- ] Exception: Error at jar:file/apache-tomcat-5.5.20
/temp/4-web/WEB-INF/lib/tapestry-
framework-4.1.1-20061217.194907-31.jar!/META-INF/tapestry.data.xml, line 49,
column 64: Unable to update property squeezeAdaptors of object
DataSqueezer[adaptors=<AdaptorRegistry[org.apache.cayenne.DataObject=<SingletonProxy
for application_hivemodule.CayenneAdapter(org.rz.squeezer.IDataObjectAdapter)>]>]:
java.lang.reflect.InvocationTargetException
then...
An adaptor for prefix '' is already registered.
ok both Beanform and my squeezer have a prefix and they are different.
Before I go posting slabs of Hive modules etc does anyone have a clue here?
Using Tap 4.1.1-SNAPSHOT.
Thanks,
Steve
Re: Squeeze adapter issue with Beanform
Posted by D&J Gredler <dj...@gmail.com>.
It looks to me like you're right:
http://tapestry.apache.org/tapestry4/apidocs/src-html/org/apache/tapestry/util/io/DataSqueezerImpl.html
Well, at least you found the problem, and I'll halve the chances of
conflicts in the next release by cutting the prefix down to a single char.
Take care,
Daniel
On 12/18/06, Steve Wells <we...@gmail.com> wrote:
>
> Confirm it first, could be the lack of caffeine here, I'd be curious to
> see
> if you see it in the same way.
>
> On 18/12/06, D&J Gredler <dj...@gmail.com> wrote:
> >
> > Hmm... very interesting. I wonder why the squeezer prefix works that
> way?
> > It
> > looks like I probably need to change the BeanForm squeezer prefix to
> just
> > be
> > a single character, in order to minimize conflicts...
> >
> > On 12/18/06, Steve Wells <we...@gmail.com> wrote:
> > >
> > > hmmm, thanks and good thinking guys not sure it nails it though...
> > >
> > > The prefix is "P" but I have tried others., BeanForm uses "BP"
> > >
> > > Barry I think the squeezer type is registered by the getDataClass
> > method?
> > > Cayenne squeezer:
> > > public Class getDataClass() {
> > > return DataObject.class;
> > > }
> > >
> > > BeanForm:
> > > public Class getDataClass() {
> > > return BeanProperty.class;
> > > }
> > >
> > > ahhh haaaa (20 mins later), when I said I tried others I only tried
> "PO"
> > > (Persistent Object :) ). I tried 'q' and 'p' and they both
> > > work. Studying
> > > the Tapestry DataSqueezerImpl you see that (well it looks like it to
> me)
> > > all
> > > the characters in the prefix String are registered, using "BP" will
> > > reserve
> > > both the chars, B and P. Then my squeezer comes along with "P" and it
> > > fails
> > > with an error message that is a bit misleading.
> > >
> > > This is not the behaviour I was expecting. I was treating
> > > SqueezeAdapter.getPrefix() to set a unique String key for a squeezer,
> so
> > > that "A" is different to "AA". Now I know but perhaps this trap could
> > be
> > > removed?
> > >
> > > Thanks all for your suggestions.
> > >
> > > Steve
> > >
> > > On 19/12/06, Barry Books <tr...@gmail.com> wrote:
> > > >
> > > > Could it be both sqeezers are useable for the object you are trying
> to
> > > > sqeeze? I'm not sure how that case is handled but the error looks
> > > > similar to the one you get when you specify more that one persist
> > > > option.
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: Squeeze adapter issue with Beanform
Posted by Steve Wells <we...@gmail.com>.
Confirm it first, could be the lack of caffeine here, I'd be curious to see
if you see it in the same way.
On 18/12/06, D&J Gredler <dj...@gmail.com> wrote:
>
> Hmm... very interesting. I wonder why the squeezer prefix works that way?
> It
> looks like I probably need to change the BeanForm squeezer prefix to just
> be
> a single character, in order to minimize conflicts...
>
> On 12/18/06, Steve Wells <we...@gmail.com> wrote:
> >
> > hmmm, thanks and good thinking guys not sure it nails it though...
> >
> > The prefix is "P" but I have tried others., BeanForm uses "BP"
> >
> > Barry I think the squeezer type is registered by the getDataClass
> method?
> > Cayenne squeezer:
> > public Class getDataClass() {
> > return DataObject.class;
> > }
> >
> > BeanForm:
> > public Class getDataClass() {
> > return BeanProperty.class;
> > }
> >
> > ahhh haaaa (20 mins later), when I said I tried others I only tried "PO"
> > (Persistent Object :) ). I tried 'q' and 'p' and they both
> > work. Studying
> > the Tapestry DataSqueezerImpl you see that (well it looks like it to me)
> > all
> > the characters in the prefix String are registered, using "BP" will
> > reserve
> > both the chars, B and P. Then my squeezer comes along with "P" and it
> > fails
> > with an error message that is a bit misleading.
> >
> > This is not the behaviour I was expecting. I was treating
> > SqueezeAdapter.getPrefix() to set a unique String key for a squeezer, so
> > that "A" is different to "AA". Now I know but perhaps this trap could
> be
> > removed?
> >
> > Thanks all for your suggestions.
> >
> > Steve
> >
> > On 19/12/06, Barry Books <tr...@gmail.com> wrote:
> > >
> > > Could it be both sqeezers are useable for the object you are trying to
> > > sqeeze? I'm not sure how that case is handled but the error looks
> > > similar to the one you get when you specify more that one persist
> > > option.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
>
>
Re: Squeeze adapter issue with Beanform
Posted by D&J Gredler <dj...@gmail.com>.
Hmm... very interesting. I wonder why the squeezer prefix works that way? It
looks like I probably need to change the BeanForm squeezer prefix to just be
a single character, in order to minimize conflicts...
On 12/18/06, Steve Wells <we...@gmail.com> wrote:
>
> hmmm, thanks and good thinking guys not sure it nails it though...
>
> The prefix is "P" but I have tried others., BeanForm uses "BP"
>
> Barry I think the squeezer type is registered by the getDataClass method?
> Cayenne squeezer:
> public Class getDataClass() {
> return DataObject.class;
> }
>
> BeanForm:
> public Class getDataClass() {
> return BeanProperty.class;
> }
>
> ahhh haaaa (20 mins later), when I said I tried others I only tried "PO"
> (Persistent Object :) ). I tried 'q' and 'p' and they both
> work. Studying
> the Tapestry DataSqueezerImpl you see that (well it looks like it to me)
> all
> the characters in the prefix String are registered, using "BP" will
> reserve
> both the chars, B and P. Then my squeezer comes along with "P" and it
> fails
> with an error message that is a bit misleading.
>
> This is not the behaviour I was expecting. I was treating
> SqueezeAdapter.getPrefix() to set a unique String key for a squeezer, so
> that "A" is different to "AA". Now I know but perhaps this trap could be
> removed?
>
> Thanks all for your suggestions.
>
> Steve
>
> On 19/12/06, Barry Books <tr...@gmail.com> wrote:
> >
> > Could it be both sqeezers are useable for the object you are trying to
> > sqeeze? I'm not sure how that case is handled but the error looks
> > similar to the one you get when you specify more that one persist
> > option.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
Re: Squeeze adapter issue with Beanform
Posted by Steve Wells <we...@gmail.com>.
hmmm, thanks and good thinking guys not sure it nails it though...
The prefix is "P" but I have tried others., BeanForm uses "BP"
Barry I think the squeezer type is registered by the getDataClass method?
Cayenne squeezer:
public Class getDataClass() {
return DataObject.class;
}
BeanForm:
public Class getDataClass() {
return BeanProperty.class;
}
ahhh haaaa (20 mins later), when I said I tried others I only tried "PO"
(Persistent Object :) ). I tried 'q' and 'p' and they both work. Studying
the Tapestry DataSqueezerImpl you see that (well it looks like it to me) all
the characters in the prefix String are registered, using "BP" will reserve
both the chars, B and P. Then my squeezer comes along with "P" and it fails
with an error message that is a bit misleading.
This is not the behaviour I was expecting. I was treating
SqueezeAdapter.getPrefix() to set a unique String key for a squeezer, so
that "A" is different to "AA". Now I know but perhaps this trap could be
removed?
Thanks all for your suggestions.
Steve
On 19/12/06, Barry Books <tr...@gmail.com> wrote:
>
> Could it be both sqeezers are useable for the object you are trying to
> sqeeze? I'm not sure how that case is handled but the error looks
> similar to the one you get when you specify more that one persist
> option.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Squeeze adapter issue with Beanform
Posted by Barry Books <tr...@gmail.com>.
Could it be both sqeezers are useable for the object you are trying to
sqeeze? I'm not sure how that case is handled but the error looks
similar to the one you get when you specify more that one persist
option.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Squeeze adapter issue with Beanform
Posted by D&J Gredler <dj...@gmail.com>.
Never had this happen to me... what's the prefix for your Cayenne squeezer?
On 12/17/06, Steve Wells <we...@gmail.com> wrote:
>
> Hiya,
>
> I've just been trying to get beanform 0.7 working, but get what appears to
> be a clash with the BeanPropertySqueezer and my own Cayenne squeezer.
> Cutdown error is:
>
> Error building service tapestry.data.DataSqueezerTerminator: Error at
> jar:file:/G:/JavaTools/apache-tomcat-5.5.20
> /temp/4-web/WEB-INF/lib/tapestry-
> framework-4.1.1-20061217.194907-31.jar!/META-INF/tapestry.data.xml, line
> 49,
> column 64: Unable to update property squeezeAdaptors of object
> DataSqueezer[adaptors=<AdaptorRegistry[org.apache.cayenne.DataObject=
> <SingletonProxy
> for application_hivemodule.CayenneAdapter(
> org.rz.squeezer.IDataObjectAdapter)>]>]:
> java.lang.reflect.InvocationTargetException
>
> [ +/- ] Exception: Error at jar:file/apache-tomcat-5.5.20
> /temp/4-web/WEB-INF/lib/tapestry-
> framework-4.1.1-20061217.194907-31.jar!/META-INF/tapestry.data.xml, line
> 49,
> column 64: Unable to update property squeezeAdaptors of object
> DataSqueezer[adaptors=<AdaptorRegistry[org.apache.cayenne.DataObject=
> <SingletonProxy
> for application_hivemodule.CayenneAdapter(
> org.rz.squeezer.IDataObjectAdapter)>]>]:
> java.lang.reflect.InvocationTargetException
>
> then...
> An adaptor for prefix '' is already registered.
>
> ok both Beanform and my squeezer have a prefix and they are different.
> Before I go posting slabs of Hive modules etc does anyone have a clue
> here?
> Using Tap 4.1.1-SNAPSHOT.
>
> Thanks,
>
> Steve
>
>