cancel
Showing results for 
Search instead for 
Did you mean: 

ClassLoader not finding files in /shared/classes/alfesco

esource
Champ on-the-rise
Champ on-the-rise
my ClassLoader is not finding custom files placed in tomcat/shared/classes/alfresco/extension.  It only discovers files in alfresco/WEB-INF/classes/alfresco/extension.  What can I do so ClassLoader will locate files in shared? 


      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      InputStream is = cl.getResourceAsStream("/alfresco/extension/custom.properties");
3 REPLIES 3

gyro_gearless
Champ in-the-making
Champ in-the-making
Maybe try removing the leading "/" from the path:

InputStream is = cl.getResourceAsStream("alfresco/extension/custom.properties");


I'm never quite sure how to this right…  :?

HTH
Gyro

targa2000
Champ in-the-making
Champ in-the-making
Should be:


InputStream is = cl.getResourceAsStream("alfresco/extension/custom.properties");

just remove the leading '/' from your path

esource
Champ on-the-rise
Champ on-the-rise
Thank you!  Yes, it was the leading "/" that caused the problem.