cancel
Showing results for 
Search instead for 
Did you mean: 

Unhandled exception type Authentication Fault

zengqingyi12
Champ in-the-making
Champ in-the-making
Hi, right now i want to write a web service.
And I try to run WebserviceSample    Categories, but it has such exceptions:

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
   Unhandled exception type AuthenticationFault
   Unhandled exception type ClassificationFault
   Unhandled exception type ClassificationFault
   Unhandled exception type RepositoryFault

   at org.alfresco.sample.webservice.Categories.main(Categories.java:55)
I have start the alfresco server. And set the entry point to  
WebServiceFactory.setEndpointAddress("http://localhost:8080/alfresco/api");
#
# Set the following property to reference the Alfresco server endpoint that you would like web service client
# to communicate with
repository.location=http://localhost:8080/alfresco/api
# Set this property if your WAR file has a different name
repository.webapp=alfresco

How can i figure out this issue?
3 REPLIES 3

mangar
Star Contributor
Star Contributor
I am having the exact same problem.
When I build it on the command line using ant , it compiles, but when I try to run I get that error.

In Eclipse I put a try/catch around the whole thing and it still says im not handling the exception. BUT IM CATCHING THROWABLE!

Here is the whole class:
import org.alfresco.webservice.util.AuthenticationUtils;

public class ApplysiteDocImporter {

   public static void main(String[] args) throws Exception {
      ApplysiteDocImporter i = new ApplysiteDocImporter();
      i.doit();
   }
   
   public void doit() throws Exception {
      try {
         AuthenticationUtils.startSession("", "");
      } catch (Throwable e) {
         e.printStackTrace();
      } finally {
            // End the session
            AuthenticationUtils.endSession();
        }
   }

}

What is going on here!?

driekhof
Champ in-the-making
Champ in-the-making
Had similar problem.  Adding all the jars from lib/remote/dependencies fixed the problem.  Looks like AuthenticationFault is at the bottom of a deep inheritance tree and the compiler doesn't bother to tell you that it can't find some of the classes its extending.

nguyenhoathuan
Champ in-the-making
Champ in-the-making
Had similar problem.  Adding all the jars from lib/remote/dependencies fixed the problem.  Looks like AuthenticationFault is at the bottom of a deep inheritance tree and the compiler doesn't bother to tell you that it can't find some of the classes its extending.
Thanks Smiley Happy, it works for me !