Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

JAXB was part of the JDK, was removed in Java 11, and now lives on as Jakarta XML Binding. What does this history teach about depending on platform-bundled libraries, and how would you decide whether to keep investing in XML binding at all?

JAXB's removal from the JDK teaches that anything we use should be an explicit, owned dependency in the build, because a platform can drop bundled APIs when it slims down, as JEP 320 did in Java 11 with the Java EE and CORBA modules. Whether to keep investing in XML binding depends on who needs XML: partners in banking, government, healthcare and SOAP integrations still demand it, while new internal APIs mostly use JSON, so I would keep XML binding isolated in integration modules, budget for its upkeep, and decide per integration with clear criteria.

Why this question is asked

For many Java teams, the move to Java 11 was the moment their builds broke with ClassNotFoundException for javax.xml.bind classes, and then broke again when Spring Boot 3 required jakarta packages. That was not bad luck; it was the cost of an implicit dependency. Interviewers ask this question at principal level because it is really about two leadership skills: learning the right lesson from a platform change, and deciding where to spend engineering effort on an older technology. In this answer, we will retell the history briefly, draw the lessons about platform-bundled libraries, look at where XML still earns its place, and build a way to decide how much to invest in XML binding.

1A Short History of JAXB

JAXB arrived in the JDK with Java 6, so any Java program could bind XML without adding a library. That convenience meant thousands of applications used it without ever listing it as a dependency. Java 9's module system made the JDK's contents explicit, and the Java EE modules, including JAXB, JAX-WS and the activation framework, were deprecated for removal. JEP 320 removed them in Java 11, together with CORBA, because these APIs had their own release cycles in the enterprise world and did not belong in the core platform.

Then Java EE moved to the Eclipse Foundation as Jakarta EE, and from Jakarta EE 9 the packages were renamed from javax.* to jakarta.*. So applications faced two migrations: first add JAXB as a library, then switch it to a new namespace. Each looked small, but each touched every service, every generated class and every library that exposed the types.

Step throughHow JAXB moved out of the platform
  1. Java 6: bundled in the JDKused everywhere with no declared dependency
  2. Java 9: deprecated for removalmodule system makes it visible
  3. Java 11: removed by JEP 320builds fail without a library
  4. Jakarta EE 9: javax renamed to jakartasecond migration for every user
  5. Today: Jakarta XML Binding 4.0an ordinary library with its own releases

5 steps in order. Play them, or step through them one at a time.

Two migrations followed from one hidden dependency.

2Lesson One: Make Every Dependency Explicit

The cause of the pain was not that JAXB changed; it was that our builds did not say we depended on it. A dependency that comes with the platform has no version in our build file, no entry in our software bill of materials, no owner, and no warning when it goes away. So the first lesson is a rule: everything our code uses beyond the core language library is declared in the build with a version, and our dependency tooling knows about it.

The second part of the lesson is about the platform itself. Platforms shrink as well as grow. The JDK has also removed the Nashorn JavaScript engine, applets and the security manager, and application servers drop old specifications. So when we choose a convenient bundled API, we should ask how central it is to the platform's future. A lean core with explicit libraries upgrades more predictably than a large platform where hidden pieces may vanish.

The third part is about blast radius. Services that used JAXB in one integration module needed a small change; services that had JAXB annotations on their domain entities, shared across many modules and libraries, needed changes everywhere. Isolating technology-specific code behind our own interfaces is what turns a platform change from a rewrite into a module upgrade.

3Where XML Still Earns Its Place

XML is not dead; it has moved to particular domains. Banking runs on ISO 20022 payment messages, which are XML. Governments use XML for tax filings, customs, e-invoicing and procurement. Healthcare still exchanges HL7 CDA documents, and many enterprise partners expose only SOAP services. In these places XML Schema gives something partners value: a precise, validatable contract with namespaces, strict types and a long-standing tool chain, and regulators often mandate it.

For new internal APIs between our own services, JSON over HTTP, or Protobuf for high volume and strong typing, is usually simpler, cheaper to process and better supported by modern tooling. So the realistic picture for most companies is mixed: XML at the edges where partners require it, and something else inside.

4Deciding How Much to Invest

I would decide per integration, not for XML as a whole, using a few explicit criteria. Partner requirement: does an external party or regulation require XML, and for how long? Cost of maintenance: how many incidents, upgrade hours and library versions has this integration cost in the last year? Skills: how many people on the team can still debug schema and namespace problems? Security exposure: does the service parse XML from the internet, where XXE and entity expansion are real risks?

With those answers, three choices appear. Where partners demand XML, we keep binding, but isolated in an integration module that maps to our own domain objects, with explicit Jakarta dependencies, hardened parsers and a named owner. Where XML is used only between our own services, we plan a migration to JSON or Protobuf with versioned schemas, because every internal XML contract is cost without a customer. And where an integration is used rarely and has no owner, we consider retiring it altogether.

Deciding per XML integration
SituationDecisionInvestment
Partner or regulator requires XMLkeep, isolated in an integration moduleowner, hardened parsers, upgrades budgeted
Only our own services use itmigrate to JSON or Protobufone-off project, then remove
Low volume, no owner, unclear usersretire or find an ownerrisk register until decided
New contract with a partneroffer JSON or REST firstXML only if the partner insists

5Budgeting for What We Keep

The XML we keep needs a maintenance budget like any other dependency. That means tracking end-of-support dates for the binding runtime and the build plugins, upgrading on a schedule rather than in a crisis, and keeping both javax and jakarta generations from living side by side longer than a planned transition. It also means keeping a small group of people who understand schemas, namespaces and xjc, through documentation and pairing, so the knowledge does not leave with one engineer.

I would review this inventory once a year with the business owners of each integration. Partner requirements change, regulators move to new formats, and an integration that justified its cost three years ago may not today. The goal is not to defend or abolish XML but to make sure each piece of it is there because someone needs it.

6Follow-up questions

Does this mean we should avoid all bundled platform APIs?

No. Core APIs such as collections, java.time, the HTTP client and the XML parsers in java.xml are central to the platform and very stable. The lesson is to know which APIs are core and which are conveniences that may move out, and to declare and isolate the latter.

How do you convince the business to pay for XML maintenance?

By connecting it to the revenue and obligations behind each integration. A payment integration that carries most of the company's revenue clearly deserves a funded owner; an export nobody can name a user for does not. Showing the incident and upgrade cost per integration makes the trade-off concrete.

Would you ever choose XML for a new internal contract?

Rarely, perhaps when the data is document-like with mixed content, or when the same messages must also flow to partners in an existing XML standard and duplicating the model would cost more. Even then, the contract would be schema-first, versioned and owned like any other.

7Conclusion

In this answer, we followed JAXB from the JDK, through deprecation in Java 9 and removal in Java 11 by JEP 320, to Jakarta XML Binding with its new namespace. The lessons are to declare every dependency explicitly, to be careful with convenient bundled APIs that are not core to the platform, and to isolate technology-specific code so platform changes stay small. For the investment decision, we saw that XML still matters where partners and regulators demand it, and that the right approach is to decide per integration using partner need, maintenance cost, skills and security exposure.

What to say in the interviewAbout 90 seconds aloud

Open with

The history is that JAXB came with the JDK from Java 6, so many teams used it without declaring it. Java 9 deprecated the Java EE modules and Java 11 removed them with JEP 320, and then Jakarta EE 9 renamed javax to jakarta, so everyone paid for two migrations.

Then, if they want more

The lesson I take is that a dependency should be explicit in the build, versioned and owned, even if the platform happens to provide it today, because platforms shrink as well as grow.

The second lesson is isolation: teams that kept JAXB in one integration module had a small change, while teams with XML annotations on shared domain entities had changes everywhere. On whether to keep investing, I would decide per integration rather than for XML as a whole.

XML is still required for ISO 20022 in banking, government filings, healthcare documents and many SOAP partners, so where a partner or regulator demands it, I keep binding in an isolated module with hardened parsers, a named owner and a maintenance budget that tracks end-of-support dates.

Where XML is only used between our own services, I plan a move to JSON or Protobuf. The criteria are partner requirements, maintenance cost, the team's skills and the security exposure of parsing XML, and I would review that inventory yearly with the business owners.

About this answer

Last updated
12 November 2026
Versions it names
Java 11, Java 9, Jakarta EE 9, Java 6
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "JAXB was part of the JDK, was removed in Java 11, and now lives on as Jakarta XML...": https://scrivio-interview-library.netlify.app/java/jaxb/a68b0b1f17/