cancel
Showing results for 
Search instead for 
Did you mean: 

class not found exception

anshul
Champ in-the-making
Champ in-the-making
Hi
I am trying to write a servlet in eclipse that interacts with the alfresco repository and gets the number of users in alfresco and display the output to a webpage.

To create a session i used the following code

AuthenticationUtils.startSession("admin", "admin");

But when i run this the following error comes.

java.lang.NoClassDefFoundError: org.alfresco.webservice.util.AuthenticationUtils

But when i copy the code into a simple java application and displayed the output into console it works fines.
can anybody tell me what i am doing wrong here , why i cannot run the same piece of code as a servlet.

And i would like to tell that i am using two tomcat server one for the alfresco and one for the servlet in eclipse.

Thanks
Anshul
2 REPLIES 2

jcustovic
Champ in-the-making
Champ in-the-making
You are missing libraries for alfresco web service. You should copy lib (alfresco-web-service-client-3.3.jar and alfresco-repository-3.3g.jar with all other dependencies) files to your webapp /WEB-INF/lib folder.

anshul
Champ in-the-making
Champ in-the-making
Thanks it worked