I am trying to add snowflake as a datasource. I got my groovy file set up and executed and can get it to show up, but whenever I restart the tomcat server, I end up getting a cypher error message. “Could not decrypt ciphertext”.
When trying to figure out how to get this to work, I put the snowflake jdbc driver in the apache tomcat/lib folder in addition to the apache-tomcat/webapps/reportserver/web-inf/lib.
My best guess is that it was trying to load the driver and didn’t know what to do with it. Once I removed it, everything started working again.
@eduardo, my groovy script above worked to query the database if that is a config you would like to add for the future.
Here is my connection string jdbc:snowflake://.snowflakecomputing.com/?warehouse=<my_wh>&db=<my_db>&role=<my_role>
@alexander, thanks for the suggestion that lead me to try re-starting the application without the file to see I had an issue before.
In general, I think adding to the documentation where to add the jdbc driver would be helpful.
Another question. In the documentation, it mentions adding the script to the onstartup.d folder in bin. I didn’t have the folder so I created it, then I tried restarting the services, but it didn’t run the script. How do I get it run on startup without that folder?
Are you completely sure that the folder is named onstartup.d (no spaces) and that it is located in the correct location? Also pls check what is your configured folder here: https://reportserver.net/en/guides/conf … xtensions/
fileserver/bin/onstartup.groovy
Maybe create a simple script that just prints something into the logs, and try with this script first.
I have confirmed that my folder is onstartup.d and it is in the fileserver/bin/onstartup.d
Looks like the scripting file had it set to fileserver/bin/onstartup.d instead of fileserver/bin/onstartup.groovy
Should I also see the onstartup.groovy script in the bin folder as well? I don’t have that script.
does this configuration allow you to create a dynamic list on your Snowflake datasource? Could you please test the pagination buttons (< and >) and (<<, >>) to see if they work as well?
I tried a simple script, but didn’t see it show up in any of the logs, I checked reportserver, reportserverenterpisetomcat-stderr, and reportserverenterprisetomcat-stdout.
Here is my full scripting.config, could the restrict cause the issue? does it need to be fileserver/bin maybe?
true
bin
fileserver/bin/onlogin.d
fileserver/bin/onstartup.d
One issue with snowflake that I have found to be aware of is how columns are defined. Snowflake can be kind of picky.
If its standard text such as ‘column’, it can be addressed as
select column from table
But if you have any special capitals or special characters. if you name the column as Column or Column# or ColumnName, it treats it as a literal text name and needs to be selected with double quotes.
select “Column”, “Column#”, “ColumnName” from table
These are 3 valid ways to select a “standard” column in snowflake.
select column, COLUMN, “COLUMN” from table
I don’t necessarily know how to address this, other than someone just has to know the nuances of snowflake if they use it.
I double checked everything we already discussed in this thread.
I am not seeing any logs when running it manually. Is there a specific file that this should show up in? I added a println “Snowflake” to my script so I can better search the logs. I have checked files in the “C:\Bitnami\reportserverenterprise\apache-tomcat\logs” folder.
First of all can you please provide us your ReportServer version so we can help you a bit more precisely? I read “Bitnami” in your path. Since Bitnami does no longer ship the installer for the ReportServer i assume that you’re using an old or upgraded ReportServer?
If you’re executing your script manually via terminal you can use “tout.println” in your script to directly print into the terminal. Without “tout” the reportserver will print to one of the logfiles (depending on your logging-rs.properties).
Logging is highly customizable and you may have a look at documentation (searching for “setup logging”)
scripting.config:
Yes the restrict tag configures the ReportServer that scripts can only be executed in /bin and its subfolders.
The directory " /bin/onstartup.d" can be created manually if nonexistant. Every script in this folder wil be executed automatically on startup of the ReportServer.
The second is my script to enable snowflake. This script works when manually executed.
I re-started the mariadb, tomcat, and apache. Snowflake isn’t configured. Then I ran it, and it showed.
I checked all of the apache tomcat logs and searched for ‘snowflake’, I found a couple of references to the jdbc package, but did not see my ‘Test Snowflake’ in any of them.
Here is the only reference to snowflake in the catalina log file.
15-Sep-2025 09:20:12.328 WARNING [Catalina-utility-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [reportserver] registered the JDBC driver [net.snowflake.client.jdbc.SnowflakeDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.