Hi,
I tried deploying a new tool in LAMS as per the tips given in the link
http://wiki.lamsfoundation.org/display/lams/RenameTool
--I followed the following step in this page.
2 Use the RenameTool to copy an existing tool.
--I used the lams_tool_lamc folder since I wanted to base my tool on this existing tool for multi choice.
--I renamed my tool lams_tool_lathmc
using the lines
//
Source D:\lams_eclipse\lams_tool_lamc
Rename lamc11 lathmc11
//
in the tasklist.conf file.
--I also retained a saved copy of the folder lams_tool_lamc, so as to render the original tool.
However I had to make a few more changes to the configuration in addition to the changes to be done in
lams_build/build.ml file.
--These additional changes were in
lams_tool_lathmc\src\java\org\lamsfoundation\lams\tool\mc\mcApplicationContext.xml
and
lams_tool_lathmc\src\java\org\lamsfoundation\lams\tool\mc\service\McServiceProxy.java
to change the service name 'mcService' to 'thmcService'
Changes in the xml and java source files under the lams_tool_lathmc folder.
Changes in the package names in
\lams_tool_lathmc\src\java\org\lamsfoundation\lams\tool\thmc\mcApplicationContext.xml
and
\lams_tool_lathmc\web\WEB-INF\web.xml
(I had to change the package names bcos the new tool folder had the same package structure within it).
But I could not get rid of the error
[java] TOOL DEPLOY FAILED
[java] org.lamsfoundation.lams.tool.deploy.DeployException: Could not execute statements
[java] at org.lamsfoundation.lams.tool.deploy.ScriptRunner.executeStatements(ScriptRunner.java:112)
[java] at org.lamsfoundation.lams.tool.deploy.ScriptRunner.run(ScriptRunner.java:66)
[java] at org.lamsfoundation.lams.tool.deploy.ToolDBDeployTask.runScript(ToolDBDeployTask.java:326)
[java] at org.lamsfoundation.lams.tool.deploy.ToolDBDeployTask.runToolInsertScript(ToolDBDeployTask.java:361)
[java] at org.lamsfoundation.lams.tool.deploy.ToolDBDeployTask.execute(ToolDBDeployTask.java:144)
[java] at org.lamsfoundation.lams.tool.deploy.Deploy.main(Deploy.java:187)
[java] Caused by: java.sql.BatchUpdateException: Duplicate entry 'mcService' for key 3
[java] at com.mysql.jdbc.Statement.executeBatch(Statement.java:709)
[java] at org.lamsfoundation.lams.tool.deploy.ScriptRunner.executeStatements(ScriptRunner.java:107)
[java] ... 5 more
Posted by Karthikeyan Chidambaram