logicahealth / InfoButtons

Infobuttons are context-sensitive links embedded in the electronic health record (EHR). They use clinical context information from the EHR, such as patient demographics, medications, diagnoses, user role, and clinical setting to help find answers to clinicians' and patients' questions using online health information resources.
28 stars 29 forks source link

logsDbDao - Possible dependency issue with 2.1 #17

Closed appliedhcs closed 7 years ago

appliedhcs commented 7 years ago

We have compiled oib-request following BUILDGUIDE provided within the same branch. However, when we deployed generated war file in Tomcat 8, it is not serving any requests or even html pages (InfobuttonQA.html or OpenInfobuttonDemo.html). Upon looking at catalina log file, it appears that deployment fails with severe error "org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logsDbDao': Unsatisfied dependency expressed through field 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [core-data-datasource-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set'"

Is this a bug or we missed something while going through build process?

aniskand commented 7 years ago

Would you mind sharing your datasource URLs that you configured in the oib-request pom.xml ? You can leave out the passwords of course. About the only cause I can think of for that error is if the datasource URL is not set correctly. It should be in the JDBC format of jdbc:mysql://domain:port/database

appliedhcs commented 7 years ago

Here is datasource section from pom.xml:

    <datasource1.url>jdbc:mysql://hostname:3306/valueset_and_log</datasource1.url>
    <datasource1.driver>com.mysql.jdbc.Driver</datasource1.driver>
    <datasource1.user>username</datasource1.user>
    <datasource1.password>password</datasource1.password>

    <datasource2.url>jdbc:mysql://hostname:3306/resource_profile</datasource2.url>
    <datasource2.driver>com.mysql.jdbc.Driver</datasource2.driver>
    <datasource2.user>username</datasource2.user>
    <datasource2.password>password</datasource2.password>

I had tried to look for any missing tables or schema indicated in BUILD Guide and it appears all is present within MySql.

Hope this helps.

aniskand commented 7 years ago

Yeah that looks correct to me. Did you make sure you completely deleted your entire Maven repository before building the new version? Also what version of Tomcat 8 are you using? I verified that the app deploys to Tomcat 7.0.57 and Tomcat 8.0.38. If you let me know which version of Tomcat 8 you're using, I can try it on my machine.

appliedhcs commented 7 years ago

This is our first attempt to build and deploy OpenInfoButton locally, so there should not be anything in Maven repository. We are using latest version of Tomcat 8.5.20 and latest version of MySQL 5.7.19. I had looked into valueset_and_log schema and noticed that logs table is empty. Also, when I compared it with "saveRequest" method from LogsDaoImpl.java, table seems to be containing all appropriate columns needed. If needed then I could delete and recreate this table to see if that makes any different.

Also, I had tried to rebuild using "mvn clean install -Dmaven.test.skip=true -U", however war file deployment generated same error.

One thing that comes to mind is that I believe initial build may have contained wrong username and password for the database connection. Pom.xml was modified with correct username and password before rebuild but I am not sure if maven had kept old info somewhere in the repository. If so then please let me know the best way to clean out Maven repository and do the build again.

aniskand commented 7 years ago

Ok, so I upgraded to Tomcat 8.5.20 and MySQL 5.7.20 (I had been using 5.5 previously) and then tried the application again. Everything still deploys fine with no errors. As for your POM file, just changing the username and password shouldn't cause any build or deployment errors, but I would definitely double check that your domain, port and credentials are correct for your installation.

If you would like to try and delete your Maven repository, you need to find a directory called .m2 and delete everything inside the repository folder inside it. It's location depends on your platform. Generally, it's located in your user home directory.

appliedhcs commented 7 years ago

Based on your recommendation, we performed clean build of all the files and that allowed final war file to be deployed without any errors on Tomcat 8.5.20. I suppose either there was a typo in one of the config files or something was being picked from the cache. In any case it is deployed now without any errors. We really appreciate your quick response on this matter.

What is the best method to test out request and responder functionality? Currently when I use following URL then it doesn't appear to generate proper response: http://localhost:8080/infobutton-service/infoRequest?representedOrganization.id.root=1.3.6.1.4.1.5884&patientPerson.administrativeGenderCode.c=F&age.v.v=47&age.v.u=a&taskContext.c.c=PROBLISTREV&mainSearchCriteria.v.c=595.9&mainSearchCriteria.v.cs=2.16.840.1.113883.6.103&mainSearchCriteria.v.dn=Cystitis&performer=PROV&informationRecipient=PROV&knowledgeResponseType=text/xml I had taken this URL from the one provided in tests excel file and replaced service.oib.utah.edu with localhost so I suppose oid may not be matching. Also, I am still not able to get to http://localhost:8080/infobutton-service/OpenInfobuttonDemo.html is that normal behavior after deployment or it should allow access to that html file? Following url is generating empty response: http://localhost:8080/openInfobutton/responder?mainSearchCriteria.v.c=579.0&mainSearchCriteria.v.cs=2.16.840.1.113883.6.103&taskContext.c.c=PROBLISTREV

It appears that we are close on getting our local install working and largely thanks to your effort and quick response. We really appreciate your insight into issues we are facing. As indicated before, since this is our first attempt it is likely that we are making some basic mistake. So once again we really appreciate your help.

aniskand commented 7 years ago

Awesome, I'm glad i could help! The best way to test functionality is using the LITE tool. That would be the oib-site-lite-ui project in the same github repository you got the manager and responder from. Get that setup and running, then you can proceed to downloading profiles and using the testing tool to test requests. Here's a user guide for LITE that you may find helpful,

http://www.openinfobutton.org/documentation/lite-users-guide

appliedhcs commented 7 years ago

aniskand, Thank you very much for your help, guidance and quick response. Everything seems to be running fine at this point as we continue to learn this wonderful tool.

gdelfiol commented 7 years ago

Glad to hear it’s working for you guys! Note that when you use LITE (as @aniskand suggested), you will need to setup your own organization OID or DNS on the config page, download the set of resource profiles you are interested in using, assign the profiles to your organization, and then change the organization in the URL requests (representedOrganization.id.root parameter). That’s the parameter that the infobutton manager uses to make the response institution-specific.

From: appliedhcs notifications@github.com Reply-To: VHAINNOVATIONS/InfoButtons reply@reply.github.com Date: Friday, August 18, 2017 at 12:20 PM To: VHAINNOVATIONS/InfoButtons InfoButtons@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [VHAINNOVATIONS/InfoButtons] logsDbDao - Possible dependency issue with 2.1 (#17)

Based on your recommendation, we performed clean build of all the files and that allowed final war file to be deployed without any errors on Tomcat 8.5.20. I suppose either there was a typo in one of the config files or something was being picked from the cache. In any case it is deployed now without any errors. We really appreciate your quick response on this matter.

What is the best method to test out request and responder functionality? Currently when I use following URL then it doesn't appear to generate proper response: http://localhost:8080/infobutton-service/infoRequest?representedOrganization.id.root=1.3.6.1.4.1.5884&patientPerson.administrativeGenderCode.c=F&age.v.v=47&age.v.u=a&taskContext.c.c=PROBLISTREV&mainSearchCriteria.v.c=595.9&mainSearchCriteria.v.cs=2.16.840.1.113883.6.103&mainSearchCriteria.v.dn=Cystitis&performer=PROV&informationRecipient=PROV&knowledgeResponseType=text/xml I had taken this URL from the one provided in tests excel file and replaced service.oib.utah.edu with localhost so I suppose oid may not be matching. Also, I am still not able to get to http://localhost:8080/infobutton-service/OpenInfobuttonDemo.html is that normal behavior after deployment or it should allow access to that html file? Following url is generating empty response: http://localhost:8080/openInfobutton/responder?mainSearchCriteria.v.c=579.0&mainSearchCriteria.v.cs=2.16.840.1.113883.6.103&taskContext.c.c=PROBLISTREV

It appears that we are close on getting our local install working and largely thanks to your effort and quick response. We really appreciate your insight into issues we are facing. As indicated before, since this is our first attempt it is likely that we are making some basic mistake. So once again we really appreciate your help.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/VHAINNOVATIONS/InfoButtons/issues/17#issuecomment-323425314, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD6r2dABKue2MqXBxb_uezoJJ0MZAXJLks5sZdV4gaJpZM4O7tex.