AnsweredAssumed Answered

Unable to find SQL file

Question asked by bj0069601 on Apr 20, 2018
Latest reply on May 15, 2018 by bj0069601

Hi there,

 

I'm developing a buildingblock that requires a few simple database schemes. To populate them on install, I've created a post_schema_update_sql script.

 

This works perfectly fine on my local dev VM, but when I try and install it on our test server I get the error at the bottom. It seems the test environment can't find the sql script, but I can't for the death of me figure it out why.

 

This is the reference in my schema file:

 

<post-schema-update>
<sql-script name="insert_default_values.sql" comment="Populate settings with secure defaults if not currently populated with data."/>
</post-schema-update>

 

This is my schma file structure:

 

NB! The pgsql file is the one I tested successfully on my local environment. The mssql file was an attempt to see, if the server used another database flavour.

 

Hope someone has an idea, or even better a soulution for me

2018-04-20 12:40:58 +0200 - Error: Could not install Building Block with vendor cesu handle uxsc and version 0.1.0. - blackboard.persist.PersistenceException: Error registering Building Block cesu-uxsc. Please delete package and re-install.

at blackboard.platform.plugin.PackageInstaller.install(PackageInstaller.java:365)

at blackboard.platform.plugin.PackageInstaller.install(PackageInstaller.java:313)

at blackboard.platform.plugin.PackageInstaller.install(PackageInstaller.java:307)

at blackboard.platform.plugin.messagequeue.PlugInMessageQueueHandler.onMessage(PlugInMessageQueueHandler.java:103)

at blackboard.platform.messagequeue.impl.activemq.ActiveMQMessageQueueConsumer$ConsumerThread.run(ActiveMQMessageQueueConsumer.java:194)

Caused by: java.security.PrivilegedActionException: java.io.IOException: Unable to find SQL file /usr/local/blackboard/content/vi/BBLEARN/plugins/cesu-uxsc/webapp/schema/main/post_schema_update_sql/insert_default_values.sql

at java.security.AccessController.doPrivileged(Native Method)

at blackboard.platform.plugin.PackageInstaller.install(PackageInstaller.java:356)

... 4 more

Caused by: java.io.IOException: Unable to find SQL file /usr/local/blackboard/content/vi/BBLEARN/plugins/cesu-uxsc/webapp/schema/main/post_schema_update_sql/insert_default_values.sql

at blackboard.db.schema.DbSchemaUpdater.executeCustomSql(DbSchemaUpdater.java:1004)

at blackboard.db.schema.DbSchemaUpdater.update(DbSchemaUpdater.java:237)

at blackboard.platform.plugin.PackageInstaller$InstallAction.updateSchema(PackageInstaller.java:3109)

at blackboard.platform.plugin.PackageInstaller$InstallAction.run(PackageInstaller.java:2990)

... 6 more

Outcomes