Error uploading ______.jar: Unable to complete transfer: javax/xml/bind/JAXBException #123
Comments
Thanks for reporting this issue. Java 11 is not supported by far. The desired Java version is Java 8. |
What is the plan for supporting Java 11? Some IDEs can not upload lambda functions due this issue. (JAXB classes were deprecated) |
Hi @william-ricaurte-skymate , Thanks for reaching out to us. We are more focused on JetBrains plugins at the moment. The support of Java 11 in Eclipse has a low priority. The AWS Toolkit for JetBrains has fully supported SAM local running/debugging of Java/Python. We recommend SAM users to switch to AWS Toolkit for JetBrains for better support. If you have reasons why not switching to IntelliJ, can you let us know? Thanks. |
@zhangzhx - Eclipse is a good IDE with a lot of useful built-in features and a lot of third-party plugins. For my use cases Eclipse is better featured, more configurable, faster and more comfortable as I've been working with it a long time now. It integrates better with my Linux-based operating system (open file dialog boxes see network shares, etc). I also believe their out-of-the-box keyboard shortcuts are superior and I can't get used to the JetBrains way of doing things. JetBrains is a commercial software with an expensive license - the non-crippled version is $500 for the first year. This is too expensive for a lot of developers and we already pay quite a bit to Amazon for AWS service. Java 8 is 4 versions behind the current GA version with Eclipse 2019-06 supporting Java 12. Amazon offer support for Java 11 across their entire range of products including the Corretto JDK distribution. The fix for this issue sounds to be pretty small - just add JAXB as a dependency to the plugin and be done with it. If Amazon decides not to support Eclipse, just say so and drop this project - stringing us along with "Yes, we support Eclipse - as long as you use this ancient version on this ancient installation" is not OK. Java 8 and Eclipse 4.4 were released in 2014. |
I have found a workaround for this issue:
The following worked for me:
|
it's not clear in the docs that only java 1.8 will work. ("To contribute to the AWS Toolkit for Eclipse, you need to have at least these requirements met."...) I tried to reinstall eclipse from scratch to see if I could get things to work with corretto 8 but it wouldn't let me, I had to select java-11 or greater during install. Then, after install, even when I set eclipse and the project to use corretto8 as the JRE, I hit the same error. Presumably because I wasn't able to select java-8 when I first installed eclipse. |
guss77's suggestion worked for me, but I was not happy launching eclipse from the command prompt, so I added the following entry to the eclipse.ini file then tested uploading to AWS lambda and it worked. I would add that I am still not happy Amazon has not updated the plugin to correct this issue without needing this workaround.
Note that the entry is before the -vm arg Finally note that the version of java that eclipse is running under is java 14 [eclipse jee 2020-09] |
I'm not sure where the first error is but in Eclipse I cannot upload a lambda function. Unclear if its a S3 issue or Lambda
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at com.amazonaws.util.Md5Utils.md5AsBase64(Md5Utils.java:104) at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1647) at com.amazonaws.eclipse.lambda.upload.wizard.util.UploadFunctionUtil.performFunctionUpload(UploadFunctionUtil.java:95) at com.amazonaws.eclipse.lambda.upload.wizard.UploadFunctionWizard.doFinish(UploadFunctionWizard.java:111) at com.amazonaws.eclipse.core.plugin.AbstractAwsJobWizard$1.run(AbstractAwsJobWizard.java:35) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException cannot be found by com.amazonaws.eclipse.javasdk_1.11.248 at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 6 more
session Data:
eclipse.buildId=4.9.0.I20180906-0745 java.version=11 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
The text was updated successfully, but these errors were encountered: