cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MGarg...@escholar.com
Subject Re: A few more issues: BLOBs and Oracle sequences
Date Tue, 11 May 2010 20:21:59 GMT
I think that was it.  Thanks guys.

-Mike



From:
Michael Gentry <mgentry@masslight.net>
To:
user@cayenne.apache.org
Date:
05/11/2010 12:04 PM
Subject:
Re: A few more issues: BLOBs and Oracle sequences



The sequence cache between the database and Cayenne must match.  When
you created the sequence in Oracle you gave an INCREMENT BY value (not
the CACHE value).  If you have an INCREMENT BY 100, you want to enter
100 into Cayenne Modeler's Cached PK Size box.

mrg


On Tue, May 11, 2010 at 11:35 AM,  <MGargano@escholar.com> wrote:
> I'm not trying to recommit dirty objects, this is on a complete second 
run
> of the process which is what is so confusing to me.  It's like the 
object
> got commited, but the sequence didn't.  I have the sequence cache set to
> 20 on the DB, but cache PK size set to 0 in cayenne modeler.  I don't 
know
> if there is a relationship between the two.
>
> With the second problem, I now see that column size parameter.  I didn't
> know about that.  Can I leave it blank?  If not, what's the max. value 
for
> a BLOB?
>
> I'm so close to getting this thing working.  :-D
>
> Thanks.
> -Mike
>
>
>
>
> From:
> Andrus Adamchik <andrus@objectstyle.org>
> To:
> user@cayenne.apache.org
> Date:
> 05/11/2010 10:52 AM
> Subject:
> Re: A few more issues:  BLOBs and Oracle sequences
>
>
>
>
> On May 11, 2010, at 4:56 PM, MGargano@escholar.com wrote:
>
>> 1)
>> I'm using an Oracle 11g backend, have my sequences all set (with
>> caching
>> set to 0 in cayenne modeler), and it works fine until my program
>> throws an
>> exception.  Now this exception is being thrown after I'm calling
>> commitChanges() on the dataContext, but the next time I run my
>> application
>> it complains about a PK violation and I need to wipe my test DB before
>> going forward.  any ideas?
>
> So are you trying to re-commit the same "dirty" objects again after an
> exception? Not sure if the Oracle sequences are transactional and are
> subject to rollback, but if they are, I guess the assigned PK values
> are no longer valid. We may need to test this scenario in Cayenne
> (Jira anyone?) and maybe reset the generated object PKs on rollback.
> In the meantime, you can rollback your ObjectContext on exception and
> start with fresh objects.
>
>> 2)
>> I'm storing zipped file content in BLOBs... it seemed to be working
>> fine
>> yesterday, but now I get this (the files today might just be larger,
>> these
>> files might get pretty big ~1.5GB)....
>>
>> Exception in thread "Thread-7"
>> org.apache.cayenne.validation.ValidationException: [v.3.0RC2 Jan 30
>> 2010
>> 16:41:40] Validation failures: Validation failure for
>> com.mycomp.FileContentObject.content: "content" exceeds maximum
>> allowed
>
> Check max length for this column in Modeler. It looks like this is
> coming from that setting.
>
> Andrus
>
>
>



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message