Hi Shinji,
Cool, that worked, thank you.
I now got my sessionID and tried to create an EHR with
curl -X POST -H 'Ehr-Session:
sessionId:172.18.0.3-root-1535570266743--2067865307-17' -i
http://localhost:8888/rest/v1/ehr
That resulted in this response:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /rest/v1/ehr. Reason:
<pre> #1.0.0 Invocation exception to
method:create:org.jooq.exception.DataAccessException: SQL [select 1 as
"one" where exists (select 1 as "one" from "ehr"."party_identified"
where ("ehr"."party_identified"."party_ref_namespace" = ? and
"ehr"."party_identified"."party_ref_scheme" = ? and
"ehr"."party_identified"."party_ref_value" = ?))]; This connection has
been closed.</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>
This is the output of the application inside the Docker:
app_1 | INFO - com.ethercis.vehr.AccessLog.info(64) |
userId=USER[SHIRO]_root,method=post,path=rest/v1/ehr,qryparams={x-client-ip=172.18.0.1;}
app_1 | WARN - com.ethercis.vehr.RequestDispatcher.dispatch(672) |
Invocation exception to method:create
app_1 | org.jooq.exception.DataAccessException: SQL [select 1 as
"one" where exists (select 1 as "one" from "ehr"."party_identified"
where ("ehr"."party_identified"."party_ref_namespace" = ? and
"ehr"."party_identified"."party_ref_scheme" = ? and
"ehr"."party_identified"."party_ref_value" = ?))]; This connection has
been closed.
app_1 | at org.jooq.impl.Tools.translate(Tools.java:1690)
app_1 | at
org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:660)
app_1 | at
org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:354)
app_1 | at
org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:341)
app_1 | at
org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:328)
app_1 | at
org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:493)
app_1 | at org.jooq.impl.SelectImpl.fetchOne(SelectImpl.java:2735)
app_1 | at
org.jooq.impl.DefaultDSLContext.fetchExists(DefaultDSLContext.java:2663)
app_1 | at
org.jooq.impl.DefaultDSLContext.fetchExists(DefaultDSLContext.java:2673)
app_1 | at
com.ethercis.dao.access.jooq.PartyIdentifiedAccess.findReferencedParty(PartyIdentifiedAccess.java:301)
app_1 | at
com.ethercis.dao.access.jooq.PartyIdentifiedAccess.getOrCreateParty(PartyIdentifiedAccess.java:385)
app_1 | at
com.ethercis.dao.access.interfaces.I_PartyIdentifiedAccess.getOrCreatePartyByExternalRef(I_PartyIdentifiedAccess.java:182)
app_1 | at
com.ethercis.persistence.AuditSetter.getCommitter(AuditSetter.java:66)
app_1 | at
com.ethercis.persistence.AuditSetter.handleProperties(AuditSetter.java:60)
app_1 | at
com.ethercis.ehrservice.EhrService.create(EhrService.java:226)
app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
app_1 | at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
app_1 | at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
app_1 | at java.lang.reflect.Method.invoke(Method.java:498)
app_1 | at
com.ethercis.vehr.RequestDispatcher.dispatch(RequestDispatcher.java:654)
app_1 | at
com.ethercis.vehr.RequestDispatcher.dispatch(RequestDispatcher.java:691)
app_1 | at
com.ethercis.vehr.AccessGateService.queryHandler(AccessGateService.java:295)
app_1 | at
com.ethercis.vehr.VEhrGateServlet.syncExecute(VEhrGateServlet.java:633)
app_1 | at
com.ethercis.vehr.VEhrGateServlet.processRequest(VEhrGateServlet.java:611)
app_1 | at
com.ethercis.vehr.VEhrGateServlet.doPost(VEhrGateServlet.java:451)
app_1 | at
javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
app_1 | at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
app_1 | at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
app_1 | at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
app_1 | at
org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:259)
app_1 | at
org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:222)
app_1 | at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
app_1 | at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
app_1 | at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
app_1 | at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
app_1 | at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
app_1 | at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
app_1 | at
org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
app_1 | at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
app_1 | at org.eclipse.jetty.server.Server.handle(Server.java:497)
app_1 | at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
app_1 | at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
app_1 | at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
app_1 | at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
app_1 | at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
app_1 | at java.lang.Thread.run(Thread.java:745)
app_1 | Caused by: org.postgresql.util.PSQLException: This
connection has been closed.
app_1 | at
org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2Connection.java:861)
app_1 | at
org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement(AbstractJdbc3Connection.java:281)
app_1 | at
org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement(AbstractJdbc2Connection.java:334)
app_1 | at
org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:112)
app_1 | at
org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:76)
app_1 | at
org.jooq.impl.AbstractResultQuery.prepare(AbstractResultQuery.java:227)
app_1 | at
org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:314)
app_1 | ... 43 more
app_1 | INFO - com.ethercis.vehr.VEhrGateServlet.syncExecute(640)
| Error trapped:#1.0.0 Invocation exception to
method:create:org.jooq.exception.DataAccessException: SQL [select 1 as
"one" where exists (select 1 as "one" from "ehr"."party_identified"
where ("ehr"."party_identified"."party_ref_namespace" = ? and
"ehr"."party_identified"."party_ref_scheme" = ? and
"ehr"."party_identified"."party_ref_value" = ?))]; This connection has
been closed.
Did I use the POST command to create a new EHR correctly ? I have
interpreted the API that there are no further parameters mandatory. What
could have gone wrong ?
Greetings
Georg
--
---------------------------------------------------------------------
Dipl.-Inf. Georg Fette Raum: B001
Universität Würzburg Tel.: +49-(0)931-31-85516
Am Hubland Fax.: +49-(0)931-31-86732
97074 Würzburg mail: georg.fe...@uni-wuerzburg.de
---------------------------------------------------------------------
_______________________________________________
openEHR-implementers mailing list
openEHR-implementers@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-implementers_lists.openehr.org