Aggregate 2.01 on AWS

What is the problem? Please be detailed.
Aggregate installation on AWS loads simply as a blank screen.
I have been through the DOCs procedure 3 times, and done the install 3 times (even tried a new instance on AWS). Same result. Before trying for a fourth time, I checked the catalina.out log (thanks to a post on the forum for that one!) and found this:

WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.opendatakit.common.persistence.engine.mysql.DatastoreImpl] for bean with name 'datastore' defined in class path resource [odk-settings.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: org/opendatakit/common/persistence/engine/mysql/DatastoreImpl : Unsupported major.minor version 52.0 (unable to load class [org.opendatakit.common.persistence.engine.mysql.DatastoreImpl])
Mar 11, 2019 12:06:58 PM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.opendatakit.common.persistence.engine.mysql.DatastoreImpl] for bean with name 'datastore' defined in class path resource [odk-settings.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: org/opendatakit/common/persistence/engine/mysql/DatastoreImpl : Unsupported major.minor version 52.0 (unable to load class [org.opendatakit.common.persistence.engine.mysql.DatastoreImpl])

blah...blah...

Caused by: java.lang.UnsupportedClassVersionError: org/opendatakit/common/persistence/engine/mysql/DatastoreImpl : Unsupported major.minor version 52.0 (unable to load class [org.opendatakit.common.persistence.engine.mysql.DatastoreImpl])

I guess my question is, did I cause that with getting some setting wrong during the set up of Aggregate (on my PC) or is there a bug that this has picked up?

Just wondering if I caused the problem with 'datastore' - I've examined my ROOT.war archive, and I can't find the xml file called odk-settings.xml (only odk-settings.xml.example in ROOT.war\WEB-INF\classes) - so I can't check if the mistake is mine...

As it is quite a complex upload process to AWS I don't want to just keep floundering around with trial and error...

What ODK tool and version are you using? And on what device and operating system version?
Aggregate v2.0.1 on Windows 10; installing on AWS Amazon linux

Hoping someone can point me in the right direction...

Unsupported major.minor version usually means there is a mismatch between what the code is compiled for and what you have installed. Can you run java -version and report back with what you find?

Java version 1.7.0.121

Just to be sure I just did a sudo yum update and it came back with "no packages marked for update" message.

I'm running AWS instance (free version of course) created on Friday: Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type, 64 bit - everything as default.

Do I need to install Java 1.8? If so, I assume that would be with the following commands:

sudo yum install java-1.8.0

sudo alternatives --config java

(thanks to stackoverflow for that one!) But then there could be a later version out there!

I've been following the complex, but helpful guide: https://docs.opendatakit.org/aggregate-aws/

In another recent plea for help, which I managed to fumble my way past, I suggested an update about specifying which Tomcat version should be installed, so this could be something to add too, if it's likely to be a 'common' problem...

Thanks. Appreciate your help.

@seewhy It causes me physical pain to see you struggling like this with the install. Please give us a week to review the AWS docs and try to make this easier.

1 Like

Hi @yanokwa, Yeah, me too!!!! My forehead is distinctly flat. Sorry for not responding earlier - I've been doing fieldwork (which will be imported directly via briefcase in the absence of Aggregate!!).

I mean this to be constructive - the AWS docs give enough information to get me into trouble, but not enough to get me out of it. I have generally tried to avoid too much Command Line stuff, so I followed the instructions by rote, not really knowing what each command meant - I'm not entirely stupid, but this process really made me feel old and from the late palaeolithic. I have learned a few tricks in the process of doing this (with a lot of help from my favourite web-footed search engine), so my next attempt might be a bit smoother...

I went through a steep learning curve to set up Aggregate on Appspot, and then found I had to do it again with AWS - I understand the reasons for switching, but the use of Tomcat means I can't set up Aggregate on my existing hosting platform that I pay for.

I recognise that it's hard to write guidance for a moving target - changing versions of dependent packages, for example - but it would really help if you can ensure that instructions that are version specific are highlighted. I think that with AWS a problem is that one essentially starts from a blank sheet, but the table on which that sheet is laid may not have 4 legs (or legs that are the same length).

It is necessarily a linear description / process within the documentation, but the Aggregate for Windows installer 'contradicts' the online guidance (version of tomcat for example), so if you've already set up the instance, with an elastic IP and then find you've done it wrong (where the installer asks for a different version, for example), you have to go back... so you end up pushing forwards with multiple windows / connections (PuTTY, FileZilla, Aggregate Installer, File Explorer, Firefox) and it is easy to get confused.

Not sure if it's just me (probably) but I found real difficulty moving files from my hard drive to AWS using filezilla - not having sufficient privilege to copy to tomcat folders, for instance. I ended up coping everything to ec2-user home folder and then moving them using the sudo command (that was a lucky guess).

The thing that really stumped me was getting a blank screen when trying to access the Aggregate interface - for a while I thought my elastic IP DNS hadn't propagated from my domain, and it was only when I found a post that suggested looking at Catalina.out that I discovered Aggregate had fallen over and didn't want to get up. I don't know if there's a way to instantiate aggregate and then make sure it shows an error message that gives someone a clue where to go looking...

I still don't know if I caused part of the problem, or if I get the right versions of dependent packages, if it will 'just work'.

I appreciate the efforts everyone makes with ODK - it's an amazing ecosystem (people and code!)
Thanks
CY

1 Like