Apache camel date - apache-camel

I use camel version 2.12.3
I would like to get yesterday date for file name.
Founded documentation from https://camel.apache.org/components/latest/languages/simple-language.html
So i coded like below :
<setProperty propertyName="exportFileName">
<camel:simple>${date:now-24h:yyyyMMdd}</camel:simple>
</setProperty>
I had this error "java.lang.IllegalArgumentException: Command not supported for dateExpression: now-24h"
Am i missing something here ?
Thanks

Your version is simply too old. This works in current versions of Camel 2.x but not in 2.12.x
By the way: Notice the version switcher in the Camel component docs in the upper right. You have to switch from latest to 2.x to see the correct docs. However, even the 2.x docs describe the current versions of 2.x and so you would have the same problem in this case :-)

Related

What is latest version joi-browser and its name if it is changed?

What is latest version of npm validation package joi-browser? I have searched alot and unfortunately I found nothing clear info about it.
I found #hapi/joi, v17.1.x and I guess which is only for Nodejs, also Joi left #Hapi Organization so its name is changed. I found joi-browser v13.x.x which is 2-3 years old.
I want to use Joi for frontend(React) so what is latest version of Joi for frontend and what is its exact name if it is changed?
It looks like joi-browser has been deprecated. As of v16.0.0 of joi, it now includes browser support as you can see here: https://github.com/sideway/joi/issues/2037

Apache Camel Rest - v3.2.0 - Multipart file upload issue

I am looking forward to achieve the multipart file upload with camel 3.2.0 version and JDK11.
I was able to successfully do the same with the older version of camel 2.x using the below code,
.post("/importFile")
.id("importFile")
.bindingMode(RestBindingMode.off)
.consumes("multipart/form-data")
.produces(IConstants.APPLICATION_JSON)
.outType(String.class)
.to("direct:importFile")
from("direct:importFile")
.unmarshal()
.mimeMultipart()
.split().attachments()
// further processing...
After upgrading the camel version from 2.x to 3.2.0, we were getting an compile time issue in the above code for ".attachments()". As a result, we replaced the from route by,
SplitAttachmentsExpression split = new SplitAttachmentsExpression();
from("direct:importFile")
.unmarshal()
.mimeMultipart()
.split(split)
// further processing...
However, after this when i debug the code i am getting null attachments.
SplitAttachmentsExpression->evaluate()->exchange.getIn(AttachmentMessage.class).hasAttachments() ==> evaluates to false.
Am i missing anything here as part of the upgrade? Has the import file functionality changed with latest version of Camel?
A quick help is highly appreciated as this was working earlier and now we are completely blocked!

Accordion component in AEM throwing error while building the project

Recently I was using the out of box accordion component in my AEM project (6.5). The component is working fine in author and publish mode. But when I'm trying to build the project using Maven, I'm getting the below error.
**${item.name in accordion.expandedItems}: extraneous input 'in' expecting {'}','.','&&','||','[','#'}**
There are no other detailed information regarding the error. What am I doing wrong here?
Thanks in advance.
You might reference an older version of HTL/Sightly in your pom.xml that has no support for in relational operator (which was added in version 1.4 of the spec).

Wakanda data browser (V1) in V 2.4.0

I've been using Wakanda since version 1. x and have been hesitating for a long time to test the newer versions because they no longer have a data browser. Now I have installed the latest version and installed a webfolder in the backend. Here I copied the complete WALIB directory and declared the Webfolder as active webfolder. Now I can use the URL "localhost: 8081/walib/dataBrowser/index. html" to access the Databrowser website, but 2 calls end with a 404 error:
"http://127.0.0.1:8081/db/walib/dataBrowser/index.package.json~waf-build.js?path=WALIB"
and
"http://127.0.0.1:8081/db/walib/dataBrowser/index.package.json~waf-build.css?path=WALIB"
It looks like the tilde is causing the problem.
How can I solve the problem, do I still have to make an adjustment somewhere?
#MyemaHMN has posted a solution that worked in this thread: Wakanda 2.2.1 Enterprise Server DataBrowser. Hope that helps.
The tilde does not seem to be the problem. In my solution I have the same call like:
http://127.0.0.1:8081/walib/dataBrowser/index.package.json~waf-build.css?path=WALIB
and it is working.
I guess it is the issue is the /db/ directory in the link. Where does it come from? The walib-directory is expected to be immediately under the webfolder.
Check the directory structure and check the app.waProject in relation to that.

AngularJS 1.5 ngComponentRouter

The ngNewRouter (now named ngComponentRouter) was supposed to be in 1.4, but was delayed and is now supposed to go into 1.5 (as I understand it). However, it's not in the 1.5 beta2 package. I do see angular1_router on github, but I don't see that built module included in the 2.0 alpha packages either.
Does anyone know if the new router will actually be in the 1.5 release?
Is there a current build of the new router hosted anywhere? I managed to find a copy of the compiled js from a random plunker, but haven't been able to compile the source myself (issues with node-gyp & msbuild, still working on that).
Does anyone know of any up-to-date documentation or working samples on the new component router? The best site I've found so far is pretty close (it says it was published in February, but it uses ngComponentRouter rather than ngNewRouter so it's clearly being updated), but the post still has things wrong - like it says to create controllers for the components you're loading for the routes, but I discovered that you actually need to be creating them as directives (optimally using the new "component" wrapper in 1.5) with the restrict set to "A" (that was fun to figure out).
You can get the new router via npm with:
npm install #angular/router
For more information on the current API you can have a look at:
https://angular.io/docs/js/latest/api/router/Router-class.html
It's for Angular 2 but the core mechanics of the router are the same, and it should give you some hints on how the API has been changed compared to the ngNewRouter.
It looks like the component router has been released. Here is the official documentation: https://docs.angularjs.org/guide/component-router
I'm not seeing any official announcements saying it was released yet though, so I'm not sure if it's supposed to be "official" or not.

Resources