aws-toolkit-vscode: Help! Transformation failed: The requested module could not be built in Java 8 sandbox.

System details (run the AWS: About Toolkit command)

  • OS: Linux x64 5.15.0-52-generic
  • Visual Studio Code version: 1.86.0
  • AWS Toolkit version: 2.8.0

Question

Hi everyone, good afternoon.

I’m trying to use the toolkit in order to help us migrate a legacy project from Java 8. I’m aware that Amazon Q is under preview mode, so I don’t expect a full transformation to be executed properly. But it would be good to see what we can get.

However, even that I had double-checked my build locally as we can see on the screenshot (‘BUILD SUCCESS’), it says that the transformation failed. I also increased the log-level to DEBUG for the toolkit to see if I was able to get more detailed messages, but that didn’t help that much.

image

Am I missing something? Is there a way that I can have more details regarding that message? If so, it would be good, so I can play around here and try again.

Thank you, Regards.

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Comments: 22 (13 by maintainers)

Most upvoted comments

Thank you for doing that. I will look into this issue further. Seems like using version 2.10 is important here.

Thanks for your feedback. We don’t currently show you as the user the specific error message of why the sandbox build failed, but this is something that I will discuss with my team, and can get back to you on this thread with an update.

And looks like your job was partially successful. If you don’t mind when you’re done analyzing results revert the changes to the pom.xml file and re-run the transformation – I’m thinking even with the original pom.xml it should work now that you’re using v2.12.0

Ok nice so looks like it does auto-update. Good to know.

thank you @dhasani23 for the update! I’ll definitely update the extension on my end too. I can’t wait to see what else is coming!

We are also working on showing users the ZIP that gets created of your code + dependencies so that you can verify that all dependencies were included. In the meantime, you can try to run the job again, and you can also run at the root of your project (which should contain a pom.xml): mvn clean install and mvn dependency:copy-dependencies -DoutputDirectory=<some directory> -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true -Dmdep.addParentPoms=true – then you can go to <some directory> and confirm that all of the dependencies in your project (from all pom.xml files present) were copied over by this command that we run. I say this because it looks like although this command seems to have succeeded for you last time you tried to transform, the backend build appears to be failing due a missing dependency.

Hi thank you and I haven’t forgotten about this! To start, please update your VS Code AWS Toolkit as a new version was released just yesterday. As a part of the transformation, we run 2 Maven commands before uploading your code: mvn clean install and mvn dependency:copy-dependencies (with some arguments) – if either of these commands fail you will now see a text file with the error logs automatically open.

For you, it seems that both of these commands were always succeeding (since you never saw an error message related to Maven pop up), so I don’t think this was the issue, but just wanted to mention it.

The work to show you as a user the exact error message from our backend as to why your code did not successfully build in the Java 8 sandbox is still in-progress – I will update you here when that completes.