Forum Problems Installing LAMS: Deploying a new tool interferes with existing tool.


 
You may request notification for Deploying a new tool interferes with existing tool..
Search: 

1: Deploying a new tool interferes with existing tool.
08/01/07 11:33 PM
[ Reply | Forward ]
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

2: Re: Deploying a new tool interferes with existing tool.
In response to 1 08/02/07 04:03 AM
[ Reply | Forward ]
I'm afraid I'm too tired to give a decent explanation here (its been a long day for me) but I'll give you the short answer.

The problem file is in db/sql/tool_insert.sql. The name of the service bean is in there too.

In the directory db/sql there are 5 scripts you might need to change at some stage:
create_lams_tool_mc.sql and drop_lams_tool_mc.sql contain the definitions of the tool's tables. So if you want to add any columns, etc then you need to change create_lams_tool_mc.sql

activity_insert.sql, library_insert.sql and tool_insert.sql all insert rows in the LAMS system tables. These are the rows that tell LAMS all about your tool. A tool is defined in tool_insert and wrapped up in an activity (defined in activity_insert.sql). Its actually the activity record that matches the icon you see in learning. Finally the activity is wrapper up in a library, but you don't ever see the library anywhere - its just an internal system thing.

In the sql scripts, if you see entries like ${learning_library_id}, ${tool_id}, etc leave them alone. They are macros that are replaced by our tool installation program and if you replace them with anything else, your tool probably won't appear in authoring, or it won't work properly.

Hopefully this will get you passed this hurdle!

Fiona

Posted by Fiona Malikoff

3: Re: Re: Deploying a new tool interferes with existing tool.
In response to 2 08/02/07 10:15 PM
[ Reply | Forward ]
Thank you very much Fiona.

It worked.

Posted by Karthikeyan Chidambaram

Reply to first post on this page
Back to Problems Installing LAMS