OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
131 stars 169 forks source link

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

Closed schuemie closed 9 years ago

schuemie commented 9 years ago

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 commented 9 years ago

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:

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

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 https://github.com/OHDSI/WebAPI/issues/2.

schuemie commented 9 years ago

No luck, same problem when using vocab V5.

schuemie commented 9 years ago

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.