Skip to content

Amendment#37

Merged
qqmyers merged 1 commit intoGlobalDataverseCommunityConsortium:IQSS/9983-missing_unique_constraintsfrom
janvanmansum:IQSS/9983-missing_unique_constraints
Oct 10, 2023
Merged

Amendment#37
qqmyers merged 1 commit intoGlobalDataverseCommunityConsortium:IQSS/9983-missing_unique_constraintsfrom
janvanmansum:IQSS/9983-missing_unique_constraints

Conversation

@janvanmansum
Copy link

As discussed with @qqmyers changing DatasetFieldType.isControlledVocabulary() to return allowControlledVocabulary instead of accessing the database to see if the list of terms is non-empty. This gets rid of NPE's in EclipseLink's AbstractSession.executeDeferredEvents, e.g.,

  java.lang.NullPointerException
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeDeferredEvents(AbstractSession.java:1534)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:3005)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1898)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1880)

which are presumably caused by using the EntityManager from a thread that is not supposed to use it. See also: https://stackoverflow.com/questions/73974404/npe-in-eclipse-link-abstractsession-executedeferredeventsabstractsession-java1

…rolledVocabulary instead of looking up complete list of terms to see if it is empty
@qqmyers qqmyers merged commit e6ef39c into GlobalDataverseCommunityConsortium:IQSS/9983-missing_unique_constraints Oct 10, 2023
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.

2 participants