Details
-
Bug
-
Resolution: Fixed
-
Minor
-
2.4.0, 2.5.0
-
None
Description
Reported by a user. They had a query, which used SUBJECT_ID_OR_IDENTIFIER as the returned column. The loader reported back an error:
java.lang.RuntimeException: Loader job needs to have SUBJECT_ID, SUBJECT_IDENTIFIER, or SUBJECT_ID_OR_IDENTIFIER! XXX, ArrayList size: 1: [0]: SUBJECT_ID_OR_IDENTIFIER at edu.internet2.middleware.grouper.app.loader.db.GrouperLoaderResultset$Row.getSubject(GrouperLoaderResultset.java:1460) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType.syncOneGroupMembership(GrouperLoaderType.java:2944) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$1.runJob(GrouperLoaderType.java:168) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:465) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:345) |
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) |
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) |
basis:training:hcc_zoom processed 8500 records, finding new members, 8283 of 9488 subjects, Subject is unresolvable 'XXXX' col: subjectIdOrIdentifier, jobName: XXXX is unresolvable 'XXX' col: subjectIdOrIdentifier, jobName: XXX is unresolvable 'XXXX' col: subjectIdOrIdentifier, jobName:XXXjava.lang.RuntimeException: Problem with group: XXXXX |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType.syncOneGroupMembership(GrouperLoaderType.java:3184) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$1.runJob(GrouperLoaderType.java:168) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:465) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:345) |
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) |
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) |
Caused by: java.lang.RuntimeException: Loader job needs to have SUBJECT_ID, SUBJECT_IDENTIFIER, or SUBJECT_ID_OR_IDENTIFIER! XXXX, ArrayList size: 1: [0]: SUBJECT_ID_OR_IDENTIFIER at edu.internet2.middleware.grouper.app.loader.db.GrouperLoaderResultset$Row.getSubject(GrouperLoaderResultset.java:1460) |
at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType.syncOneGroupMembership(GrouperLoaderType.java:2944) |
... 5 more |
In fact, the "ArrayList size: 1: [0]: SUBJECT_ID_OR_IDENTIFIER " in the first line proves that the column is there, and the "Loader job needs to have SUBJECT_ID, SUBJECT_IDENTIFIER, or SUBJECT_ID_OR_IDENTIFIER!" in the same line is incorrect and misleading as to the cause.
The user reports that this is actually occurring when the subject is null. If null ids are filtered out, the error doesn't occur.
The loader should detect that this is the issue, and report it as a null value (or use an appropriate subject not found if it makes sense), so the user isn't misled that their query is wrong.