ODK Aggregate Internal Server Error (500) because of PostgreSQL trigger

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for
    development first).
  • PostgreSQL 9.2 for Windows.
  • ODK Aggregate 1.4.7
  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK
Aggregate interface then convert from .CSV to Shapefile using XLS
GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK Aggregate
tables into your PostGIS tables, so that users can use QGIS to connect
directly to PostGIS to read data, which saves at least two complicated
steps.

Anyway, my problem now is, every time I place the trigger into the ODK
Aggregate table (one for test first), both uploading data from client
(GeoODK) and also "Manually Upload Submission Data" in Web-based ODK
Aggregate, both ways producing error. Trigger SQL itself may not be any
problem since I can query it and produce a good result. If I remove the
trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table
structure.

Does anybody here have same problem and have a solution? Or is it a bug in
ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

Polygon.SQL (201 Bytes)

POLYGON_SURVEY_CORE.SQL (4.71 KB)

Trigger.SQL (430 Bytes)

Look in your Tomcat logs for more detailed error messages.

You might need to configure logging on Tomcat to get it to produce detailed
logs. The ODK Aggregate code should log errors of this kind, but I have
noticed that our recent Tomcat 6 deployments did not produce the expected
(and volumeous) tomcat6.stdout log.

Looking at your files, I believe the trigger insert is failing and causing
the ODK Aggregate to fail.

The root cause is likely that the thanhnv user that is used by ODK
Aggregate does not have insert permissions on the polygon table owned
by postgres

··· On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn wrote:

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for
    development first).
  • PostgreSQL 9.2 for Windows.
  • ODK Aggregate 1.4.7
  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK
Aggregate interface then convert from .CSV to Shapefile using XLS
GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK Aggregate
tables into your PostGIS tables, so that users can use QGIS to connect
directly to PostGIS to read data, which saves at least two complicated
steps.

Anyway, my problem now is, every time I place the trigger into the ODK
Aggregate table (one for test first), both uploading data from client
(GeoODK) and also "Manually Upload Submission Data" in Web-based ODK
Aggregate, both ways producing error. Trigger SQL itself may not be any
problem since I can query it and produce a good result. If I remove the
trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table
structure.

Does anybody here have same problem and have a solution? Or is it a bug in
ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

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

Thank you very much Mitch,

I’ve found the problem before getting your message. The log can be found easily in (my case, Windows 10 64 bit) “C:\Program Files\PostgreSQL\9.2\data\pg_log”. Yes, it is the INSERT permission on the database.

Anyway, I am stuck at converting coordinates data (geo_shape) to geometry. I used ST_GeomFromText but not success at this moment. Do you all have any suggestion?

Regards,

··· From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com] On Behalf Of Mitch Sundt Sent: Saturday, November 7, 2015 1:36 AM To: ODK Community Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500) because of PostgreSQL trigger

Look in your Tomcat logs for more detailed error messages.

You might need to configure logging on Tomcat to get it to produce detailed logs. The ODK Aggregate code should log errors of this kind, but I have noticed that our recent Tomcat 6 deployments did not produce the expected (and volumeous) tomcat6.stdout log.

Looking at your files, I believe the trigger insert is failing and causing the ODK Aggregate to fail.

The root cause is likely that the thanhnv user that is used by ODK Aggregate does not have insert permissions on the polygon table owned by postgres

On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn <thanh.dbpfms@gmail.com mailto:thanh.dbpfms@gmail.com > wrote:

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for development first).

  • PostgreSQL 9.2 for Windows.

  • ODK Aggregate 1.4.7

  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK Aggregate interface then convert from .CSV to Shapefile using XLS GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK Aggregate tables into your PostGIS tables, so that users can use QGIS to connect directly to PostGIS to read data, which saves at least two complicated steps.

Anyway, my problem now is, every time I place the trigger into the ODK Aggregate table (one for test first), both uploading data from client (GeoODK) and also "Manually Upload Submission Data" in Web-based ODK Aggregate, both ways producing error. Trigger SQL itself may not be any problem since I can query it and produce a good result. If I remove the trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table structure.

Does anybody here have same problem and have a solution? Or is it a bug in ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--

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

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto:opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opendatakit+unsubscribe@googlegroups.com mailto:opendatakit+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

Sorry, no.

GIS systems are not my area of expertise.

··· On Sat, Nov 7, 2015 at 7:42 PM, Nguyễn Văn Thanh wrote:

Thank you very much Mitch,

I’ve found the problem before getting your message. The log can be found
easily in (my case, Windows 10 64 bit) “C:\Program
Files\PostgreSQL\9.2\data\pg_log”. Yes, it is the INSERT permission on the
database.

Anyway, I am stuck at converting coordinates data (geo_shape) to geometry.
I used ST_GeomFromText but not success at this moment. Do you all have any
suggestion?

Regards,

From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com]
*On Behalf Of *Mitch Sundt
Sent: Saturday, November 7, 2015 1:36 AM
To: ODK Community opendatakit@googlegroups.com
Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500)
because of PostgreSQL trigger

Look in your Tomcat logs for more detailed error messages.

You might need to configure logging on Tomcat to get it to produce
detailed logs. The ODK Aggregate code should log errors of this kind, but
I have noticed that our recent Tomcat 6 deployments did not produce the
expected (and volumeous) tomcat6.stdout log.

Looking at your files, I believe the trigger insert is failing and causing
the ODK Aggregate to fail.

The root cause is likely that the thanhnv user that is used by ODK
Aggregate does not have insert permissions on the polygon table owned
by postgres

On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn thanh.dbpfms@gmail.com wrote:

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for
    development first).

  • PostgreSQL 9.2 for Windows.

  • ODK Aggregate 1.4.7

  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK
Aggregate interface then convert from .CSV to Shapefile using XLS
GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK Aggregate
tables into your PostGIS tables, so that users can use QGIS to connect
directly to PostGIS to read data, which saves at least two complicated
steps.

Anyway, my problem now is, every time I place the trigger into the ODK
Aggregate table (one for test first), both uploading data from client
(GeoODK) and also "Manually Upload Submission Data" in Web-based ODK
Aggregate, both ways producing error. Trigger SQL itself may not be any
problem since I can query it and produce a good result. If I remove the
trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table
structure.

Does anybody here have same problem and have a solution? Or is it a bug in
ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--

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

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

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

Dear Mitch and All,

Finally, I got the SQL to query spatial data from PostgreSQL, using
ST_GeomFromText (text, integer). Now I can reduce 2 big steps for users to
use QGIS to readd data from ODK Collect.

However, my next concerns are how to produce image links as it is produced
in the exported CSV by ODK Aggregate (I prefer to use PostgreSQL
function(s) to create links). I have tried to have a look at ODK Aggregate
Database Structure
https://github.com/opendatakit/opendatakit/wiki/Aggregate-Database-Structure,
but actually, not much information.

Do you all can blow some guides?

Thank you very much in advance.

Thanh

Vào 02:13:05 UTC+7 Thứ Ba, ngày 10 tháng 11 năm 2015, Mitch Sundt đã viết:

··· > > Sorry, no. > > GIS systems are not my area of expertise. > > On Sat, Nov 7, 2015 at 7:42 PM, Nguyễn Văn Thanh <thanh....@gmail.com > wrote: > >> Thank you very much Mitch, >> >> >> >> I’ve found the problem before getting your message. The log can be found >> easily in (my case, Windows 10 64 bit) “C:\Program >> Files\PostgreSQL\9.2\data\pg_log”. Yes, it is the INSERT permission on the >> database. >> >> >> >> Anyway, I am stuck at converting coordinates data (geo_shape) to >> geometry. I used ST_GeomFromText but not success at this moment. Do you all >> have any suggestion? >> >> >> >> Regards, >> >> >> >> *From:* opend...@googlegroups.com [mailto: >> opend...@googlegroups.com ] *On Behalf Of *Mitch Sundt >> *Sent:* Saturday, November 7, 2015 1:36 AM >> *To:* ODK Community <opend...@googlegroups.com > >> *Subject:* Re: [ODK Community] ODK Aggregate Internal Server Error (500) >> because of PostgreSQL trigger >> >> >> >> Look in your Tomcat logs for more detailed error messages. >> >> >> >> You might need to configure logging on Tomcat to get it to produce >> detailed logs. The ODK Aggregate code should log errors of this kind, but >> I have noticed that our recent Tomcat 6 deployments did not produce the >> expected (and volumeous) tomcat6.stdout log. >> >> >> >> Looking at your files, I believe the trigger insert is failing and >> causing the ODK Aggregate to fail. >> >> >> >> The root cause is likely that the thanhnv user that is used by ODK >> Aggregate does not have insert permissions on the polygon table owned >> by postgres >> >> >> >> >> >> On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn <thanh....@gmail.com > wrote: >> >> Dear All, >> >> >> >> First, I do apologies if I am missing relevant posts. >> >> >> >> I am now deploying a system as below: >> >> >> >> 1. Server side: >> >> - Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for >> development first). >> >> - PostgreSQL 9.2 for Windows. >> >> - ODK Aggregate 1.4.7 >> >> >> >> 2. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1 >> >> >> >> This system operate smoothly if I satisfy with "Export to .CSV" on ODK >> Aggregate interface then convert from .CSV to Shapefile using XLS >> GeoConverter. >> >> >> >> However, it is quite complicated for user to operate many steps. >> >> >> >> My idea is to set up database triggers to copy data from the ODK >> Aggregate tables into your PostGIS tables, so that users can use QGIS to >> connect directly to PostGIS to read data, which saves at least two >> complicated steps. >> >> >> >> Anyway, my problem now is, every time I place the trigger into the ODK >> Aggregate table (one for test first), both uploading data from client >> (GeoODK) and also "Manually Upload Submission Data" in Web-based ODK >> Aggregate, both ways producing error. Trigger SQL itself may not be any >> problem since I can query it and produce a good result. If I remove the >> trigger from ODK Aggregate table, data uploading is no error. >> >> >> >> Attachments are some detailed information with screenshots and table >> structure. >> >> >> >> Does anybody here have same problem and have a solution? Or is it a bug >> in ODK Aggregate? >> >> >> >> Any help are warmly welcome. >> >> >> >> Thank you very much in advance. >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> >> -- >> >> Mitch Sundt >> Software Engineer >> University of Washington >> mitche...@gmail.com >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "ODK Community" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

Sounds like good progress!

What you see on the wiki is what exists as far as DB structure. Is
there a specific question we could help answer?

Yaw

··· -- Need ODK consultants? Nafundi provides form design, server setup, in-field training, and software development for ODK. Go to https://nafundi.com to get started.

On Sun, Nov 15, 2015 at 6:16 PM, Văn Thanh Nguyễn thanh.dbpfms@gmail.com wrote:

Dear Mitch and All,

Finally, I got the SQL to query spatial data from PostgreSQL, using
ST_GeomFromText (text, integer). Now I can reduce 2 big steps for users to
use QGIS to readd data from ODK Collect.

However, my next concerns are how to produce image links as it is produced
in the exported CSV by ODK Aggregate (I prefer to use PostgreSQL function(s)
to create links). I have tried to have a look at ODK Aggregate Database
Structure, but actually, not much information.

Do you all can blow some guides?

Thank you very much in advance.

Thanh

Vào 02:13:05 UTC+7 Thứ Ba, ngày 10 tháng 11 năm 2015, Mitch Sundt đã viết:

Sorry, no.

GIS systems are not my area of expertise.

On Sat, Nov 7, 2015 at 7:42 PM, Nguyễn Văn Thanh thanh....@gmail.com wrote:

Thank you very much Mitch,

I’ve found the problem before getting your message. The log can be found
easily in (my case, Windows 10 64 bit) “C:\Program
Files\PostgreSQL\9.2\data\pg_log”. Yes, it is the INSERT permission on the
database.

Anyway, I am stuck at converting coordinates data (geo_shape) to
geometry. I used ST_GeomFromText but not success at this moment. Do you all
have any suggestion?

Regards,

From: opend...@googlegroups.com [mailto:opend...@googlegroups.com] On
Behalf Of Mitch Sundt
Sent: Saturday, November 7, 2015 1:36 AM
To: ODK Community opend...@googlegroups.com
Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500)
because of PostgreSQL trigger

Look in your Tomcat logs for more detailed error messages.

You might need to configure logging on Tomcat to get it to produce
detailed logs. The ODK Aggregate code should log errors of this kind, but I
have noticed that our recent Tomcat 6 deployments did not produce the
expected (and volumeous) tomcat6.stdout log.

Looking at your files, I believe the trigger insert is failing and
causing the ODK Aggregate to fail.

The root cause is likely that the thanhnv user that is used by ODK
Aggregate does not have insert permissions on the polygon table owned by
postgres

On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn thanh....@gmail.com wrote:

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for
    development first).

  • PostgreSQL 9.2 for Windows.

  • ODK Aggregate 1.4.7

  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK
Aggregate interface then convert from .CSV to Shapefile using XLS
GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK
Aggregate tables into your PostGIS tables, so that users can use QGIS to
connect directly to PostGIS to read data, which saves at least two
complicated steps.

Anyway, my problem now is, every time I place the trigger into the ODK
Aggregate table (one for test first), both uploading data from client
(GeoODK) and also "Manually Upload Submission Data" in Web-based ODK
Aggregate, both ways producing error. Trigger SQL itself may not be any
problem since I can query it and produce a good result. If I remove the
trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table
structure.

Does anybody here have same problem and have a solution? Or is it a bug
in ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--

Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

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

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

It works, of course!

··· -----Original Message----- From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com] On Behalf Of stajcicdejanfon@gmail.com Sent: Wednesday, December 23, 2015 12:51 AM To: ODK Community Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500) because of PostgreSQL trigger

Dear Văn Thanh Nguyễn,

(Now I can reduce 2 big steps for users to use QGIS to readd data from ODK Collect.)

trigger and do not work?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The URL for the binary attachment is constructed from the XPath expression
for that file.

e.g., from the opendatakit demo site:

https://opendatakit.appspot.com/view/binaryData?blobKey=Birds[%40version%3Dnull+and+%40uiVersion%3Dnull]%2Fnm[%40key%3Duuid%3A49def8d0-1357-41b2-956c-a270e2d91f62]%2Frepeat_observation[%40ordinal%3D1]%2Fimage&previewImage=true

Everything after ? is an &-separated key-value list of arguments.

The previewImage=true argument produces a thumbnail.

The identifier for the image is the *blobKey=... *argument:

Birds%5B%40version%3Dnull+and+%40uiVersion%3Dnull%5D%2Fnm%5B%40key%3Duuid%3A49def8d0-1357-41b2-956c-a270e2d91f62%5D%2Frepeat_observation%5B%40ordinal%3D1%5D%2Fimage

This is a URL-escaped XPath:

Birds[@version=null and
@uiVersion=null]/nm[@key=uuid:49def8d0-1357-41b2-956c-a270e2d91f62]/repeat_observation[@ordinal=1]/image

The first portion of this is:

formid[@version=null and @uiVersion=null]/topElement[@key=idvalue]

topElement is the root element of the XForms instance.

After that, it is an XPath to the image file. If you have repeat groups,
the specific repeat group is identified with [@ordinal=nnn], where nnn is
1, 2, ....

··· On Sun, Nov 15, 2015 at 5:16 PM, Yaw Anokwa wrote:

Sounds like good progress!

What you see on the wiki is what exists as far as DB structure. Is
there a specific question we could help answer?

Yaw

Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.

On Sun, Nov 15, 2015 at 6:16 PM, Văn Thanh Nguyễn thanh.dbpfms@gmail.com wrote:

Dear Mitch and All,

Finally, I got the SQL to query spatial data from PostgreSQL, using
ST_GeomFromText (text, integer). Now I can reduce 2 big steps for users
to
use QGIS to readd data from ODK Collect.

However, my next concerns are how to produce image links as it is
produced
in the exported CSV by ODK Aggregate (I prefer to use PostgreSQL
function(s)
to create links). I have tried to have a look at ODK Aggregate Database
Structure, but actually, not much information.

Do you all can blow some guides?

Thank you very much in advance.

Thanh

Vào 02:13:05 UTC+7 Thứ Ba, ngày 10 tháng 11 năm 2015, Mitch Sundt đã
viết:

Sorry, no.

GIS systems are not my area of expertise.

On Sat, Nov 7, 2015 at 7:42 PM, Nguyễn Văn Thanh thanh....@gmail.com wrote:

Thank you very much Mitch,

I’ve found the problem before getting your message. The log can be
found

easily in (my case, Windows 10 64 bit) “C:\Program
Files\PostgreSQL\9.2\data\pg_log”. Yes, it is the INSERT permission on
the

database.

Anyway, I am stuck at converting coordinates data (geo_shape) to
geometry. I used ST_GeomFromText but not success at this moment. Do
you all

have any suggestion?

Regards,

From: opend...@googlegroups.com [mailto:opend...@googlegroups.com] On
Behalf Of Mitch Sundt
Sent: Saturday, November 7, 2015 1:36 AM
To: ODK Community opend...@googlegroups.com
Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500)
because of PostgreSQL trigger

Look in your Tomcat logs for more detailed error messages.

You might need to configure logging on Tomcat to get it to produce
detailed logs. The ODK Aggregate code should log errors of this kind,
but I

have noticed that our recent Tomcat 6 deployments did not produce the
expected (and volumeous) tomcat6.stdout log.

Looking at your files, I believe the trigger insert is failing and
causing the ODK Aggregate to fail.

The root cause is likely that the thanhnv user that is used by ODK
Aggregate does not have insert permissions on the polygon table owned
by

postgres

On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn <thanh....@gmail.com wrote:

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for
    development first).

  • PostgreSQL 9.2 for Windows.

  • ODK Aggregate 1.4.7

  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK
Aggregate interface then convert from .CSV to Shapefile using XLS
GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK
Aggregate tables into your PostGIS tables, so that users can use QGIS
to

connect directly to PostGIS to read data, which saves at least two
complicated steps.

Anyway, my problem now is, every time I place the trigger into the ODK
Aggregate table (one for test first), both uploading data from client
(GeoODK) and also "Manually Upload Submission Data" in Web-based ODK
Aggregate, both ways producing error. Trigger SQL itself may not be any
problem since I can query it and produce a good result. If I remove the
trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table
structure.

Does anybody here have same problem and have a solution? Or is it a bug
in ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups

"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an

email to opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups

"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an

email to opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

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

Dear Mitch,

First, I would to sincere thanks for your clues on this point.

I would also like to have some questions to you as below, please try to support at the most possibility.

  1.  I have tried to find the XML which uploaded from the ODK Collect to ODK Aggregate, unfortunately, I was not luck in this job. So, I thought that this type of XML file has not been sending to the Aggregate server. My questions on this point are: (a) if I am wrong, where is the XML file is stored in the ODK Aggregate? and (b) if I am right, how does the ODK Collect (with what widget?) to escape this XPath to the PostgreSQL database with ODK Aggregate?   
    
  2.  This point might be more time-consuming answer for you, but I still want to understand more clear. I have detailed look at the PostgreSQL database (all columns in all tables) but still not find some fields in the string:  formid[@version=null and @uiVersion=null]/topElement[@key=idvalue]
    
  •     @version
    
  •     @uiVersion
    
  •     topElement
    
  •     key=idvalue.
    

Could you please tell me where I can find it in the database?

Thank you so much in advance.

Thanh

··· From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com] On Behalf Of Mitch Sundt Sent: Tuesday, November 17, 2015 2:04 AM To: ODK Community Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500) because of PostgreSQL trigger

The URL for the binary attachment is constructed from the XPath expression for that file.

e.g., from the opendatakit demo site:

https://opendatakit.appspot.com/view/binaryData?blobKey=Birds[%40version%3Dnull+and+%40uiVersion%3Dnull]%2Fnm[%40key%3Duuid%3A49def8d0-1357-41b2-956c-a270e2d91f62]%2Frepeat_observation[%40ordinal%3D1]%2Fimage https://opendatakit.appspot.com/view/binaryData?blobKey=Birds[%40version%3Dnull+and+%40uiVersion%3Dnull]%2Fnm[%40key%3Duuid%3A49def8d0-1357-41b2-956c-a270e2d91f62]%2Frepeat_observation[%40ordinal%3D1]%2Fimage&previewImage=true &previewImage=true

Everything after ? is an &-separated key-value list of arguments.

The previewImage=true argument produces a thumbnail.

The identifier for the image is the blobKey=... argument:

Birds%5B%40version%3Dnull+and+%40uiVersion%3Dnull%5D%2Fnm%5B%40key%3Duuid%3A49def8d0-1357-41b2-956c-a270e2d91f62%5D%2Frepeat_observation%5B%40ordinal%3D1%5D%2Fimage

This is a URL-escaped XPath:

Birds[@version=null and @uiVersion=null]/nm[@key=uuid:49def8d0-1357-41b2-956c-a270e2d91f62]/repeat_observation[@ordinal=1]/image

The first portion of this is:

formid[@version=null and @uiVersion=null]/topElement[@key=idvalue]

topElement is the root element of the XForms instance.

After that, it is an XPath to the image file. If you have repeat groups, the specific repeat group is identified with [@ordinal=nnn], where nnn is 1, 2, ....

On Sun, Nov 15, 2015 at 5:16 PM, Yaw Anokwa yanokwa@nafundi.com wrote:

Sounds like good progress!

What you see on the wiki is what exists as far as DB structure. Is
there a specific question we could help answer?

Yaw

Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.

On Sun, Nov 15, 2015 at 6:16 PM, Văn Thanh Nguyễn <thanh.dbpfms@gmail.com mailto:thanh.dbpfms@gmail.com > wrote:

Dear Mitch and All,

Finally, I got the SQL to query spatial data from PostgreSQL, using
ST_GeomFromText (text, integer). Now I can reduce 2 big steps for users to
use QGIS to readd data from ODK Collect.

However, my next concerns are how to produce image links as it is produced
in the exported CSV by ODK Aggregate (I prefer to use PostgreSQL function(s)
to create links). I have tried to have a look at ODK Aggregate Database
Structure, but actually, not much information.

Do you all can blow some guides?

Thank you very much in advance.

Thanh

Vào 02:13:05 UTC+7 Thứ Ba, ngày 10 tháng 11 năm 2015, Mitch Sundt đã viết:

Sorry, no.

GIS systems are not my area of expertise.

On Sat, Nov 7, 2015 at 7:42 PM, Nguyễn Văn Thanh <thanh....@gmail.com mailto:thanh....@gmail.com > wrote:

Thank you very much Mitch,

I’ve found the problem before getting your message. The log can be found
easily in (my case, Windows 10 64 bit) “C:\Program
Files\PostgreSQL\9.2\data\pg_log”. Yes, it is the INSERT permission on the
database.

Anyway, I am stuck at converting coordinates data (geo_shape) to
geometry. I used ST_GeomFromText but not success at this moment. Do you all
have any suggestion?

Regards,

From: opend...@googlegroups.com mailto:opend...@googlegroups.com [mailto:opend...@googlegroups.com mailto:opend...@googlegroups.com ] On
Behalf Of Mitch Sundt
Sent: Saturday, November 7, 2015 1:36 AM
To: ODK Community <opend...@googlegroups.com mailto:opend...@googlegroups.com >
Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500)
because of PostgreSQL trigger

Look in your Tomcat logs for more detailed error messages.

You might need to configure logging on Tomcat to get it to produce
detailed logs. The ODK Aggregate code should log errors of this kind, but I
have noticed that our recent Tomcat 6 deployments did not produce the
expected (and volumeous) tomcat6.stdout log.

Looking at your files, I believe the trigger insert is failing and
causing the ODK Aggregate to fail.

The root cause is likely that the thanhnv user that is used by ODK
Aggregate does not have insert permissions on the polygon table owned by
postgres

On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn <thanh....@gmail.com mailto:thanh....@gmail.com > wrote:

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for
    development first).

  • PostgreSQL 9.2 for Windows.

  • ODK Aggregate 1.4.7

  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK
Aggregate interface then convert from .CSV to Shapefile using XLS
GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK
Aggregate tables into your PostGIS tables, so that users can use QGIS to
connect directly to PostGIS to read data, which saves at least two
complicated steps.

Anyway, my problem now is, every time I place the trigger into the ODK
Aggregate table (one for test first), both uploading data from client
(GeoODK) and also "Manually Upload Submission Data" in Web-based ODK
Aggregate, both ways producing error. Trigger SQL itself may not be any
problem since I can query it and produce a good result. If I remove the
trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table
structure.

Does anybody here have same problem and have a solution? Or is it a bug
in ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

--

Post: opend...@googlegroups.com mailto:opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com mailto:opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--

Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com mailto:mitche...@gmail.com

--

Post: opend...@googlegroups.com mailto:opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com mailto:opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit...@googlegroups.com mailto:opendatakit...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

--

Post: opend...@googlegroups.com mailto:opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com mailto:opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com mailto:mitche...@gmail.com

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com mailto:opendatakit%2Bunsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com mailto:opendatakit%2Bunsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

--

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

--

Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com mailto:opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the Google Groups "ODK Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opendatakit+unsubscribe@googlegroups.com mailto:opendatakit+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout.

(1) Data is sent to ODK Aggregate following the OpenRosa standards:
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaAPI

The XML submission files are the XML files under the subdirectories within
the /sdcard/odk/instances directory on the device. ODK Collect sends the
submission and associated image files using:
https://bitbucket.org/javarosa/javarosa/wiki/FormSubmissionAPI

(2) This is how you construct the URL that is sent to ODK Aggregate to
retrieve image files. ODK Aggregate examines the URL and accesses the
database to retrieve that image. Some of these fields correspond to
database columns in the top-level table of the form (_MODEL_VERSION,
_UI_VERSION, _URI). The topElement does not.

Images are stored in their own sets of tables. It is easiest to construct
the URL to them rather than attempt to access them directly through the
database.

The database structures are described here:

··· On Wed, Nov 18, 2015 at 7:42 AM, Nguyễn Văn Thanh wrote:

Dear Mitch,

First, I would to sincere thanks for your clues on this point.

I would also like to have some questions to you as below, please try to
support at the most possibility.

  1.  I have tried to find the XML which uploaded from the ODK Collect
    

to ODK Aggregate, unfortunately, I was not luck in this job. So, I thought
that this type of XML file has not been sending to the Aggregate server. My
questions on this point are: (a) if I am wrong, where is the XML file is
stored in the ODK Aggregate? and (b) if I am right, how does the ODK
Collect (with what widget?) to escape this XPath to the PostgreSQL database
with ODK Aggregate?

*2. *This point might be more time-consuming answer for you, but I
still want to understand more clear. I have detailed look at the PostgreSQL
database (all columns in all tables) but still not find some fields in the
string: formid[@version=null and
@uiVersion=null]/topElement[@key=idvalue]

  •     @version
    
  •     @uiVersion
    
  •     topElement
    
  •     key=idvalue.
    

Could you please tell me where I can find it in the database?

Thank you so much in advance.

Thanh

From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com]
*On Behalf Of *Mitch Sundt
Sent: Tuesday, November 17, 2015 2:04 AM
To: ODK Community opendatakit@googlegroups.com

Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500)
because of PostgreSQL trigger

The URL for the binary attachment is constructed from the XPath expression
for that file.

e.g., from the opendatakit demo site:

https://opendatakit.appspot.com/view/binaryData?blobKey=Birds[%40version%3Dnull+and+%40uiVersion%3Dnull]%2Fnm[%40key%3Duuid%3A49def8d0-1357-41b2-956c-a270e2d91f62]%2Frepeat_observation[%40ordinal%3D1]%2Fimage&previewImage=true

Everything after ? is an &-separated key-value list of arguments.

The previewImage=true argument produces a thumbnail.

The identifier for the image is the *blobKey=... *argument:

Birds%5B%40version%3Dnull+and+%40uiVersion%3Dnull%5D%2Fnm%5B%40key%3Duuid%3A49def8d0-1357-41b2-956c-a270e2d91f62%5D%2Frepeat_observation%5B%40ordinal%3D1%5D%2Fimage

This is a URL-escaped XPath:

Birds[@version=null and
@uiVersion=null]/nm[@key=uuid:49def8d0-1357-41b2-956c-a270e2d91f62]/repeat_observation[@ordinal=1]/image

The first portion of this is:

formid[@version=null and @uiVersion=null]/topElement[@key=idvalue]

topElement is the root element of the XForms instance.

After that, it is an XPath to the image file. If you have repeat groups,
the specific repeat group is identified with [@ordinal=nnn], where nnn is
1, 2, ....

On Sun, Nov 15, 2015 at 5:16 PM, Yaw Anokwa yanokwa@nafundi.com wrote:

Sounds like good progress!

What you see on the wiki is what exists as far as DB structure. Is
there a specific question we could help answer?

Yaw

Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.

On Sun, Nov 15, 2015 at 6:16 PM, Văn Thanh Nguyễn thanh.dbpfms@gmail.com wrote:

Dear Mitch and All,

Finally, I got the SQL to query spatial data from PostgreSQL, using
ST_GeomFromText (text, integer). Now I can reduce 2 big steps for users
to
use QGIS to readd data from ODK Collect.

However, my next concerns are how to produce image links as it is
produced
in the exported CSV by ODK Aggregate (I prefer to use PostgreSQL
function(s)
to create links). I have tried to have a look at ODK Aggregate Database
Structure, but actually, not much information.

Do you all can blow some guides?

Thank you very much in advance.

Thanh

Vào 02:13:05 UTC+7 Thứ Ba, ngày 10 tháng 11 năm 2015, Mitch Sundt đã
viết:

Sorry, no.

GIS systems are not my area of expertise.

On Sat, Nov 7, 2015 at 7:42 PM, Nguyễn Văn Thanh thanh....@gmail.com wrote:

Thank you very much Mitch,

I’ve found the problem before getting your message. The log can be
found

easily in (my case, Windows 10 64 bit) “C:\Program
Files\PostgreSQL\9.2\data\pg_log”. Yes, it is the INSERT permission on
the

database.

Anyway, I am stuck at converting coordinates data (geo_shape) to
geometry. I used ST_GeomFromText but not success at this moment. Do
you all

have any suggestion?

Regards,

From: opend...@googlegroups.com [mailto:opend...@googlegroups.com] On
Behalf Of Mitch Sundt
Sent: Saturday, November 7, 2015 1:36 AM
To: ODK Community opend...@googlegroups.com
Subject: Re: [ODK Community] ODK Aggregate Internal Server Error (500)
because of PostgreSQL trigger

Look in your Tomcat logs for more detailed error messages.

You might need to configure logging on Tomcat to get it to produce
detailed logs. The ODK Aggregate code should log errors of this kind,
but I

have noticed that our recent Tomcat 6 deployments did not produce the
expected (and volumeous) tomcat6.stdout log.

Looking at your files, I believe the trigger insert is failing and
causing the ODK Aggregate to fail.

The root cause is likely that the thanhnv user that is used by ODK
Aggregate does not have insert permissions on the polygon table owned
by

postgres

On Fri, Nov 6, 2015 at 12:02 AM, Văn Thanh Nguyễn <thanh....@gmail.com wrote:

Dear All,

First, I do apologies if I am missing relevant posts.

I am now deploying a system as below:

  1. Server side:
  • Apache Tomcat/6.0.44 on Windows 10 (64-bit) => This Laptop (for
    development first).

  • PostgreSQL 9.2 for Windows.

  • ODK Aggregate 1.4.7

  1. Client side: GeoODK 1.9 (GitHub) on Android 5.0.1

This system operate smoothly if I satisfy with "Export to .CSV" on ODK
Aggregate interface then convert from .CSV to Shapefile using XLS
GeoConverter.

However, it is quite complicated for user to operate many steps.

My idea is to set up database triggers to copy data from the ODK
Aggregate tables into your PostGIS tables, so that users can use QGIS
to

connect directly to PostGIS to read data, which saves at least two
complicated steps.

Anyway, my problem now is, every time I place the trigger into the ODK
Aggregate table (one for test first), both uploading data from client
(GeoODK) and also "Manually Upload Submission Data" in Web-based ODK
Aggregate, both ways producing error. Trigger SQL itself may not be any
problem since I can query it and produce a good result. If I remove the
trigger from ODK Aggregate table, data uploading is no error.

Attachments are some detailed information with screenshots and table
structure.

Does anybody here have same problem and have a solution? Or is it a bug
in ODK Aggregate?

Any help are warmly welcome.

Thank you very much in advance.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups

"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an

email to opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups

"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an

email to opendatakit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--

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

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/_dV2b7UetWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

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