Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

328
Visualizações
How to store a MultiMap into mongo db in spring boot?

I am trying to store a special guava collection for storing reports, but I get an error when the spring application starts.

This is the error:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryEntityController' defined in URL [jar:file:/C:/Users/mirel/.m2/repository/org/springframework/data/spring-data-rest-webmvc/2.5.6.RELEASE/spring-data-rest-webmvc-2.5.6.RELEASE.jar!/org/springframework/data/rest/webmvc/RepositoryEntityController.class]: Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultConversionService' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.DefaultFormattingConversionService]: Factory method 'defaultConversionService' threw exception; nested exception is java.lang.NullPointerException

This is the model:

public class Report {

    @Id
    private String id;
    private Calendar date;
    private BiMap<String, Multimap<String, String>> data;

    public Report() {
    }

    public Calendar getDate() {
        return date;
    }

    public void setDate(Calendar date) {
        this.date = date;
    }

    public BiMap<String, Multimap<String, String>> getData() {
        return data;
    }

    public void setData(BiMap<String, Multimap<String, String>> data) {
        this.data = data;
       }
  }

Repository:

public interface ReportRepository extends MongoRepository<Report, String>{
}

I believe that defaultConversionService cannot save the MultiMap data type from Guava library. How can I save the report model ?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda