A few more issues: BLOBs and Oracle sequences

From: MGargan..scholar.com
Date: Tue May 11 2010 - 13:56:20 UTC

  • Next message: Andrus Adamchik: "Re: A few more issues: BLOBs and Oracle sequences"

    Hi everyone,

            Thanks for all the help so far. Cayenne is pretty sweet, but I've
    got a few more questions/problems. I'm trying to get this thing out the
    door and I'm running into the following two problems....

    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?

    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
    length (4000 bytes): 138292
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 121038
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 1275943
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 1727298
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 3594212
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 320593
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 41402
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 138292
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 121038
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 1275943
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 1727298
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 3594212
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 320593
    Validation failure for com.mycomp.FileContentObject.content: "content"
    exceeds maximum allowed length (4000 bytes): 41402
            at
    org.apache.cayenne.access.ObjectStoreGraphDiff.validateAndCheckNoop(
    ObjectStoreGraphDiff.java:111)
            at org.apache.cayenne.access.DataContext.flushToParent(
    DataContext.java:1095)
            at org.apache.cayenne.access.DataContext.commitChanges(
    DataContext.java:1045)
            at com.escholar.cayenne.BaseCayenneDAO.commitChanges(
    BaseCayenneDAO.java:60)
            at
    com.escholar.datamgr.msu.batchmgr.MsuInboxProcessingThread.prepareFiles(
    MsuInboxProcessingThread.java:203)
            at com.escholar.datamgr.msu.batchmgr.MsuInboxProcessingThread.run(
    MsuInboxProcessingThread.java:68)
            at java.lang.Thread.run(Thread.java:619)

    No clue why this is happening other than the fact my byte array is over
    4000 bytes, but I'm pretty sure the files from yesterday were too.

    Any help is much appreciated. Thanks again.

    -Mike



    This archive was generated by hypermail 2.0.0 : Tue May 11 2010 - 13:57:03 UTC