You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Filippos Slavik <fs...@forthnet.gr> on 2002/01/03 02:24:59 UTC

type mismatch between read and write methods (intake)

Dear all I have the following problem with TurbineIntakeService (2.x, 
version 1.3)

I have the following table column defined in my database xml file:

<column javaName="DiskPlatformID" name="DIGITAL_LARGE_DISKPLATFORM_ID" 
type="INTEGER"/>

Torque (the one distirbuted with TDK2.1) generates in the Base OM object 
one getter:

public NumberKey getDiskPlatformID()

and two setters:

public void setDiskPlatformID(NumberKey v ) throws Exception
public void setDiskPlatformID(String v ) throws Exception

So far so good. My inputs.xml contains an entry to handle the above field:

<field name="DiskPlatformID" key="diskplatformid" type="NumberKey" 
mapToProperty="DiskPlatformID"/>

The problem is that TurbineIntakeService fails to select the correct (?) 
setter for the concrete field/property. From the exception thrown the 
reason is obvious. The IntakseService  uses the 
java.bean.PropertyDescriptor class to get the setter and getter for the 
property, but it fails since there are two setters for the property with 
different parameter types.

I'm stuck :( Due to this exception I'm not able to map my "form data" to 
the appropriate OM instances and store them to the database backend. Once 
again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 for the 
generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...

Any help ? :)

Thanks :)
Slavikos




################################################################
Filippos Slavik
FORTHnet R&D, Heraklion, Greece
e-mail : fsla@forthnet.gr
phone : (+3) 081 391230
################################################################

"The software said 'runs on Win95 or better,' so I installed it
on Linux..."



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by Filippos Slavik <fs...@forthnet.gr>.
At 12:49 ìì 3/1/2002 -0800, you wrote:
>If you come up with a good patch, I would include it in Intake, so it
>will work with jdk1.2.  But I expect it to be a lot of work.
>
>An alternative is to patch Object.vm in torque to not add the overloaded
>method.

Well, I came up with a "hack" and not patch for now, since my time is very 
limited due to a project deadline on monday :) Anyway, I took me about 15 
minutes to grab the sources of PropertyDescriptor, Introspector, 
GenericBeanInfo and FeatureDescriptor from Sun's 1.3.1 source and import 
them to  "my Turbine" project in VAJ. I did some editing and actually 
removed a couple of methods from the above mentioned sources that are not 
needed and it's finally working for me...

"My" TurbineIntakeService in

public Method getFieldGetter(String className, String propName)
and
public Method getFieldSetter(String className, String propName)

uses my customized PropertyDescriptor class and not the one from the 1.2.2 
java.bean.* package...

Surely, this not a clean patch nor a clean "hack", but hey, since PD is 
used in the getFieldGetter and getFieldSetter methods only to get the 
correct getter and setter and not for other funcy staff, I'll tell you what 
I'm going to do:

I'll implement a very simple singleton class that will correctly return a 
getter and a setter for a give property (with the same logic of the 1.3.x 
PD implementation).. I'll use it for a while in my project and if it will 
work correctly I'll send you my sources and it will be up to you to use it 
or not in the TurbineIntakeService :)

>john mcnally

Regards
Slavikos


>Filippos Slavik wrote:
> >
> > At 05:27 ðì 3/1/2002 +0200, you wrote:
> > >At 06:49 ìì 2/1/2002 -0800, John McNally wrote:
> > >>I have looked at the source for PropertyDescriptor (PD) and Introspector
> > >>and do not see where the problem might be.  I have sun's jdk 1.3.0.  you
> > >>might want to look for yourself.
> > >
> > >Yeap, you'r right... Under 1.3.1_01 there is no problem... There is
> > >something wrong with 1.2.2. Thank you for your help.
> > >
> >
> > More info about that:
> >
> > PropertyDescriptor (PD) in 1.2.2 is buggy. I did some source checking, and
> > I discovered that the PD in 1.2.2 assumes that for a given property there
> > is one setter and one getter. On the other hand, PD in 1.3.x has the
> > correct logic. It assumes that for a given property there should be at
> > least one getter and there might be multiple getters. It then first tries
> > to find the qualified getter, learns the return type of the getter and
> > therefore the data type of the property and then it searches the class  for
> > a setter with one argument of the given data type.
> >
> > Anyway, the behaviour of PD in 1.3.x is correct, BUT that means that the
> > current implementation of TurbineIntakeService is working properly only
> > with 1.3.x JRE's. I think that this should, from now, be somewhere stated
> > ... perhaps in the Intake HOWTO.
> >
> > As for me, since my project is 1.2.2 based and I can't upgrade to a newer
> > JRE due to some restrictions I have to patch the TurbineIntakeService :(
> >
> > Best Regards
> > Filippos Slavik
> >
> > PS: John, thanks very much for your help and feedback :)
> >
> > >>PD should only throw that exception in
> > >>the case where you have
> > >>
> > >>Foo getFoo()
> > >>
> > >>and the only setter it is able to find is
> > >>
> > >>void setFoo(Bar foo)
> > >>
> > >>
> > >>if it can find a
> > >>
> > >>void setFoo(Foo foo)
> > >>
> > >>it will be the one selected.
> > >>
> > >>john mcnally
> > >>
> > >>Filippos Slavik wrote:
> > >> >
> > >> > At 06:16 ìì 2/1/2002 -0800, you wrote:
> > >> > >PropertyDescriptor contains the logic to determine the correct setter
> > >> > >according to the return type of the getter, so it should not be a
> > >> > >problem.  What is the exception? stacktrace?
> > >> >
> > >> > [Thu Jan 03 04:21:34 GMT+02:00 2002] -- ERROR --
> > >> >          Exception:  java.beans.IntrospectionException: type mismatch
> > >> > between read and write methods
> > >> >          Stack Trace follows:
> > >> >          java.beans.IntrospectionException: type mismatch between 
> read and
> > >> > write methods
> > >> >          java.lang.Throwable(java.lang.String)
> > >> >          java.lang.Exception(java.lang.String)
> > >> >          java.beans.IntrospectionException(java.lang.String)
> > >> >          void java.beans.PropertyDescriptor.findPropertyType()
> > >> >          java.beans.PropertyDescriptor(java.lang.String, 
> java.lang.Class)
> > >> >          java.lang.reflect.Method
> > >> >
> > >> 
> org.apache.turbine.services.intake.TurbineIntakeService.getFieldSetter(java.lang.String,
> > >> > java.lang.String)
> > >> >          java.lang.reflect.Method
> > >> >
> > >> 
> org.apache.turbine.services.intake.TurbineIntake.getFieldSetter(java.lang.String,
> > >> > java.lang.String)
> > >> >
> > >> 
> org.apache.turbine.services.intake.model.Field(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > >> > org.apache.turbine.services.intake.model.Group)
> > >> >
> > >> 
> org.apache.turbine.services.intake.model.NumberKeyField(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > >> > org.apache.turbine.services.intake.model.Group)
> > >> >          org.apache.turbine.services.intake.model.Field
> > >> >
> > >> 
> org.apache.turbine.services.intake.model.FieldFactory$5.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > >> > org.apache.turbine.services.intake.model.Group)
> > >> >          org.apache.turbine.services.intake.model.Field
> > >> >
> > >> 
> org.apache.turbine.services.intake.model.FieldFactory.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > >> > org.apache.turbine.services.intake.model.Group)
> > >> >
> > >> 
> org.apache.turbine.services.intake.model.Group(org.apache.turbine.services.intake.xmlmodel.XmlGroup)
> > >> >          org.apache.turbine.services.intake.model.Group
> > >> >
> > >> 
> org.apache.turbine.services.intake.TurbineIntakeService.getGroup(java.lang.String)
> > >> >          org.apache.turbine.services.intake.model.Group
> > >> >
> > >> 
> org.apache.turbine.services.intake.TurbineIntake.getGroup(java.lang.String)
> > >> >          void
> > >> > org.apache.turbine.services.intake.IntakeTool.init(java.lang.Object)
> > >> >          void
> > >> >
> > >> 
> org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools(org.apache.velocity.context.Context,
> > >> > org.apache.turbine.util.RunData)
> > >> >          void
> > >> >
> > >> 
> org.apache.turbine.services.pull.TurbinePullService.populateContext(org.apache.velocity.context.Context,
> > >> > org.apache.turbine.util.RunData)
> > >> >          void
> > >> >
> > >> 
> org.apache.turbine.services.pull.TurbinePull.populateContext(org.apache.velocity.context.Context,
> > >> > org.apache.turbine.util.RunData)
> > >> >          org.apache.velocity.context.Context
> > >> >
> > >> 
> org.apache.turbine.services.velocity.TurbineVelocityService.getContext(org.apache.turbine.util.RunData)
> > >> >          org.apache.velocity.context.Context
> > >> >
> > >> 
> org.apache.turbine.services.velocity.TurbineVelocity.getContext(org.apache.turbine.util.RunData)
> > >> >          void
> > >> >
> > >> 
> org.apache.turbine.util.velocity.VelocityActionEvent.perform(org.apache.turbine.util.RunData)
> > >> >          void
> > >> >
> > >> 
> org.apache.turbine.modules.actions.VelocityAction.perform(org.apache.turbine.util.RunData)
> > >> >          void
> > >> >
> > >> 
> org.apache.turbine.modules.ActionLoader.exec(org.apache.turbine.util.RunData,
> > >> > java.lang.String)
> > >> >          void
> > >> > 
> org.apache.turbine.Turbine.doGet(javax.servlet.http.HttpServletRequest,
> > >> > javax.servlet.http.HttpServletResponse)
> > >> >          void
> > >> >
> > >> 
> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> > >> > javax.servlet.http.HttpServletResponse)
> > >> >          void
> > >> > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> > >> > javax.servlet.ServletResponse)
> > >> >          void
> > >> >
> > >> 
> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
> > >> > org.apache.tomcat.core.Response)
> > >> >          void
> > >> > org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
> > >> > org.apache.tomcat.core.Response)
> > >> >          void
> > >> >
> > >> 
> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
> > >> > org.apache.tomcat.core.Response)
> > >> >          void
> > >> >
> > >> 
> org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request,
> > >> > org.apache.tomcat.core.Response)
> > >> >          void
> > >> >
> > >> 
> org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request,
> > >> > org.apache.tomcat.core.Response)
> > >> >          void
> > >> >
> > >> 
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection,
> > >> > java.lang.Object [])
> > >> >          void
> > >> > org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object [])
> > >> >          void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
> > >> >          void java.lang.Thread.run()
> > >> >
> > >> > JRE 1.2.2 :)
> > >> >
> > >> > Best Regards
> > >> > Filippos Slavik
> > >> >
> > >> > >john mcnally
> > >> > >
> > >> > >Filippos Slavik wrote:
> > >> > > >
> > >> > > > At 05:49 ìì 2/1/2002 -0800, you wrote:
> > >> > > > >See the archives.  A reasonable though not ideal fix is in
> > >> cvs.  And the
> > >> > > > >problem is not with PropertyDescriptor, I am pretty sure it
> > >> contains the
> > >> > > > >correct logic.  The bug occurs in BeanInfo or Introspector.
> > >> > > >
> > >> > > > Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD
> > >> (should't be
> > >> > > > the fix there ?)
> > >> > > >
> > >> > > > I got the exception in the following line:
> > >> > > >
> > >> > > > pd = new PropertyDescriptor(propName, Class.forName(className));
> > >> > > >
> > >> > > > in the ::getFieldSetter of TurbineIntakeService..
> > >> > > >
> > >> > > > >john mcnally
> > >> > > >
> > >> > > > Best Regards
> > >> > > > Filippos Slavik
> > >> > > >
> > >> > > > >Filippos Slavik wrote:
> > >> > > > > >
> > >> > > > > > Dear all I have the following problem with
> > >> TurbineIntakeService (2.x,
> > >> > > > > > version 1.3)
> > >> > > > > >
> > >> > > > > > I have the following table column defined in my database 
> xml file:
> > >> > > > > >
> > >> > > > > > <column javaName="DiskPlatformID"
> > >> name="DIGITAL_LARGE_DISKPLATFORM_ID"
> > >> > > > > > type="INTEGER"/>
> > >> > > > > >
> > >> > > > > > Torque (the one distirbuted with TDK2.1) generates in the 
> Base OM
> > >> > > object
> > >> > > > > > one getter:
> > >> > > > > >
> > >> > > > > > public NumberKey getDiskPlatformID()
> > >> > > > > >
> > >> > > > > > and two setters:
> > >> > > > > >
> > >> > > > > > public void setDiskPlatformID(NumberKey v ) throws Exception
> > >> > > > > > public void setDiskPlatformID(String v ) throws Exception
> > >> > > > > >
> > >> > > > > > So far so good. My inputs.xml contains an entry to handle the
> > >> above
> > >> > > field:
> > >> > > > > >
> > >> > > > > > <field name="DiskPlatformID" key="diskplatformid" 
> type="NumberKey"
> > >> > > > > > mapToProperty="DiskPlatformID"/>
> > >> > > > > >
> > >> > > > > > The problem is that TurbineIntakeService fails to select the
> > >> > > correct (?)
> > >> > > > > > setter for the concrete field/property. From the exception
> > >> thrown the
> > >> > > > > > reason is obvious. The IntakseService  uses the
> > >> > > > > > java.bean.PropertyDescriptor class to get the setter and
> > >> getter for the
> > >> > > > > > property, but it fails since there are two setters for the
> > >> property
> > >> > > with
> > >> > > > > > different parameter types.
> > >> > > > > >
> > >> > > > > > I'm stuck :( Due to this exception I'm not able to map my 
> "form
> > >> > > data" to
> > >> > > > > > the appropriate OM instances and store them to the database
> > >> > > backend. Once
> > >> > > > > > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1
> > >> for the
> > >> > > > > > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for 
> Java)...
> > >> > > > > >
> > >> > > > > > Any help ? :)
> > >> > > > > >
> > >> > > > > > Thanks :)
> > >> > > > > > Slavikos
> > >> > > > > >
> > >> > > > > > 
> ################################################################
> > >> > > > > > Filippos Slavik
> > >> > > > > > FORTHnet R&D, Heraklion, Greece
> > >> > > > > > e-mail : fsla@forthnet.gr
> > >> > > > > > phone : (+3) 081 391230
> > >> > > > > > 
> ################################################################
> > >> > > > > >
> > >> > > > > > "The software said 'runs on Win95 or better,' so I 
> installed it
> > >> > > > > > on Linux..."
> > >> > > > > >
> > >> > > > > > --
> > >> > > > > > To unsubscribe,
> > >> > > > > e-mail:   <ma...@jakarta.apache.org>
> > >> > > > > > For additional commands, e-mail:
> > >> > > > > <ma...@jakarta.apache.org>
> > >> > > > >
> > >> > > > >--
> > >> > > > >To unsubscribe,
> > >> > > e-mail:   <ma...@jakarta.apache.org>
> > >> > > > >For additional commands, e-mail:
> > >> > > <ma...@jakarta.apache.org>
> > >> > > >
> > >> > > > ################################################################
> > >> > > > Filippos Slavik
> > >> > > > FORTHnet R&D, Heraklion, Greece
> > >> > > > e-mail : fsla@forthnet.gr
> > >> > > > phone : (+3) 081 391230
> > >> > > > ################################################################
> > >> > > >
> > >> > > > "The software said 'runs on Win95 or better,' so I installed it
> > >> > > > on Linux..."
> > >> > > >
> > >> > > > --
> > >> > > > To unsubscribe,
> > >> > > e-mail:   <ma...@jakarta.apache.org>
> > >> > > > For additional commands, e-mail:
> > >> > > <ma...@jakarta.apache.org>
> > >> > >
> > >> > >--
> > >> > >To unsubscribe,
> > >> e-mail:   <ma...@jakarta.apache.org>
> > >> > >For additional commands, e-mail:
> > >> <ma...@jakarta.apache.org>
> > >> >
> > >> > ################################################################
> > >> > Filippos Slavik
> > >> > FORTHnet R&D, Heraklion, Greece
> > >> > e-mail : fsla@forthnet.gr
> > >> > phone : (+3) 081 391230
> > >> > ################################################################
> > >> >
> > >> > "The software said 'runs on Win95 or better,' so I installed it
> > >> > on Linux..."
> > >> >
> > >> > --
> > >> > To unsubscribe,
> > >> e-mail:   <ma...@jakarta.apache.org>
> > >> > For additional commands, e-mail:
> > >> <ma...@jakarta.apache.org>
> > >>
> > >>--
> > >>To unsubscribe,
> > >>e-mail:   <ma...@jakarta.apache.org>
> > >>For additional commands, e-mail:
> > >><ma...@jakarta.apache.org>
> > >
> > >
> > >################################################################
> > >Filippos Slavik
> > >FORTHnet R&D, Heraklion, Greece
> > >e-mail : fsla@forthnet.gr
> > >phone : (+3) 081 391230
> > >################################################################
> > >
> > >"The software said 'runs on Win95 or better,' so I installed it
> > >on Linux..."
> > >
> > >
> > >
> > >--
> > >To unsubscribe, 
> e-mail:   <ma...@jakarta.apache.org>
> > >For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> > >
> >
> > ################################################################
> > Filippos Slavik
> > FORTHnet R&D, Heraklion, Greece
> > e-mail : fsla@forthnet.gr
> > phone : (+3) 081 391230
> > ################################################################
> >
> > "The software said 'runs on Win95 or better,' so I installed it
> > on Linux..."
> >
> > --
> > To unsubscribe, 
> e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


################################################################
Filippos Slavik
FORTHnet R&D, Heraklion, Greece
e-mail : fsla@forthnet.gr
phone : (+3) 081 391230
################################################################

"The software said 'runs on Win95 or better,' so I installed it
on Linux..."



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Also, you might be able to get away with extending (rather than
patching) the TurbineIntakeService and using your custom
implementation (set via TurbineResources.properties).

Dan


John McNally <jm...@collab.net> writes:

> If you come up with a good patch, I would include it in Intake, so it
> will work with jdk1.2.  But I expect it to be a lot of work.
>
> An alternative is to patch Object.vm in torque to not add the overloaded
> method.
>
> Filippos Slavik wrote:
> > 
>> PropertyDescriptor (PD) in 1.2.2 is buggy. I did some source checking, and
>> I discovered that the PD in 1.2.2 assumes that for a given property there
>> is one setter and one getter. On the other hand, PD in 1.3.x has the
>> correct logic. It assumes that for a given property there should be at
>> least one getter and there might be multiple getters. It then first tries
>> to find the qualified getter, learns the return type of the getter and
>> therefore the data type of the property and then it searches the class  for
>> a setter with one argument of the given data type.
>> 
>> Anyway, the behaviour of PD in 1.3.x is correct, BUT that means that the
>> current implementation of TurbineIntakeService is working properly only
>> with 1.3.x JRE's. I think that this should, from now, be somewhere stated
>> ... perhaps in the Intake HOWTO.
>> 
>> As for me, since my project is 1.2.2 based and I can't upgrade to a newer
>> JRE due to some restrictions I have to patch the TurbineIntakeService :(

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by John McNally <jm...@collab.net>.
If you come up with a good patch, I would include it in Intake, so it
will work with jdk1.2.  But I expect it to be a lot of work.

An alternative is to patch Object.vm in torque to not add the overloaded
method.

john mcnally

Filippos Slavik wrote:
> 
> At 05:27 ðì 3/1/2002 +0200, you wrote:
> >At 06:49 ìì 2/1/2002 -0800, John McNally wrote:
> >>I have looked at the source for PropertyDescriptor (PD) and Introspector
> >>and do not see where the problem might be.  I have sun's jdk 1.3.0.  you
> >>might want to look for yourself.
> >
> >Yeap, you'r right... Under 1.3.1_01 there is no problem... There is
> >something wrong with 1.2.2. Thank you for your help.
> >
> 
> More info about that:
> 
> PropertyDescriptor (PD) in 1.2.2 is buggy. I did some source checking, and
> I discovered that the PD in 1.2.2 assumes that for a given property there
> is one setter and one getter. On the other hand, PD in 1.3.x has the
> correct logic. It assumes that for a given property there should be at
> least one getter and there might be multiple getters. It then first tries
> to find the qualified getter, learns the return type of the getter and
> therefore the data type of the property and then it searches the class  for
> a setter with one argument of the given data type.
> 
> Anyway, the behaviour of PD in 1.3.x is correct, BUT that means that the
> current implementation of TurbineIntakeService is working properly only
> with 1.3.x JRE's. I think that this should, from now, be somewhere stated
> ... perhaps in the Intake HOWTO.
> 
> As for me, since my project is 1.2.2 based and I can't upgrade to a newer
> JRE due to some restrictions I have to patch the TurbineIntakeService :(
> 
> Best Regards
> Filippos Slavik
> 
> PS: John, thanks very much for your help and feedback :)
> 
> >>PD should only throw that exception in
> >>the case where you have
> >>
> >>Foo getFoo()
> >>
> >>and the only setter it is able to find is
> >>
> >>void setFoo(Bar foo)
> >>
> >>
> >>if it can find a
> >>
> >>void setFoo(Foo foo)
> >>
> >>it will be the one selected.
> >>
> >>john mcnally
> >>
> >>Filippos Slavik wrote:
> >> >
> >> > At 06:16 ìì 2/1/2002 -0800, you wrote:
> >> > >PropertyDescriptor contains the logic to determine the correct setter
> >> > >according to the return type of the getter, so it should not be a
> >> > >problem.  What is the exception? stacktrace?
> >> >
> >> > [Thu Jan 03 04:21:34 GMT+02:00 2002] -- ERROR --
> >> >          Exception:  java.beans.IntrospectionException: type mismatch
> >> > between read and write methods
> >> >          Stack Trace follows:
> >> >          java.beans.IntrospectionException: type mismatch between read and
> >> > write methods
> >> >          java.lang.Throwable(java.lang.String)
> >> >          java.lang.Exception(java.lang.String)
> >> >          java.beans.IntrospectionException(java.lang.String)
> >> >          void java.beans.PropertyDescriptor.findPropertyType()
> >> >          java.beans.PropertyDescriptor(java.lang.String, java.lang.Class)
> >> >          java.lang.reflect.Method
> >> >
> >> org.apache.turbine.services.intake.TurbineIntakeService.getFieldSetter(java.lang.String,
> >> > java.lang.String)
> >> >          java.lang.reflect.Method
> >> >
> >> org.apache.turbine.services.intake.TurbineIntake.getFieldSetter(java.lang.String,
> >> > java.lang.String)
> >> >
> >> org.apache.turbine.services.intake.model.Field(org.apache.turbine.services.intake.xmlmodel.XmlField,
> >> > org.apache.turbine.services.intake.model.Group)
> >> >
> >> org.apache.turbine.services.intake.model.NumberKeyField(org.apache.turbine.services.intake.xmlmodel.XmlField,
> >> > org.apache.turbine.services.intake.model.Group)
> >> >          org.apache.turbine.services.intake.model.Field
> >> >
> >> org.apache.turbine.services.intake.model.FieldFactory$5.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> >> > org.apache.turbine.services.intake.model.Group)
> >> >          org.apache.turbine.services.intake.model.Field
> >> >
> >> org.apache.turbine.services.intake.model.FieldFactory.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> >> > org.apache.turbine.services.intake.model.Group)
> >> >
> >> org.apache.turbine.services.intake.model.Group(org.apache.turbine.services.intake.xmlmodel.XmlGroup)
> >> >          org.apache.turbine.services.intake.model.Group
> >> >
> >> org.apache.turbine.services.intake.TurbineIntakeService.getGroup(java.lang.String)
> >> >          org.apache.turbine.services.intake.model.Group
> >> >
> >> org.apache.turbine.services.intake.TurbineIntake.getGroup(java.lang.String)
> >> >          void
> >> > org.apache.turbine.services.intake.IntakeTool.init(java.lang.Object)
> >> >          void
> >> >
> >> org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools(org.apache.velocity.context.Context,
> >> > org.apache.turbine.util.RunData)
> >> >          void
> >> >
> >> org.apache.turbine.services.pull.TurbinePullService.populateContext(org.apache.velocity.context.Context,
> >> > org.apache.turbine.util.RunData)
> >> >          void
> >> >
> >> org.apache.turbine.services.pull.TurbinePull.populateContext(org.apache.velocity.context.Context,
> >> > org.apache.turbine.util.RunData)
> >> >          org.apache.velocity.context.Context
> >> >
> >> org.apache.turbine.services.velocity.TurbineVelocityService.getContext(org.apache.turbine.util.RunData)
> >> >          org.apache.velocity.context.Context
> >> >
> >> org.apache.turbine.services.velocity.TurbineVelocity.getContext(org.apache.turbine.util.RunData)
> >> >          void
> >> >
> >> org.apache.turbine.util.velocity.VelocityActionEvent.perform(org.apache.turbine.util.RunData)
> >> >          void
> >> >
> >> org.apache.turbine.modules.actions.VelocityAction.perform(org.apache.turbine.util.RunData)
> >> >          void
> >> >
> >> org.apache.turbine.modules.ActionLoader.exec(org.apache.turbine.util.RunData,
> >> > java.lang.String)
> >> >          void
> >> > org.apache.turbine.Turbine.doGet(javax.servlet.http.HttpServletRequest,
> >> > javax.servlet.http.HttpServletResponse)
> >> >          void
> >> >
> >> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> >> > javax.servlet.http.HttpServletResponse)
> >> >          void
> >> > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> >> > javax.servlet.ServletResponse)
> >> >          void
> >> >
> >> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
> >> > org.apache.tomcat.core.Response)
> >> >          void
> >> > org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
> >> > org.apache.tomcat.core.Response)
> >> >          void
> >> >
> >> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
> >> > org.apache.tomcat.core.Response)
> >> >          void
> >> >
> >> org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request,
> >> > org.apache.tomcat.core.Response)
> >> >          void
> >> >
> >> org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request,
> >> > org.apache.tomcat.core.Response)
> >> >          void
> >> >
> >> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection,
> >> > java.lang.Object [])
> >> >          void
> >> > org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object [])
> >> >          void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
> >> >          void java.lang.Thread.run()
> >> >
> >> > JRE 1.2.2 :)
> >> >
> >> > Best Regards
> >> > Filippos Slavik
> >> >
> >> > >john mcnally
> >> > >
> >> > >Filippos Slavik wrote:
> >> > > >
> >> > > > At 05:49 ìì 2/1/2002 -0800, you wrote:
> >> > > > >See the archives.  A reasonable though not ideal fix is in
> >> cvs.  And the
> >> > > > >problem is not with PropertyDescriptor, I am pretty sure it
> >> contains the
> >> > > > >correct logic.  The bug occurs in BeanInfo or Introspector.
> >> > > >
> >> > > > Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD
> >> (should't be
> >> > > > the fix there ?)
> >> > > >
> >> > > > I got the exception in the following line:
> >> > > >
> >> > > > pd = new PropertyDescriptor(propName, Class.forName(className));
> >> > > >
> >> > > > in the ::getFieldSetter of TurbineIntakeService..
> >> > > >
> >> > > > >john mcnally
> >> > > >
> >> > > > Best Regards
> >> > > > Filippos Slavik
> >> > > >
> >> > > > >Filippos Slavik wrote:
> >> > > > > >
> >> > > > > > Dear all I have the following problem with
> >> TurbineIntakeService (2.x,
> >> > > > > > version 1.3)
> >> > > > > >
> >> > > > > > I have the following table column defined in my database xml file:
> >> > > > > >
> >> > > > > > <column javaName="DiskPlatformID"
> >> name="DIGITAL_LARGE_DISKPLATFORM_ID"
> >> > > > > > type="INTEGER"/>
> >> > > > > >
> >> > > > > > Torque (the one distirbuted with TDK2.1) generates in the Base OM
> >> > > object
> >> > > > > > one getter:
> >> > > > > >
> >> > > > > > public NumberKey getDiskPlatformID()
> >> > > > > >
> >> > > > > > and two setters:
> >> > > > > >
> >> > > > > > public void setDiskPlatformID(NumberKey v ) throws Exception
> >> > > > > > public void setDiskPlatformID(String v ) throws Exception
> >> > > > > >
> >> > > > > > So far so good. My inputs.xml contains an entry to handle the
> >> above
> >> > > field:
> >> > > > > >
> >> > > > > > <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
> >> > > > > > mapToProperty="DiskPlatformID"/>
> >> > > > > >
> >> > > > > > The problem is that TurbineIntakeService fails to select the
> >> > > correct (?)
> >> > > > > > setter for the concrete field/property. From the exception
> >> thrown the
> >> > > > > > reason is obvious. The IntakseService  uses the
> >> > > > > > java.bean.PropertyDescriptor class to get the setter and
> >> getter for the
> >> > > > > > property, but it fails since there are two setters for the
> >> property
> >> > > with
> >> > > > > > different parameter types.
> >> > > > > >
> >> > > > > > I'm stuck :( Due to this exception I'm not able to map my "form
> >> > > data" to
> >> > > > > > the appropriate OM instances and store them to the database
> >> > > backend. Once
> >> > > > > > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1
> >> for the
> >> > > > > > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
> >> > > > > >
> >> > > > > > Any help ? :)
> >> > > > > >
> >> > > > > > Thanks :)
> >> > > > > > Slavikos
> >> > > > > >
> >> > > > > > ################################################################
> >> > > > > > Filippos Slavik
> >> > > > > > FORTHnet R&D, Heraklion, Greece
> >> > > > > > e-mail : fsla@forthnet.gr
> >> > > > > > phone : (+3) 081 391230
> >> > > > > > ################################################################
> >> > > > > >
> >> > > > > > "The software said 'runs on Win95 or better,' so I installed it
> >> > > > > > on Linux..."
> >> > > > > >
> >> > > > > > --
> >> > > > > > To unsubscribe,
> >> > > > > e-mail:   <ma...@jakarta.apache.org>
> >> > > > > > For additional commands, e-mail:
> >> > > > > <ma...@jakarta.apache.org>
> >> > > > >
> >> > > > >--
> >> > > > >To unsubscribe,
> >> > > e-mail:   <ma...@jakarta.apache.org>
> >> > > > >For additional commands, e-mail:
> >> > > <ma...@jakarta.apache.org>
> >> > > >
> >> > > > ################################################################
> >> > > > Filippos Slavik
> >> > > > FORTHnet R&D, Heraklion, Greece
> >> > > > e-mail : fsla@forthnet.gr
> >> > > > phone : (+3) 081 391230
> >> > > > ################################################################
> >> > > >
> >> > > > "The software said 'runs on Win95 or better,' so I installed it
> >> > > > on Linux..."
> >> > > >
> >> > > > --
> >> > > > To unsubscribe,
> >> > > e-mail:   <ma...@jakarta.apache.org>
> >> > > > For additional commands, e-mail:
> >> > > <ma...@jakarta.apache.org>
> >> > >
> >> > >--
> >> > >To unsubscribe,
> >> e-mail:   <ma...@jakarta.apache.org>
> >> > >For additional commands, e-mail:
> >> <ma...@jakarta.apache.org>
> >> >
> >> > ################################################################
> >> > Filippos Slavik
> >> > FORTHnet R&D, Heraklion, Greece
> >> > e-mail : fsla@forthnet.gr
> >> > phone : (+3) 081 391230
> >> > ################################################################
> >> >
> >> > "The software said 'runs on Win95 or better,' so I installed it
> >> > on Linux..."
> >> >
> >> > --
> >> > To unsubscribe,
> >> e-mail:   <ma...@jakarta.apache.org>
> >> > For additional commands, e-mail:
> >> <ma...@jakarta.apache.org>
> >>
> >>--
> >>To unsubscribe,
> >>e-mail:   <ma...@jakarta.apache.org>
> >>For additional commands, e-mail:
> >><ma...@jakarta.apache.org>
> >
> >
> >################################################################
> >Filippos Slavik
> >FORTHnet R&D, Heraklion, Greece
> >e-mail : fsla@forthnet.gr
> >phone : (+3) 081 391230
> >################################################################
> >
> >"The software said 'runs on Win95 or better,' so I installed it
> >on Linux..."
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> 
> ################################################################
> Filippos Slavik
> FORTHnet R&D, Heraklion, Greece
> e-mail : fsla@forthnet.gr
> phone : (+3) 081 391230
> ################################################################
> 
> "The software said 'runs on Win95 or better,' so I installed it
> on Linux..."
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by Filippos Slavik <fs...@forthnet.gr>.
At 05:27 ðì 3/1/2002 +0200, you wrote:
>At 06:49 ìì 2/1/2002 -0800, John McNally wrote:
>>I have looked at the source for PropertyDescriptor (PD) and Introspector
>>and do not see where the problem might be.  I have sun's jdk 1.3.0.  you
>>might want to look for yourself.
>
>Yeap, you'r right... Under 1.3.1_01 there is no problem... There is 
>something wrong with 1.2.2. Thank you for your help.
>

More info about that:

PropertyDescriptor (PD) in 1.2.2 is buggy. I did some source checking, and 
I discovered that the PD in 1.2.2 assumes that for a given property there 
is one setter and one getter. On the other hand, PD in 1.3.x has the 
correct logic. It assumes that for a given property there should be at 
least one getter and there might be multiple getters. It then first tries 
to find the qualified getter, learns the return type of the getter and 
therefore the data type of the property and then it searches the class  for 
a setter with one argument of the given data type.

Anyway, the behaviour of PD in 1.3.x is correct, BUT that means that the 
current implementation of TurbineIntakeService is working properly only 
with 1.3.x JRE's. I think that this should, from now, be somewhere stated 
... perhaps in the Intake HOWTO.

As for me, since my project is 1.2.2 based and I can't upgrade to a newer 
JRE due to some restrictions I have to patch the TurbineIntakeService :(

Best Regards
Filippos Slavik

PS: John, thanks very much for your help and feedback :)


>>PD should only throw that exception in
>>the case where you have
>>
>>Foo getFoo()
>>
>>and the only setter it is able to find is
>>
>>void setFoo(Bar foo)
>>
>>
>>if it can find a
>>
>>void setFoo(Foo foo)
>>
>>it will be the one selected.
>>
>>john mcnally
>>
>>Filippos Slavik wrote:
>> >
>> > At 06:16 ìì 2/1/2002 -0800, you wrote:
>> > >PropertyDescriptor contains the logic to determine the correct setter
>> > >according to the return type of the getter, so it should not be a
>> > >problem.  What is the exception? stacktrace?
>> >
>> > [Thu Jan 03 04:21:34 GMT+02:00 2002] -- ERROR --
>> >          Exception:  java.beans.IntrospectionException: type mismatch
>> > between read and write methods
>> >          Stack Trace follows:
>> >          java.beans.IntrospectionException: type mismatch between read and
>> > write methods
>> >          java.lang.Throwable(java.lang.String)
>> >          java.lang.Exception(java.lang.String)
>> >          java.beans.IntrospectionException(java.lang.String)
>> >          void java.beans.PropertyDescriptor.findPropertyType()
>> >          java.beans.PropertyDescriptor(java.lang.String, java.lang.Class)
>> >          java.lang.reflect.Method
>> > 
>> org.apache.turbine.services.intake.TurbineIntakeService.getFieldSetter(java.lang.String,
>> > java.lang.String)
>> >          java.lang.reflect.Method
>> > 
>> org.apache.turbine.services.intake.TurbineIntake.getFieldSetter(java.lang.String,
>> > java.lang.String)
>> > 
>> org.apache.turbine.services.intake.model.Field(org.apache.turbine.services.intake.xmlmodel.XmlField,
>> > org.apache.turbine.services.intake.model.Group)
>> > 
>> org.apache.turbine.services.intake.model.NumberKeyField(org.apache.turbine.services.intake.xmlmodel.XmlField,
>> > org.apache.turbine.services.intake.model.Group)
>> >          org.apache.turbine.services.intake.model.Field
>> > 
>> org.apache.turbine.services.intake.model.FieldFactory$5.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
>> > org.apache.turbine.services.intake.model.Group)
>> >          org.apache.turbine.services.intake.model.Field
>> > 
>> org.apache.turbine.services.intake.model.FieldFactory.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
>> > org.apache.turbine.services.intake.model.Group)
>> > 
>> org.apache.turbine.services.intake.model.Group(org.apache.turbine.services.intake.xmlmodel.XmlGroup)
>> >          org.apache.turbine.services.intake.model.Group
>> > 
>> org.apache.turbine.services.intake.TurbineIntakeService.getGroup(java.lang.String)
>> >          org.apache.turbine.services.intake.model.Group
>> > 
>> org.apache.turbine.services.intake.TurbineIntake.getGroup(java.lang.String)
>> >          void
>> > org.apache.turbine.services.intake.IntakeTool.init(java.lang.Object)
>> >          void
>> > 
>> org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools(org.apache.velocity.context.Context,
>> > org.apache.turbine.util.RunData)
>> >          void
>> > 
>> org.apache.turbine.services.pull.TurbinePullService.populateContext(org.apache.velocity.context.Context,
>> > org.apache.turbine.util.RunData)
>> >          void
>> > 
>> org.apache.turbine.services.pull.TurbinePull.populateContext(org.apache.velocity.context.Context,
>> > org.apache.turbine.util.RunData)
>> >          org.apache.velocity.context.Context
>> > 
>> org.apache.turbine.services.velocity.TurbineVelocityService.getContext(org.apache.turbine.util.RunData)
>> >          org.apache.velocity.context.Context
>> > 
>> org.apache.turbine.services.velocity.TurbineVelocity.getContext(org.apache.turbine.util.RunData)
>> >          void
>> > 
>> org.apache.turbine.util.velocity.VelocityActionEvent.perform(org.apache.turbine.util.RunData)
>> >          void
>> > 
>> org.apache.turbine.modules.actions.VelocityAction.perform(org.apache.turbine.util.RunData)
>> >          void
>> > 
>> org.apache.turbine.modules.ActionLoader.exec(org.apache.turbine.util.RunData,
>> > java.lang.String)
>> >          void
>> > org.apache.turbine.Turbine.doGet(javax.servlet.http.HttpServletRequest,
>> > javax.servlet.http.HttpServletResponse)
>> >          void
>> > 
>> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
>> > javax.servlet.http.HttpServletResponse)
>> >          void
>> > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
>> > javax.servlet.ServletResponse)
>> >          void
>> > 
>> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
>> > org.apache.tomcat.core.Response)
>> >          void
>> > org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
>> > org.apache.tomcat.core.Response)
>> >          void
>> > 
>> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
>> > org.apache.tomcat.core.Response)
>> >          void
>> > 
>> org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request,
>> > org.apache.tomcat.core.Response)
>> >          void
>> > 
>> org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request,
>> > org.apache.tomcat.core.Response)
>> >          void
>> > 
>> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection,
>> > java.lang.Object [])
>> >          void
>> > org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object [])
>> >          void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
>> >          void java.lang.Thread.run()
>> >
>> > JRE 1.2.2 :)
>> >
>> > Best Regards
>> > Filippos Slavik
>> >
>> > >john mcnally
>> > >
>> > >Filippos Slavik wrote:
>> > > >
>> > > > At 05:49 ìì 2/1/2002 -0800, you wrote:
>> > > > >See the archives.  A reasonable though not ideal fix is in 
>> cvs.  And the
>> > > > >problem is not with PropertyDescriptor, I am pretty sure it 
>> contains the
>> > > > >correct logic.  The bug occurs in BeanInfo or Introspector.
>> > > >
>> > > > Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD 
>> (should't be
>> > > > the fix there ?)
>> > > >
>> > > > I got the exception in the following line:
>> > > >
>> > > > pd = new PropertyDescriptor(propName, Class.forName(className));
>> > > >
>> > > > in the ::getFieldSetter of TurbineIntakeService..
>> > > >
>> > > > >john mcnally
>> > > >
>> > > > Best Regards
>> > > > Filippos Slavik
>> > > >
>> > > > >Filippos Slavik wrote:
>> > > > > >
>> > > > > > Dear all I have the following problem with 
>> TurbineIntakeService (2.x,
>> > > > > > version 1.3)
>> > > > > >
>> > > > > > I have the following table column defined in my database xml file:
>> > > > > >
>> > > > > > <column javaName="DiskPlatformID" 
>> name="DIGITAL_LARGE_DISKPLATFORM_ID"
>> > > > > > type="INTEGER"/>
>> > > > > >
>> > > > > > Torque (the one distirbuted with TDK2.1) generates in the Base OM
>> > > object
>> > > > > > one getter:
>> > > > > >
>> > > > > > public NumberKey getDiskPlatformID()
>> > > > > >
>> > > > > > and two setters:
>> > > > > >
>> > > > > > public void setDiskPlatformID(NumberKey v ) throws Exception
>> > > > > > public void setDiskPlatformID(String v ) throws Exception
>> > > > > >
>> > > > > > So far so good. My inputs.xml contains an entry to handle the 
>> above
>> > > field:
>> > > > > >
>> > > > > > <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
>> > > > > > mapToProperty="DiskPlatformID"/>
>> > > > > >
>> > > > > > The problem is that TurbineIntakeService fails to select the
>> > > correct (?)
>> > > > > > setter for the concrete field/property. From the exception 
>> thrown the
>> > > > > > reason is obvious. The IntakseService  uses the
>> > > > > > java.bean.PropertyDescriptor class to get the setter and 
>> getter for the
>> > > > > > property, but it fails since there are two setters for the 
>> property
>> > > with
>> > > > > > different parameter types.
>> > > > > >
>> > > > > > I'm stuck :( Due to this exception I'm not able to map my "form
>> > > data" to
>> > > > > > the appropriate OM instances and store them to the database
>> > > backend. Once
>> > > > > > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 
>> for the
>> > > > > > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
>> > > > > >
>> > > > > > Any help ? :)
>> > > > > >
>> > > > > > Thanks :)
>> > > > > > Slavikos
>> > > > > >
>> > > > > > ################################################################
>> > > > > > Filippos Slavik
>> > > > > > FORTHnet R&D, Heraklion, Greece
>> > > > > > e-mail : fsla@forthnet.gr
>> > > > > > phone : (+3) 081 391230
>> > > > > > ################################################################
>> > > > > >
>> > > > > > "The software said 'runs on Win95 or better,' so I installed it
>> > > > > > on Linux..."
>> > > > > >
>> > > > > > --
>> > > > > > To unsubscribe,
>> > > > > e-mail:   <ma...@jakarta.apache.org>
>> > > > > > For additional commands, e-mail:
>> > > > > <ma...@jakarta.apache.org>
>> > > > >
>> > > > >--
>> > > > >To unsubscribe,
>> > > e-mail:   <ma...@jakarta.apache.org>
>> > > > >For additional commands, e-mail:
>> > > <ma...@jakarta.apache.org>
>> > > >
>> > > > ################################################################
>> > > > Filippos Slavik
>> > > > FORTHnet R&D, Heraklion, Greece
>> > > > e-mail : fsla@forthnet.gr
>> > > > phone : (+3) 081 391230
>> > > > ################################################################
>> > > >
>> > > > "The software said 'runs on Win95 or better,' so I installed it
>> > > > on Linux..."
>> > > >
>> > > > --
>> > > > To unsubscribe,
>> > > e-mail:   <ma...@jakarta.apache.org>
>> > > > For additional commands, e-mail:
>> > > <ma...@jakarta.apache.org>
>> > >
>> > >--
>> > >To unsubscribe, 
>> e-mail:   <ma...@jakarta.apache.org>
>> > >For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>> >
>> > ################################################################
>> > Filippos Slavik
>> > FORTHnet R&D, Heraklion, Greece
>> > e-mail : fsla@forthnet.gr
>> > phone : (+3) 081 391230
>> > ################################################################
>> >
>> > "The software said 'runs on Win95 or better,' so I installed it
>> > on Linux..."
>> >
>> > --
>> > To unsubscribe, 
>> e-mail:   <ma...@jakarta.apache.org>
>> > For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>>--
>>To unsubscribe, 
>>e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: 
>><ma...@jakarta.apache.org>
>
>
>################################################################
>Filippos Slavik
>FORTHnet R&D, Heraklion, Greece
>e-mail : fsla@forthnet.gr
>phone : (+3) 081 391230
>################################################################
>
>"The software said 'runs on Win95 or better,' so I installed it
>on Linux..."
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>


################################################################
Filippos Slavik
FORTHnet R&D, Heraklion, Greece
e-mail : fsla@forthnet.gr
phone : (+3) 081 391230
################################################################

"The software said 'runs on Win95 or better,' so I installed it
on Linux..."



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by Filippos Slavik <fs...@forthnet.gr>.
At 06:49 ìì 2/1/2002 -0800, John McNally wrote:
>I have looked at the source for PropertyDescriptor (PD) and Introspector
>and do not see where the problem might be.  I have sun's jdk 1.3.0.  you
>might want to look for yourself.

Yeap, you'r right... Under 1.3.1_01 there is no problem... There is 
something wrong with 1.2.2. Thank you for your help.

Best Regards
Filippos Slavik



>PD should only throw that exception in
>the case where you have
>
>Foo getFoo()
>
>and the only setter it is able to find is
>
>void setFoo(Bar foo)
>
>
>if it can find a
>
>void setFoo(Foo foo)
>
>it will be the one selected.
>
>john mcnally
>
>Filippos Slavik wrote:
> >
> > At 06:16 ìì 2/1/2002 -0800, you wrote:
> > >PropertyDescriptor contains the logic to determine the correct setter
> > >according to the return type of the getter, so it should not be a
> > >problem.  What is the exception? stacktrace?
> >
> > [Thu Jan 03 04:21:34 GMT+02:00 2002] -- ERROR --
> >          Exception:  java.beans.IntrospectionException: type mismatch
> > between read and write methods
> >          Stack Trace follows:
> >          java.beans.IntrospectionException: type mismatch between read and
> > write methods
> >          java.lang.Throwable(java.lang.String)
> >          java.lang.Exception(java.lang.String)
> >          java.beans.IntrospectionException(java.lang.String)
> >          void java.beans.PropertyDescriptor.findPropertyType()
> >          java.beans.PropertyDescriptor(java.lang.String, java.lang.Class)
> >          java.lang.reflect.Method
> > 
> org.apache.turbine.services.intake.TurbineIntakeService.getFieldSetter(java.lang.String,
> > java.lang.String)
> >          java.lang.reflect.Method
> > 
> org.apache.turbine.services.intake.TurbineIntake.getFieldSetter(java.lang.String,
> > java.lang.String)
> > 
> org.apache.turbine.services.intake.model.Field(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > org.apache.turbine.services.intake.model.Group)
> > 
> org.apache.turbine.services.intake.model.NumberKeyField(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > org.apache.turbine.services.intake.model.Group)
> >          org.apache.turbine.services.intake.model.Field
> > 
> org.apache.turbine.services.intake.model.FieldFactory$5.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > org.apache.turbine.services.intake.model.Group)
> >          org.apache.turbine.services.intake.model.Field
> > 
> org.apache.turbine.services.intake.model.FieldFactory.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> > org.apache.turbine.services.intake.model.Group)
> > 
> org.apache.turbine.services.intake.model.Group(org.apache.turbine.services.intake.xmlmodel.XmlGroup)
> >          org.apache.turbine.services.intake.model.Group
> > 
> org.apache.turbine.services.intake.TurbineIntakeService.getGroup(java.lang.String)
> >          org.apache.turbine.services.intake.model.Group
> > org.apache.turbine.services.intake.TurbineIntake.getGroup(java.lang.String)
> >          void
> > org.apache.turbine.services.intake.IntakeTool.init(java.lang.Object)
> >          void
> > 
> org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools(org.apache.velocity.context.Context,
> > org.apache.turbine.util.RunData)
> >          void
> > 
> org.apache.turbine.services.pull.TurbinePullService.populateContext(org.apache.velocity.context.Context,
> > org.apache.turbine.util.RunData)
> >          void
> > 
> org.apache.turbine.services.pull.TurbinePull.populateContext(org.apache.velocity.context.Context,
> > org.apache.turbine.util.RunData)
> >          org.apache.velocity.context.Context
> > 
> org.apache.turbine.services.velocity.TurbineVelocityService.getContext(org.apache.turbine.util.RunData)
> >          org.apache.velocity.context.Context
> > 
> org.apache.turbine.services.velocity.TurbineVelocity.getContext(org.apache.turbine.util.RunData)
> >          void
> > 
> org.apache.turbine.util.velocity.VelocityActionEvent.perform(org.apache.turbine.util.RunData)
> >          void
> > 
> org.apache.turbine.modules.actions.VelocityAction.perform(org.apache.turbine.util.RunData)
> >          void
> > 
> org.apache.turbine.modules.ActionLoader.exec(org.apache.turbine.util.RunData,
> > java.lang.String)
> >          void
> > org.apache.turbine.Turbine.doGet(javax.servlet.http.HttpServletRequest,
> > javax.servlet.http.HttpServletResponse)
> >          void
> > 
> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> > javax.servlet.http.HttpServletResponse)
> >          void
> > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> > javax.servlet.ServletResponse)
> >          void
> > 
> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
> > org.apache.tomcat.core.Response)
> >          void
> > org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
> > org.apache.tomcat.core.Response)
> >          void
> > 
> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
> > org.apache.tomcat.core.Response)
> >          void
> > 
> org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request,
> > org.apache.tomcat.core.Response)
> >          void
> > 
> org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request,
> > org.apache.tomcat.core.Response)
> >          void
> > 
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection,
> > java.lang.Object [])
> >          void
> > org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object [])
> >          void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
> >          void java.lang.Thread.run()
> >
> > JRE 1.2.2 :)
> >
> > Best Regards
> > Filippos Slavik
> >
> > >john mcnally
> > >
> > >Filippos Slavik wrote:
> > > >
> > > > At 05:49 ìì 2/1/2002 -0800, you wrote:
> > > > >See the archives.  A reasonable though not ideal fix is in 
> cvs.  And the
> > > > >problem is not with PropertyDescriptor, I am pretty sure it 
> contains the
> > > > >correct logic.  The bug occurs in BeanInfo or Introspector.
> > > >
> > > > Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD 
> (should't be
> > > > the fix there ?)
> > > >
> > > > I got the exception in the following line:
> > > >
> > > > pd = new PropertyDescriptor(propName, Class.forName(className));
> > > >
> > > > in the ::getFieldSetter of TurbineIntakeService..
> > > >
> > > > >john mcnally
> > > >
> > > > Best Regards
> > > > Filippos Slavik
> > > >
> > > > >Filippos Slavik wrote:
> > > > > >
> > > > > > Dear all I have the following problem with TurbineIntakeService 
> (2.x,
> > > > > > version 1.3)
> > > > > >
> > > > > > I have the following table column defined in my database xml file:
> > > > > >
> > > > > > <column javaName="DiskPlatformID" 
> name="DIGITAL_LARGE_DISKPLATFORM_ID"
> > > > > > type="INTEGER"/>
> > > > > >
> > > > > > Torque (the one distirbuted with TDK2.1) generates in the Base OM
> > > object
> > > > > > one getter:
> > > > > >
> > > > > > public NumberKey getDiskPlatformID()
> > > > > >
> > > > > > and two setters:
> > > > > >
> > > > > > public void setDiskPlatformID(NumberKey v ) throws Exception
> > > > > > public void setDiskPlatformID(String v ) throws Exception
> > > > > >
> > > > > > So far so good. My inputs.xml contains an entry to handle the above
> > > field:
> > > > > >
> > > > > > <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
> > > > > > mapToProperty="DiskPlatformID"/>
> > > > > >
> > > > > > The problem is that TurbineIntakeService fails to select the
> > > correct (?)
> > > > > > setter for the concrete field/property. From the exception 
> thrown the
> > > > > > reason is obvious. The IntakseService  uses the
> > > > > > java.bean.PropertyDescriptor class to get the setter and getter 
> for the
> > > > > > property, but it fails since there are two setters for the property
> > > with
> > > > > > different parameter types.
> > > > > >
> > > > > > I'm stuck :( Due to this exception I'm not able to map my "form
> > > data" to
> > > > > > the appropriate OM instances and store them to the database
> > > backend. Once
> > > > > > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 
> for the
> > > > > > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
> > > > > >
> > > > > > Any help ? :)
> > > > > >
> > > > > > Thanks :)
> > > > > > Slavikos
> > > > > >
> > > > > > ################################################################
> > > > > > Filippos Slavik
> > > > > > FORTHnet R&D, Heraklion, Greece
> > > > > > e-mail : fsla@forthnet.gr
> > > > > > phone : (+3) 081 391230
> > > > > > ################################################################
> > > > > >
> > > > > > "The software said 'runs on Win95 or better,' so I installed it
> > > > > > on Linux..."
> > > > > >
> > > > > > --
> > > > > > To unsubscribe,
> > > > > e-mail:   <ma...@jakarta.apache.org>
> > > > > > For additional commands, e-mail:
> > > > > <ma...@jakarta.apache.org>
> > > > >
> > > > >--
> > > > >To unsubscribe,
> > > e-mail:   <ma...@jakarta.apache.org>
> > > > >For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > > > ################################################################
> > > > Filippos Slavik
> > > > FORTHnet R&D, Heraklion, Greece
> > > > e-mail : fsla@forthnet.gr
> > > > phone : (+3) 081 391230
> > > > ################################################################
> > > >
> > > > "The software said 'runs on Win95 or better,' so I installed it
> > > > on Linux..."
> > > >
> > > > --
> > > > To unsubscribe,
> > > e-mail:   <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > >
> > >--
> > >To unsubscribe, 
> e-mail:   <ma...@jakarta.apache.org>
> > >For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> >
> > ################################################################
> > Filippos Slavik
> > FORTHnet R&D, Heraklion, Greece
> > e-mail : fsla@forthnet.gr
> > phone : (+3) 081 391230
> > ################################################################
> >
> > "The software said 'runs on Win95 or better,' so I installed it
> > on Linux..."
> >
> > --
> > To unsubscribe, 
> e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


################################################################
Filippos Slavik
FORTHnet R&D, Heraklion, Greece
e-mail : fsla@forthnet.gr
phone : (+3) 081 391230
################################################################

"The software said 'runs on Win95 or better,' so I installed it
on Linux..."



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by John McNally <jm...@collab.net>.
I have looked at the source for PropertyDescriptor (PD) and Introspector
and do not see where the problem might be.  I have sun's jdk 1.3.0.  you
might want to look for yourself.  PD should only throw that exception in
the case where you have

Foo getFoo()

and the only setter it is able to find is

void setFoo(Bar foo)


if it can find a 

void setFoo(Foo foo)

it will be the one selected.

john mcnally

Filippos Slavik wrote:
> 
> At 06:16 ìì 2/1/2002 -0800, you wrote:
> >PropertyDescriptor contains the logic to determine the correct setter
> >according to the return type of the getter, so it should not be a
> >problem.  What is the exception? stacktrace?
> 
> [Thu Jan 03 04:21:34 GMT+02:00 2002] -- ERROR --
>          Exception:  java.beans.IntrospectionException: type mismatch
> between read and write methods
>          Stack Trace follows:
>          java.beans.IntrospectionException: type mismatch between read and
> write methods
>          java.lang.Throwable(java.lang.String)
>          java.lang.Exception(java.lang.String)
>          java.beans.IntrospectionException(java.lang.String)
>          void java.beans.PropertyDescriptor.findPropertyType()
>          java.beans.PropertyDescriptor(java.lang.String, java.lang.Class)
>          java.lang.reflect.Method
> org.apache.turbine.services.intake.TurbineIntakeService.getFieldSetter(java.lang.String,
> java.lang.String)
>          java.lang.reflect.Method
> org.apache.turbine.services.intake.TurbineIntake.getFieldSetter(java.lang.String,
> java.lang.String)
>          org.apache.turbine.services.intake.model.Field(org.apache.turbine.services.intake.xmlmodel.XmlField,
> org.apache.turbine.services.intake.model.Group)
>          org.apache.turbine.services.intake.model.NumberKeyField(org.apache.turbine.services.intake.xmlmodel.XmlField,
> org.apache.turbine.services.intake.model.Group)
>          org.apache.turbine.services.intake.model.Field
> org.apache.turbine.services.intake.model.FieldFactory$5.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> org.apache.turbine.services.intake.model.Group)
>          org.apache.turbine.services.intake.model.Field
> org.apache.turbine.services.intake.model.FieldFactory.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField,
> org.apache.turbine.services.intake.model.Group)
>          org.apache.turbine.services.intake.model.Group(org.apache.turbine.services.intake.xmlmodel.XmlGroup)
>          org.apache.turbine.services.intake.model.Group
> org.apache.turbine.services.intake.TurbineIntakeService.getGroup(java.lang.String)
>          org.apache.turbine.services.intake.model.Group
> org.apache.turbine.services.intake.TurbineIntake.getGroup(java.lang.String)
>          void
> org.apache.turbine.services.intake.IntakeTool.init(java.lang.Object)
>          void
> org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools(org.apache.velocity.context.Context,
> org.apache.turbine.util.RunData)
>          void
> org.apache.turbine.services.pull.TurbinePullService.populateContext(org.apache.velocity.context.Context,
> org.apache.turbine.util.RunData)
>          void
> org.apache.turbine.services.pull.TurbinePull.populateContext(org.apache.velocity.context.Context,
> org.apache.turbine.util.RunData)
>          org.apache.velocity.context.Context
> org.apache.turbine.services.velocity.TurbineVelocityService.getContext(org.apache.turbine.util.RunData)
>          org.apache.velocity.context.Context
> org.apache.turbine.services.velocity.TurbineVelocity.getContext(org.apache.turbine.util.RunData)
>          void
> org.apache.turbine.util.velocity.VelocityActionEvent.perform(org.apache.turbine.util.RunData)
>          void
> org.apache.turbine.modules.actions.VelocityAction.perform(org.apache.turbine.util.RunData)
>          void
> org.apache.turbine.modules.ActionLoader.exec(org.apache.turbine.util.RunData,
> java.lang.String)
>          void
> org.apache.turbine.Turbine.doGet(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
>          void
> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
>          void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse)
>          void
> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
>          void
> org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
>          void
> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
>          void
> org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
>          void
> org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
>          void
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection,
> java.lang.Object [])
>          void
> org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object [])
>          void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
>          void java.lang.Thread.run()
> 
> JRE 1.2.2 :)
> 
> Best Regards
> Filippos Slavik
> 
> >john mcnally
> >
> >Filippos Slavik wrote:
> > >
> > > At 05:49 ìì 2/1/2002 -0800, you wrote:
> > > >See the archives.  A reasonable though not ideal fix is in cvs.  And the
> > > >problem is not with PropertyDescriptor, I am pretty sure it contains the
> > > >correct logic.  The bug occurs in BeanInfo or Introspector.
> > >
> > > Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD (should't be
> > > the fix there ?)
> > >
> > > I got the exception in the following line:
> > >
> > > pd = new PropertyDescriptor(propName, Class.forName(className));
> > >
> > > in the ::getFieldSetter of TurbineIntakeService..
> > >
> > > >john mcnally
> > >
> > > Best Regards
> > > Filippos Slavik
> > >
> > > >Filippos Slavik wrote:
> > > > >
> > > > > Dear all I have the following problem with TurbineIntakeService (2.x,
> > > > > version 1.3)
> > > > >
> > > > > I have the following table column defined in my database xml file:
> > > > >
> > > > > <column javaName="DiskPlatformID" name="DIGITAL_LARGE_DISKPLATFORM_ID"
> > > > > type="INTEGER"/>
> > > > >
> > > > > Torque (the one distirbuted with TDK2.1) generates in the Base OM
> > object
> > > > > one getter:
> > > > >
> > > > > public NumberKey getDiskPlatformID()
> > > > >
> > > > > and two setters:
> > > > >
> > > > > public void setDiskPlatformID(NumberKey v ) throws Exception
> > > > > public void setDiskPlatformID(String v ) throws Exception
> > > > >
> > > > > So far so good. My inputs.xml contains an entry to handle the above
> > field:
> > > > >
> > > > > <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
> > > > > mapToProperty="DiskPlatformID"/>
> > > > >
> > > > > The problem is that TurbineIntakeService fails to select the
> > correct (?)
> > > > > setter for the concrete field/property. From the exception thrown the
> > > > > reason is obvious. The IntakseService  uses the
> > > > > java.bean.PropertyDescriptor class to get the setter and getter for the
> > > > > property, but it fails since there are two setters for the property
> > with
> > > > > different parameter types.
> > > > >
> > > > > I'm stuck :( Due to this exception I'm not able to map my "form
> > data" to
> > > > > the appropriate OM instances and store them to the database
> > backend. Once
> > > > > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 for the
> > > > > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
> > > > >
> > > > > Any help ? :)
> > > > >
> > > > > Thanks :)
> > > > > Slavikos
> > > > >
> > > > > ################################################################
> > > > > Filippos Slavik
> > > > > FORTHnet R&D, Heraklion, Greece
> > > > > e-mail : fsla@forthnet.gr
> > > > > phone : (+3) 081 391230
> > > > > ################################################################
> > > > >
> > > > > "The software said 'runs on Win95 or better,' so I installed it
> > > > > on Linux..."
> > > > >
> > > > > --
> > > > > To unsubscribe,
> > > > e-mail:   <ma...@jakarta.apache.org>
> > > > > For additional commands, e-mail:
> > > > <ma...@jakarta.apache.org>
> > > >
> > > >--
> > > >To unsubscribe,
> > e-mail:   <ma...@jakarta.apache.org>
> > > >For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > > ################################################################
> > > Filippos Slavik
> > > FORTHnet R&D, Heraklion, Greece
> > > e-mail : fsla@forthnet.gr
> > > phone : (+3) 081 391230
> > > ################################################################
> > >
> > > "The software said 'runs on Win95 or better,' so I installed it
> > > on Linux..."
> > >
> > > --
> > > To unsubscribe,
> > e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >--
> >To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> ################################################################
> Filippos Slavik
> FORTHnet R&D, Heraklion, Greece
> e-mail : fsla@forthnet.gr
> phone : (+3) 081 391230
> ################################################################
> 
> "The software said 'runs on Win95 or better,' so I installed it
> on Linux..."
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by Filippos Slavik <fs...@forthnet.gr>.
At 06:16 ìì 2/1/2002 -0800, you wrote:
>PropertyDescriptor contains the logic to determine the correct setter
>according to the return type of the getter, so it should not be a
>problem.  What is the exception? stacktrace?

[Thu Jan 03 04:21:34 GMT+02:00 2002] -- ERROR --
         Exception:  java.beans.IntrospectionException: type mismatch 
between read and write methods
         Stack Trace follows:
         java.beans.IntrospectionException: type mismatch between read and 
write methods
         java.lang.Throwable(java.lang.String)
         java.lang.Exception(java.lang.String)
         java.beans.IntrospectionException(java.lang.String)
         void java.beans.PropertyDescriptor.findPropertyType()
         java.beans.PropertyDescriptor(java.lang.String, java.lang.Class)
         java.lang.reflect.Method 
org.apache.turbine.services.intake.TurbineIntakeService.getFieldSetter(java.lang.String, 
java.lang.String)
         java.lang.reflect.Method 
org.apache.turbine.services.intake.TurbineIntake.getFieldSetter(java.lang.String, 
java.lang.String)
         org.apache.turbine.services.intake.model.Field(org.apache.turbine.services.intake.xmlmodel.XmlField, 
org.apache.turbine.services.intake.model.Group)
         org.apache.turbine.services.intake.model.NumberKeyField(org.apache.turbine.services.intake.xmlmodel.XmlField, 
org.apache.turbine.services.intake.model.Group)
         org.apache.turbine.services.intake.model.Field 
org.apache.turbine.services.intake.model.FieldFactory$5.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField, 
org.apache.turbine.services.intake.model.Group)
         org.apache.turbine.services.intake.model.Field 
org.apache.turbine.services.intake.model.FieldFactory.getInstance(org.apache.turbine.services.intake.xmlmodel.XmlField, 
org.apache.turbine.services.intake.model.Group)
         org.apache.turbine.services.intake.model.Group(org.apache.turbine.services.intake.xmlmodel.XmlGroup)
         org.apache.turbine.services.intake.model.Group 
org.apache.turbine.services.intake.TurbineIntakeService.getGroup(java.lang.String)
         org.apache.turbine.services.intake.model.Group 
org.apache.turbine.services.intake.TurbineIntake.getGroup(java.lang.String)
         void 
org.apache.turbine.services.intake.IntakeTool.init(java.lang.Object)
         void 
org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools(org.apache.velocity.context.Context, 
org.apache.turbine.util.RunData)
         void 
org.apache.turbine.services.pull.TurbinePullService.populateContext(org.apache.velocity.context.Context, 
org.apache.turbine.util.RunData)
         void 
org.apache.turbine.services.pull.TurbinePull.populateContext(org.apache.velocity.context.Context, 
org.apache.turbine.util.RunData)
         org.apache.velocity.context.Context 
org.apache.turbine.services.velocity.TurbineVelocityService.getContext(org.apache.turbine.util.RunData)
         org.apache.velocity.context.Context 
org.apache.turbine.services.velocity.TurbineVelocity.getContext(org.apache.turbine.util.RunData)
         void 
org.apache.turbine.util.velocity.VelocityActionEvent.perform(org.apache.turbine.util.RunData)
         void 
org.apache.turbine.modules.actions.VelocityAction.perform(org.apache.turbine.util.RunData)
         void 
org.apache.turbine.modules.ActionLoader.exec(org.apache.turbine.util.RunData, 
java.lang.String)
         void 
org.apache.turbine.Turbine.doGet(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
         void 
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
         void 
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
         void 
org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
         void 
org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
         void 
org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
         void 
org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
         void 
org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
         void 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, 
java.lang.Object [])
         void 
org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object [])
         void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
         void java.lang.Thread.run()

JRE 1.2.2 :)

Best Regards
Filippos Slavik



>john mcnally
>
>Filippos Slavik wrote:
> >
> > At 05:49 ìì 2/1/2002 -0800, you wrote:
> > >See the archives.  A reasonable though not ideal fix is in cvs.  And the
> > >problem is not with PropertyDescriptor, I am pretty sure it contains the
> > >correct logic.  The bug occurs in BeanInfo or Introspector.
> >
> > Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD (should't be
> > the fix there ?)
> >
> > I got the exception in the following line:
> >
> > pd = new PropertyDescriptor(propName, Class.forName(className));
> >
> > in the ::getFieldSetter of TurbineIntakeService..
> >
> > >john mcnally
> >
> > Best Regards
> > Filippos Slavik
> >
> > >Filippos Slavik wrote:
> > > >
> > > > Dear all I have the following problem with TurbineIntakeService (2.x,
> > > > version 1.3)
> > > >
> > > > I have the following table column defined in my database xml file:
> > > >
> > > > <column javaName="DiskPlatformID" name="DIGITAL_LARGE_DISKPLATFORM_ID"
> > > > type="INTEGER"/>
> > > >
> > > > Torque (the one distirbuted with TDK2.1) generates in the Base OM 
> object
> > > > one getter:
> > > >
> > > > public NumberKey getDiskPlatformID()
> > > >
> > > > and two setters:
> > > >
> > > > public void setDiskPlatformID(NumberKey v ) throws Exception
> > > > public void setDiskPlatformID(String v ) throws Exception
> > > >
> > > > So far so good. My inputs.xml contains an entry to handle the above 
> field:
> > > >
> > > > <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
> > > > mapToProperty="DiskPlatformID"/>
> > > >
> > > > The problem is that TurbineIntakeService fails to select the 
> correct (?)
> > > > setter for the concrete field/property. From the exception thrown the
> > > > reason is obvious. The IntakseService  uses the
> > > > java.bean.PropertyDescriptor class to get the setter and getter for the
> > > > property, but it fails since there are two setters for the property 
> with
> > > > different parameter types.
> > > >
> > > > I'm stuck :( Due to this exception I'm not able to map my "form 
> data" to
> > > > the appropriate OM instances and store them to the database 
> backend. Once
> > > > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 for the
> > > > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
> > > >
> > > > Any help ? :)
> > > >
> > > > Thanks :)
> > > > Slavikos
> > > >
> > > > ################################################################
> > > > Filippos Slavik
> > > > FORTHnet R&D, Heraklion, Greece
> > > > e-mail : fsla@forthnet.gr
> > > > phone : (+3) 081 391230
> > > > ################################################################
> > > >
> > > > "The software said 'runs on Win95 or better,' so I installed it
> > > > on Linux..."
> > > >
> > > > --
> > > > To unsubscribe,
> > > e-mail:   <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > >
> > >--
> > >To unsubscribe, 
> e-mail:   <ma...@jakarta.apache.org>
> > >For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> >
> > ################################################################
> > Filippos Slavik
> > FORTHnet R&D, Heraklion, Greece
> > e-mail : fsla@forthnet.gr
> > phone : (+3) 081 391230
> > ################################################################
> >
> > "The software said 'runs on Win95 or better,' so I installed it
> > on Linux..."
> >
> > --
> > To unsubscribe, 
> e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


################################################################
Filippos Slavik
FORTHnet R&D, Heraklion, Greece
e-mail : fsla@forthnet.gr
phone : (+3) 081 391230
################################################################

"The software said 'runs on Win95 or better,' so I installed it
on Linux..."



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by John McNally <jm...@collab.net>.
PropertyDescriptor contains the logic to determine the correct setter
according to the return type of the getter, so it should not be a
problem.  What is the exception? stacktrace?

john mcnally

Filippos Slavik wrote:
> 
> At 05:49 ìì 2/1/2002 -0800, you wrote:
> >See the archives.  A reasonable though not ideal fix is in cvs.  And the
> >problem is not with PropertyDescriptor, I am pretty sure it contains the
> >correct logic.  The bug occurs in BeanInfo or Introspector.
> 
> Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD (should't be
> the fix there ?)
> 
> I got the exception in the following line:
> 
> pd = new PropertyDescriptor(propName, Class.forName(className));
> 
> in the ::getFieldSetter of TurbineIntakeService..
> 
> >john mcnally
> 
> Best Regards
> Filippos Slavik
> 
> >Filippos Slavik wrote:
> > >
> > > Dear all I have the following problem with TurbineIntakeService (2.x,
> > > version 1.3)
> > >
> > > I have the following table column defined in my database xml file:
> > >
> > > <column javaName="DiskPlatformID" name="DIGITAL_LARGE_DISKPLATFORM_ID"
> > > type="INTEGER"/>
> > >
> > > Torque (the one distirbuted with TDK2.1) generates in the Base OM object
> > > one getter:
> > >
> > > public NumberKey getDiskPlatformID()
> > >
> > > and two setters:
> > >
> > > public void setDiskPlatformID(NumberKey v ) throws Exception
> > > public void setDiskPlatformID(String v ) throws Exception
> > >
> > > So far so good. My inputs.xml contains an entry to handle the above field:
> > >
> > > <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
> > > mapToProperty="DiskPlatformID"/>
> > >
> > > The problem is that TurbineIntakeService fails to select the correct (?)
> > > setter for the concrete field/property. From the exception thrown the
> > > reason is obvious. The IntakseService  uses the
> > > java.bean.PropertyDescriptor class to get the setter and getter for the
> > > property, but it fails since there are two setters for the property with
> > > different parameter types.
> > >
> > > I'm stuck :( Due to this exception I'm not able to map my "form data" to
> > > the appropriate OM instances and store them to the database backend. Once
> > > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 for the
> > > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
> > >
> > > Any help ? :)
> > >
> > > Thanks :)
> > > Slavikos
> > >
> > > ################################################################
> > > Filippos Slavik
> > > FORTHnet R&D, Heraklion, Greece
> > > e-mail : fsla@forthnet.gr
> > > phone : (+3) 081 391230
> > > ################################################################
> > >
> > > "The software said 'runs on Win95 or better,' so I installed it
> > > on Linux..."
> > >
> > > --
> > > To unsubscribe,
> > e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >--
> >To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> ################################################################
> Filippos Slavik
> FORTHnet R&D, Heraklion, Greece
> e-mail : fsla@forthnet.gr
> phone : (+3) 081 391230
> ################################################################
> 
> "The software said 'runs on Win95 or better,' so I installed it
> on Linux..."
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by Filippos Slavik <fs...@forthnet.gr>.
At 05:49 ìì 2/1/2002 -0800, you wrote:
>See the archives.  A reasonable though not ideal fix is in cvs.  And the
>problem is not with PropertyDescriptor, I am pretty sure it contains the
>correct logic.  The bug occurs in BeanInfo or Introspector.

Can you bee a bit more precise ? I 'm using Turbine 2 CVS HEAD (should't be 
the fix there ?)

I got the exception in the following line:

pd = new PropertyDescriptor(propName, Class.forName(className));

in the ::getFieldSetter of TurbineIntakeService..

>john mcnally

Best Regards
Filippos Slavik


>Filippos Slavik wrote:
> >
> > Dear all I have the following problem with TurbineIntakeService (2.x,
> > version 1.3)
> >
> > I have the following table column defined in my database xml file:
> >
> > <column javaName="DiskPlatformID" name="DIGITAL_LARGE_DISKPLATFORM_ID"
> > type="INTEGER"/>
> >
> > Torque (the one distirbuted with TDK2.1) generates in the Base OM object
> > one getter:
> >
> > public NumberKey getDiskPlatformID()
> >
> > and two setters:
> >
> > public void setDiskPlatformID(NumberKey v ) throws Exception
> > public void setDiskPlatformID(String v ) throws Exception
> >
> > So far so good. My inputs.xml contains an entry to handle the above field:
> >
> > <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
> > mapToProperty="DiskPlatformID"/>
> >
> > The problem is that TurbineIntakeService fails to select the correct (?)
> > setter for the concrete field/property. From the exception thrown the
> > reason is obvious. The IntakseService  uses the
> > java.bean.PropertyDescriptor class to get the setter and getter for the
> > property, but it fails since there are two setters for the property with
> > different parameter types.
> >
> > I'm stuck :( Due to this exception I'm not able to map my "form data" to
> > the appropriate OM instances and store them to the database backend. Once
> > again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 for the
> > generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
> >
> > Any help ? :)
> >
> > Thanks :)
> > Slavikos
> >
> > ################################################################
> > Filippos Slavik
> > FORTHnet R&D, Heraklion, Greece
> > e-mail : fsla@forthnet.gr
> > phone : (+3) 081 391230
> > ################################################################
> >
> > "The software said 'runs on Win95 or better,' so I installed it
> > on Linux..."
> >
> > --
> > To unsubscribe, 
> e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


################################################################
Filippos Slavik
FORTHnet R&D, Heraklion, Greece
e-mail : fsla@forthnet.gr
phone : (+3) 081 391230
################################################################

"The software said 'runs on Win95 or better,' so I installed it
on Linux..."



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: type mismatch between read and write methods (intake)

Posted by John McNally <jm...@collab.net>.
See the archives.  A reasonable though not ideal fix is in cvs.  And the
problem is not with PropertyDescriptor, I am pretty sure it contains the
correct logic.  The bug occurs in BeanInfo or Introspector.

john mcnally

Filippos Slavik wrote:
> 
> Dear all I have the following problem with TurbineIntakeService (2.x,
> version 1.3)
> 
> I have the following table column defined in my database xml file:
> 
> <column javaName="DiskPlatformID" name="DIGITAL_LARGE_DISKPLATFORM_ID"
> type="INTEGER"/>
> 
> Torque (the one distirbuted with TDK2.1) generates in the Base OM object
> one getter:
> 
> public NumberKey getDiskPlatformID()
> 
> and two setters:
> 
> public void setDiskPlatformID(NumberKey v ) throws Exception
> public void setDiskPlatformID(String v ) throws Exception
> 
> So far so good. My inputs.xml contains an entry to handle the above field:
> 
> <field name="DiskPlatformID" key="diskplatformid" type="NumberKey"
> mapToProperty="DiskPlatformID"/>
> 
> The problem is that TurbineIntakeService fails to select the correct (?)
> setter for the concrete field/property. From the exception thrown the
> reason is obvious. The IntakseService  uses the
> java.bean.PropertyDescriptor class to get the setter and getter for the
> property, but it fails since there are two setters for the property with
> different parameter types.
> 
> I'm stuck :( Due to this exception I'm not able to map my "form data" to
> the appropriate OM instances and store them to the database backend. Once
> again let me state that I'm using turbine 2.x CVS HEAD (TDK2.1 for the
> generation of OM sources) - JRE 1.2.2 (Visual Age 4.0 for Java)...
> 
> Any help ? :)
> 
> Thanks :)
> Slavikos
> 
> ################################################################
> Filippos Slavik
> FORTHnet R&D, Heraklion, Greece
> e-mail : fsla@forthnet.gr
> phone : (+3) 081 391230
> ################################################################
> 
> "The software said 'runs on Win95 or better,' so I installed it
> on Linux..."
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>