What is the best dev setup for database development on ODK-aggregate?

Hello ODK community,

I am interested in setting up Aggregate sources for the express purpose of
working with the data base drivers to add sqlserver capabilities and
potentially adding an extra web interface for better data management. I
have been trying to setup a development environment with Aggregate for
about a week and a half and have been have an awful lot of trouble doing
so--perhaps because my scatter shot approach is ineffective.

I followed the directions in CONFIGURE.txt line by line (multiple times)
and succeeded in getting aggregate up and running as a strict gas project.
However there were some big memory problems and the GAE web app usually
crashed within several page loads. Regardless, I don't much care about
getting it to work as a strict GAE project because I need it to work in
tomcat with a real relational database (initially mysql because it is
already setup to be able to work with it, then sqlserver).

I saw the notes in the forum on using the odk-mysql-settings project to
combine with the odk-gae-settings so that I could at least run mysql with
the eclipse-aggregate-gae project. I successfully manage to compile a
odk-gae-settings-latest.jar with the mysql datasource and parameters. When
I run the eclipse-gae-aggregate application I get a series of
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. Which would seem a
simple error to fix but all the normal places have the sql drive setup--ie
class path and lib dirs. (note that I have other tomcat apps that are
connecting to mysql just fine with the com.mysql.jdbc.Driver). Clearly
there is some other facet of the GAE that needs to know where the driver
is. I am at a loss with how to fix this.

(Why does odk-gae-settings have a build.xml but odk-mysql-settings does
not?)

In the end I would prefer not to have to deal with the GAE and have it
running directly on tomcat--I realized the same post describing how to get
the GAE project to work with mysql also stated that getting aggregate to
work directly on tomcat in the ev environment had never been done before.
working . I tried running aggregate-mysql project directly with tomcat
(inside eclipse environ). I managed to get eclipse to install the
aggregate-mysql into its tomcat directory such that the start up had no
error. I can get JSP pages that I place into the web app to show but I
cannot get any of the aggregate servlets to show up (all 404s) so there is
some problem in the tomcat setup or in the spring modules (which I don't
fully understand). What is the purpose of the aggregate-mysql project
versus the eclipse-gae-aggregate project? and has anyone been able to get
development instance up that sit directly on tomcat?

Which one of the prior scenarios that I've tried is best for my goals of
developing on odk-aggregate working on db capabilities?

A note about my software context:

  • Mac 0s 10.7.5
  • eclipse 4.3.1
  • Tomcat 7.0.42
  • JDK 1.7
  • Maven 3.0.3

Thank you very much for any help or advice that can be offered.

Best,
Dan Lasaga

As it happens, I just had to set up a Tomcat instance for debugging issues
with GAE and the Resteasy libraries...

The good news is that this is now much easier than 3 years ago.

  • I have committed and pushed a stub Tomcat project *to the 'uiexperiment'
    branch.

I've also updated and reorganized the CONFIGURE.txt to be, hopefully, a
little less scatter-brained. It also has some updates on VM size settings
and descriptions of how to set the debug web app vm size.

This check-in adds an 'eclipse-aggregate-mysql' project;
*it is not a complete, ready-to-import project!*Be sure to read the
SETUP.txt in that directory.

The recommended steps are:

Pull and update to uiexperiment tip ( "Caution - broken Javarosa jar -
prelim update to candidate javarosa library" )
( I gave it a scary name because it is an interim check-in for you with a
bad JR jar (should work fine for defining forms, but not editing them) )

Start Eclipse, DO NOT import the eclipse-aggregate-mysql project.

Get the eclipse-aggregate-gae project to build.

Do a GWT Toolkit to compile (via the Google web-app drop-down in Eclipse).

Stop Eclipse

Copy the eclipse-aggregate-gae/war directory tree over to the
eclipse-aggregate-mysql directory.

Follow the SETUP.txt instructions to get a reasonable app settings
configuration jar

Start Eclipse

Import existing project into workspace, select the eclipse-aggregate-mysql
and import it.

It should build OK. You might need to add/remove the settings jar from
your libraries list. Be sure it is exported.

Set up your Tomcat 6.0 server runtime

And hopefully you will be ready to go.

If you do a GWT Toolkit compile within Eclipse, you don't need to run with
gwt debugging on Chrome (no need for the ?gwt.server=... on your URL). This
will further reduce your VM size requirements.

ยทยทยท ---------- Mitch

On Mon, Mar 10, 2014 at 1:09 PM, Dan Lasaga dalasaga14@gmail.com wrote:

Hello ODK community,

I am interested in setting up Aggregate sources for the express purpose of
working with the data base drivers to add sqlserver capabilities and
potentially adding an extra web interface for better data management. I
have been trying to setup a development environment with Aggregate for
about a week and a half and have been have an awful lot of trouble doing
so--perhaps because my scatter shot approach is ineffective.

I followed the directions in CONFIGURE.txt line by line (multiple times)
and succeeded in getting aggregate up and running as a strict gas project.
However there were some big memory problems and the GAE web app usually
crashed within several page loads. Regardless, I don't much care about
getting it to work as a strict GAE project because I need it to work in
tomcat with a real relational database (initially mysql because it is
already setup to be able to work with it, then sqlserver).

I saw the notes in the forum on using the odk-mysql-settings project to
combine with the odk-gae-settings so that I could at least run mysql with
the eclipse-aggregate-gae project. I successfully manage to compile a
odk-gae-settings-latest.jar with the mysql datasource and parameters. When
I run the eclipse-gae-aggregate application I get a series of
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. Which would seem a
simple error to fix but all the normal places have the sql drive setup--ie
class path and lib dirs. (note that I have other tomcat apps that are
connecting to mysql just fine with the com.mysql.jdbc.Driver). Clearly
there is some other facet of the GAE that needs to know where the driver
is. I am at a loss with how to fix this.

(Why does odk-gae-settings have a build.xml but odk-mysql-settings does
not?)

In the end I would prefer not to have to deal with the GAE and have it
running directly on tomcat--I realized the same post describing how to get
the GAE project to work with mysql also stated that getting aggregate to
work directly on tomcat in the ev environment had never been done before.
working . I tried running aggregate-mysql project directly with tomcat
(inside eclipse environ). I managed to get eclipse to install the
aggregate-mysql into its tomcat directory such that the start up had no
error. I can get JSP pages that I place into the web app to show but I
cannot get any of the aggregate servlets to show up (all 404s) so there is
some problem in the tomcat setup or in the spring modules (which I don't
fully understand). What is the purpose of the aggregate-mysql project
versus the eclipse-gae-aggregate project? and has anyone been able to get
development instance up that sit directly on tomcat?

Which one of the prior scenarios that I've tried is best for my goals of
developing on odk-aggregate working on db capabilities?

A note about my software context:

  • Mac 0s 10.7.5
  • eclipse 4.3.1
  • Tomcat 7.0.42
  • JDK 1.7
  • Maven 3.0.3

Thank you very much for any help or advice that can be offered.

Best,
Dan Lasaga

--
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/d/optout.

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