Sorry. 
         We were not able to reproduce this error in development
environment. I've been searching for this solution for a long time. I found
a similar issues online using JPox. 

http://www.jpox.org/servlet/forum/viewthread?thread=4105

We are using Oracle 10.2.0.1 and driver 10.2.0.1. Oracle said the fixed a
bug related to Timestamp in version 10.2.0.4. Bug id bug 5045849. "TIMESTAMP
value incorrect when retrieved using getTimestamp with Calendar object".
Could it be related to this issue. ? 

I'm going to to put the new Oracle Driver and hopes it fix the bug.

Rajesh

Rajesh Muthu-2 wrote:
> 
> Werner Guttmann wrote:
>> Can you please create a Jira issue and attach a test case that allows 
>> us to reproduce your problem.
>>
>> Werner
>>
>> Rajesh Muthu wrote:
>>> Hi
>>>       We use castor 1.0 for ORACLE. We still having problems with 
>>> timestamp field.
>>> This is our mapping xml.
>>>    <class name="com.test.web.util.Material" identity="id" 
>>> key-generator="seqgen_material">
>>>        <description>Material</description>
>>>        <map-to table="MATERIAL" xml="group"/>
>>>        <field name="id" type="long">
>>>            <sql name="ME_ID" type="bigint" />
>>>        </field>
>>>        <field name="materialDateTime" type="timestamp">
>>>            <sql name="MATERIAL_DATE" type="timestamp" dirty="ignore"/>
>>>        </field>
>>>    </class>
>>>
>>> Oracle database's data type for this field is DATE.
>>>
>>> Sometimes we got weird dates like '9/16/2036 7:18:09 PM' in our 
>>> database. There is no way user can enter the dates.Application 
>>> generates those dates. materialDateTime field is java.sql.Timestamp. 
>>> We set this materialDateTime field using another member variable 
>>> called meDate. Application get and set the materialDateTime by
>>>    public Date getMeDate()
>>>    {
>>>        return this.getMaterialDateTime();
>>>    }
>>>    public void setMeDate(java.util.Date date)
>>>    {
>>>        this.setMaterialDateTime(new Timestamp(date.getTime()));
>>>    }
>>> Most of the time we set meDate value using
>>> java.util.Date date = new java.util.Date();
>>>    setMeDate(date );
>>> or java.util.Calendar calendar = 
>>> java.util.Calendar.getInstance(java.util.TimeZone.getDefault());
>>>    setMeDate(calendar.getTime());
>>>
>>> Let me know if you need more info
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
> Werner
>               Although we can reproduce the problem, we cannot reproduce 
> the problem consistently. We found much information with this bug or
> glitch.
> 
> 1.    It changes the object value even though we read the jdo object i.e 
> we are just reading the record from the table and displaying it. There 
> is no update made in that transaction.
> 2.   Sometimes it changes the value of the object's member variable in 
> our case "materialDateTime" even though we read it AccessMode.Readonly
> mode.
> 3.   When it updates the date field, it always increase by 1 year and 1 
> hour.
> 
> Now we fix the weird dates in our testing environment and using 
> castor1.1.2.1 so far we are not having any new weird dates. Its not 
> actually weird dates. It increase the date by 1 year and 1 hour even
> when they view that record. if the refresh the page 10 times, date got 
> increased by 10 years and 10 hours.
> Thanks
> 
> -- 
> Rajesh Muthu
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Date-problem-with-Castor-1.0-and-oracle-tp12748378p23130221.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to