cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Upload to Alfresco from Servlet

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

I have a problem. I have a servlet that invoke a ws of Alfresco to upload a file. I try my code on my jboss and work fine, but on another jboss I retrieve this Exception. I think that the problem is on classpath. Can you help me? Thanks

my code is:

try {
        WebServiceFactory.setEndpointAddress(AlfrescoConstants.REPOSITORY_LOCATION);
   AuthenticationUtils.startSession(AlfrescoConstants.ALFRESCO_USERNAME, AlfrescoConstants.ALFRESCO_PASSWORD);
   createSpaceIfNoExists();
   String mimeType = new MimetypesFileTypeMap().getContentType(file.getFileName());
   ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();       
   RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
   Reference newContentReference = createNewContent(contentService, file.getFileName(), file.getFileData(), mimeType);
   makeVersionable(repositoryService, newContentReference);
} catch (Exception e) {
   e.printStackTrace();
   throw e;
} finally {
   AuthenticationUtils.endSession();
}


my exception is:
2010-02-23 16:24:14,057 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.axis.MessageContext.getMessage()Ljavax/xml/soap/SOAPMessage;" the class loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) of the current class, org/apache/axis/MessageContext, and the class loader (instance of <bootloader>) for interface javax/xml/rpc/handler/soap/SOAPMessageContext have different Class objects for the type javax/xml/soap/SOAPMessage used in the signature
   at org.apache.axis.AxisFault.setFaultCodeAsString(AxisFault.java:422)
   at org.apache.axis.AxisFault.<init>(AxisFault.java:228)
   at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.createCall(AuthenticationServiceSoapBindingStub.java:167)
   at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:175)
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:79)
2 REPLIES 2

ant_batt
Champ in-the-making
Champ in-the-making
I solved my problem.

In client classpath there was 2 libraries, that I have remove, that create conflict

vamsi_k1
Champ in-the-making
Champ in-the-making
Hi can you let me know the two libraries that created the conflict…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.