• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Table or view does not exist

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I Have created 1 Spring boot project in 2.1.1 version.
I am able to connect to oracle database if configuration defined on application.properties file.
but when i am trying to create multiple data base and creating a configuration file and creating data source using datasourcebuilder i am getting table or view does not exists error.

Same thing i am able to do in spring boot version 1.5.0.

Is there any configuration change in spring boot 2.1.1 or can someone provide me a sample configuration with oracle in 2.1.* version.
Posts: 1171
IntelliJ IDE Hibernate Firefox Browser MySQL Database Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the ranch
When you say create do you mean connect?
This is an example of using multiple datasources in springboot:


You do need to instantiate our DataSource beans manually in a configuration class:

Notice that the bean is anotated with @ConfigurationProperties and a config prefix is provided. Inside the method we're using a dataSourceBuilder and SpringBoot will take care of the rest.
This is what happens behind the scene:
When calling the build method on the dataSource it will call it's private bind method:

This private method performs much of the autoconfiguration magic, binding the resolved configuration to the actual DataSource instance
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic