8

The Oracle Berkeley DB Java edition source is here: https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html

One can check in the source that it's under Apache 2.0 license.

On the other hand, Oracle states here that:

The our open source license permits you to use Berkeley DB, Berkeley DB Java Edition or Berkeley DB XML at no charge under the condition that if you use the software in an application you redistribute, the complete source code for your application must be available and freely redistributable under reasonable conditions. If you do not want to release the source code for your application, you may purchase a license from Oracle. For pricing information, or if you have further questions on licensing, please contact us at berkeleydb-info_us@oracle.com.

However, it's my understanding that code under Apache 2.0 license can be reused in commercial products for free. How is it possible then to require a commercial license for such use?

And if Oracle can require that, does it mean that it affects also code based on Berkeley DB JE, that one releases? How does that make sense?

New contributor
Jean-Claude Arbaut is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • 5
    That notice is very weird. I looked at the three links labeled "Open source license for Berkeley DB [Java/XML]" and I see that Java Edition is under Apache 2, while the other two are under the AGPL. The licensing terms you quote from the page are (as you say) much stricter than Apache 2 while also much more lax than AGPLv3. Oracle's intent here is very unclear, and I'm frankly astounded that a multimillion dollar corporation has indicated their licensing intent in such an unclear manner; this is the kind of confused "yes but actually no" nonsense I might expect from an amateur GitHub repo.
    – apsillers
    Nov 25 at 17:16
12

Oracle is being (deliberately?) confusing. Whereas their Berkeley DB product is made available under the AGPL which does require making the source code available upon redistribution, Berkeley DB Java Edition is Apache-2.0 licensed and has no such condition. I'd trust the licensing that is explicitly given on the download page, rather than Oracle's summary that is clearly intended to scare businesses into acquiring a paid license.

It may be worth considering that Oracle is in the business of selling licenses. They are not interested in enabling easy and safe use of their software under an open source license, but do frequently offer such licenses for historical or reputational reasons or to build an ecosystem around their products. Sometimes parodized, they are known for enabling downloads for free, but then auditing customers to find license violations and pressuring them into expensive license contracts. This benefits from unclear and confusing licensing terms.

Instead of downloading your software from Oracle, consider using a package manager with clearer license management instead. For example, Debian also packages this software for their Linux distribution. It is worth noting that the open source community forked Berkeley DB before it was relicensed, e.g. Debian packages the (severely outdated) version 5.3 of the native library and version 3.3 of the Java Edition, both under the GPL-style “Sleepycat” license. Due to the Oracle licensing shenanigans, many projects have transitioned from Berkeley DB to LMDB (permissive open source license) which also has good Java bindings. Further alternatives for native programs include SQLite (public domain) or RocksDB (Apache-2.0), both of which have Java/JNI bindings. In Java, HSQLDB (BSD license) can also be nice, but it's a full SQL database instead of a key–value store.

5
  • Well, the summary on the download page has the same problem: "Our open source license is OSI-certified and permits use of Berkeley DB in open source projects or in applications that are not distributed to third parties." Nov 25 at 17:41
  • 2
    @Jean-ClaudeArbaut That's technically true if you relate the statement to Berkeley DB (non-Java edition). And it's still almost true for the Apache-2.0: OSI-certified, permits use in open source projects, permits use in applications that are not distributed – but also permits use in applications that are distributed, subject to the attribution requirements in the license.
    – amon
    Nov 25 at 18:08
  • 2
    Ah, yes, that's right. But it's misleading. But I think we all agree on that :) Nov 25 at 18:14
  • @amon Sleepycat license is hardly BSD-like because it requires full source of components that use BerkeleyDB be provided by request, so, itʼs a copyleft one, more like GPL. Thatʼs why BSD OS flavors retain BerkeleyDB 1.85 or 1.86 which were the last ones under original BSD (usable with proprietary code). Later Oracle switch to AGPL might be even better due to more practically-proven copyleft license, but still didn't go on to permit commercialized use.
    – Netch
    Nov 26 at 16:43
  • @Netch oops, thanks for pointing this out. Fixed!
    – amon
    Nov 26 at 16:56

Your Answer

Jean-Claude Arbaut is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.