Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.1:verify (verify) - apache-karaf

When i am trying to build the project using maven ,getting this error .Can any one help me sort this out?
Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.1:verify (verify)

The Apache Karaf feature verification fails. You don't provide any useful information, so it's hard to tell what's going wrong, but the most common cause is that an OSGi bundle's requirement can not be satisfied. It's either a missing package or a missing service, and in both cases, you need to add a dependency to a bundle providing a capability that can match the requirement.

Related

Error while issuing a state in Postgres Corda 4.6 OS

Following are the error I got when trying to initiate a state in Corda 4.6OS using Postgres:
"net.corda.core.CordaRuntimeException: com.esotericsoftware.kryo.KryoException: java.lang.UnsupportedOperationException: net.corda.nodeapi.internal.persistence.CordaPersistence, which is a closeable resource, has been detected during flow checkpointing. Restoring such resources across node restarts is not supported. Make sure code accessing it is confined to a private method or the reference is nulled out."
unfortunately with just this information it's hard to know what exactly happened.
Here's some examples of what could be happening.
look carefully through the stacktrace, if you're getting an unsupported runtime exception or other exceptions from code that's not in your control look around and make sure you're using packages / resources that line up with the cordapp template.
For example I had something like this for a couple hours because I was using the wrong junit package in my imports and the tests weren't initializing properly so you can get errors like this one and it won't be obvious at all why unfortunately.
Here's a link to the cordapp template, try to carefully check your flow / state to make sure all the imports are reasonable and you're using the right packages / gradle dependencies.
https://github.com/corda/cordapp-template-java
https://github.com/corda/cordapp-template-kotlin
good luck

How to integrate spring-security.xml file into spring boot ? using Annotation base only

I have searched and didn't find any helpful solution that's why i am going to post this question.
Actually i have spring boot project which is completely configure based upon 'Annotation'.
Now for some reason, i need to add spring-security into this project.
for that i am getting spring-security-XXX.xml file from other co-worker.
Now, i am thinking how can i wrote some Annotation which will automatically load that spring-serity-xxx.xml file into my current project environment without change any other part, so that i can achieve security feature as per spring-serity-xxx.xml file.
For example, #Configuration(classpath:spring-security-config.xml) something like, is it possible ?.
if it's possible then provide me completed list of configuration.
NOTE : security added to get OAuth integration.
Any Help Appreciate..!!
Use #ImportResource annotation.

Configure an sbt build for a test framework of your own

In one vein of thought I would like to configure a build with a custom task that will serve instead of the test default task. I will not be registering it as an "sbt test framework" as I'd like to avoid the syntax, limitations and history that comes with that. For example I'd like more flexibility in formatting, storing and sending test results.
Would it be possible introducing an sbt task to mimic sbt's default test task, in the following essential senses:
depend on compilation
be a dependency for other tasks such as artifact publishing tasks, and have them depend on a success return value from it
be able to provide it with library dependencies which will be excluded from final publishable artifacts
be able to control it just like any other task dependency
etc
Alternatively, are you able to delineate the structure of the mostly undocumented sbt TestFramework interface to a level that it's straightforward having your own formatting, test output logic, and test results publishing code, in your TestFramework implementation? I have mostly failed locating scalaTest's implementation of it.
Thanks in advance for you answers on both techniques.

Guice, Peaberry and ServletModule

I am having an issue getting Peaberry/Guice/OSGi/Servlets to place nice. To begin, I have been migrating a Jetty-based, WAR deployed webapp over to OSGi to leverage the plugin architecture. My original application was using guice everywhere.
I have broken everything into modules and Maven-iszed the build. Everything seems to be working except for the pesky installation of the ServletModule.
I receive the following exception when I attempt to install a ServletModule:
java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Preconditions
at com.google.inject.servlet.ServletModule.configure(ServletModule.java:44)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.AbstractModule.install(AbstractModule.java:118)
at com.payplum.CoreActivator$CoreImportModule.configure(CoreActivator.java:145)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.payplum.CoreActivator.start(CoreActivator.java:53)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
So I'm not quite clear on why it's failing to find these bundles. I have added the guice-servlet dependency and have verified that it is making it into my deployed bundles.
I guess the other piece of importance is registering the GuiceFilter. I use the ServiceTracker to get the ExtHttpService, as I'm using Jetty. When that Tracker returns, I add register it out using the typical call
service.registerFilter( this.guiceFilter, "/*", null, 0, null );
And that seems to work fine. I'm really struggling to get these things working and I'm a little caught in the middle between the Guice/OSGi/Peaberry part. Any help is much appreciated.
Thanks!
The exception means you're missing a class on your classpath, so you're either missing a jar or one of the jars (surprisingly) doesn't include its required classes. Check the JARs that are included in your final war file e.g. using 'jar -tf thejar.jar' on whether they include the $Preconditions class.

How to debug into AutoMapper code?

I am using AutoMapper to map my business objects to my view model and there is a custom type I wrote that is not mapping correctly resulting in an exception. I am trying to figure out how to setup my system so that I can debug into AutoMapper.DLL. Does anyone know how to do this without downloading the source and building the source first?
If anyone has a link to instructions for doing this or knows how to set this up, I would greatly appreciate it.
AutoMapper has SourceLink enabled and a symbols package on NuGet (the same is true for the MyGet build). So debugging into AM works without building from source. You cannot debug into the mapping code per se, but check the execution plan.

Resources