Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3850

javax.sql.DataSource' that could not be found

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.0.M3
    • Fix Version/s: 2.0.0.RC3
    • Component/s: BUILD
    • Labels:
      None
    • Environment:
      Linux

      Description

      Hello, New project in M3 When run spring boot Run cause:
      Description:

      Parameter 0 of constructor in org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration required a bean of type 'javax.sql.DataSource' that could not be found.

      • Bean method 'dataSource' not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
      • Bean method 'dataSource' not loaded because @ConditionalOnBean (types: org.springframework.boot.jta.XADataSourceWrapper; SearchStrategy: all) did not find any beans
        Action:
        Consider revisiting the conditions above or defining a bean of type 'javax.sql.DataSource' in your configuration.
        When application.properties is:
        spring.datasource.driver-class-name=com.mysql.jdbc.Driver
        spring.datasource.url=jdbc:mysql://localhost:3306/[dbName]?characterEncoding=UTF-8
        spring.messages.encoding=utf-8
        spring.datasource.username=root
        spring.datasource.password=ps
        spring.jpa.hibernate.naming.strategy=org.hibernate.cfg.ImprovedNamingStrategy
        spring.messages.fallback-to-system-locale=false
        spring.jpa.show-sql = false
        spring.jpa.hibernate.ddl-auto = update
        spring.datasource.min-idle=10
        spring.datasource.max-idle=60
        spring.datasource.initial-size=10
        spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

        Attachments

          Activity

            People

            Assignee:
            jcgarcia Juan Carlos GarcĂ­a del Canto
            Reporter:
            Ali Ali
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: