cancel
Showing results for 
Search instead for 
Did you mean: 

Web script packaged in jars can not be found by 4.2

smilehahohi
Champ in-the-making
Champ in-the-making
I have created some web script, and packaged them into a jar, then I put the jar into the shared/lib folder, the alfresco community 4.2 can not found the web script. If I un-packaged the jar, and put the web script folder structure under the shared/classes, then the alfresco can found it and registrate it. I'm sure the shared/lib is under classpath.

I use Ubuntu 11.02, Tomcat 7 and JDK 7.

Another isssue is spring context file will also not be found if I put it into a jar file. I have made a xxxx-context.xml file, and package it into a jar, then I put the jar into [TOMCAT7]/webapps/alfresco/WEB-INF/lib, alfresco 4.2 will not found it. I found that the application-context.xml will import all the *-context.xml, why my xxxx-context.xml can not be found?

If I un-pakcage the jar file, and put the xxxx-context.xml into shared/classes/alfresco/extensions folder, then this file can be found.

So it seems like custom web script and spring context file can not be found by alfresco 4.2 if I put them into a jar file, or maybe it is a JDK 7 or Tomcat 7 issue?

Any idea? Very thanks.
3 REPLIES 3

loftux
Star Contributor
Star Contributor
Check that tomcat/conf/catalina.properties has
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

Does it work if you put it in tomcat/webapps/alfresco/WEB-INF/lib ?

smilehahohi
Champ in-the-making
Champ in-the-making
I have configured shared.loader.

It doesn't work even I put the jar into webapps/alfresco/WEB-INF/lib.

smilehahohi
Champ in-the-making
Champ in-the-making
I suspect it's a spring resource load issue, still investigating…