We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

OC-WS project not getting deployed

I have followed the instructions from  https://docs.openclinica.com/3.1/installation/installing-openclinica-windows

The "OpenClinica" web project is working as expected but when we access the http://localhost:8080/OpenClinica-ws

browser shows "HTTP Status 404 - /OpenClinica-ws" and I get the following on tomcat log.

My datainfo.properties

dbType=postgres
dbUser=clinica
dbPass=clinica
db=${WEBAPP.lower}
dbPort=5432
dbHost=localhost

Would be great if get the right pointers to figure out what is wrong.
<log>
 < sortSpecification(null)
 < orderByFragment(null)
Jun 03, 2015 6:44:09 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Jun 03, 2015 6:44:09 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/OpenClinica-ws] startup failed due to previous errors
Jun 03, 2015 6:44:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/OpenClinica-ws] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
</log>

thanks,
Santosh

Comments

  • GerbenRienkGerbenRienk Posts: 838 ✭✭✭

    Hi Santosh,

    Could you try to replace ${WEBAPP.lower} in db=${WEBAPP.lower} with the actual name of your database?

    Thanks,

    Gerben Rienk

  • tkhajatkhaja Posts: 62 ✭✭
    via Email
    Hi Santosh,

    Is this the datainfo.properties for openclinica-ws? If so, your "db" should
    be set to "openclinica" or whatever name you used to create your database
    for openclinica WEBAPP and not ${WEBAPP.lower}. Because ${WEBAPP.lower} is
    equivalent to openclinica-ws and this is not the database we want to
    connect.

    Hope it helps. Let me know if you need more information.

    Thanks,
    Thasbiha

    On Wed, Jun 3, 2015 at 9:26 AM, smaskar
    wrote:

    > I have followed the instructions from
    > https://docs.openclinica.com/3.1/installation/installing-openclinica-windows
    >
    > The "OpenClinica" web project is working as expected but when we access
    > the http://localhost:8080/OpenClinica-ws
    >
    > browser shows "HTTP Status 404 - /OpenClinica-ws" and I get the following
    > on tomcat log.
    >
    > My datainfo.properties
    >
    > dbType=postgres
    > dbUser=clinica
    > dbPass=clinica
    > db=${WEBAPP.lower}
    > dbPort=5432
    > dbHost=localhost
    >
    > Would be great if get the right pointers to figure out what is wrong.
    >
    > < sortSpecification(null)
    > < orderByFragment(null)
    > Jun 03, 2015 6:44:09 PM org.apache.catalina.core.StandardContext
    > startInternal
    > SEVERE: One or more listeners failed to start. Full details will be found
    > in the appropriate container log file
    > Jun 03, 2015 6:44:09 PM org.apache.catalina.core.StandardContext
    > startInternal
    > SEVERE: Context [/OpenClinica-ws] startup failed due to previous errors
    > Jun 03, 2015 6:44:09 PM org.apache.catalina.loader.WebappClassLoader
    > clearReferencesJdbc
    > SEVERE: The web application [/OpenClinica-ws] registered the JDBC driver
    > [org.postgresql.Driver] but failed to unregister it when the web
    > application was stopped. To prevent a memory leak, the JDBC Driver has been
    > forcibly unregistered.
    >
    >
    > thanks,
    > Santosh
    >
    > --
    > To manage your email notifications, please visit:
    > https://www.openclinica.com/forums#/profile/preferences
    >
    > Reply to this email directly or follow the link below to check it out:
    >
    > https://forums.openclinica.com/discussion/15659/oc-ws-project-not-getting-deployed
    >
    >
  • smaskarsmaskar Posts: 6
    Thanks to both of you Thasbiha, Gerben.

    after changing the database name it started working.

    Appreciate your quick help.

    Just wanted to know if you aware of php library to access the OC data using webservice. I am exploring the https://github.com/lindsay-stevens-kirby/openclinica_scripts/tree/master/webservices but if you know any comments on this would help.

    thanks,
    Santosh
  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    Hi santosh

    I wrote the php client, so if you have any questions you can ask here or on
    github. There is example code in the folder with the client that may be
    useful to get started.

    I know at least it is in use now in an application that was shown at OC15
    called ODIN, which is a UI for facilitating data mapping and import to
    OpenClinica. ODIN is written by Csaba Halmagyi, and he may also be able to
    answer questions about the php client.

    I have some updates from that project that I will add soon, which allows
    the ODM object constructor to add additional copies of objects for larger /
    more complex data imports than are shown in the client examples.

    My other comment is that the php client is for the SOAP web services only;
    these are described on the OpenClinica technical documentation. There is
    currently no code for the newer REST web services which at the moment are
    just useful for reading data. If you happen to write REST client code or
    have any other improvements to add these would be very welcome.

    Best regards
    Lindsay
  • smaskarsmaskar Posts: 6
    Thanks Lindsay.

    Your comments helped me to get going my exploration. I will use your php client to get the data from OC. If I need any help, will post that here or on github.

    -Santosh
  • smaskarsmaskar Posts: 6
    Hi Lindsay,

    I did not see anything related to SSL while setting up the OC ( https://docs.openclinica.com/3.1/installation/installing-openclinica-windows) but in "OpenClinicaWSExamples.php" there is call to
    https://localhost:8443/OpenClinica3141-ws/"

    Looks like I am missing something. Can you point to documentation or link where I can setup the SSL.

    thanks
    Santosh
  • smaskarsmaskar Posts: 6
    Hi Lindsay,

    I am getting the following response from when I hit http://localhost/oc/OpenClinicaWSExamples.php

    not sure if this is due to SSL.

    --start test calls-- last request: root12345678VHCRP1107 last response: SOAP-ENV:Clientcom.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username Password Token Failed; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username Password Token Failedsoapfault: SoapFault exception: [SOAP-ENV:Client] com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username Password Token Failed; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username Password Token Failed in /var/www/html/oc/OpenClinicaSoapWebService.php:87 Stack trace: #0 /var/www/html/oc/OpenClinicaSoapWebService.php(87): SoapClient->__soapCall('listAll', Array) #1 /var/www/html/oc/OpenClinicaSoapWebService.php(372): OpenClinicaSoapWebService->callSoapClient('http://localhos...', 'http://openclin...', 'listAll', Object(SoapVar)) #2 /var/www/html/oc/OpenClinicaWSExamples.php(59): OpenClinicaSoapWebService->StudyEventDefinitionListAll('VHCRP1107') #3 {main}

    thanks,
    Santosh
  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    SSL is a web server configuration, which should be done in addition to
    OpenClinica setup. It can be set up in Tomcat or in the main server if
    Apache or Nginx is in front of Tomcat. For development a self signed
    certificate could be used, or just plain http.

    The error message you posted shows that there is an authentication failure,
    and that you are querying for one of my studies VHCRP1107. The example code
    requires that you substitute details from your OpenClinica instance - a
    username and password of an account you have created with SOAP privileges,
    and the identifiers from a study you have created.

    Also the code is meant to be incorporated into some other system, in that
    it will handle interaction with OpenClinica, but not generate for example a
    formatted output or UI.
    Hi Lindsay,

    I am getting the following response from when I hit
    http://localhost/oc/OpenClinicaWSExamples.php

    not sure if this is due to SSL.

    --start test calls-- last request: root12345678VHCRP1107 last response:
    SOAP-ENV:Clientcom.sun.xml.wss.impl.WssSoapFaultException: Authentication
    of Username Password Token Failed; nested exception is
    com.sun.xml.wss.XWSSecurityException:
    com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username
    Password Token Failedsoapfault: SoapFault exception: [SOAP-ENV:Client]
    com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username
    Password Token Failed; nested exception is
    com.sun.xml.wss.XWSSecurityException:
    com.sun.xml.wss.impl.WssSoapFaultException: Authentication of Username
    Password Token Failed in
    /var/www/html/oc/OpenClinicaSoapWebService.php:87 Stack trace: #0
    /var/www/html/oc/OpenClinicaSoapWebService.php(87):
    SoapClient->__soapCall('listAll', Array) #1
    /var/www/html/oc/OpenClinicaSoapWebService.php(372):
    OpenClinicaSoapWebService->callSoapClient('http://localhos...', '
    http://openclin...', 'listAll', Object(SoapVar)) #2
    /var/www/html/oc/OpenClinicaWSExamples.php(59):
    OpenClinicaSoapWebService->StudyEventDefinitionListAll('VHCRP1107') #3
    {main}

    thanks,
    Santosh
  • Csaba.HalmagyiCsaba.Halmagyi Posts: 54 ✭✭
    Lindsay,

    Thanks for mentioning the project. I will finish the user documentation soon and publish ODIN on github as well.

    Santosh feel free to reuse ODIN scripts and classes for your purposes.
This discussion has been closed.