I copy the amp file in:
D:\Alfresco\amps\myrepo-amp.amp
I stop Tomcat.
Then I uninstall.
D:\Alfresco\java\bin>java -jar ../../bin/alfresco-mmt.jar uninstall myrepo-amp ../../tomcat/webapps/alfresco.war
Then I install the new amp.
D:\Alfresco\java\bin>java -jar ../../bin/alfresco-mmt.jar install ../../amps/myrepo-amp.amp ../../tomcat/webapps/alfresco.war -verbose -force
I start Tomcat
The alfresco.war correctly contains the new files and new jar (e.g., my.jar inside amp). If I extract the alfresco.war, I can also see correctly the new jar file (e.g. my.jar) and other new XML files.
However, the D:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib never gets the new jar of my.jar file.
The WEB-INF\lib had an older copy of "my.jar" which I deleted manually from before doing any install.
After the new install of amp, the "my.jar" never makes it to the WEB-INF\lib directory.
For that matter, I manually copied "my.jar" in the WEB-INF\lib and restarted Tomcat and re-started Tomcat.
After doing that, I am not getting any error in the start-up of Tomcat (Tomcat started successfully, no error in the log files), but the services page says 404 (Not found) error.
https://mydomaino/service/index
I doublechecked inside alfresco.war (which got created by install) that it indeed has all the new and correct XML and class files and the new jar file. I manually copied the my.jar inWEB-IN\lib and restarted Tomcat.
I am fine if I have to manually copy my.jar yo WEB-IN\lib (although I should not).
Perhaps I am missing something else. I am not sure why I keep getting 404 error when I try to display the sercice/index.html page.
Am I missing anything? Any thoughts?
Check that your generated artifact is correctly deployed.
Go to <tomcat_dir>/webapps/alfresco/WEB-INF/lib and find your artifact. First of all, check that there's only one customized jar in this folder. When you change artifact versions, old jars remain there. Clean up old jars if that's the case.
Next, open your jar with any zip tool, and check that it effectively contains your modified file. If that's not the case, stop tomcat and execute apply_amps with the -force option.
Start tomcat, and check again that your deployed jar contains the changes you expect.
Hope it helps.
Hi, Which webscript you are going to chage?
Please use sdk to make any customization with existing webscript or developing new webscript.
Dont make any change in existing amps.
Thank you so much for the reply and yes you're correct one of the reamianing old jar was causing this after updating and cleaning all the old jars it started to work as usual.
It's kind of like update to the custome module that we have built, the deployment of these modules were done by conventional jars instead of amps, there were trouble updating the version of these custom jar.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.