Skip to content

Conversation

@NutharaNR
Copy link

@NutharaNR NutharaNR commented Feb 5, 2026

Purpose

In WSO2 IS, when SSOUtils::marshall is called, the parser pool is initialized before the runtime DocumentBuilderFactory is set. This causes OpenSAML to create a JDK com.sun.org.apache.xerces.internal.dom.DocumentImpl instead of the expected org.apache.xerces.dom.DeferredDocumentImpl, leading to errors when unmarshalling and then marshalling a SAML XML object.

Related Issues

Related PRs

Summary by CodeRabbit

  • Chores
    • Updated the XML parser configuration to improve compatibility and reliability during runtime operations.

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Walkthrough

A Java system property for the XML parser factory (javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl) was added to the WSO2 server batch startup script to explicitly specify the Xerces-based parser implementation at runtime.

Changes

Cohort / File(s) Summary
Startup Configuration
distribution/kernel/carbon-home/bin/wso2server.bat
Added Java system property to specify Xerces DocumentBuilderFactory implementation in CMD_LINE_ARGS for XML parsing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 A parser, precise and true,
Xerces factories, shiny and new,
In batch scripts we declare with care,
System properties floating in air! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete compared to the template. It includes Purpose and Related Issues/PRs, but lacks Goals, Approach, User stories, Release note, Documentation, Training, Certification, Marketing, Automation tests, Security checks, Samples, Migrations, Test environment, and Learning sections. Complete the pull request description by adding the missing required template sections, particularly Goals, Approach, Documentation, Security checks, and Test environment to provide comprehensive context for reviewers.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: adding a DocumentBuilderFactory property to wso2server.bat, which aligns with the single-line change in the batch file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NutharaNR
Copy link
Author

@NutharaNR
Copy link
Author

Diff check:
image

@NutharaNR NutharaNR requested a review from Copilot February 5, 2026 08:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NutharaNR
Copy link
Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant