cancel
Showing results for 
Search instead for 
Did you mean: 

Custom classes not loaded

kamielvdz
Champ in-the-making
Champ in-the-making
I have created a few custom classes which I want alfresco to load from /shared/classes/{customClassesPath} and not from /alfresco/WEB-INF/classes/{customClassesPath}. The main reason being alfresco explorer, share and other custom webapps should load the same custom class file(s) from one location.

The tomcat webapp does not seem to pick up these shared classes even though I have set
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
in catalina.properties.

Am I wrong to assume that alfresco should pick up these classes and load them as if they were in /alfresco/WEB-INF/classes/ ? For my share webapp it does work and it is the same tomcat installation so it is puzzling me.

I tried wrapping them in jar files and putting them in /shared/lib, but got the same result. Does work for share does not work for alfresco explorer.
3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
Are you wiring in these classes through Spring?

Jeff

kamielvdz
Champ in-the-making
Champ in-the-making
No I am not, I thought this would happen automatically, why else would they we called /shared/classes. But thx for the tip. I'll add them through spring.

loftux
Star Contributor
Star Contributor
Sort of hijacking this thread, but I had a similar question. Load class file from shared/lib with alfresco dependency.

So once you have your classes loaded using spring context files, should it be possible to load them from other places than WEB-INF/lib?