No bean Javers bean configured to be auto wired - mongodb

I am trying to use javers latest version library with spring boot 3.0 .The document says when you have Javers starter files on classpath , spring boot automatically creates Javers bean . But while starting server , I get an error no bean configured for Javers bean for injecting . I am using Mongo db
I tried using the documentation but it didn't helped .

Related

What controls the appearance of the "Web" option in the spring boot administrator UI?

I'm having an issue with using Spring Boot Administrator against a number of different Spring Boot microservices, where the Web left-hand menu option (which has the Mappings and HTTP Traces suboptions) only shows for some of the microservices.
The only obvious POM differences between those microservices that work and those that don't is the Spring Boot Starter parent version; those which display the Web option are using version 2.1.6.RELEASE, while those that do not are using higher versions like 2.3.1.RELEASE (which I'm guessing will affect versions of e.g. spring boot actuator libraries).
I'm using version 2.3.0 of Spring Boot Admin Server with Spring Boot Starter Parent 2.3.1.RELEASE.
For anyone else that stumbled upon this, the answer is that from Spring Boot 2.0.0 onwards, in order to expose the Spring Boot actuator httptrace endpoint (which is what drives the Web option in the Spring Boot Administrator), you now need to also add a bean that implements HttpTraceRepository into your Spring context.
e.g.
#Configuration
public class HttpTraceActuatorConfiguration {
#Bean
public HttpTraceRepository httpTraceRepository() {
return new InMemoryHttpTraceRepository();
}
}

I have created a spring boot application

I have added dependency for h2 in memory database in my pom.xml but i have not configured the h2 database properties in my application.properties but still my jpa class are getting created in h2 database, can someone tell how is it possible?
It is due to auto-configuration feature of spring boot
https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/reference/html/using-boot-auto-configuration.html
Spring Boot auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added. For example, if HSQLDB is on your classpath, and you have not manually configured any database connection beans, then Spring Boot auto-configures an in-memory database.
You need to opt-in to auto-configuration by adding the #EnableAutoConfiguration or #SpringBootApplication annotations to one of your #Configuration classes.

Jboss as7 ejb injection inside cdi beans

I have developed an ear application using ejb3.1, jsf2.0 and cdi enabled.
I have packaged my application as ear with ejb modules defining the session beans, ejbremote jar defining the remote session interfaces and the jpa entities, and the war application which includes dependency on ejbremote jar (for the remote interface lookup, and the jpa entities).
Scenario:
If i inject directly session beans defined in the ejb jar in any cdi bean, jboss fails to find the righ proxy to inject, and throws a ClassCastException EjbManagerRemote field of my cdi bean cannot be cast to com.sun.proxy.$Proxy78
However, with glassfish, this scenario works perfectly.
To circumvent the jboss problem, i have developed a session bean inside the war (something like a producer: actually intend to do this) file where i inject the session beans and then inject this local session bean into the cdi beans which give me the reference to the session beans.
My question is, why does jboss fail to inject the remote session beans, yet glassfish has no problem?
What am i missing in ejb and cdi bean injection?
Note: am injecting the beans using #EJB annotation.
Thanks

Using Spring Data Neo4j outside of Spring container

Can Spring Data Neo4j be used "standalone" (i.e. outside Spring container) like Spring Data JPA can?
Currently you cannot use Spring Data Neo4j outside of a Spring Container as it does not integrate with the CDI integration support in Spring Data Commons yet.
Feel free to open a JIRA issue if you'd like to see support for that.

How to install JPA persistence provider in spring roo project?

I am looking SpringSource Tool Suite with Google Integration and I am getting that hint when I define persistence setup.
hint:"Command 'persistence setup --provider DATANUCLEUS --database HYPERSONIC_IN_MEMORY' was found but is not currently available (type 'help' then ENTER to learn about this command)"...
and help is saying that: * persistence setup - Install or updates a JPA persistence provider in your project
how can I install JPA persistance provider to my project?
Have you tried with another provider? i.e for Hibernate it would be something like:
persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
I believe you can choose between ECLIPSELINK, HIBERNATE and OPENJPA.
I had a similar problem and I solved it creating the project using Roo instead of the Eclipse ide.
You can do it typing this in the Roo console in Eclipse:
project --topLevelPackage com.company.projectName
Depending on the version of Roo, the keywords have changed. In Spring-Roo version 1.2 and above:
roo> jpa setup --provider ECLIPSELINK --database H2_IN_MEMORY
Earlier versions of the persistence framework configuration use a persistence setup command, which has changed to the newer jpa setup in light of support for configuring non-SQL databases.