New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK not working on upcoming Java 1.8u60 #444

Closed
tkowalcz opened this Issue Jun 11, 2015 · 18 comments

Comments

Projects
None yet
@tkowalcz
Contributor

tkowalcz commented Jun 11, 2015

Joda Time has problems with formatting time zones starting with Java 1.8u60. AWS client requests will incorrectly format Date header causing server to reject the request. We tested this with S3 client but probably all services will be affected. I have described the issue in more detail here: JodaOrg/joda-time#288

@david-at-aws

This comment has been minimized.

Show comment
Hide comment
@david-at-aws

david-at-aws Jun 11, 2015

Contributor

Yikes, thanks for bringing this to our attention!

Contributor

david-at-aws commented Jun 11, 2015

Yikes, thanks for bringing this to our attention!

@tkowalcz

This comment has been minimized.

Show comment
Hide comment
@tkowalcz

tkowalcz Jun 15, 2015

Contributor

I have created pull request for this: JodaOrg/joda-time#291. @jodastephen have patched and released version 2.8.1.

Contributor

tkowalcz commented Jun 15, 2015

I have created pull request for this: JodaOrg/joda-time#291. @jodastephen have patched and released version 2.8.1.

manikandanrs added a commit that referenced this issue Jun 17, 2015

Merge pull request #446 from tkowalcz/master
Fix for SDK not working on upcoming Java 1.8u60 #444
@manikandanrs

This comment has been minimized.

Show comment
Hide comment
@manikandanrs

manikandanrs Jun 19, 2015

Contributor

This has been fixed. Thanks for the pull request
http://aws.amazon.com/releasenotes/8143039639694253

Contributor

manikandanrs commented Jun 19, 2015

This has been fixed. Thanks for the pull request
http://aws.amazon.com/releasenotes/8143039639694253

@tkowalcz

This comment has been minimized.

Show comment
Hide comment
@tkowalcz

tkowalcz Jun 20, 2015

Contributor

Hi, Is it possible at all to mention this issue in release notes? Right now there is no way someone notices the need to upgrade just from release notes.

Contributor

tkowalcz commented Jun 20, 2015

Hi, Is it possible at all to mention this issue in release notes? Right now there is no way someone notices the need to upgrade just from release notes.

lstephen added a commit to lstephen/docker-jenkins that referenced this issue Aug 22, 2015

@kaaloo

This comment has been minimized.

Show comment
Hide comment
@kaaloo

kaaloo Aug 25, 2015

I'm seeing this just now on aws-sdk-java 1.10.12 and oracle jdk 1.8u60 on ubuntu vivid:

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

kaaloo commented Aug 25, 2015

I'm seeing this just now on aws-sdk-java 1.10.12 and oracle jdk 1.8u60 on ubuntu vivid:

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
@dadoonet

This comment has been minimized.

Show comment
Hide comment
@dadoonet

dadoonet Aug 26, 2015

@kaaloo Same here. We have users reporting the same behavior here.

dadoonet commented Aug 26, 2015

@kaaloo Same here. We have users reporting the same behavior here.

@shorea

This comment has been minimized.

Show comment
Hide comment
@shorea

shorea Aug 26, 2015

Contributor

Can you confirm you are pulling in joda-time-2.8.1+ at runtime? See #484 for suggestions on how to identify which version of joda time you are using.

Contributor

shorea commented Aug 26, 2015

Can you confirm you are pulling in joda-time-2.8.1+ at runtime? See #484 for suggestions on how to identify which version of joda time you are using.

@kaaloo

This comment has been minimized.

Show comment
Hide comment
@kaaloo

kaaloo Aug 26, 2015

I clearly saw the joda-time 2.8.1 jar in my war file. I even tried with 2.8.2 with no effect. I will try again printing out new DateTime().getClass().getProtectionDomain().getCodeSource() and get back to you.

kaaloo commented Aug 26, 2015

I clearly saw the joda-time 2.8.1 jar in my war file. I even tried with 2.8.2 with no effect. I will try again printing out new DateTime().getClass().getProtectionDomain().getCodeSource() and get back to you.

@kaaloo

This comment has been minimized.

Show comment
Hide comment
@kaaloo

kaaloo Aug 26, 2015

Whoa, you're right! Something weird is going on with the dependencies in my project:

Joda Time Version: (file:/home/luis/.m2/repository/org/jruby/jruby-complete/1.7.11/jruby-complete-1.7.11.jar )

It's picking up an embedded version of joda-time and I have to see why jruby is being brought in in the first place. Thanks for your help @shorea !

kaaloo commented Aug 26, 2015

Whoa, you're right! Something weird is going on with the dependencies in my project:

Joda Time Version: (file:/home/luis/.m2/repository/org/jruby/jruby-complete/1.7.11/jruby-complete-1.7.11.jar )

It's picking up an embedded version of joda-time and I have to see why jruby is being brought in in the first place. Thanks for your help @shorea !

@shorea

This comment has been minimized.

Show comment
Hide comment
@shorea

shorea Aug 26, 2015

Contributor

Yeah no problem, glad I could help.

Contributor

shorea commented Aug 26, 2015

Yeah no problem, glad I could help.

@dadoonet

This comment has been minimized.

Show comment
Hide comment
@dadoonet

dadoonet Aug 26, 2015

w00t! I know what happened on my end. Indeed, I updated to latest AWS version my project but my project is still also using JODA 2.7! :( Will fix and report. Thanks!

dadoonet commented Aug 26, 2015

w00t! I know what happened on my end. Indeed, I updated to latest AWS version my project but my project is still also using JODA 2.7! :( Will fix and report. Thanks!

dadoonet added a commit to elastic/elasticsearch-cloud-aws that referenced this issue Aug 26, 2015

Force inclusion of Joda 2.8.2
Follow up for discussion #234

We need to pull in Joda 2.8.2 and don't rely of the version declared by elasticsearch which is currently 2.7.

It will fix issues seen with recent Java versions. See also aws/aws-sdk-java#444

Closes #239.
(cherry picked from commit 0db449a)

dadoonet added a commit to elastic/elasticsearch-cloud-aws that referenced this issue Aug 26, 2015

Force inclusion of Joda 2.8.2
Follow up for discussion #234

We need to pull in Joda 2.8.2 and don't rely of the version declared by elasticsearch which is currently 2.7.

It will fix issues seen with recent Java versions. See also aws/aws-sdk-java#444

Closes #239.
@dadoonet

This comment has been minimized.

Show comment
Hide comment
@dadoonet

dadoonet Aug 26, 2015

Confirmed. Works fine with JODA 2.8.2. Sorry for the noise.

dadoonet commented Aug 26, 2015

Confirmed. Works fine with JODA 2.8.2. Sorry for the noise.

@JoelJ

This comment has been minimized.

Show comment
Hide comment
@JoelJ

JoelJ Sep 2, 2015

The latest version still doesn't work for me. I have this in my pom.xml:

        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk</artifactId>
            <version>1.10.15</version>
        </dependency>

And I did a mvn dependency:tree and have the following:

[INFO]    \- com.amazonaws:aws-java-sdk-core:jar:1.10.15:compile
[INFO]       +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO]       +- org.apache.httpcomponents:httpclient:jar:4.3.6:compile
[INFO]       |  +- org.apache.httpcomponents:httpcore:jar:4.3.3:compile
[INFO]       |  \- commons-codec:commons-codec:jar:1.6:compile
[INFO]       \- joda-time:joda-time:jar:2.5:compile

I had to do the following to work around the issue:

        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk</artifactId>
            <version>1.10.15</version>
            <exclusions>
                <exclusion>
                    <groupId>joda-time</groupId>
                    <artifactId>joda-time</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.8.2</version>
        </dependency>

That changes the dependency:tree to look like this:

[INFO] |  \- com.amazonaws:aws-java-sdk-core:jar:1.10.15:compile
[INFO] |     +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |     \- org.apache.httpcomponents:httpclient:jar:4.3.6:compile
[INFO] |        +- org.apache.httpcomponents:httpcore:jar:4.3.3:compile
[INFO] |        \- commons-codec:commons-codec:jar:1.6:compile
[INFO] \- joda-time:joda-time:jar:2.8.2:compile

JoelJ commented Sep 2, 2015

The latest version still doesn't work for me. I have this in my pom.xml:

        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk</artifactId>
            <version>1.10.15</version>
        </dependency>

And I did a mvn dependency:tree and have the following:

[INFO]    \- com.amazonaws:aws-java-sdk-core:jar:1.10.15:compile
[INFO]       +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO]       +- org.apache.httpcomponents:httpclient:jar:4.3.6:compile
[INFO]       |  +- org.apache.httpcomponents:httpcore:jar:4.3.3:compile
[INFO]       |  \- commons-codec:commons-codec:jar:1.6:compile
[INFO]       \- joda-time:joda-time:jar:2.5:compile

I had to do the following to work around the issue:

        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk</artifactId>
            <version>1.10.15</version>
            <exclusions>
                <exclusion>
                    <groupId>joda-time</groupId>
                    <artifactId>joda-time</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.8.2</version>
        </dependency>

That changes the dependency:tree to look like this:

[INFO] |  \- com.amazonaws:aws-java-sdk-core:jar:1.10.15:compile
[INFO] |     +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |     \- org.apache.httpcomponents:httpclient:jar:4.3.6:compile
[INFO] |        +- org.apache.httpcomponents:httpcore:jar:4.3.3:compile
[INFO] |        \- commons-codec:commons-codec:jar:1.6:compile
[INFO] \- joda-time:joda-time:jar:2.8.2:compile
@shorea

This comment has been minimized.

Show comment
Hide comment
@shorea

shorea Sep 2, 2015

Contributor

Can you try printing out new DateTime().getClass().getProtectionDomain().getCodeSource() to show where joda time is being loaded from when you run your app?

Contributor

shorea commented Sep 2, 2015

Can you try printing out new DateTime().getClass().getProtectionDomain().getCodeSource() to show where joda time is being loaded from when you run your app?

@mortenbruhn

This comment has been minimized.

Show comment
Hide comment
@mortenbruhn

mortenbruhn Sep 23, 2015

Just a quick comment if others are suffering from this same issue on what solved it for me. I use

  • java version "1.8.0_60"
  • Apache Maven 3.3.3

Here are the steps that I ended up following:

  1. Update pom.xml to depend on version 2.8.2 of joda-time and 1.10.15 of aws-java-sdk as @JoelJ describes in his post above
  2. Use the method suggested by @shorea to see what version of joda-time is actually being linked:

System.out.println(new DateTime().getClass().getProtectionDomain().getCodeSource());

  1. Purge the old version of joda-time (2.3) that was apparently being linked

rm -rf ~/.m2/repository/joda-time/

  1. Build and run again
  2. Repeat step 2 to verify that the correct version of joda-time is now being linked.

That did the trick for me. Hope it will help others

mortenbruhn commented Sep 23, 2015

Just a quick comment if others are suffering from this same issue on what solved it for me. I use

  • java version "1.8.0_60"
  • Apache Maven 3.3.3

Here are the steps that I ended up following:

  1. Update pom.xml to depend on version 2.8.2 of joda-time and 1.10.15 of aws-java-sdk as @JoelJ describes in his post above
  2. Use the method suggested by @shorea to see what version of joda-time is actually being linked:

System.out.println(new DateTime().getClass().getProtectionDomain().getCodeSource());

  1. Purge the old version of joda-time (2.3) that was apparently being linked

rm -rf ~/.m2/repository/joda-time/

  1. Build and run again
  2. Repeat step 2 to verify that the correct version of joda-time is now being linked.

That did the trick for me. Hope it will help others

peterdietz added a commit to LongsightGroup/DSpace that referenced this issue Oct 14, 2015

yongjiaw added a commit to yongjiaw/spark that referenced this issue Oct 30, 2015

[SPARK-11413][Build] bum joda-time version.
It's a known issue that older versions of joda-time is incompatible with java 1.8u60 or above. This causes s3 request failure, and will affect Spark when using s3 as data source.
aws/aws-sdk-java#444

yongjiaw added a commit to yongjiaw/spark that referenced this issue Oct 30, 2015

[SPARK-11413][BUILD] Bump joda-time version to 2.9 for java 8 and s3
It's a known issue that joda-time before 2.8.1 is incompatible with java 1.8u60 or later, which causes s3 request to fail. This affects Spark when using s3 as data source.
aws/aws-sdk-java#444

ghost pushed a commit to dbtsai/spark that referenced this issue Nov 2, 2015

[SPARK-11413][BUILD] Bump joda-time version to 2.9 for java 8 and s3
It's a known issue that joda-time before 2.8.1 is incompatible with java 1.8u60 or later, which causes s3 request to fail. This affects Spark when using s3 as data source.
aws/aws-sdk-java#444

Author: Yongjia Wang <yongjiaw@gmail.com>

Closes apache#9379 from yongjiaw/SPARK-11413.
@chexov

This comment has been minimized.

Show comment
Hide comment
@chexov

chexov Nov 2, 2015

Here is my "quickfix fork" which works with JVM1.8
https://github.com/chexov/s3s3mirror/tree/jvm1.8

I did removed slf4j, joda, lambo because they.. well... no needed for such simple tools:)

chexov commented Nov 2, 2015

Here is my "quickfix fork" which works with JVM1.8
https://github.com/chexov/s3s3mirror/tree/jvm1.8

I did removed slf4j, joda, lambo because they.. well... no needed for such simple tools:)

vundela pushed a commit to vundela/spark that referenced this issue Nov 3, 2015

[SPARK-11413][BUILD] Bump joda-time version to 2.9 for java 8 and s3
It's a known issue that joda-time before 2.8.1 is incompatible with java 1.8u60 or later, which causes s3 request to fail. This affects Spark when using s3 as data source.
aws/aws-sdk-java#444

Author: Yongjia Wang <yongjiaw@gmail.com>

Closes apache#9379 from yongjiaw/SPARK-11413.

ajbozarth added a commit to ajbozarth/spark that referenced this issue Nov 12, 2015

[SPARK-11413][BUILD] Bump joda-time version to 2.9 for java 8 and s3
It's a known issue that joda-time before 2.8.1 is incompatible with java 1.8u60 or later, which causes s3 request to fail. This affects Spark when using s3 as data source.
aws/aws-sdk-java#444

Author: Yongjia Wang <yongjiaw@gmail.com>

Closes apache#9379 from yongjiaw/SPARK-11413.

@giurim giurim referenced this issue Nov 15, 2015

Closed

Update yoda-time #36

peterdietz added a commit to LongsightGroup/DSpace that referenced this issue Nov 20, 2015

kiszk added a commit to kiszk/spark-gpu that referenced this issue Dec 26, 2015

[SPARK-11413][BUILD] Bump joda-time version to 2.9 for java 8 and s3
It's a known issue that joda-time before 2.8.1 is incompatible with java 1.8u60 or later, which causes s3 request to fail. This affects Spark when using s3 as data source.
aws/aws-sdk-java#444

Author: Yongjia Wang <yongjiaw@gmail.com>

Closes #9379 from yongjiaw/SPARK-11413.

vpalaiya added a commit to electric-cloud/EC-S3 that referenced this issue Jun 27, 2016

updated aws-java-sdk to 1.10.1
updated aws-java-sdk from 1.9.30 to 1.10.1 to fix problem with java8u60
and above (aws/aws-sdk-java#444)
@sathishkumar55

This comment has been minimized.

Show comment
Hide comment
@sathishkumar55

sathishkumar55 Aug 4, 2016

Updated the Joda time library to 2.8.2 or 2.9.4 and it is working fine for 1.10.72.
But when i update the aws-sdk-core library to 1.11.23 version ,i am still facing thie issue

sathishkumar55 commented Aug 4, 2016

Updated the Joda time library to 2.8.2 or 2.9.4 and it is working fine for 1.10.72.
But when i update the aws-sdk-core library to 1.11.23 version ,i am still facing thie issue

@varunnvs92

This comment has been minimized.

Show comment
Hide comment
@varunnvs92

varunnvs92 Aug 4, 2016

Contributor

@sathishkumar55
Can you try printing the version of joda-time using this:
System.out.println(new DateTime().getClass().getProtectionDomain().getCodeSource());

Contributor

varunnvs92 commented Aug 4, 2016

@sathishkumar55
Can you try printing the version of joda-time using this:
System.out.println(new DateTime().getClass().getProtectionDomain().getCodeSource());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment