3

Has anyone managed to get the AWS SDK samples for Simple Workflow and the Flow Framework to work properly? I've followed the Eclipse set-up instructions (http://docs.amazonwebservices.com/amazonswf/latest/awsflowguide/setup.html) to the letter, but no classes get generated. As a result my project won't build because there are missing *Client classes all over the place.

I've tried this with both the samples in the SDK and the ImageProcessing sample that is offered when one first logs into the SWF Admin Console. Colleagues similarly can't get it to work.

Steffen Opel
  • 63,899
  • 11
  • 192
  • 211
DeejUK
  • 12,891
  • 19
  • 89
  • 169

4 Answers4

4

I've encountered two (potentially unrelated) problems in this context:

1) You might have missed an important prerequisite still (it's easy to miss, I did as well ;) - see Setting up the Development Environment:

If you are using the Eclipse development environment, [...] install the AWS Toolkit for Eclipse using the update site http://aws.amazon.com/eclipse/. Be sure to install the Amazon Simple Workflow Service (SWF) Tools. Among other things, this plug-in processes the annotations and generates the client classes. [emphasis mine]

Once I fixed this oversight of mine, compile time weaving started generating classes on build as expected.

2) My initial answer addresses a subsequent problem of the AspectJ runtime missing due to an apparent conflict between AspectJ provided via the SpringSource Tool Suite (STS) and the AspectJ developer tools for Eclipse. I still haven't figured out whether this might have been a local problem of my STS installation only - please see my answer for details, in case this conflict applies to you as well.

Community
  • 1
  • 1
Steffen Opel
  • 63,899
  • 11
  • 192
  • 211
3

Update

Please see my second answer first, which addresses an easy to miss but important prerequisite step; the problem addressed in the initial answer below might be a configuration issues with my STS installation only in fact.


Are you by chance using SpringSource Tool Suite (STS)? This appears to be a conflict between the AspectJ support implicitly installed by STS (or Spring Roo for that matter) and the documented AspectJ developer tools for Eclipse to be installed via the built-in Eclipse Marketplace client for example.

I have an Eclipse Indigo installation with an after the fact STS install via the STS Eclipse update site (i.e. not the SpringSource download bundle), yet experienced the very same problem. Installing the AspectJ developer tools for Eclipse from the marketplace as well didn't change this, despite some back and forth configuration attempts (though no error has been logged), especially the missing AspectJ runtime jar is nowhere to be seen (org.aspectj.runtime.source_1.6.12.20110613132200.jar in my case).

However, using the identical Eclipse package and installing only the AspectJ developer tools for Eclipse yields the AspectJ runtime to be installed indeed, and the sample working just fine in turn.

Good luck!

Community
  • 1
  • 1
Steffen Opel
  • 63,899
  • 11
  • 192
  • 211
  • I installed Eclipse Indigo (3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK) and the AJDT plugin (2.1.3.e37x-20110628-1900), followed the load-time weaving instructions as per the AWS documents, and still no luck. – DeejUK Feb 23 '12 at 16:16
  • I'm not that familiar with using AspectJ like this - at what point should I expect these classes to magically appear if it's all working? – DeejUK Feb 23 '12 at 16:17
  • @Deejay: I've used the compile time weaving only for the time being, which generates the classes on build as expected - maybe you have missed a step still? E.g. installing the _AWS Toolkit for Eclipse_ **doesn't** automatically install the _Amazon Simple Workflow Service (SWF) Tools_ as well (which process annotations and generate client classes) - I had missed that one initially indeed ;) – Steffen Opel Feb 23 '12 at 19:32
  • @Stefan: That was the solution! If you want to add it as an answer, I'll accept it accordingly. – DeejUK Feb 24 '12 at 08:20
  • @Deejay: Glad this worked out :) I've provided a second answer primarily addressing this prerequisite step and will update/merge both once there might be more inside in the STS conflict I encountered (have you actually got this to work with STS now?) - thanks! – Steffen Opel Feb 24 '12 at 09:11
1

I got the java samples to compile in the command-line on OSX by doing the following:

  1. Set an environment variable in my .profile: export AWS_SWF_SAMPLES_CONFIG=$HOME/aws-java-sdk/1.4.7/samples/AwsFlowFramework
  2. Download junit-4.11, apache-log4j-1.2.17, and spring-framework-3.2.3 from their respective publishers
  3. Copy the downloaded files to $HOME/aws-java-sdk/1.4.7/third-party
  4. Build by running "ant compile" in $HOME/aws-java-sdk/1.4.7/samples/AwsFlowFramework
Lophat
  • 11
  • 2
1

It's interesting to note that the directions for using load time weaving found in the Setting up the Development Environment documentation work as is using Eclipse 3.6 (Helios) , but do not work outright using Eclipse 3.7 (Indigo). When looking at the Eclipse log file for difference between the two versions, it seems that the log4j and freemarker dependencies are missing when running with Indigo, but a likely present with Helios. It's also worth noting that you can also get compile time weaving working just fine using IntelliJ IDEA (I'm using Community Edition, but it should work just fine with a licensed version).

csdroid
  • 766
  • 5
  • 3