Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Added hint to support spring-integration-jdbc dependency. #831

Merged
merged 1 commit into from Jun 17, 2021

Conversation

cppwfs
Copy link
Contributor

@cppwfs cppwfs commented Jun 16, 2021

Currently if the spring-integration-jdbc dependency is present in a project, then integration's schemas are not found. As in the example below, schema-h2 is not found:

     Caused by: org.springframework.jdbc.datasource.init.CannotReadScriptException: Cannot read SQL script from class path resource [org/springframework/integration/jdbc/schema-h2.sql]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/integration/jdbc/schema-h2.sql] cannot be opened because it does not exist
       org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:239)
       org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:254)
       org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:49)
       org.springframework.boot.jdbc.AbstractDataSourceInitializer.initialize(AbstractDataSourceInitializer.java:71)
       org.springframework.boot.jdbc.AbstractDataSourceInitializer.afterPropertiesSet(AbstractDataSourceInitializer.java:55)
       [...]
     Caused by: java.io.FileNotFoundException: class path resource [org/springframework/integration/jdbc/schema-h2.sql] cannot be opened because it does not exist
       org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:187)
       org.springframework.core.io.support.EncodedResource.getReader(EncodedResource.java:146)
       org.springframework.jdbc.datasource.init.ScriptUtils.readScript(ScriptUtils.java:328)
       org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:236)

This PR adds a hint to resolve this issue.

Currently if this dependency is present in a project, schema-h2 (if h2 is specifed as datastore) is not found.
```
     Caused by: org.springframework.jdbc.datasource.init.CannotReadScriptException: Cannot read SQL script from class path resource [org/springframework/integration/jdbc/schema-h2.sql]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/integration/jdbc/schema-h2.sql] cannot be opened because it does not exist
       org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:239)
       org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:254)
       org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:49)
       org.springframework.boot.jdbc.AbstractDataSourceInitializer.initialize(AbstractDataSourceInitializer.java:71)
       org.springframework.boot.jdbc.AbstractDataSourceInitializer.afterPropertiesSet(AbstractDataSourceInitializer.java:55)
       [...]
     Caused by: java.io.FileNotFoundException: class path resource [org/springframework/integration/jdbc/schema-h2.sql] cannot be opened because it does not exist
       org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:187)
       org.springframework.core.io.support.EncodedResource.getReader(EncodedResource.java:146)
       org.springframework.jdbc.datasource.init.ScriptUtils.readScript(ScriptUtils.java:328)
       org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:236)
```

This PR adds a hint to resolve this issue.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 16, 2021
@sdeleuze sdeleuze added type: compatibility Native image compatibility issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 17, 2021
@sdeleuze sdeleuze added this to the 0.10.1 milestone Jun 17, 2021
@sdeleuze sdeleuze merged commit 084342a into spring-attic:main Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: compatibility Native image compatibility issue
Development

Successfully merging this pull request may close these issues.

None yet

3 participants