Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] @OptimisticLocking => NullPointerException

What version of EclipseLink?

Please provide the full stack trace.

What object is involved, how is it mapped?

On 01/07/2013 12:22 PM, Michael Hönnig wrote:
Dear EclipseLink community,

We are getting a NullPointerExcption when using @OptimisticLocking.

org.eclipse.persistence.internal.descriptors.CascadeLockingPolicy
is the class where it happens:

CascadeLockingPolicy.initUnmappedFieldsQuery(...) {
...
SQLSelectStatement statement = new SQLSelectStatement();
Iterator<DatabaseField> itUnmappedFields =
m_unmappedQueryKeyFields.values().iterator();
...
}

called by

CascadeLockingPolicy.initUnmappedFields(...) {
...
  if(m_unmappedQueryKeyFields.isEmpty()) {
                  m_unmappedQueryKeyFields = null;
                  m_mappedQueryKeyFields = m_queryKeyFields;
              }
   initUnmappedFieldsQuery(uow);
...
}

Just 2 statements before initUnmappedFieldsQuery() is using
m_unmappedQueryKeyFields, it is set to null.

Is ths a bug or does anybody know which circumstances, e.g. annotations in our
entities, could lead to this problem?`

Best regards
... Michael



Back to the top