1 Reply Latest reply: Feb 27, 2012 9:07 AM by "Andrei Costache, Oracle-Oracle" RSS

    cannot store vector in Berkeley DB

    918395
      I am now working on some graph algorithm. Specifically, I was supposed to compute all paths for certain pairs of nodes in a graph. Now, I have a graph which has 22 nodes and 45 edges. I precomputed partial path information and put it in a vector in memory. Then, I tried to store this vector in Berkeley DB. The vector has size of 262. The statement used to write the vector to BDB is as follows: dataBinding.objectToEntry(value, aValue);

      Then, I encountered the following error message:

      java.lang.NegativeArraySizeException
      at com.sleepycat.util.FastOutputStream.bump(FastOutputStream.java:277)
      at com.sleepycat.util.FastOutputStream.makeSpace(FastOutputStream.java:259)
      at com.sleepycat.bind.tuple.TupleOutput.writeString(TupleOutput.java:408)
      at com.sleepycat.bind.tuple.TupleOutput.writeString(TupleOutput.java:158)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:153)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeDotPETree(MyDataBinding.java:149)
      at MyDataBinding.writePETree(MyDataBinding.java:104)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.writeUnionPETree(MyDataBinding.java:124)
      at MyDataBinding.writePETree(MyDataBinding.java:99)
      at MyDataBinding.objectToEntry(MyDataBinding.java:34)
      at com.sleepycat.bind.tuple.TupleBinding.objectToEntry(TupleBinding.java:83)
      at BdbStorage.writeEntryToBdb(BdbStorage.java:785)
      at BdbStorage.writeToBDb(BdbStorage.java:634)
      at newGraph.storeGraphToBdb(newGraph.java:2722)
      at newGraph.eliminate(newGraph.java:2685)
      at newGraph.<init>(newGraph.java:1136)
      at QueryProcessor.getAllPaths(QueryProcessor.java:2837)
      at testAQ1_test_data_prefix.main(testAQ1_test_data_prefix.java:510)
      Couldn't store to recordDb


      Any suggestions to solve this problem?

      Thank you so much.

      Sidan