aws-toolkit-eclipse icon indicating copy to clipboard operation
aws-toolkit-eclipse copied to clipboard

java 11: "Unable to export project"

Open srjogdande93 opened this issue 5 years ago • 12 comments

While uploading the lambda function to AWS showing

Failed to upload project to Lambada Unable to export project [project-name] to jar file

Java version :
java 11.0.4 2019-07-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

image

srjogdande93 avatar Jan 22 '20 12:01 srjogdande93

Are you able to export the project to a jar? That's an Eclipse feature, so if it's failing then that would prevent Lambda upload .

justinmk3 avatar Jan 22 '20 19:01 justinmk3

Are you able to export the project to a jar? That's an Eclipse feature, so if it's failing then that would prevent Lambda upload.

I have the same issue, AWS Toolkit allows to upload lambda project only built with Java 8. If change the project build path to Jdk 11 or 12 it fails with error 'Unable to export project ... to jar file'. Export to jar with menu works successfully.

jsoftpro avatar Jan 22 '20 21:01 jsoftpro

We currently only support java 8

hunterwerlla avatar Jan 23 '20 22:01 hunterwerlla

Okay, Thanks

srjogdande93 avatar Jan 26 '20 16:01 srjogdande93

I am interested to participate to fix this issue, however I am not fully able to build/run the project due to #174

Appreciate hinting about:

  • What is the Eclipse version currently used by the team?
  • Are there any technical restrictions that prevent supporting Java 11?

asashour avatar May 23 '20 07:05 asashour

I am interested to participate to fix this issue, however I am not fully able to build/run the project due to #174

Appreciate hinting about:

* What is the Eclipse version currently used by the team?

* Are there any technical restrictions that prevent supporting Java 11?
  • Photon is used for testing because it's our minimum version
  • We have not investigated this

Have you tried the updated build instructions? The old ones were missing several things. Additionally, if you are trying to build and run from the IDE, you might have to unload simpledb/rds depending on the plugins installed (they will still build from the command line)

hunterwerlla avatar May 26 '20 15:05 hunterwerlla

I am confused by the fact that this item is still open. I get that Amazon claims this is an Eclipse limitation but they built the toolkit and the upload works fine using Corretto 8. They offer Corretto 11 as LTS so if it is a JDK limitation then it should be one that is easily overcome even if they need to add new code to the toolkit to do so. I understand that 11 removed the JRE but the ability to compile the toolkit into a jar means that the toolkit jar itself could contain the necessary runtime to push the project to AWS. Very disappointed with the lack of tool support here.

gjblajian avatar Sep 30 '20 21:09 gjblajian

This should be called out in the docs. Wasted time trying to get a simple Hello World running, I'm sure I'm not the only one.

renschler avatar Oct 07 '20 23:10 renschler

We currently only support java 8

Java 9 was released in 2017. Eclipse has not supported Java 8 for the last 2 versions, so users are stuck. AWS Lambda has supported JDK Coretto 11 for at least a year.

It's really not that complicated, just include the necessary modules. I seriously don't understand what the holdup is on this issue.

kenyons avatar Jan 13 '21 01:01 kenyons

I opened pull request #227 to upgrade the underlying AWS Java SDK, it is a fairly straightforward fix. Apart from Maven the code for the plugin itself required only one line change.

eschulma avatar Feb 17 '21 03:02 eschulma

I'm still experiencing this issue. Has anyone seen that it was fixed?

MLaunch avatar May 28 '21 05:05 MLaunch

any updates on this, I am running into the same problem

hashitha avatar Dec 31 '21 10:12 hashitha