Could not initialise JsonSchemaValidator - mule

I am using Json schema Validator in mule flow. There are many flows in one project which are using same json schema validator.
Whenever I tried to run the project, which is imported from SVN, it gives an error as Could not initialise JsonSchemaValidator.
I could not find the reason for it. ow should I resolve this?
Thanks in advance.

Related

Make native query in standalone Waterline

When trying to use Waterline standalone mode, I could not find the correct method to perform native queries. With Sails.JS the sendNativeQuery method is used which I could not find in the instances of the models. Does anyone know how I can perform these queries?
Thank you!
I have the same problem, i think it sail who set getDatastore() and sendNativeQuery() function on model and datastore.
Surely on this file: https://github.com/balderdashy/sails-hook-orm/blob/master/lib/build-registered-datastore-instance.js
and the function is defined here: https://github.com/balderdashy/sails-hook-orm/blob/master/lib/build-registered-datastore-instance.js
Im going to implement this in my code but if someone have a better idea or have already doing this i appreciate help :)
Sails enables you to access what called datastore.manager
Depending on the adapter, this might represent a connection pool, a single connection, or even just a reference to a pre-configured client library instance.
If you are using MongoDB for example, you can have a raw Mongo collection instance.
see here.

Mule APIKit and multiple RAMLs

It is possible using multiple RAML files in one APIKit Mule Project?
Let's say I have two functions /api/func1 and /api/func2.
Each of the functions is defined in its own raml - func1.raml and func2.raml.
I've generated a flow in Anypoint for the first function using the APIKit wizard. It's working ok.
Now, I'm trying generating a flow for the second function. The flow is generated with no errors. However, it just doesn't work. I've tried fixing the URLs, bindings, configurations and nothing really helps.
Note, that I don't wanna bind both the RAMLs into one file. The reason is that it's easier to develop/maintain the functions separately.
The only solution I can see is to define two separate projects. But this is not really what I'd like to do.
So, looking for an advice of how to deal with this situation.
Thanks,
Ok, actually, it's possible.
What you need to do is make the "Path"es different in the HTTP connectors for the flows generated.
The apikit wizard generates the default path that looks like this: "/api/*".
So, Mule generates an error when attempting to deploy the app. What you need to do is changing paths to "/api/func1/" and "/api/func2/"
You can continue having a single RAML file and make external references to simplify your raml, here is an example:
#%RAML 0.8
title: Eventlog API
version: 1.0
baseUri: http://eventlog.example.org/{version}
schemas:
- eventJson: !include eventSchema.json
eventListJson: !include eventlistSchema.json
Also going by strict REST design it is recommended to have a resource related details maintained in a single RAML file.
Optionally you may edit the url's to resolve any context related conflict.

MuleDevKit - Build a Transformer and access it in the palette

I'am trying to build a custom transformer with Muledevkit. I am successful in building one and I can install it in my studio. But I couldn't figure out a way how to allow the end-user to set a property (like how its shown in custom-transformer under the 'Transformer Settings' -> 'Property') to access inside my Transformer class.
Regards,
Raj
Unfortunately this is a feature not covered by the DevKit transformers.
Because DevKit transformers can be implicitly called (Mule out of the box mechanism to resolve transformers), there are some constrains we have to follow.
The only work around I can think of is to create a processor that does the transformation for you.
I'll add this as a feature request on our backlog.
HTH

Error when creating a new view using MvcScaffoldingT4TwitterBootstrapMvc Nuget package

I installed the MvcScaffolding4TwitterBootstrapMvc package which is based on the scaffolding stuff Steve Sanderson has done. Now I'm attempting to create a new view based on it and I'm just receiving PS errors.
I'm typing this:
Scaffold View LocationType CreateOrEdit -Template _CreateOrEdit
(I've tried other view templates as well)
I receive this error message:
t4(115,64) : error CS1061: Compiling transformation: 'EnvDTE.CodeProperty' does not contain a definition for 'IsScaffoldable' and no extension method 'IsScaffoldable' accepting a first argument of type 'EnvDTE.CodeProperty' could be found
At packages\MvcScaffolding4TwitterBootstrapMvc.1.0.2\tools\RazorView\MvcScaffolding.RazorView.ps1:42 char:27
Obviously the template is causing the error because it can't find something (maybe the T4 library)? But I'm not really sure what or where I'd fix it.
It looks like the IsScaffoldable extension method doesn't exist in the version of the T4Scaffolding.DLL that is installed with the NuGet package.
If found this work item which lead me to GitHub and I see this method exists. Since I'm not really using this attribute, I decided it's probably just simpler for me to remove the .IsScaffoldable() call from the T4 template instead of pulling down the source and compiling a new version of T4Scaffolding.

how to create an output file based on xml data in mule

Im very new to mule so hopefully someone out there can help me out. Im trying to create an output based on a content in my xml
Ex
<Header>
<UniqueID>AAA_12345</UniqueID>
</Header>
Id like the filename to be the the UniqueID ie AAA_1245.xml
I found a few syntax on the net but it doesnt work for me. My syntax is
<file:outbound-endpoint path="${cwMessagesPath}/out" outputPattern="#[xpath:/Header/UniqueID].xml" connector-ref="cwksbDefaultFileConnector" />
for some reason, mule creates #[xpath: as a directory, Header as another directory and then the filename as UniqueID].xml
Im using mule 2.2.1
Thanks for your help.
This should work.
Is cwksbDefaultFileConnector configured in any specific manner?
Also, I think in Mule 2 it was possible to configure other placeholders than #[ ] for expressions. Are expressions working with this syntax elsewhere in your application? If yes, then the problem is different.
Do you run standalone or embedded? If embedded, make sure you have the mule-module-xml dependency in your project's POM.
Finally, what is the payload type of the message that hits the file:outbound-endpoint? Maybe some manual transformation is needed in Mule 2 before using XPath.