question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception when using parent transactions

See original GitHub issue

I can’t get parent transactions to work. This is the Scala code I run:

object ParentTxnProblem extends App {
  val db =  org.lmdbjava.Env.create
  val testFolder = new java.io.File("./test")
  testFolder.mkdir
  val env = db.open(testFolder)
  val parentTxn = env.txnRead
  val childTxn = env.txn(parentTxn, org.lmdbjava.TxnFlags.MDB_RDONLY_TXN)
}

This is the output of running the above with the current 0.0.5-SNAPSHOT from Sonatype:

Exception in thread "main" org.lmdbjava.LmdbNativeException$ConstantDerviedException: Platform constant error code: EINVAL (22)
	at org.lmdbjava.ResultCodeMapper.checkRc(ResultCodeMapper.java:113)
	at org.lmdbjava.Txn.<init>(Txn.java:73)
	at org.lmdbjava.Env.txn(Env.java:274)
	at last line of example code above

Am I doing something wrong or is there an issue with parent transactions? Thanks a lot for your time.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

3reactions
benalexaucommented, Jan 4, 2017

Are we OK to close this ticket now PR #36 is closed?

0reactions
pstutzcommented, Jan 7, 2017

Thanks for the explanation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Parent transaction is getting affected while child ...
In this code, an exception is thrown in method5() and that method is under a new transaction. Then how the parent transaction (in...
Read more >
The resource is already being used in a parent transaction
Hi i have used explicit transaction like this -startTransaction(t1) –sequence(success) —sequence(failure) insert (local trasaction, ...
Read more >
PeopleSoft Commitment Control 9.1 PeopleBook
View and handle budget transactions exceptions. Click to jump to parent topic Understanding Exception Handling and Notification. Inevitably, some transactions ...
Read more >
Positive Pay Exception Reconciliation - Fiserv AppMarket
Reverse any draws that are associated, by the parent transaction, with the original transaction. You can reverse the draws by processing the identical ......
Read more >
Altova MapForce 2023 Enterprise Edition
To make it possible to roll back data if database exceptions are encountered, you can configure the mapping to use database transactions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found