Forum Discussion

Debz's avatar
Debz
Contributor
8 years ago

HTTP/1.1 401 Unauthorized warning followed by ORA-00936 when building via Jenkins

Hi,

 

I encounter warnings and errors when creating a build with Jenkins but the test is running fine whenever I run it directly with SoapUI.

 

DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 401 Unauthorized
DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
DEBUG [HttpClientSupport$SoapUIHttpClient] Target requested authentication
WARN [HttpClientSupport$SoapUIHttpClient] Authentication error: Unable to respond to any of these challenges:{}
...
Error [SoapUI] An error occured [ORA-00936:missing expression]
....

 

I'm wondering if there is any setup I should watch out for? We are using tokens but there's also an API request to generate one before proceeding with the rest of the test cases so I'm wondering where the 401 is coming from. For ORA-00093, when I searched online it says on one page that this might be something on SELECT statement but why is it failing only when creating a build via Jenkins?
  • Nastya_Khovrina's avatar
    Nastya_Khovrina
    SmartBear Alumni (Retired)

    Hi Debra,

     

    Thank you for your post. 

    1. As for the Authentication error, I advise that you check that the pre-emptive authentication option is enabled in Preferences > HTTP > Adds authentication information to outgoing request. Since you use tokens, make sure that a token isn't expired.

     

    2. Yes, basically this error means that some part of an SQL clause or expression has been omitted. You can log the SQL statement when you run tests via TestRunner (via Jenkins) and check whether it works fine. The following article can be helpful for you: http://www.developerfeed.com/javasqlsqlexception-ora-00936-missing-expression/.

  • nmrao's avatar
    nmrao
    Champion Level 3
    You mean it works well from SoapUI and only does not work from jenkins? what is query causing the issue?
    • raiqee's avatar
      raiqee
      Occasional Contributor

      nmrao wrote:
      You mean it works well from SoapUI and only does not work from jenkins? what is query causing the issue?

      Hi Rao,

       

             We only encounter the said error in Jenkins if we used the non-active environment from our SoapUI project file.. but in our Pom file we defined another environment, please see below set-up.

      <configuration>
      <projectFile>C:\Git\soapui\BTS API.xml</projectFile>
      <outputFolder>${project.basedir}/output/</outputFolder>
      <junitReport>true</junitReport>
      <testSuite>All Markets</testSuite>
      <environment>ISBB-162</environment>
      <exportwAll>true</exportwAll>
      <printReport>true</printReport>
      <testFailIgnore>true</testFailIgnore>
      </configuration>

      the active environment in our project file is Vanilla and in this POM we want to run the ISBB-162 environment, but when jenkins execute the Pom file we are encountering below error,

      10:29:56,850 ERROR [SoapUI] An error occurred [ORA-00936: missing expression
      ], see error log for details
      java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
      
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774)
      	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798)
      	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:4901)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1385)
      	at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.load(JdbcSubmit.java:206)
      	at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.runQuery(JdbcSubmit.java:174)
      	at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.run(JdbcSubmit.java:147)
      	at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.<init>(JdbcSubmit.java:79)
      	at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcRequest.submit(JdbcRequest.java:116)
      	at com.eviware.soapui.impl.wsdl.teststeps.JdbcRequestTestStep.run(JdbcRequestTestStep.java:192)
      	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:213)
      	at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
      	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:139)
      	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47)
      	at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:129)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)

      it works if we use the active environment, the solution we are doing right now to run the other environment is by changing the active environment. 

       

      We have the same issue from this post 

      https://community.smartbear.com/t5/SoapUI-NG/Maven-SoapUi-how-to-parametrized-environment-endpoint/td-p/95660

      • nmrao's avatar
        nmrao
        Champion Level 3
        No voice in maven.

        Mainly I was asking for the query which is causing the failure.

        It appears that Nastya_Khovrina already suggested you regarding oracle error message. Try it.
  • kishs1991's avatar
    kishs1991
    New Contributor

    Hi,

     

    I am also facing same issue -

     

    19:48:01,474 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 401 Unauthorized
    19:48:01,502 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
    19:48:01,503 DEBUG [HttpClientSupport$SoapUIHttpClient] Target requested authentication
    19:48:01,503 WARN  [HttpClientSupport$SoapUIHttpClient] Authentication error: Unable to respond to any of these challenges: {}
    19:48:02,244 INFO  [SoapUITestCaseRunner] Finished running SoapUI testcase [GetProcess TestCase], time taken: 2320ms, status: FINISHED
    19:48:02,246 INFO  [SoapUITestCaseRunner] TestCase [GetProcess TestCase] finished with status [FINISHED] in 2320ms
    
    SoapUI 5.4.0 TestCaseRunner Summary
    -----------------------------
    Time Taken: 3734ms
    Total TestSuites: 0
    Total TestCases: 1 (0 failed)
    Total TestSteps: 1
    Total Request Assertions: 0
    Total Failed Assertions: 0
    Total Exported Results: 0

    Could you please help.

    • richie's avatar
      richie
      Community Hero

      kishs1991

       

      is this the same issue?

       

      Debz is struggling running SoapUI via jenkins and an Oracle error is being reported in his/her response - yes she's getting a 401 - but the 'real issue' appears to be an Oracle error.

       

      You have no Oracle error included in your stack trace making me think it isn't the same error.....

       

      cheers,

       

      richie

      • kishs1991's avatar
        kishs1991
        New Contributor
        richie, For me it is not showing 'ORA-00936' error but it is showing 'HTTP/1.1 401 Unauthorized'. Simple request is getting successfull but while running testrunner only is showing the error. The request has three headers added. I think testrunner is not getting these headers where while executing simple request it is taking these headers. Do you know if there is option to pass headers to testrunner ?