Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-371

Parameter 0 of constructor in org.springframework.data.cassandra.repository.support.CassandraRepositoryFactoryBean required a bean of type 'java.lang.Class' that could not be found.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Works as Designed
    • Affects Version/s: 1.5 RC1 (Ingalls)
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      I'm currently running into some issues trying to migrate from 1.4.5.RELEASE to 1.5.0.BUILD-SNAPSHOT.

      My project was working with 1.4.5.RELEASE, I changed the version for 1.5.0.BUILD-SNAPSHOT, removed some workaround I had in place (https://jira.spring.io/browse/DATACASS-349), did minor code modifications due to interface changes, changed for a cassandra 3.9 and then tried to run the tests.

      I had the following error:

      java.lang.ClassNotFoundException: com.datastax.driver.core.policies.AddressTranslator
      

      I then decided to use datastax driver code 3.1.2. But I now have a different error (the full trace is attached):

      org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean found for dependency [java.lang.Class<org.springframework.data.repository.Repository<?, ?>>]: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
      

      When I try to run the program (not the tests), I got the following error (no exception trace):

      Description:
      Parameter 0 of constructor in org.springframework.data.cassandra.repository.support.CassandraRepositoryFactoryBean required a bean of type 'java.lang.Class' that could not be found.
      Action:
      Consider defining a bean of type 'java.lang.Class' in your configuration.
      

      I've attached a simple code provoking the error.

        Attachments

        1. full-trace.txt
          33 kB
        2. src.zip
          2 kB

          Activity

            People

            Assignee:
            mp911de Mark Paluch
            Reporter:
            Marc P. Marc Pynaert
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 40 weeks, 5 days ago