I thought it might be a good idea to gather together in one place all the SOAP/BPEL/Alfresco error messages that are encountered along the way, together with suggestions on how to solve the underlying problem.

org.apache.ws.security.WSSecurityException#

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Server.generalException</faultcode>
            <faultstring>WSDoAllReceiver: security processing failed; nested exception is: 
	org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized</faultstring>
            <detail>
                <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">my.webserviceserver.ac.uk</ns1:hostname>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

The error message given is that The security token could not be authenticated or authorized. This might mean that your security token is not valid: it doesn't match the value associated with your Alfresco Java session. Is it being transferred without error from the Authentication Service output to the appropriate request header?

This exception will also be thrown if the UsernameToken element is not compliant with the precise terms of the WSS security profile (not necessarily equivalent to being XML schema-valid). For example, in an older version of Alfresco (with an earlier version of Axis, presumably) I could get away with the following:

 <UsernameToken>
     <Username>admin</Username>
     <Password>TICKET_84f1af68138105a9895948126a9db7ddb77c8dce</Password>
 </UsernameToken>

However, in the WSS UsernameToken specs there is a mandatory Type attribute associated with the Password element. For the profile being used the Type attribute needs to have the value:

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText

Hence, what is required for the UsernameToken element is:

 <UsernameToken>
     <Username>admin</Username>
     <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_84f1af68138105a9895948126a9db7ddb77c8dce</Password>
 </UsernameToken>

BPEL Selection Failure#

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode xmlns="">SOAP-ENV:Server</faultcode>
      <faultstring xmlns="">BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure; Fault Data is &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;jbi:message xmlns:sxeh=&amp;quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&amp;quot; type=&amp;quot;sxeh:faultMessage&amp;quot; version=&amp;quot;1.0&amp;quot; xmlns:jbi=&amp;quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&amp;quot;&amp;gt;&amp;lt;jbi:part&amp;gt;BPCOR-6174: Selection Failure occurred in BPEL({http://enterprise.netbeans.org/bpel/amset12createuser/amset12createuser}amset12createuser) at line 83&amp;lt;/jbi:part&amp;gt;&amp;lt;/jbi:message&amp;gt;. Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
      <faultactor xmlns="">sun-bpel-engine</faultactor>
      <detail xmlns="">
        <detailText>BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure; Fault Data is &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;jbi:message xmlns:sxeh=&amp;quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&amp;quot; type=&amp;quot;sxeh:faultMessage&amp;quot; version=&amp;quot;1.0&amp;quot; xmlns:jbi=&amp;quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&amp;quot;&amp;gt;&amp;lt;jbi:part&amp;gt;BPCOR-6174: Selection Failure occurred in BPEL({http://enterprise.netbeans.org/bpel/amset12createuser/amset12createuser}amset12createuser) at line 83&amp;lt;/jbi:part&amp;gt;&amp;lt;/jbi:message&amp;gt;. Sending errors for the pending requests in the process scope before terminating the process instance
   Caused by: BPCOR-6174: Selection Failure occurred in BPEL({http://enterprise.netbeans.org/bpel/amset12createuser/amset12createuser}amset12createuser) at line 83
BPCOR-6129: Line Number is 73
BPCOR-6130: Activity Name is Assign4</detailText>
      </detail>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Seems to occur when either a From or a To element in an Assign statement is lacking a value. It's a sneaky one because on first contact it seems to be more serious that it actually is and can have one scurrying after namespace errors.


I first saw it when I left the properties element of the AdministationService.createUsers() SOAP request empty:

<adm:properties>
 <ns:name></ns:name>
  <ns:isMultiValue></ns:isMultiValue>
  <ns:value></ns:value>
  <ns:values></ns:values>
</adm:properties>

It disappeared when I supplied an email property:

<adm:properties>
  <ns:name>{http://www.alfresco.org/model/content/1.0}email</ns:name>
  <ns:isMultiValue>false</ns:isMultiValue>
  <ns:value>magneto@badmutants.com</ns:value>
  <ns:values></ns:values>
</adm:properties>

If it were imperative to create new users with no properties apart from userName and password, then remove the Assign copy statements involving the properties element in the BPEL file.

User already exists#

In a production system there would have to be tests and fault handling for trying to create a user that already exists, but the raw fault is as follows.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Server.generalException</faultcode>
            <faultstring/>
            <detail>
                <faultData>
                    <ns1:errorCode xmlns:ns1="http://www.alfresco.org/ws/service/action/1.0">0</ns1:errorCode>
                    <ns2:message xmlns:ns2="http://www.alfresco.org/ws/service/action/1.0">User already exists: user40</ns2:message>
                </faultData>
                <ns3:exceptionName xmlns:ns3="http://xml.apache.org/axis/">org.alfresco.repo.webservice.action.ActionFault</ns3:exceptionName>
                <ns4:stackTrace xmlns:ns4="http://xml.apache.org/axis/">
	at org.alfresco.repo.webservice.administration.AdministrationWebService.createUsers(AdministrationWebService.java:393)
	at sun.reflect.GeneratedMethodAccessor4026.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
	at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
	at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
	at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
	at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
	at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
	at java.lang.Thread.run(Thread.java:619)
</ns4:stackTrace>
                <ns5:hostname xmlns:ns5="http://xml.apache.org/axis/">fbsdpcu167.leeds.ac.uk</ns5:hostname>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

Hierarchy Request Error#

Caused by: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.

One cause of this error was the illegal use of ALL as an input AuthorityType instead of either USER, GROUP or ROLE.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode xmlns="">SOAP-ENV:Server</faultcode>
      <faultstring xmlns="">BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;jbi:message xmlns:sxeh=&amp;quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&amp;quot; type=&amp;quot;sxeh:faultMessage&amp;quot; version=&amp;quot;1.0&amp;quot; xmlns:jbi=&amp;quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&amp;quot;&amp;gt;&amp;lt;jbi:part&amp;gt;HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. &amp;lt;/jbi:part&amp;gt;&amp;lt;/jbi:message&amp;gt;. Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
      <faultactor xmlns="">sun-bpel-engine</faultactor>
      <detail xmlns="">
        <detailText>BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;jbi:message xmlns:sxeh=&amp;quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&amp;quot; type=&amp;quot;sxeh:faultMessage&amp;quot; version=&amp;quot;1.0&amp;quot; xmlns:jbi=&amp;quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&amp;quot;&amp;gt;&amp;lt;jbi:part&amp;gt;HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. &amp;lt;/jbi:part&amp;gt;&amp;lt;/jbi:message&amp;gt;. Sending errors for the pending requests in the process scope before terminating the process instance
   Caused by: BPCOR-6131: An Error status was received while doing an invoke (partnerLink=AccessControlPL, portType={http://www.alfresco.org/ws/service/accesscontrol/1.0}AccessControlServiceSoapPort, operation=getAllAuthorities)
BPCOR-6129: Line Number is 103
BPCOR-6130: Activity Name is Invoke5
   Caused by: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. </detailText>
      </detail>
    </SOAP-ENV:Fault>

Connection Refused#

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode xmlns="">SOAP-ENV:Server</faultcode>
      <faultstring xmlns="">BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;jbi:message xmlns:sxeh=&amp;quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&amp;quot; type=&amp;quot;sxeh:faultMessage&amp;quot; version=&amp;quot;1.0&amp;quot; xmlns:jbi=&amp;quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&amp;quot;&amp;gt;&amp;lt;jbi:part&amp;gt;HTTP transport error: java.net.ConnectException: Connection refused: connect&amp;lt;/jbi:part&amp;gt;&amp;lt;/jbi:message&amp;gt;. Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
      <faultactor xmlns="">sun-bpel-engine</faultactor>
      <detail xmlns="">
        <detailText>BPCOR-6135: A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;jbi:message xmlns:sxeh=&amp;quot;http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling&amp;quot; type=&amp;quot;sxeh:faultMessage&amp;quot; version=&amp;quot;1.0&amp;quot; xmlns:jbi=&amp;quot;http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper&amp;quot;&amp;gt;&amp;lt;jbi:part&amp;gt;HTTP transport error: java.net.ConnectException: Connection refused: connect&amp;lt;/jbi:part&amp;gt;&amp;lt;/jbi:message&amp;gt;. Sending errors for the pending requests in the process scope before terminating the process instance
   Caused by: BPCOR-6131: An Error status was received while doing an invoke (partnerLink=AuthenticationServicePL, portType={http://www.alfresco.org/ws/service/authentication/1.0}AuthenticationServiceSoapPort, operation=startSession)
BPCOR-6129: Line Number is 69
BPCOR-6130: Activity Name is Invoke1
   Caused by: HTTP transport error: java.net.ConnectException: Connection refused: connect
   Caused by: Connection refused: connect</detailText>
      </detail>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If you are using port redirect and wsmonitor is not running then this error will appear.

This error will also appear if the application server on which Alfresco is loaded is down.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-) was last changed on 17-Nov-2009 13:22 by clayton