Skip to content

Conversation

@njr-11
Copy link
Member

@njr-11 njr-11 commented Dec 5, 2025

I noticed a user attempting to use an entity that was missing a unique identifier and also not annotated @Entity. If the latter were present, Jakarta Persistence would raise an error and we even have an error path test for that already. However, in this case, there was no @Entity annotation, and we missed detecting any problem until ending up with a NullPointerException and raised a misleading error message.

@njr-11 njr-11 self-assigned this Dec 5, 2025
@njr-11 njr-11 added bug This bug is not present in a released version of Open Liberty team:Zombie Apocalypse serviceability Label used to track serviceability related issues labels Dec 5, 2025
@njr-11
Copy link
Member Author

njr-11 commented Dec 5, 2025

!build
notification=newcomment

@LibbyBot
Copy link
Member

LibbyBot commented Dec 5, 2025

Your Open Liberty Personal Build request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=d3efac1d-515a-4637-a871-781b8c4cf408

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link
Member

LibbyBot commented Dec 5, 2025

https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=d3efac1d-515a-4637-a871-781b8c4cf408 - Open Liberty Personal Build completed with errors/failures.

…liberty/data/internal/persistence/resources/CWWKDMessages.nlsprops

Co-authored-by: Kyle Aure <[email protected]>
@njr-11
Copy link
Member Author

njr-11 commented Dec 5, 2025

!build
notification=newcomment

@LibbyBot
Copy link
Member

LibbyBot commented Dec 5, 2025

Your Open Liberty Personal Build request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=ecfaec28-7966-440b-990e-f930573f2a4e

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link
Member

LibbyBot commented Dec 5, 2025

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 3 FAT files were changed, added, or removed.

  • Check that the build did not break the affected FAT suite(s).

  • 6 product code files were changed.

  • Please describe in a separate comment how you tested your changes.

  • 1 messages files were changed and need an L2 review.

  • @OpenLiberty/message-reviewer Please review.

    • dev/io.openliberty.data.internal.persistence/resources/io/openliberty/data/internal/persistence/resources/CWWKDMessages.nlsprops
  • 1 NLS files were changed and need an ID review.

  • @OpenLiberty/message-reviewer Please review.

    • dev/io.openliberty.data.internal.persistence/resources/io/openliberty/data/internal/persistence/resources/CWWKDMessages.nlsprops

Copy link

@helyarp helyarp left a comment

Choose a reason for hiding this comment

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

The messages are well written. I've suggested a change to one message.

the clauses: SELECT, FROM, and WHERE.

CWWKD1121.record.lacks.id=CWWKD1121E: The {0} record cannot be used as an entity \
because it lacks a unqiue identifier. One of the record components ({1}) must \
Copy link

@helyarp helyarp Dec 5, 2025

Choose a reason for hiding this comment

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

Instead of One of the record components ({1}), change it to The ({1}) record component

Copy link
Member Author

Choose a reason for hiding this comment

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

@helyarp thanks for reviewing so quickly.
{1} is actually a list of the record components, so this will look like,

CWWKD1121E: The org.example.Person record cannot be used as an entity
because it lacks a unqiue identifier. One of the record components (ssn, firstName, lastName, birthday) must ...

so it would be incorrect to say "The record component" because the value has multiple.

Copy link

Choose a reason for hiding this comment

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

@njr-11 Hi, thanks for the explanation. Keep what you have. I'll add the ID reviewed label.

@LibbyBot
Copy link
Member

LibbyBot commented Dec 6, 2025

https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=ecfaec28-7966-440b-990e-f930573f2a4e - Open Liberty Personal Build completed with errors/failures.

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

Labels

bug This bug is not present in a released version of Open Liberty ID reviewed serviceability Label used to track serviceability related issues team:Zombie Apocalypse

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants