cancel
Showing results for 
Search instead for 
Did you mean: 

AMP deploy - missing jar in SDK?

talija83
Champ in-the-making
Champ in-the-making
I'm trying to deploy AMP file using ANT build file. AMP is properly built, and can be deployed using command line tools. Is it possible that Alfresco4.2c SDK is missing truezip library? I'm getting the following error while deploying in Eclipse:

<blockcode>    
        Caused by: java.lang.ClassNotFoundException: de.schlichtherle.truezip.socket.IOPoolProvider
       at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
      Could not find the main class: org.alfresco.repo.module.tool.ModuleManagementTool.  Program will exit.</blockcode>

And the same code in built file was used while deploying project with Alfresco 3.3g SDK, which had truezip.jar inside.

Ant-build file excerpt:

<blockcode>
    <target name="deploy-alfresco-amp" depends="clean-reset-war, package-alfresco-amp">
        <echo>Merges extension AMP file into build/webapps/alfresco.war</echo>
        <java dir="." fork="true" classname="org.alfresco.repo.module.tool.ModuleManagementTool">
            <classpath refid="src.classpath"/>
            <arg line="install ${alfresco.amp.file} ${alfresco.war.file} -force -verbose -nobackup"/>
        </java>
    </target>
</blockcode>

Thanks in advance. Smiley Happy

2 REPLIES 2

smicyk
Champ in-the-making
Champ in-the-making
Hi,

you should try to change line:
   <java dir="." fork="true" classname="org.alfresco.repo.module.tool.ModuleManagementTool">‍‍‍

to:
<java dir="." fork="true" jar="${alfresco.install.dir}/bin/alfresco-mmt.jar">‍‍‍

alfresco.install.dir - points to you alfresco installation directory

alfresco-mmt.jar could be run with out any classpath information - everything is in it (remove classpath refid… also)

Hope it helps.

talija83
Champ in-the-making
Champ in-the-making
This works now! Thanks a lot! Smiley Happy

Although I still think that they should check the SDK - maybe truezip.jar isn't the only one that's missing.