Submission Key Part not well formed exception

Hi,

So for some (seemingly random) submissions, I don't see the photo on the
Aggregate.html page. And for these submission, I get the following error in
the appengine logs:

java.lang.IllegalArgumentException: submission key part
data[@key=DcB3scpYbCSD9 is not well formed
at
org.opendatakit.aggregate.submission.SubmissionKeyPart.(SubmissionKeyPart.java:55)

PFA complete stacktrace of the exception.

I placed additional log statements in the BinaryDataServlet class and saw
that for photos showing just fine the keyString is

build_-2-_1372059095[@version=null and @uiVersion=null]/data[@key=W1kGsX8luC6iMERh6UuT5Q30ls8ih8SuyOmkmaopoI22R9vqBfVrLDe1MUgh5qbe
]/photo

and for photos not showing the key is (note the slashes '/' in the data)

keyString build_-2-_1372059095[@version=null and @uiVersion=null]/data[@key=DcB3scpYbCSD9/htOydobrQMdm1EgjR3jOvOTKzS/wAjt0uWDIPTPJkqTfoBwe3X
]/photo

Can one of the developers explain.

Thanks.

StackTrace.txt (6.92 KB)

The extra slashes in the @key= value are causing the problem.

Google apparently now has slashes in their entity key format.

This will be fixed in the next update to ODK Aggregate (I will send you a
candidate build sooner than a public release since you are experiencing
this issue).

Mitch

ยทยทยท On Thu, Aug 1, 2013 at 12:06 AM, Fahad Sultan wrote:

Hi,

So for some (seemingly random) submissions, I don't see the photo on the
Aggregate.html page. And for these submission, I get the following error in
the appengine logs:

java.lang.IllegalArgumentException: submission key part
data[@key=DcB3scpYbCSD9 is not well formed
at
org.opendatakit.aggregate.submission.SubmissionKeyPart.(SubmissionKeyPart.java:55)

PFA complete stacktrace of the exception.

I placed additional log statements in the BinaryDataServlet class and saw
that for photos showing just fine the keyString is

build_-2-_1372059095[@version=null and @uiVersion=null]/data[@key=W1kGsX8luC6iMERh6UuT5Q30ls8ih8SuyOmkmaopoI22R9vqBfVrLDe1MUgh5qbe
]/photo

and for photos not showing the key is (note the slashes '/' in the data)

keyString build_-2-_1372059095[@version=null and @uiVersion=null]/data[@key=DcB3scpYbCSD9/htOydobrQMdm1EgjR3jOvOTKzS/wAjt0uWDIPTPJkqTfoBwe3X
]/photo

Can one of the developers explain.

Thanks.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks for responding. I realized that and fixed it be splitting on ']/'
instead of just '/' and then adding the ']' back before passing the split
array elements to SubmissionKeyPart constructor (expect for for the last
element, photo). All photos are appearing just fine now.

Send the build anyway. You might have a better fix.

Thanks.

Fahad