Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 562057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:30:53+00:00 2026-05-13T12:30:53+00:00

I have a class Document which consists of Id (int) and Url (String) .

  • 0

I have a class Document which consists of Id (int) and Url (String). I would like to have a primary index on Id and secondary index on Url. I would also like to have a sequence for Id auto-incrementation. So I create a SecondaryDatabase and then I create a Sequence. During initialisation of the Sequence I get an exception:

Exception in thread "main" java.lang.IllegalArgumentException
 at com.sleepycat.util.UtfOps.getCharLength(UtfOps.java:137)
 at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:259)
 at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
 at pl.edu.mimuw.zbd.berkeley.zadanie.rozwiazanie.MyDocumentBiding.entryToObject(MyDocumentBiding.java:12)
 at pl.edu.mimuw.zbd.berkeley.zadanie.rozwiazanie.MyDocumentBiding.entryToObject(MyDocumentBiding.java:1)
 at com.sleepycat.bind.tuple.TupleBinding.entryToObject(TupleBinding.java:76)
 at pl.edu.mimuw.zbd.berkeley.zadanie.rozwiazanie.UrlKeyCreator.createSecondaryKey(UrlKeyCreator.java:20)
 at com.sleepycat.je.SecondaryDatabase.updateSecondary(SecondaryDatabase.java:835)
 at com.sleepycat.je.SecondaryTrigger.databaseUpdated(SecondaryTrigger.java:42)
 at com.sleepycat.je.Database.notifyTriggers(Database.java:2004)
 at com.sleepycat.je.Cursor.putNotify(Cursor.java:1692)
 at com.sleepycat.je.Cursor.putInternal(Cursor.java:1616)
 at com.sleepycat.je.Cursor.putNoOverwrite(Cursor.java:663)
 at com.sleepycat.je.Sequence.<init>(Sequence.java:188)
 at com.sleepycat.je.Database.openSequence(Database.java:546)
 at pl.edu.mimuw.zbd.berkeley.zadanie.rozwiazanie.MyFullTextSearchEngine.init(MyFullTextSearchEngine.java:131)
 at pl.edu.mimuw.zbd.berkeley.zadanie.testy.MyFullTextSearchEngineTest.main(MyFullTextSearchEngineTest.java:18)

It seems that during the initialisation of the sequence the secondary database is forced to update. When I debug the entryToObject method of MyDocumentBiding the bytes that it tries to convert to object seem random.

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:30:53+00:00Added an answer on May 13, 2026 at 12:30 pm

    I found out that the solution is to either create a separate db for the sequence or to make the SecondaryKeyCreator detect when it is adding a sequence data and return false in such situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: I have a document class which contains a list of objects. These objects
I have an .fla that links to a generic Document class which manages the
I have table which class is forum . My jquery code: <script type=text/javascript> $(document).ready(function()
Say I have class A with class A { final String foo() { //
If I have class names such as left, right, clear and xhtml like <a
I have 6 classes, which are all document types. All the document types have
I currently have this in my document $(document).ready(function(){ $([href$='.html']).addClass('html'); $([href$='.pdf']).addClass('pdf'); }); which styles any
I have an interface public interface IDataProvider { T GetDataDocument<T>(Guid document) where T:class, new()
I have class method that returns a list of employees that I can iterate
I have: class MyClass extends MyClass2 implements Serializable { //... } In MyClass2 is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.