NullPointerException on new JSON server connection

Hello all, I'm working on a REDCap connector for ODK Aggregate 1.0. I'm
reusing most of the code for the incomplete JSON Server external connector,
and am now getting a puzzling NullPointerException. The traceboack is
pointing me to this bit of code:

@Override
public ExternServSummary transform() {
return new ExternServSummary(fsc.getUri(),
fsc.getCreatorUriUser(),
fsc.getOperationalStatus(),
fsc.getEstablishmentDateTime(),
fsc.getExternalServicePublicationOption(),
fsc.getUploadCompleted(),
fsc.getLastUploadCursorDate(),
fsc.getLastStreamingCursorDate(),
fsc.getExternalServiceType().getServiceName(),
getDescriptiveTargetString());
}

Which (as far as I can tell) depends on a FormServiceCursor that gets
created a few lines up:

fsc = FormServiceCursor.createFormServiceCursor(form,

ExternalServiceType.REDCAP_SERVER, objectEntity,
cc);
fsc.setExternalServiceOption(externalServiceOption);
fsc.setIsExternalServicePrepared(true);
fsc.setOperationalStatus(OperationalStatus.ACTIVE);
fsc.setEstablishmentDateTime(new Date());
fsc.setUploadCompleted(false);

I did add REDCAP_SERVER to ExternalServiceType. When I try to add a REDCap
connector from the UI I get an "Access Denied" message in addition to the
traceback. Thanks in advance.

··· -- Kevin Harvey Web Developer kcharvey@gmail.com

We have recently restructured the code in the "uiexperiment" branch to
improve constructor ordering to hopefully prevent this. The half
completed JSON code probably was insuffucently constructed, while the
JSON implementation is still incomplete it has at least been updated
to follow the new constructor ordering. The changes in the
"uiexperiment" branch should be be moved to the V1_0 branch next week.
In the mean time you can grab the new files from "uiexperiment" or
just use "uiexperiment". However, an important warning that we are
actively changing some important areas of aggregate and we expect bugs
to occur during this change over that we will be fixing this week
(that is the reason we are keeping the two branches separate).

The access denied is probably because the user does not have
sufficient permissions. Form Manager permission (or higher, ie Site
Administrator) is required for external services.

Waylon

··· On Thu, Sep 8, 2011 at 8:52 AM, Kevin Harvey wrote: > Hello all, I'm working on a REDCap connector for ODK Aggregate 1.0. I'm > reusing most of the code for the incomplete JSON Server external connector, > and am now getting a puzzling NullPointerException. The traceboack is > pointing me to this bit of code: > > @Override > public ExternServSummary transform() { > return new ExternServSummary(fsc.getUri(), > fsc.getCreatorUriUser(), > fsc.getOperationalStatus(), > fsc.getEstablishmentDateTime(), > fsc.getExternalServicePublicationOption(), > fsc.getUploadCompleted(), > fsc.getLastUploadCursorDate(), > fsc.getLastStreamingCursorDate(), > fsc.getExternalServiceType().getServiceName(), > getDescriptiveTargetString()); > } > > Which (as far as I can tell) depends on a FormServiceCursor that gets > created a few lines up: > > fsc = FormServiceCursor.createFormServiceCursor(form, > ExternalServiceType.REDCAP_SERVER, objectEntity, > cc); > fsc.setExternalServiceOption(externalServiceOption); > fsc.setIsExternalServicePrepared(true); > fsc.setOperationalStatus(OperationalStatus.ACTIVE); > fsc.setEstablishmentDateTime(new Date()); > fsc.setUploadCompleted(false); > > I did add REDCAP_SERVER to ExternalServiceType. When I try to add a REDCap > connector from the UI I get an "Access Denied" message in addition to the > traceback. Thanks in advance. > > -- > Kevin Harvey > Web Developer > kcharvey@gmail.com > >

Have the changes to the code noted below been finalized yet? Is it safe to
start working on a connector again?

··· -- Kevin Harvey Web Developer 615-686-8238 kcharvey@gmail.com

On Thu, Sep 8, 2011 at 2:14 PM, W. Brunette wbrunette@gmail.com wrote:

We have recently restructured the code in the "uiexperiment" branch to
improve constructor ordering to hopefully prevent this. The half
completed JSON code probably was insuffucently constructed, while the
JSON implementation is still incomplete it has at least been updated
to follow the new constructor ordering. The changes in the
"uiexperiment" branch should be be moved to the V1_0 branch next week.
In the mean time you can grab the new files from "uiexperiment" or
just use "uiexperiment". However, an important warning that we are
actively changing some important areas of aggregate and we expect bugs
to occur during this change over that we will be fixing this week
(that is the reason we are keeping the two branches separate).

The access denied is probably because the user does not have
sufficient permissions. Form Manager permission (or higher, ie Site
Administrator) is required for external services.

Waylon

On Thu, Sep 8, 2011 at 8:52 AM, Kevin Harvey kcharvey@gmail.com wrote:

Hello all, I'm working on a REDCap connector for ODK Aggregate 1.0. I'm
reusing most of the code for the incomplete JSON Server external
connector,
and am now getting a puzzling NullPointerException. The traceboack is
pointing me to this bit of code:

@Override
public ExternServSummary transform() {
return new ExternServSummary(fsc.getUri(),
fsc.getCreatorUriUser(),
fsc.getOperationalStatus(),
fsc.getEstablishmentDateTime(),
fsc.getExternalServicePublicationOption(),
fsc.getUploadCompleted(),
fsc.getLastUploadCursorDate(),
fsc.getLastStreamingCursorDate(),
fsc.getExternalServiceType().getServiceName(),
getDescriptiveTargetString());
}

Which (as far as I can tell) depends on a FormServiceCursor that gets
created a few lines up:

fsc = FormServiceCursor.createFormServiceCursor(form,

ExternalServiceType.REDCAP_SERVER, objectEntity,
cc);
fsc.setExternalServiceOption(externalServiceOption);
fsc.setIsExternalServicePrepared(true);
fsc.setOperationalStatus(OperationalStatus.ACTIVE);
fsc.setEstablishmentDateTime(new Date());
fsc.setUploadCompleted(false);

I did add REDCAP_SERVER to ExternalServiceType. When I try to add a
REDCap
connector from the UI I get an "Access Denied" message in addition to the
traceback. Thanks in advance.

--
Kevin Harvey
Web Developer
kcharvey@gmail.com

The majority of the changes are now complete in the "uiexperiment"
branch. We aren't finish testing the changes yet so it hasn't moved to
the V1_0. Overall if you are okay living on the edge i think it's fine
to start developing against the uiexperiment. It is in a much more
stable state than when I wrote the warning. However, we aren't saying
it's done yet or it would have been moved in to V1_0, we expect that
to happen soon as we are currently looking for bugs in preparation for
a release.

Waylon

··· On Wed, Sep 14, 2011 at 4:52 AM, Kevin Harvey wrote: > Have the changes to the code noted below been finalized yet? Is it safe to > start working on a connector again? > -- > Kevin Harvey > Web Developer > 615-686-8238 > kcharvey@gmail.com > > > > On Thu, Sep 8, 2011 at 2:14 PM, W. Brunette wrote: >> >> We have recently restructured the code in the "uiexperiment" branch to >> improve constructor ordering to hopefully prevent this. The half >> completed JSON code probably was insuffucently constructed, while the >> JSON implementation is still incomplete it has at least been updated >> to follow the new constructor ordering. The changes in the >> "uiexperiment" branch should be be moved to the V1_0 branch next week. >> In the mean time you can grab the new files from "uiexperiment" or >> just use "uiexperiment". However, an important warning that we are >> actively changing some important areas of aggregate and we expect bugs >> to occur during this change over that we will be fixing this week >> (that is the reason we are keeping the two branches separate). >> >> The access denied is probably because the user does not have >> sufficient permissions. Form Manager permission (or higher, ie Site >> Administrator) is required for external services. >> >> Waylon >> >> On Thu, Sep 8, 2011 at 8:52 AM, Kevin Harvey wrote: >> > Hello all, I'm working on a REDCap connector for ODK Aggregate 1.0. I'm >> > reusing most of the code for the incomplete JSON Server external >> > connector, >> > and am now getting a puzzling NullPointerException. The traceboack is >> > pointing me to this bit of code: >> > >> > @Override >> > public ExternServSummary transform() { >> > return new ExternServSummary(fsc.getUri(), >> > fsc.getCreatorUriUser(), >> > fsc.getOperationalStatus(), >> > fsc.getEstablishmentDateTime(), >> > fsc.getExternalServicePublicationOption(), >> > fsc.getUploadCompleted(), >> > fsc.getLastUploadCursorDate(), >> > fsc.getLastStreamingCursorDate(), >> > fsc.getExternalServiceType().getServiceName(), >> > getDescriptiveTargetString()); >> > } >> > >> > Which (as far as I can tell) depends on a FormServiceCursor that gets >> > created a few lines up: >> > >> > fsc = FormServiceCursor.createFormServiceCursor(form, >> > ExternalServiceType.REDCAP_SERVER, objectEntity, >> > cc); >> > fsc.setExternalServiceOption(externalServiceOption); >> > fsc.setIsExternalServicePrepared(true); >> > fsc.setOperationalStatus(OperationalStatus.ACTIVE); >> > fsc.setEstablishmentDateTime(new Date()); >> > fsc.setUploadCompleted(false); >> > >> > I did add REDCAP_SERVER to ExternalServiceType. When I try to add a >> > REDCap >> > connector from the UI I get an "Access Denied" message in addition to >> > the >> > traceback. Thanks in advance. >> > >> > -- >> > Kevin Harvey >> > Web Developer >> > kcharvey@gmail.com >> > >> > > >