-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Cannot initialize Quartz with scripts containing custom prefix comment #13041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Quartz comment prefix include "#" org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql
Quartz comment prefix include "#" org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql
|
Because Quartz init SQL script comment prefix include "#" , Quartz initialization failed! |
|
@linkqu I am not following. the auto-configuration for Quartz can initialize the store by creating tables automatically and that process has nothing to do with this component. Are you aware of |
|
Yes, I'm aware, But initialization failed and there's no mistake. I run the following example to be successful,I doubt it's the problem of "ScriptUtils.DEFAULT_COMMENT_PREFIX" ScriptUtils.executeSqlScript( |
|
@linkqu the point I was trying to make is that what you've changed in your PR is not used by the Quartz database initializer. So you must be using the Quartz DDL as part of I am happy to improve this area if it helps you but I am not yet convinced what problem you're trying to solve. Can you please share a sample that demonstrates the problem you're having now? (without the change in this PR). |
|
Sorry, It may not be the cause of the above! AbstractDataSourceInitializer code: @PostConstruct
protected void initialize() {
if (!isEnabled()) {
return;
}
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
String schemaLocation = getSchemaLocation();
if (schemaLocation.contains(PLATFORM_PLACEHOLDER)) {
String platform = getDatabaseName();
schemaLocation = schemaLocation.replace(PLATFORM_PLACEHOLDER, platform);
}
populator.addScript(this.resourceLoader.getResource(schemaLocation));
populator.setContinueOnError(true);
DatabasePopulatorUtils.execute(populator, this.dataSource);
} |
|
quartz:2.3.0 |
|
Thanks, @linkqu. I see the problem now. A number of the To support this, the property needs to be added to Would you like to update this pull request? |
|
right! |
Quartz comment prefix include "#"
org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql