Skip to content

Application failed to start due to org.springframework.beans.factory.NoUniqueBeanDefinitionException #410

@geneguard-radu

Description

@geneguard-radu

Hi,

I'm running Exomiser 13.0.0, hg38, data version 2109, on an AWS linux machine with Java 17 Corretto.

java -Xms14g -Xmx14g -jar exomiser-cli-13.0.0.jar --analysis /data/analyses/EX76.analysis.yml

Here is the log that I'm getting:

 Welcome to:
  _____ _            _____                     _
 |_   _| |__   ___  | ____|_  _____  _ __ ___ (_)___  ___ _ __
   | | | '_ \ / _ \ |  _| \ \/ / _ \| '_ ` _ \| / __|/ _ \ '__|
   | | | | | |  __/ | |___ >  < (_) | | | | | | \__ \  __/ |
   |_| |_| |_|\___| |_____/_/\_\___/|_| |_| |_|_|___/\___|_|

 A Tool to Annotate and Prioritize Exome Variants     v13.0.0

2021-10-13 13:33:59.201  INFO 7464 --- [           main] org.monarchinitiative.exomiser.cli.Main  : Starting Main using Java 17 on ip-11-0-0-98.ec2.internal with PID 7464 (/home/ec2-user/exomiser-cli-13.0.0/exomiser-cli-13.0.0.jar started by ec2-user in /home/ec2-user/exomiser-cli-13.0.0)
2021-10-13 13:33:59.204  INFO 7464 --- [           main] org.monarchinitiative.exomiser.cli.Main  : No active profile set, falling back to default profiles: default
2021-10-13 13:34:00.475  INFO 7464 --- [           main] o.m.exomiser.cli.config.MainConfig       : Exomiser home: /home/ec2-user/exomiser-cli-13.0.0
2021-10-13 13:34:00.492  INFO 7464 --- [           main] o.m.exomiser.cli.config.MainConfig       : Data source directory defined in properties as: /data
2021-10-13 13:34:00.493  INFO 7464 --- [           main] o.m.exomiser.cli.config.MainConfig       : Root data source directory set to: /data
2021-10-13 13:34:00.499  INFO 7464 --- [           main] o.m.e.c.g.j.JannovarDataProtoSerialiser  : Deserialising Jannovar data from /data/2109_hg38/2109_hg38_transcripts_ensembl.ser
2021-10-13 13:34:02.316  INFO 7464 --- [           main] o.m.e.c.g.j.JannovarDataProtoSerialiser  : Deserialisation took 1.816 sec.
2021-10-13 13:34:04.122  INFO 7464 --- [           main] g.GenomeAnalysisServiceAutoConfiguration : Configured hg38 genome analysis service
2021-10-13 13:34:05.618  INFO 7464 --- [           main] o.m.exomiser.cli.config.MainConfig       : Default results directory set to: /home/ec2-user/exomiser-cli-13.0.0/results
2021-10-13 13:34:05.672  WARN 7464 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Unsatisfied dependency expressed through method 'dataSource' parameter 0; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' available: expected single matching bean but found 3: spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties,phenotypeDataSourceProperties,hg38genomeDataSourceProperties
2021-10-13 13:34:05.697  INFO 7464 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-10-13 13:34:05.715 ERROR 7464 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method dataSource in org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari required a single bean, but 3 were found:
	- spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties: defined in null
	- phenotypeDataSourceProperties: defined by method 'phenotypeDataSourceProperties' in org.monarchinitiative.exomiser.autoconfigure.phenotype.PhenotypeProperties
	- hg38genomeDataSourceProperties: defined by method 'hg38genomeDataSourceProperties' in org.monarchinitiative.exomiser.autoconfigure.genome.Hg38GenomeProperties


Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

Could you please let me know if I'm doing something wrong or is this a bug?

Thank you!
Radu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions