FlywayAutoConfiguration & QuartzAutoConfiguration process order issue - flyway

I am using spring-boot-2.1.6.RELEASE and try to use flyway handling the quartz schema initialization, but it seems QuartzAutoConfiguration is always processed ahead of FlywayAutoConfiguration, which will raise the [org.quartz.JobPersistenceException: Couldn't retrieve job: ORA-00942] exception, because the quartz schema is not initialized yet(I am using jdbc as the quartz job store type, spring.quartz.job-store-type=jdbc).
So, am I got something wrong? any idea.
Thanks!!

it is a bug ,waiting for fix!
please chcek [https://github.com/spring-projects/spring-boot/issues/17528]

Related

How to run liquibase changelogSyncSQL or changelogSync up to a tag and/or labels?

I'm adding liquibase to an existing project where tables and data already exist. I would like to know how I might limit the scope of changelogSync[SQL] to a subset of available changes.
Background
I've run liquibase generateChangeLog to capture the current state and placed this into say src/main/resources/db/changelog/changes/V2021.04.13.00.00.00__init01.yaml.
I've also added another changeset to cover some new requirements in a new file. Let's call it src/main/resources/db/changelog/changes/V2021.04.13.00.00.00__new-feature.yaml.
I've added a main changelog file src/main/resources/db/changelog/db.changelog-master.yaml with the following contents:
databaseChangeLog:
- includeAll:
path: changes
relativeToChangelogFile: true
I now want to ensure that when I run liquibase changelogSync[SQL] against a particular version of the db that the scope is limited to the first changelog init01, thereby allowing from that point on a liquibase update or updateToTag et al, to continue with changes following init01.
I'm surprised to see that the changelogSync[SQL] commands don't seem to offer some way (that I can see from the docs for how to do this.
Besides printing the SQL and manually changing it, is there something I've missed? Any suggested approaches welcome. Thanks!
What about changelogSyncToTagSQL ?
Wouldn't it cover your needs?
Or maybe you could try changelogSyncSQL with additional parameters "label" or and "context" ?
changelogSyncToTagSQL
context
labels
As it stands, the only solution I've found is to generate the SQL and then manually edit its contents to filter the change sets which don't correspond to your current schema.
Then you can apply the sql to the db.

Why I can't access to RunCommandLineApplicationAsync?

I'm trying to build CLI. I took an example here
And in Program class author use return await builder.RunCommandLineApplicationAsync<TestCmd>(args);
Like a start point of program, but when i'm trying to do the same i have an error:
How can I solve this issue?
I figured out why, because i thougth that it's from Microsoft.Hosting, but i need to intall this package: McMaster.Extensions.Hosting.CommandLine.
Close please this topic

How do I register a MediatR post processor

I would like to try the new pipeline feature in MediatR: https://github.com/jbogard/MediatR/wiki/Behaviors
I tried the following, but it does not get executed
services.AddMediatR();
services.AddTransient(typeof(IRequestPostProcessor<,>), typeof(PostHandler<,>));
What am I missing?
You need to register the behavior associated with post-processors, like this unit test shows.
Your registration code would look like:
services.AddMediatR();
services.AddTransient(typeof(IRequestPostProcessor<,>), typeof(PostHandler<,>));
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(RequestPostProcessorBehavior<,>));
That behavior will get all the post-processors you registered and execute them.
Edit
After a comment about the post-processor running twice, I had a look at the code that registers MediatR in the ASP.NET Core built-in DI container, and it turns out instances of IRequestPreProcessor<TRequest, TResponse> and IRequestPostProcessor<TRequest, TResponse> are automatically registered as you can see here. What's left to do to get them running in the pipeline is just register the associated behavior. So the necessary registration is then:
services.AddMediatR();
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(RequestPostProcessorBehavior<,>));
I encountered the same issue as Larsi in the comment above. My code looked like this
services.AddScoped<IPipelineBehavior<AddMessageRequest, MessageResponse>, RequestPostProcessorBehavior<AddMessageRequest, MessageResponse>>();
but the behaviour still executed twice. My solution was to simply not register it manually, seems like the registration is handled otherwise now.
In my case services.AddMediatR(Assembly.GetExecutingAssembly()); was enough.
Would be nice if someone could expand on why this is.

Can't access PFObject as dictionary

I am starting to use Parse and in the documentation it has examples to use the PFObject as an NSDitionary like this:
// Create the post
PFObject *myPost = [PFObject objectWithClassName:#"Post"];
myPost[#"title"] = #"I'm Hungry";
but i am getting a compiler error:
"Expected method to write dictionary element not found on object of type "PFObject"
But if I access the myPost PFObject like this, it works:
[myPost setObject:#"I'm Hungry" forKey:#"title"];
What is the problem?
I though that PFObject could be accesses as a dictionary?
thanks
I would check that you are using the latest version of the Parse SDK. This is new functionality and my guess is you haven't downloaded the SDK since this feature was introduced.
when i try your code at my side it gives me success message. I think you are using old parse library.
Thanks.
Downloading latest XCode should help. Subscript syntax is available from Xcode 4.4+

MarkLogic: don't truncate error output?

Is there a way with ML to have it not truncate error output when using fn:error() or when an error is sent to the browser? This is obviously for local development only.
Thanks!
No, not really. However you can log messages in whatever detail you like with xdmp:log, fn:trace, and xdmp:trace. When doing this, xdmp:describe and xdmp:quote are also useful.
http://docs.marklogic.com/xdmp:log

Resources