Skip to content

Hayagriva YAML export crashes on @performance entries: No enum constant StandardEntryType.Performance #17620

Closed

Description

@dylan-k

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 11. Development build 2026-10-28. The same crash was reproduced in 5.15, in 6.0-beta.1

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Open a library containing a @performance entry, for example:
@performance{Example2024Performance,
  title      = {Example Performance Title},
  author     = {Example Author},
  date       = {2024-09-12},
  venue      = {Example Venue},
  location   = {Example City},
  eventtitle = {Example Event},
  type       = {Spoken Word Performance},
  url        = {https://example.org/event}
}
  1. Select the entry and export as Hayagriva YAML.

Appendix

Exporting a library to Hayagriva YAML fails whenever the library contains a @performance entry, and the whole export aborts. The exporter maps the entry type through StandardEntryType.valueOf("Performance"), but that enum has no Performance constant, so a single @performance entry blocks an otherwise normal library export.

The export should complete, with the entry written as type: performance. Hayagriva's format defines performance as a valid entry type, a live artistic performance, and @performance is also a type in BibLaTeX's data model, so this is a straightforward mapping — not a crash, and not a silent conversion to misc.

The same crash was reproduced in 5.15, in 6.0-beta.1, and in the latest development build on 28 October 2026, in a fresh two-entry test library containing only one @performance entry and one ordinary @article entry.

java.lang.IllegalArgumentException: No enum constant org.jabref.model.entry.types.StandardEntryType.Performance
	at java.base/java.lang.Enum.valueOf(Enum.java:293)
	at org.jabref.jablib/org.jabref.model.entry.types.StandardEntryType.valueOf(StandardEntryType.java:9)
	at org.jabref.jablib/org.jabref.logic.layout.format.HayagrivaType.format(HayagrivaType.java:10)
	at org.jabref.jablib/org.jabref.logic.layout.LayoutEntry.handleOptionField(LayoutEntry.java:255)
	at org.jabref.jablib/org.jabref.logic.layout.LayoutEntry.doLayout(LayoutEntry.java:218)
	at org.jabref.jablib/org.jabref.logic.layout.LayoutEntry.handleFieldOrGroupStart(LayoutEntry.java:308)
	at org.jabref.jablib/org.jabref.logic.layout.LayoutEntry.doLayout(LayoutEntry.java:216)
	at org.jabref.jablib/org.jabref.logic.layout.Layout.doLayout(Layout.java:102)
	at org.jabref.jablib/org.jabref.logic.exporter.TemplateExporter.export(TemplateExporter.java:255)
	at org.jabref/org.jabref.gui.exporter.ExportCommand.lambda$export$2(ExportCommand.java:115)
	at org.jabref.jablib/org.jabref.logic.util.BackgroundTask$1.call(BackgroundTask.java:69)
	at org.jabref/org.jabref.gui.util.UiTaskExecutor$1.call(UiTaskExecutor.java:224)
	at javafx.graphics@27/javafx.concurrent.Task$TaskCallable.call(Task.java:1407)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1474)

Related, but not the same bug: #10382 (original Hayagriva export feature) and #10596 (parent field dropped in Hayagriva export, fixed in 5.12).

Activity

  1. added
    status: needs-triage
    on Oct 29, 2026
  2. added theissue type on Oct 29, 2026
  3. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    Hi @Vidusha10, this issue needs triage by a maintainer first. Please wait until the status: needs-triage label is removed.

  4. added and removed
    status: needs-triage
    on Oct 29, 2026
  5. nysta12 commented on Oct 29, 2026

    @nysta12
    Contributor

    /assign-me

  6. jabref-machine commented on Oct 29, 2026

    @jabref-machine
    Collaborator

    👋 Hey @nysta12, thank you for your interest in this issue! 🎉

    We're excited to have you on board. Start by exploring our Contributing guidelines, and set up your local development workspace by following the steps in our workspace setup guidelines to get started smoothly.
    When using AI tools, please use them as an assistant rather than simply copying their output. See Don't paste the AI, please..
    For questions on JabRef functionality, you can consult the JabRef Guru. For questions related to the codebase, please start using DeepWiki.

    In case you encounter failing tests during development, please check our developer FAQs!

    Still facing issues or having more questions? Feel free to ask here on GitHub or on JabRef's Gitter chat. Please don't hesitate to open a (draft) pull request early on to show the direction you are heading towards if unsure.

    Happy coding! 🚀

  7. added
    📍 Assigned
    on Oct 29, 2026
  8. Siedlerchr commented on Oct 29, 2026

    @Siedlerchr
    Member

    Yeah it must also handle unknown entrytypes. I suggest looking at

    public static EntryType parse(String typeName) {

  9. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    ⏰ Assignment Reminder

    Hi @nysta12, this is a friendly reminder about your assignment to this issue.

    Warning

    This issue will be automatically unassigned in 4 days if there's no activity.

    Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef.
    Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.

    How to keep your assignment


    If you are working on it, you can prevent automatic unassignment by:

    • Submitting a draft pull request with your progress within 4 days
    • Asking for the 📌 Pinned label if you need more time

    We appreciate your contribution and are here to help if needed!

  10. SachinyadavAug20 commented on Nov 4, 2026

    @SachinyadavAug20
    Contributor

    Hi @nysta12, @Siedlerchr, @ThiloteE!

    Checking in to see if @nysta12 is still working on this. If you are occupied or need assistance, I have investigated the codebase and would be glad to take over and resolve this.

    Root Cause

    In HayagrivaType.java, the formatter directly evaluates the entry type using StandardEntryType.valueOf(value):

    return switch (StandardEntryType.valueOf(value)) {

    Because @performance is registered under BiblatexNonStandardEntryType.Performance (rather than StandardEntryType), Enum.valueOf() throws an unhandled IllegalArgumentException, which aborts the entire Hayagriva YAML export process.

    Proposed Solution

    Following @Siedlerchr's suggestion to use EntryTypeFactory.parse():

    public static EntryType parse(String typeName) {

    1. Safe EntryType Resolution:
      Replace StandardEntryType.valueOf(value) with EntryTypeFactory.parse(value). This safely resolves standard, IEEE, and BibLaTeX entry types, returning an UnknownEntryType instead of throwing if the type is unrecognized.

    2. Explicit Mapping & Fallback:

      • Explicitly map BiblatexNonStandardEntryType.Performance to "performance" (valid in the Hayagriva specification).
      • Switch on resolved StandardEntryTypes as currently implemented.
      • For unmapped or UnknownEntryTypes, fall back gracefully to "misc" to prevent export failures.
    3. Automated Testing:

      • Add test cases in HayagrivaYamlExporterTest.java verifying that an export containing a @performance entry successfully writes type: performance.
      • Add test cases ensuring custom/unknown entry types export gracefully to type: misc without throwing.

    If the assignment is free or released, please feel free to assign this to me—I have forked the repository, reproduced the issue, and can submit a PR right away!

  11. nysta12 commented on Nov 5, 2026

    @nysta12
    Contributor

    Hi, I'm still working on this and making progress. Could I please get the 📌 Pinned label so the assignment isn't automatically removed? Thanks!

  12. moved this from Normal priority to Done in Prioritizationon Nov 14, 2026
  13. github-actions commented on Nov 14, 2026

    @github-actions
    Contributor

    We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.

    For any feedback, add a comment to the pull request at #17815.

  14. added a commit that references this issue on Nov 14, 2026
    f1d2d3a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions