Thanks for the help!
]]>System.out.println("@@@@@@@@@@@@@@ ADDVERTICA @@@@@@@@@@@@@");
Place the script in the onstartup.d folder, restart tomcat and wait until the console displays (or the logfile contains) the ADDVERTICA line. Only after that login as root and check if vertica is available as a database.
Cheers,
Thorsten
I just tried the instructions and for me it's not working either. So we probably broke something in ReportServer. I'll look into this and let you know.
Cheers,
Thorsten
Thanks for the very quick reply. I thought that was what it would do when I looked at those files. I've included them below and they are the stock files it came loaded with.
The vertica script is bin/onstartup.d/AddVerticaSupport.groovy and is the the sample off the blog post. Again this works fine when run through the console as you detailed there.
I tried also what you mentioned above of having <rs></rs> point to the onstartup.d folder directly intead of the onlogin.rs script, then restarted the server. I am seeing the same phenomena.
scripting.cf:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<scripting>
<enable>true</enable>
<restrict>
<location>bin</location>
</restrict>
<startup>
<login>fileserver/bin/onlogin.rs</login>
<rs>fileserver/bin/onstartup.rs</rs>
</startup>
</scripting>
</configuration>
onlogin.rs:
base = "/fileserver/bin/onlogin.d";
GLOBALS.findObjects(base + "/*").each{
tout.print base + "/" + it.getName() + "..."
try{
GLOBALS.exec(base + "/" + it.getName());
tout.println "OK"
}catch(Exception e){
tout.println "ERR"
}
}
onstartup.rs:
base = "/fileserver/bin/onstartup.d";
GLOBALS.findObjects(base + "/*").each{
tout.print base + "/" + it.getName() + "..."
try{
GLOBALS.exec(base + "/" + it.getName());
tout.println "OK"
}catch(Exception e){
tout.println "ERR"
}
}
sorry, I missed your comment on the blogpost. Can you check the configuration in fileserver/etc/scripting/scripting.cf?
The entries scripting.startup.login and scripting.startup.rs control the automatic script-execution on login/startup.
They should either point to
fileserver/bin/onlogin.rs
fileserver/bin/onstartup.rs
if you are using a single login/startup script, or to the folders
fileserver/bin/onlogin.d
fileserver/bin/onstartup.d
if all the content in these folders should be executed. (The default, if I remember correctly, is pointing to a single script, which in turn executes the folder contents).
Cheers,
Thorsten
But it does not effectively run on startup or logon (I've trying both folders) and errors when used until I run the script manually from the console.
I don't see errors on the scripts in the catalina.out - not sure where else to look on this one.
]]>