I have a custom deployer extension and a configuration file with some of the parameters required for the extension. The custom extension checks if the component exists in a table in the database, if not, it is inserted, if yes then the LastUpdate date is changed.
This is what the cd_deployer_conf.xml
file looks like:
<Processor Action="Deploy" Class="com.tridion.deployer.Processor">
<Module Class="com.SomeClass.tridion.deployer.CacheFlusher" Type="CacheFlusher">
<ServerName>SomeServer</ServerName>
<DataBaseName>SomeDB</DataBaseName>
<UserName>SomeUser</UserName>
<Password>Password</Password>
</Module>
In the java class, the code to get these parameters & establish the connection to the database is :
String strServerName = config.getAttribute("ServerName");
String strDataBaseName = config.getAttribute("DataBaseName");
String strUserName = config.getAttribute("UserName");
String strPassword = config.getAttribute("Password");
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection cnnConnection = DriverManager.getConnection(
String.format("jdbc:sqlserver://%s;databaseName=%s", strServerName, strDataBaseName),
strUserName,
strPassword
);
However, whenever I deploy, this is the error that I get in the logs.
ERROR CacheFlusher - com.tridion.configuration.ConfigurationException: No attribute found for: ServerName.
What am I doing wrong ?
Please help.
Thanks in Advance.
config
?