aws / aws/aws-lambda-java-libs

Joda-time as required dependency for REST API implementations with AWS Lambda

Đang mở
#72 3 bình luận 8 reaction 0 người được giao Xem trên GitHub
events-v4
Ngôn ngữ chính
Java
Star
548
Fork
241
Merge trung bình
2 ngày 5 phút
Pull request đã merge (30 ngày)
11

Mô tả

Tried excluding Joda-time from a function's implementation for AWS Lambda and got next error:
```
java.lang.ClassNotFoundException: org.joda.time.DateTime: lambdainternal.util.ReflectUtil$ReflectException
lambdainternal.util.ReflectUtil$ReflectException: java.lang.ClassNotFoundException: org.joda.time.DateTime
Caused by: java.lang.ClassNotFoundException: org.joda.time.DateTime
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
```
This required dependency adds extra 0.5 megabytes to the resulting "fat jar". Extra jar size requires reserving more memory for the function to prevent Metaspace issues. But Joda-time itself is not of much use while using Java 8 (and earlier Java versions are not supported in AWS Lambda anyway), so this limitation is unnecessary.

Maybe it's time to get rid of Joda-time? At least in some "next gen" version, for example?

P.S.: Maybe it's a duplicate of #35 , but I just wanted to bring extra reasons to your attention.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.