Oh wow, is it true?

It seem ProjectsAction-conversion.properties and ProjectsAction must
be on the same location on classpath, but it must NOT reside in the
classfolder itself.

When I added it on the same folder just in src/main/resources its used
from struts.

Why not from the same location as the class is?

Cheers
Christian

On Mon, Apr 18, 2011 at 5:40 PM, Christian Grobmeier
<grobme...@gmail.com> wrote:
> Hi,
>
>> It appears to be trying to set an Array of Strings to your setDeadlineTime
>> method, is it typed to take an Array of Strings?
>
> no arrays anywhere.
>
> But I found out I get more debug output with:
> log4j.logger.com.opensymphony.xwork2=DEBUG
>
> Now I could see that my conversion.properties file is not loaded. None
> of my converters is used, it works for the other fields with the
> default converter.
>
> A shortened logfile:
>
> DEBUG Property: deadlineTime
> DEBUG Class:  ...Project
> DEBUG field-level type converter for property [deadlineTime] = none found
> DEBUG Property: project.deadlineTime
> DEBUG Class: ....ProjectsAction
> DEBUG global-level type converter for property [deadlineTime] = noe found
> DEBUG falling back to default type converter XWorkBasicConverter
>
> my time textfield throws an error, it cannot be handled by the default
> converter.
>
> Now my assumption is i have done something wrong with the conversion 
> properties.
>
> My entity is named "Project". The props is named: 
> Project-conversion.properties
> Its located in the same package as "Project".
>
> I have tried it with my Action "ProjectsAction" too. The file is
> ProjectsAction-conversion.properties
> Same location as ProjectsAction.
>
> Content is as follows:
> deadlineTime = de.....converter.DateConverter
>
> or in the actions case:
> project.deadlineTime = de.....converter.DateConverter
>
> Any ideas why this is not drawn by Struts?
>
> Thanks!
> Christian
>
>
>>  (*Chris*)
>>
>> On Mon, Apr 18, 2011 at 7:59 AM, Christian Grobmeier 
>> <grobme...@gmail.com>wrote:
>>
>>> Hi all,
>>>
>>> i have a form with only 6 values.
>>> 4 Dates, 1 int, one string.
>>>
>>> I created 2 different conversion classes for the 4 dates. One is for
>>> creating a good date from a string like 13:30, one is for the actual
>>> date. I don't know why, but the ones for dates work and the one for
>>> time does not work.
>>>
>>> Even when i use the same conversion class for all fields, the time
>>> fields do not work.
>>>
>>> In my jsp they are named correct:
>>>
>>> project.deadlineTime
>>>
>>> In my Pojo it is:
>>>
>>> Project.setDeadlineTime(Date deadlineTime)
>>>
>>> In my
>>>
>>> MyAction-conversion.properties:
>>>
>>> project.deadlineTime = de.blub.converter.TimeConverter
>>>
>>> As the property file has the working conversions defined, I assume it
>>> is drawn correct.
>>> To avoid a problem in the converter, i have returned a new Date and
>>> once exchanged it with the working stuff. But nothing helped
>>>
>>> It always claims
>>>
>>> Error setting expression 'project.deadlineTime' with value
>>> '[Ljava.lang.String;@73ea7821'
>>> ognl.MethodFailedException: Method "setDeadlineTime" failed for object
>>>
>>>
>>> Then I tried to enable some logging output in the Converters. But they
>>> do not output anything (for none of the fields). All other of my
>>> classes can create output on the specific level.
>>>
>>> Even when I debug I cannot breakpoint and step into them. It is as if
>>> they would not exist. In all other classes it works
>>>
>>> My questions:
>>> - any ideas what I could look for and why the two fields are not working?
>>> - why is there no logging possible?
>>> - and why can't I get into a breakpoint when debugging with eclipse
>>> and run-jetty-run plugin?
>>>
>>> Any help is appreciated :-(
>>>
>>> Thanks!
>>> Christian
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>
>
>
> --
> http://www.grobmeier.de
>



-- 
http://www.grobmeier.de

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to