cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco excption

andrea_girardi
Champ in-the-making
Champ in-the-making
Hi all,

I've some problem printing the exception stack trace for Alfresco Exception.

On debug mode, step by step under Eclipse IDE I'm able to see the message when the exception is raised inspecting the Exception object but, when I print the error message to console output it's always null (I tryed with Ex.toString() / ex.getStackTrace() / Ex.getMessage() )

Anyone could help me?

thanks, Andrea
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Do you mean AlfrescoRuntimeException ?

Not all exceptions have a message, so there may not be anything to print.   

Also the AlfrescoRuntimeException may be "wrapping" another exception in which case you should examine the "cause".

If you cut and paste what you see in eclipse the perhaps you could clarify which bits of the exception you are trying to access through code.

andrea_girardi
Champ in-the-making
Champ in-the-making
Hi,

I tryed to run this code (in that case I'm trying to write a content on a folder that doesn't exists):

try {
    UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);
}
catch (Exception ex) {
    System.out.println(" " + ex.getStackTrace());          
    System.out.println("ERROR - createContent : " + ex.getMessage());
}

and this is what I can see on Eclipse inspecting the object ex :

java.lang.IllegalStateException: Failed to resolve to a single NodeRef with parameters (store=workspace:SpacesStore uuid=null path=/app:company_home/cm:UploadFromJava), found 0 nodes.

but when I try to print on log, it's always null.