Hi Artem,
No, I don't use dropwizard-client (at least not explicitly - it is not 
listed in the POM) - but you have identified the issue. Upgrading to DW 
1.1.0 pulled in the 4.5.3 version of HttpClient causing the upload to 
Amazon S3 to fail. So I explicitly 'Declared HttpClient 4.5.2 as a direct 
dependency. This time, DW1.1.0 does not pull in 4.5.3, and all seems to 
work quite properly.

Thanks for the pointer.
Chris  

On Thursday, 30 March 2017 08:54:55 UTC+1, Artem Prigoda wrote:
>
> Hi Chris,
>
> Do you use the `dropwizard-client` module? We updated it in Dropwizard 
> 1.1.0 to Apache HttpClient 4.5.3 from 4.5.2 and I believe the Amazon SDK 
> depends on the 4.5.2 version: 
> http://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-core/1.11.109. 
> Maybe your Dropwizard application pulls 4.5.3 instead of 4.5.2, and for 
> some reason the Amazon SDK doesn't work with it? I had a quick look at the 
> release notes for 4.5.3 version: 
> http://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-4.5.x.txt, 
> but couldn't find any obvious clues leading to your issue.
>
> Artem
>
> On Wednesday, March 29, 2017 at 4:10:50 PM UTC+2, Chris Charlton wrote:
>>
>> Hi,
>> I've been using DW extensively, and now in a production setting since 
>> before v0.9, and have gradually been upgrading in line with releases 
>> (fabulous product by the way - thanks).
>>
>> I've had some working code that $HTTP POST's a JPEG as part of a 
>> multipart form (posted from an Angular 1.3 javascript form) that worked 
>> fine with DW 1.0.5. The server side code took the uploaded file and did a 
>> putObject into an Amazon S3 bucket (using the s3client). Upgrading to 
>> DW1.1.0, this POST threw an error, and the top part of the stacktrace runs:
>>
>> ERROR [2017-03-29 13:23:52,058] 
>> io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a 
>> request: 35e00e139e5982e4
>> ! java.lang.IllegalStateException: Socket not created by this factory
>> ! at org.apache.http.util.Asserts.check(Asserts.java:34)
>> ! at 
>> org.apache.http.conn.ssl.SSLSocketFactory.isSecure(SSLSocketFactory.java:435)
>> ! at 
>> org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:186)
>> ! at 
>> org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)
>> ! at 
>> org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
>> ! at 
>> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
>> ! at 
>> org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
>> ! at 
>> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
>> ! at 
>> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
>> ! at 
>> com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:822)
>> ! at 
>> com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:576)
>> ! at 
>> com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:362)
>> ! at 
>> com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:328)
>> ! at 
>> com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:307)
>> ! at 
>> com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3659)
>> ! at 
>> com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1422)
>> ! at com.novel.cm.resources.CMResource.uploadPhoto(CMResource.java:2328)
>>
>> The issue appears  to be with the connection related with the S3 bucket 
>> (is it now demanding a  connection over SSL?)
>>
>> Reverting to 1.0.5 made the problem go away. 
>>
>> Any thoughts? Has some validation become overly strict (the 
>> aAsserts.check?)
>>
>> Thanks
>> Chris
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to