Web service client failed to connect with server using Basic Authentication.

Web service client failed to connect with server using Basic Authentication.

book

Article ID: KB0087675

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Abstract:
==========
Web service client failed to connect with server using Basic Authentication.


Description:
==========
After deploying on a database based domain, a web service client failed to connect with the server while using Basic Authentication and reported a 401 error. On the server side there was no error message.


Environment:
==========
TIBCO ActiveMatrix BusinessWorkss
 
Symptoms:
==========
On client side the following error is seen:
    <Data>
        <ns1:HttpClientException xmlns:ns1 = "http://schemas.tibco.com/bw/plugins/http/5.0/httpExceptions">
            <msg>The Http Server replied with a 4XX status code</msg>
            <msgCode>BW-HTTP-100000</msgCode>
            <ns2:statusLine xmlns:ns2 = "http://schemas.tibco.com/bw/plugins/http/5.0/cio">
                <httpVersion>HTTP/1.1</httpVersion>
                <statusCode>401</statusCode>
                <reasonPhrase>Unauthorized</reasonPhrase>
            </ns2:statusLine>
            <ns2:httpMessage xmlns:ns2 = "http://schemas.tibco.com/bw/plugins/http/5.0/cio">
                <headers>
                    <connection>close</connection>
                    <www-authenticate>BASIC realm="BWRealm"</www-authenticate>
                    <content-length>0</content-length>
                    <server>Apache-Coyote/1.1</server>
                    <date>Mon, 18 Nov 2013 08:59:16 GMT</date>
                </headers>
                <binaryContent/>
            </ns2:httpMessage>
        </ns1:HttpClientException>
    </Data>

On the server side, you will not see any error information in the server application's log file. But when you check the tsm.log you will find an error similar to the following:

2013 Nov 19 10:26:11:843 GMT 8 tsm Info [] [TRA-000000] StreamGobbler(ERROR) : data =
    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:662)
Caused by: com.tibco.runtime.pool.AllocationException: Connect failed to address: jdbc:oracle:thin:@jingshuguang-lt:1521:orcl@jun : java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

 
Cause:
==========
When using a DB based domain to deploy the server side project you should add the JDBC driver of the domain in the class path.
 
Resolution:
==========
Add JDBC driver to the class path tibco.env.STD_EXT_CP in the application's tra file. Then restart the server side application.

Issue/Introduction

Web service client failed to connect with server using Basic Authentication.