Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: relation "concept" does not exist (when using PostgreSQL) #2

Closed
schuemie opened this issue Jan 12, 2015 · 3 comments
Closed

Comments

@schuemie
Copy link
Member

I get this error

javax.servlet.ServletException: java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: relation "concept" does not exist
  Position: 83
    org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:397)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

when using URL

http://localhost:8080/WebAPI/vocabulary/concept/0

Here's the content of my web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
        <param-name>database.driver</param-name>
        <param-value>org.postgresql.Driver</param-value>
    </context-param>
    <context-param>
        <param-name>database.url</param-name>
        <!-- example for Microsoft SQL Server -->
        <param-value>jdbc:postgresql://localhost/hku?user=vocabuser&amp;password=secret</param-value> 
    </context-param>
    <context-param>
        <param-name>database.dialect</param-name>
        <param-value>postgresql</param-value>
    </context-param>    
    <context-param>
        <param-name>database.cdm.schema</param-name>
        <param-value>vocabulary</param-value>
    </context-param>    
    <context-param>
        <param-name>database.results.schema</param-name>
        <param-value>vocabulary</param-value>
    </context-param>    
    <servlet>
        <servlet-name>Jersey Web Application</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>jersey.config.server.provider.packages</param-name>
            <param-value>org.ohdsi.webapi</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jersey Web Application</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
</web-app>

So far I've just uploaded the vocabulary tables (V4) in the vocabulary schema. Using PosgreSQL, Java 1.7, Apache + Tomcat 7.

@jduke99
Copy link
Contributor

jduke99 commented Jan 12, 2015

I had to modify to work with V4. The default version on github is designed
for V5 vocab.
On Jan 11, 2015 9:30 PM, "Martijn Schuemie" notifications@github.com
wrote:

I get this error

javax.servlet.ServletException: java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: relation "concept" does not exist
Position: 83
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:397)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

when using URL

http://localhost:8080/WebAPI/vocabulary/concept/0

Here's the content of my web.xml:

database.driver org.postgresql.Driver database.url jdbc:postgresql://localhost/hku?user=vocabuser&password=secret database.dialect postgresql database.cdm.schema vocabulary database.results.schema vocabulary Jersey Web Application org.glassfish.jersey.servlet.ServletContainer jersey.config.server.provider.packages org.ohdsi.webapi 1 Jersey Web Application /*

So far I've just uploaded the vocabulary tables (V4) in the vocabulary
schema. Using PosgreSQL, Java 1.7, Apache + Tomcat 7.

Reply to this email directly or view it on GitHub
#2.

@schuemie
Copy link
Member Author

No luck, same problem when using vocab V5.

@schuemie
Copy link
Member Author

Never mind. Somehow the WAR file didn't rebuild completely. Removed project from Eclipse, reverted all changes, re-imported and rebuilt, and now it's working.

fdefalco pushed a commit that referenced this issue Oct 9, 2015
initial progress on connecting the webapi to the RDF endpoint via sparql
chrisknoll pushed a commit that referenced this issue Jan 27, 2017
* ignore IntelliJ files
add'l characterization/summarization work
added SQL files for summary service from Achilles::ExportToJSON
added data transfer objects (DTOs)
modified CDMResultsService, made several sql translation changes, moved
mappers and DTOs to report package in preparation for refactoring.
added add'l DTOs to report package and stubbed out service and runner classes.
fixed imports in some DTOs and RowMappers

* Use same method (getTreemap) for all (non-temporal) treemaps
Add generic row mapper, text hack impls
made several sql translation-related changes
Use same method (getTreemap) for all (non-temporal) treemaps
Use AS keyword in all cdm report query aliases
Remove text hack and camel case column names in cdm report queries
Replace all treemap endpoints with a single generic implementation
 * Rename all treemap CDM report files to treemap.sql
 * Enquote aliases in CDM report queries to preserve case
 * Add GenericRowMapper ctor with ObjectMapper for performance
 * CDMResultsAnalysisRunner.getTreemap returns ArrayNode

Fix condition CDM results queries (by concept)

 * include conceptId parameter
 * rename sqlAgeAtFirstDiagnosis to sqlAgeAtFirstOccurrence
 * modify sqlConditionsByType to check vocabulary_id, not domain_id
 * cast xCalendarYear to INT in sqlPrevalenceByGenderAgeYear

added fixes to row mapping in /person and dashboard

implemented /achillesheel, /datadensity
started implementation of /death
refactored CohortAttributeMapper --> CDMAttributeMapper
created new report data objects
drop unused/superfluous CDMResultsAnalysisRunner

fixed /datadensity

Fix queries associated with generic drilldown reports

 * Data types include conditionera, drug, drugera, measurement, observation, procedure, visit
 * Queries include AgeAtFirstOccurrence, PrevalenceByGenderAgeYear, ByType, ByMonth
 * Include parameter @conceptId
 * Cast xCalendarYear to INT (where applicable)

Remove obsoleted code from CDMResultsService (activates observation reports)

Standardize names of "by type" query files for cdm reports to sqlByType.sql

Applies to condition, drug, measurement, observation, procedure

Add cdm_database_schema to CDMResultsAnalysisRunner standard columns (for measurement treemap)

Fix typo in sqlVisitDurationByType.sql

cleaned up and changes /achillesheel --> /heel

	Add cdm_database_schema to CDMResultsAnalysisRunner standard columns as per mark-velez/* #e862d53

changed endpoint signature (/heel -->/achillesheel), fixed summary yob and yob in person report

fixed null totalRecords element in Data Density report

added summary to dashboard report in CDM results service

implemented death report

removed superfluous code (imports, methods, etc)

Reorganize sql files for cdm drilldowns (to reduce text wrangling) (#2)

* Remove sql prefix from files names
 * Camel-case filename
 * Move drilldown files to folders
 * Delete treemap files that were reverted back

removed unused method - renderDrillDownSql()

changed access modifier on several fields and methods

removed unused test and related resource

made post-rebase reconciliations in prep for PR
anthonysena added a commit that referenced this issue Feb 22, 2017
* Apache Shiro integration.

* Reflect HTTP verb normalization.

* Final updates to Shiro implementation
* Added hibernate dialect to POM.xml.
* Added schema qualifier for FK references in migraiton scripts

* Fixes #108 (#163)

* ignore IntelliJ files
add'l characterization/summarization work
added SQL files for summary service from Achilles::ExportToJSON
added data transfer objects (DTOs)
modified CDMResultsService, made several sql translation changes, moved
mappers and DTOs to report package in preparation for refactoring.
added add'l DTOs to report package and stubbed out service and runner classes.
fixed imports in some DTOs and RowMappers

* Use same method (getTreemap) for all (non-temporal) treemaps
Add generic row mapper, text hack impls
made several sql translation-related changes
Use same method (getTreemap) for all (non-temporal) treemaps
Use AS keyword in all cdm report query aliases
Remove text hack and camel case column names in cdm report queries
Replace all treemap endpoints with a single generic implementation
 * Rename all treemap CDM report files to treemap.sql
 * Enquote aliases in CDM report queries to preserve case
 * Add GenericRowMapper ctor with ObjectMapper for performance
 * CDMResultsAnalysisRunner.getTreemap returns ArrayNode

Fix condition CDM results queries (by concept)

 * include conceptId parameter
 * rename sqlAgeAtFirstDiagnosis to sqlAgeAtFirstOccurrence
 * modify sqlConditionsByType to check vocabulary_id, not domain_id
 * cast xCalendarYear to INT in sqlPrevalenceByGenderAgeYear

added fixes to row mapping in /person and dashboard

implemented /achillesheel, /datadensity
started implementation of /death
refactored CohortAttributeMapper --> CDMAttributeMapper
created new report data objects
drop unused/superfluous CDMResultsAnalysisRunner

fixed /datadensity

Fix queries associated with generic drilldown reports

 * Data types include conditionera, drug, drugera, measurement, observation, procedure, visit
 * Queries include AgeAtFirstOccurrence, PrevalenceByGenderAgeYear, ByType, ByMonth
 * Include parameter @conceptId
 * Cast xCalendarYear to INT (where applicable)

Remove obsoleted code from CDMResultsService (activates observation reports)

Standardize names of "by type" query files for cdm reports to sqlByType.sql

Applies to condition, drug, measurement, observation, procedure

Add cdm_database_schema to CDMResultsAnalysisRunner standard columns (for measurement treemap)

Fix typo in sqlVisitDurationByType.sql

cleaned up and changes /achillesheel --> /heel

	Add cdm_database_schema to CDMResultsAnalysisRunner standard columns as per mark-velez/* #e862d53

changed endpoint signature (/heel -->/achillesheel), fixed summary yob and yob in person report

fixed null totalRecords element in Data Density report

added summary to dashboard report in CDM results service

implemented death report

removed superfluous code (imports, methods, etc)

Reorganize sql files for cdm drilldowns (to reduce text wrangling) (#2)

* Remove sql prefix from files names
 * Camel-case filename
 * Move drilldown files to folders
 * Delete treemap files that were reverted back

removed unused method - renderDrillDownSql()

changed access modifier on several fields and methods

removed unused test and related resource

made post-rebase reconciliations in prep for PR

* Fixes #167 (#168)

* Fixes #170

* removed extraneous folder

* Added support for user-defined OP start and end dates.

* Route cleanup.

Made service routes for CDMResutlsService, CohortResultsService, EvidenceService and Vocabulary service to stem from the url of the service (such as /cdmresults) vs. stemming from a source key.

Added a default handler for vocabulary searching as an example of where it's advantageous to use a route of /vocabulary/search/{query} directly instead of coding to a specific source key (which may not always be available).

Fixes #173.

* Exposing default routes for vocabulary service endpoints that previously required a source key.

* Added WebAPI endpoint: /info.

Currently only contains version information, stored in pom.xml property 'webapi.version'.

Fixes #176.

* Fixes #177

* Fixes #178
fdefalco pushed a commit that referenced this issue Oct 26, 2017
pavgra added a commit that referenced this issue Jun 6, 2019
pavgra added a commit that referenced this issue Jun 6, 2019
pavgra added a commit that referenced this issue Jun 6, 2019
pavgra added a commit that referenced this issue Jun 6, 2019
pavgra added a commit that referenced this issue Aug 13, 2019
wivern pushed a commit that referenced this issue Aug 13, 2019
…int (#1293)

* Fixes permissions for newly created Source. Fixes "/permission" endpoint

* Remove unused line

* Preciser role search

* Preciser role search #2

* Preciser role search #3
pieterlukasse pushed a commit to pieterlukasse/WebAPI that referenced this issue Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants