Apache Camel's aws-s3 component does not recognize parameter delimiter - apache-camel

I try to apply prefix and delimiter for my aws-s3 consumer endpoint. For some reason delimiter parameter is not recognized:
org.apache.camel.ResolveEndpointFailedException: Failed to resolve
endpoint:
aws-s3://somebucketname?accessKey=RAW(xxxxxx)&delimiter=%2F&prefix=somePrefix&secretKey=RAW(xxxxx)
due to: There are 1 parameters that couldn't be set on the endpoint.
Check the uri if the parameters are spelt correctly and that they are
properties of the endpoint. Unknown parameters=[{delimiter=/}]
I thought that maybe adjusting &delimiter=RAW(/) would help, but I have the same result:
Unknown parameters=[{delimiter=/}]

Parameter delimiter is available since Apache Camel 3.0. The website documentation is by default switched to latest version. You can switch to older versions with selectbox in top right corner. For 2.x is aws-s3 documentation here https://camel.apache.org/components/2.x/aws-s3-component.html

Related

navigator.share() is not a function

I'm trying to use navigator.canShare() and navigator.share() to experiment with websharing in a react app.
When I call navigator.canShare() in react, I get the following run time error:
TypeError: navigator.share is not a function
How can I get react to recognize navigator.canShare()?
As mentioned in MDN docs, you can only use navigator.share() over HTTPS
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
MDN also says:
"Locally-delivered resources such as those with http://127.0.0.1 URLs, http://localhost and http://.localhost URLs (e.g. http://dev.whatever.localhost/), and file:// URLs are also considered to have been delivered securely.
Note: Firefox 84 and later support http://localhost and http://.localhost URLs as trustworthy origins (earlier versions did not, because localhost was not guaranteed to map to a local/loopback address)."
Not sure if this means HTTPS is not required locally or not, but I'm getting the same error, even with the Permissions-Policy header.

Exception in FluentProducerTemplate in Apache Camel after upgrade to 3.7.2

I've the following dependency to 3.7.2:
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-dependencies</artifactId>
<version>3.7.2</version>
I've this in the code:
fluentProducerTemplate.to("direct:myenpoint");
fluentProducerTemplate.send();
This code was working until the upgrade, but now it throws:
java.lang.IllegalArgumentException: No endpoint configured on FluentProducerTemplate. You can configure an endpoint with to(uri)`
Now I'm not able to figure why it's complaining about configuring endpoint as endpoint is clearly set in to(endpoint) call. I couldn't find anything in their documentation.
It's a fluent builder, so you should use it in a style like this:
template.to("xxx").send()
I found that endpoint has to be set at fluentProducerTemplate.setDefaultEndpoint(startingEndpoint);
The error message was misleading. And, I am not sure why to (endpoint) is still there.

Google App Engine Error: (gcloud.app.deploy) INVALID_ARGUMENT: Combined version and service (module) name is too long

I am working on one application whose UI part is written in React and redux, middle layer using golang and it is using Google Cloud Datastore as NoSQL service. I have to deploy this service using drone.io. When I try to deploy my service, I get below error:
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Combined version and service (module) name is too long. The combined length must be less than 48 characters.
My front end service name is too short(adlib-rules-mgr). Other details are as below-
descriptor: [/drone/src/github.com/nytm/adtech-adlib-web/app.yaml]
source: [/drone/src/github.com/nytm/adtech-adlib-web]
target project: [nyt-adtech-dev]
target service: [adlib-rules-mgr]
target version: [5e4890f35a4f21a08853298d362f7f68b26a945e]
target url: [https://adlib-rules-mgr-dot-nyt-adtech-dev.appspot.com]
Please help me to understand what I am doing wrong and how this issue can be fixed?
The error message indicates that the Combined version and service name should be 48 characters maximum. Yours, "adlib-rules-mgr" and "5e4890f35a4f21a08853298d362f7f68b26a945e" add up to 55 characters and thus is rejected.
It seems your drone.io setting uses the Github commit number as version name for your App Engine app. I'm not familiar with drone.io myself but you should set a shorter name for your version.

How to prevent java mail "expected resource not found" warnings from Camel "smtp" component?

I'm using the Camel SMTP component to send email messages from a Camel route, and it works fine, but I get two warning messages every time I send a mail.
expected resource not found: /META-INF/javamail.default.providers
expected resource not found: /META-INF/javamail.default.address.map
Is there a way of stopping this? I've tried putting blank resource files in the META-INF folder of the route's jar file, but that doesn't appear to have any effect. Apparently JavaMail tries to find these files in various places on the classpath, and default files should be in the JavaMail jar file, but for some reason, this isn't being picked up in the OSGi environment from which I'm running these routes.
The OSGi (Karaf) console lists bundles
JavaMail API v1.6.1
camel-mail 2.21.2
Can anyone tell me what I am missing here?
Thanks!
I tried a few solutions given at https://javaee.github.io/javamail/docs/api/index.html?javax/mail/Session.html. I use eclipse photon 4.8.0. The only thing what worked is to place an empty file named javamail.default.address.map into the folder src/main/java/META-INF. Alternative you can place it into the folder src/main/resources/META-INF, when you change the exclusion-pattern in eclipse-project to (none). Now everything works fine without the annoying warning.

Apache-Weblogic 404 configuration

I've searched around for this quite a bit and found similar questions but not exactly the same, but nonetheless I apologize if this is a duplicate question.
Basically, I am trying to handle HTTP error responses (i.e. 404) with a custom error page (i.e. 404.html) when my application is down, but weblogic is still up.
I am using Apache 2.2 with the weblogic module. I have set the ErrorDocument directive for Apache as well as the ErrorPage parameter within the block.
I have also set the location within my web.xml for my application, but this question is for when the application is down.
Currently, when the app is down and weblogic is running I am getting the weblogic default 404 page. How can I force apache and/or weblogic to use my custom page?
Here is a sample of one variation of the config that I have tried.
<IfModule mod_weblogic.c>
WebLogicCluster host:port,host:port
KeepAliveEnabled ON
WLProxySSL OFF
Debug ALL
ErrorPage http://host:port/errors/errorSystem.html
</IfModule>
I can access the error page directly, but traffic is never forwarded on error.
I've also tried to set the ErrorPage to a relative url which is the ideal solution.
The explanation from apache.org do it also with samples of code:
ErrorDocument 500 http://xxx/
ErrorDocument 404 /Lame_excuses/not_found.html
ErrorDocument 401 /Subscription/how_to_subscribe.html
According to WebLogic documentation, with ErrorPage parameter, "The plug-in redirects to an error page when the back-end server returns an HTTP 503/Service Unavailable response and there are no servers for failover.".
So 404 error from WebLogic will not be redirected to our custom error page specified with ErrorPage parameter.
The workaround is to create a simple webapp and deploy it onto your WebLogic. In this webapp:
in [web.xml] Specifiy your custom error code and page mappings, e.g.:
<error-page>
<error-code>404</error-code>
<location>/errors/404.html</location>
</error-page>
in [weblogic.xml] State that your context-root is '/':
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<context-root>/</context-root>
</weblogic-web-app>
Your need to have error pages in place such as in '/errors' folder of you webapp.
Note that the 'FMW Welcome Page Application' might have already been deployed and using '/' as context-root in your WebLogic domain. If that is the case, I believe it is safe to undeploy it or untarget it, but you are advised to raise a SR to product support asking whether it is hardful to do so.

Resources