Re: SOLVED camel route fails to AWS s3 with newer versions of java

2018-06-20 Thread Palmer, Eric
I tried this in my pom.xml file:


org.apache.camel
camel-aws
2.15.2


joda-time
joda-time





joda-time
joda-time
2.8.2


That looked good in the maven explorer. 

I tried 2.8.2 and 2.10 joda-time and it still failed.  However I got it 
working.  I use Intellij as an IDE.  Our Camel middleware routing system is the 
only Java I maintain. (we love camel).  I needed to go to the project settings 
and delete Joda 2.5.1 from the artifact contents and put 2.8.2 into the 
artifact.  

I will probably upgrade to the latest camel version soon but I got this 
working. Happy Dance.

Thanks for your help.  It is much appreciated. 

Eric


--
Eric Palmer
Director of Web Services



On 6/19/18, 7:18 PM, "Willem Jiang"  wrote:

I just went through the issue[1] of aws java sdk.

Can you try to override the  joda-time to 2.8.1 ?

[1]https://github.com/aws/aws-sdk-java/issues/484


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jun 20, 2018 at 1:40 AM, Palmer, Eric  wrote:

> Hi,
>
> Using camel 2.21.1 with xml routes.
>
> I have a case where sending a file to aws s3 fails on newer versions of
> Java but succeeds on older versions.  I have googled this and all of the
> suggestions seem to center on having a later version of joda-time.  Since 
I
> have camel 2.21.1 the Joda-time version is  2.9.9 but the route still 
fails.
>
> I build with IntelliJ and have cleared the cache and have cleaned the
> local maven repo and reimported the modules and bebuilt the artifact.
>
> Fails on:
>
> 1.8.0_101-b13
> 1.8.0_171-b11
>
> Succeeds on:
>
> build 1.8.0_51-b31
>
> Stack Trace
>
> Exception in thread "main" org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> test_s3_date_issue at: >>> To[aws-s3://hermesassets.
> richmond.edu?amazonS3Client=#amazonS3Client] <<< in route:
> Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because
> of Failed to resolve endpoint: 
aws-s3://valids3bucketname?amazonS3Client=%23amazonS3Client
> due to: AWS authentication requires a valid Date or x-amz-date header
> (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request
> ID: 0366245E9DFB4A02)
> at org.apache.camel.util.ObjectHelper.
> wrapRuntimeCamelException(ObjectHelper.java:1619)
> at org.apache.camel.spring.SpringCamelContext.
> onApplicationEvent(SpringCamelContext.java:123)
> at org.apache.camel.spring.CamelContextFactoryBean.
> onApplicationEvent(CamelContextFactoryBean.java:332)
> at org.springframework.context.event.
> SimpleApplicationEventMulticaster.invokeListener(
> SimpleApplicationEventMulticaster.java:151)
> at org.springframework.context.event.
> SimpleApplicationEventMulticaster.multicastEvent(
> SimpleApplicationEventMulticaster.java:128)
> at org.springframework.context.support.
> AbstractApplicationContext.publishEvent(AbstractApplicationContext.
> java:331)
> at org.springframework.context.support.
> AbstractApplicationContext.finishRefresh(AbstractApplicationContext.
> java:773)
> at org.springframework.context.support.
> AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
> at org.springframework.context.support.
> FileSystemXmlApplicationContext.(FileSystemXmlApplicationContex
> t.java:140)
> at org.springframework.context.support.
> FileSystemXmlApplicationContext.(FileSystemXmlApplicationContex
> t.java:84)
> at edu.richmond.webservices.MyMain.main(MyMain.java:48)
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
> create route test_s3_date_issue at: >>> To[aws-s3://hermesassets.
> richmond.edu?amazonS3Client=#amazonS3Client] <<< in route:
> Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because
> of Failed to resolve endpoint: aws-s3:// valids3bucketname?
> amazonS3Client=%23amazonS3Client due to: AWS authentication requires a
> valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403;
> Error Code: AccessDenied; Request ID: 0366245E9DFB4A02)
> at org.apache.camel.model.RouteDefinition.addRoutes(
> RouteDefinition.java:1028)
> at org.apache.camel.model.RouteDefinition.addRoutes(
> RouteDefinition.java:185)
>
>
> Any help would be very much appreciated.
>
> --
> Eric Palmer
> University 

R: Re: camel route fails to AWS s3 with newer versions of java

2018-06-19 Thread Andrea Cosentino
On master we are at 2.10 of joda-time. If needed we can change the dependency 
on the others active branches

Inviato da Yahoo Mail su Android 
 
  Il mer, 20 giu, 2018 alle 1:18, Willem Jiang ha 
scritto:   I just went through the issue[1] of aws java sdk.

Can you try to override the  joda-time to 2.8.1 ?

[1]https://github.com/aws/aws-sdk-java/issues/484


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jun 20, 2018 at 1:40 AM, Palmer, Eric  wrote:

> Hi,
>
> Using camel 2.21.1 with xml routes.
>
> I have a case where sending a file to aws s3 fails on newer versions of
> Java but succeeds on older versions.  I have googled this and all of the
> suggestions seem to center on having a later version of joda-time.  Since I
> have camel 2.21.1 the Joda-time version is  2.9.9 but the route still fails.
>
> I build with IntelliJ and have cleared the cache and have cleaned the
> local maven repo and reimported the modules and bebuilt the artifact.
>
> Fails on:
>
> 1.8.0_101-b13
> 1.8.0_171-b11
>
> Succeeds on:
>
> build 1.8.0_51-b31
>
> Stack Trace
>
> Exception in thread "main" org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> test_s3_date_issue at: >>> To[aws-s3://hermesassets.
> richmond.edu?amazonS3Client=#amazonS3Client] <<< in route:
> Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because
> of Failed to resolve endpoint: 
> aws-s3://valids3bucketname?amazonS3Client=%23amazonS3Client
> due to: AWS authentication requires a valid Date or x-amz-date header
> (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request
> ID: 0366245E9DFB4A02)
>                at org.apache.camel.util.ObjectHelper.
> wrapRuntimeCamelException(ObjectHelper.java:1619)
>                at org.apache.camel.spring.SpringCamelContext.
> onApplicationEvent(SpringCamelContext.java:123)
>                at org.apache.camel.spring.CamelContextFactoryBean.
> onApplicationEvent(CamelContextFactoryBean.java:332)
>                at org.springframework.context.event.
> SimpleApplicationEventMulticaster.invokeListener(
> SimpleApplicationEventMulticaster.java:151)
>                at org.springframework.context.event.
> SimpleApplicationEventMulticaster.multicastEvent(
> SimpleApplicationEventMulticaster.java:128)
>                at org.springframework.context.support.
> AbstractApplicationContext.publishEvent(AbstractApplicationContext.
> java:331)
>                at org.springframework.context.support.
> AbstractApplicationContext.finishRefresh(AbstractApplicationContext.
> java:773)
>                at org.springframework.context.support.
> AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
>                at org.springframework.context.support.
> FileSystemXmlApplicationContext.(FileSystemXmlApplicationContex
> t.java:140)
>                at org.springframework.context.support.
> FileSystemXmlApplicationContext.(FileSystemXmlApplicationContex
> t.java:84)
>                at edu.richmond.webservices.MyMain.main(MyMain.java:48)
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
> create route test_s3_date_issue at: >>> To[aws-s3://hermesassets.
> richmond.edu?amazonS3Client=#amazonS3Client] <<< in route:
> Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because
> of Failed to resolve endpoint: aws-s3:// valids3bucketname?
> amazonS3Client=%23amazonS3Client due to: AWS authentication requires a
> valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403;
> Error Code: AccessDenied; Request ID: 0366245E9DFB4A02)
>                at org.apache.camel.model.RouteDefinition.addRoutes(
> RouteDefinition.java:1028)
>                at org.apache.camel.model.RouteDefinition.addRoutes(
> RouteDefinition.java:185)
>
>
> Any help would be very much appreciated.
>
> --
> Eric Palmer
> University of Richmond
>
>
>  


Re: camel route fails to AWS s3 with newer versions of java

2018-06-19 Thread Willem Jiang
I just went through the issue[1] of aws java sdk.

Can you try to override the  joda-time to 2.8.1 ?

[1]https://github.com/aws/aws-sdk-java/issues/484


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jun 20, 2018 at 1:40 AM, Palmer, Eric  wrote:

> Hi,
>
> Using camel 2.21.1 with xml routes.
>
> I have a case where sending a file to aws s3 fails on newer versions of
> Java but succeeds on older versions.  I have googled this and all of the
> suggestions seem to center on having a later version of joda-time.  Since I
> have camel 2.21.1 the Joda-time version is  2.9.9 but the route still fails.
>
> I build with IntelliJ and have cleared the cache and have cleaned the
> local maven repo and reimported the modules and bebuilt the artifact.
>
> Fails on:
>
> 1.8.0_101-b13
> 1.8.0_171-b11
>
> Succeeds on:
>
> build 1.8.0_51-b31
>
> Stack Trace
>
> Exception in thread "main" org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> test_s3_date_issue at: >>> To[aws-s3://hermesassets.
> richmond.edu?amazonS3Client=#amazonS3Client] <<< in route:
> Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because
> of Failed to resolve endpoint: 
> aws-s3://valids3bucketname?amazonS3Client=%23amazonS3Client
> due to: AWS authentication requires a valid Date or x-amz-date header
> (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request
> ID: 0366245E9DFB4A02)
> at org.apache.camel.util.ObjectHelper.
> wrapRuntimeCamelException(ObjectHelper.java:1619)
> at org.apache.camel.spring.SpringCamelContext.
> onApplicationEvent(SpringCamelContext.java:123)
> at org.apache.camel.spring.CamelContextFactoryBean.
> onApplicationEvent(CamelContextFactoryBean.java:332)
> at org.springframework.context.event.
> SimpleApplicationEventMulticaster.invokeListener(
> SimpleApplicationEventMulticaster.java:151)
> at org.springframework.context.event.
> SimpleApplicationEventMulticaster.multicastEvent(
> SimpleApplicationEventMulticaster.java:128)
> at org.springframework.context.support.
> AbstractApplicationContext.publishEvent(AbstractApplicationContext.
> java:331)
> at org.springframework.context.support.
> AbstractApplicationContext.finishRefresh(AbstractApplicationContext.
> java:773)
> at org.springframework.context.support.
> AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
> at org.springframework.context.support.
> FileSystemXmlApplicationContext.(FileSystemXmlApplicationContex
> t.java:140)
> at org.springframework.context.support.
> FileSystemXmlApplicationContext.(FileSystemXmlApplicationContex
> t.java:84)
> at edu.richmond.webservices.MyMain.main(MyMain.java:48)
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
> create route test_s3_date_issue at: >>> To[aws-s3://hermesassets.
> richmond.edu?amazonS3Client=#amazonS3Client] <<< in route:
> Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because
> of Failed to resolve endpoint: aws-s3:// valids3bucketname?
> amazonS3Client=%23amazonS3Client due to: AWS authentication requires a
> valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403;
> Error Code: AccessDenied; Request ID: 0366245E9DFB4A02)
> at org.apache.camel.model.RouteDefinition.addRoutes(
> RouteDefinition.java:1028)
> at org.apache.camel.model.RouteDefinition.addRoutes(
> RouteDefinition.java:185)
>
>
> Any help would be very much appreciated.
>
> --
> Eric Palmer
> University of Richmond
>
>
>


camel route fails to AWS s3 with newer versions of java

2018-06-19 Thread Palmer, Eric
Hi,

Using camel 2.21.1 with xml routes.

I have a case where sending a file to aws s3 fails on newer versions of Java 
but succeeds on older versions.  I have googled this and all of the suggestions 
seem to center on having a later version of joda-time.  Since I have camel 
2.21.1 the Joda-time version is  2.9.9 but the route still fails.

I build with IntelliJ and have cleared the cache and have cleaned the local 
maven repo and reimported the modules and bebuilt the artifact.

Fails on:

1.8.0_101-b13
1.8.0_171-b11

Succeeds on:

build 1.8.0_51-b31

Stack Trace

Exception in thread "main" org.apache.camel.RuntimeCamelException: 
org.apache.camel.FailedToCreateRouteException: Failed to create route 
test_s3_date_issue at: >>> 
To[aws-s3://hermesassets.richmond.edu?amazonS3Client=#amazonS3Client] <<< in 
route: Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because 
of Failed to resolve endpoint: 
aws-s3://valids3bucketname?amazonS3Client=%23amazonS3Client due to: AWS 
authentication requires a valid Date or x-amz-date header (Service: Amazon S3; 
Status Code: 403; Error Code: AccessDenied; Request ID: 0366245E9DFB4A02)
at 
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1619)
at 
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:123)
at 
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)
at 
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
at 
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
at 
org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:140)
at 
org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:84)
at edu.richmond.webservices.MyMain.main(MyMain.java:48)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create 
route test_s3_date_issue at: >>> 
To[aws-s3://hermesassets.richmond.edu?amazonS3Client=#amazonS3Client] <<< in 
route: Route(test_s3_date_issue)[[From[file:/WWW/users/epalmer/s3te... because 
of Failed to resolve endpoint: aws-s3:// 
valids3bucketname?amazonS3Client=%23amazonS3Client due to: AWS authentication 
requires a valid Date or x-amz-date header (Service: Amazon S3; Status Code: 
403; Error Code: AccessDenied; Request ID: 0366245E9DFB4A02)
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1028)
at 
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:185)


Any help would be very much appreciated.

--
Eric Palmer
University of Richmond