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

Create ImagingStudy Error #52

Closed
shvoidlee opened this Issue Nov 14, 2014 · 8 comments

Comments

Projects
None yet
2 participants
@shvoidlee

shvoidlee commented Nov 14, 2014

Hi, Jamesagnew:
I try to create a new ImagingStudy resource by following samples
http://fhir.healthintersections.com.au/open/ImagingStudy/1/
http://fhir.healthintersections.com.au/open/ImagingStudy/4/

Either in local hapi-fhir-jpaserver or uhn server(http://fhirtest.uhn.ca/base/ImagingStudy/) both return:
500 Internal Server Error
Failed to call access method

and error log from my local server:
2014-11-14 12:48:59.378 [http-8000-6] [192.168.100.7] [Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36] INFO o.h.e.i.StatisticalLoggingSessionEventListener Session Metrics {
1194565 nanoseconds spent acquiring 1 JDBC connections;
0 nanoseconds spent releasing 0 JDBC connections;
0 nanoseconds spent preparing 0 JDBC statements;
0 nanoseconds spent executing 0 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
0 nanoseconds spent executing 0 flushes (flushing a total of 0 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
2014-11-14 12:48:59.394 [http-8000-6] [] [] ERROR c.u.f.r.m.BaseOutcomeReturningMethodBinding Internal error during method invocation
ca.uhn.fhir.rest.server.exceptions.InternalErrorException: Failed to call access method
at ca.uhn.fhir.rest.method.BaseMethodBinding.invokeServerMethod(BaseMethodBinding.java:195) ~[hapi-fhir-base-0.8-SNAPSHOT.jar:na]
at ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBinding.invokeServer(BaseOutcomeReturningMethodBinding.java:130) ~[hapi-fhir-base-0.8-SNAPSHOT.jar:na]
at ca.uhn.fhir.rest.method.CreateMethodBinding.invokeServer(CreateMethodBinding.java:36) [hapi-fhir-base-0.8-SNAPSHOT.jar:na]
at ca.uhn.fhir.rest.server.RestfulServer.handleRequest(RestfulServer.java:616) [hapi-fhir-base-0.8-SNAPSHOT.jar:na]
at ca.uhn.fhir.rest.server.RestfulServer.doPost(RestfulServer.java:135) [hapi-fhir-base-0.8-SNAPSHOT.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) [servlet-api.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina.jar:6.0.26]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
at org.ebaysf.web.cors.CORSFilter.handleSimpleCORS(CORSFilter.java:302) [cors-filter-1.0.1.jar:na]
at org.ebaysf.web.cors.CORSFilter.doFilter(CORSFilter.java:164) [cors-filter-1.0.1.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.26]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:6.0.26]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina.jar:6.0.26]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina.jar:6.0.26]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) [tomcat-coyote.jar:6.0.26]
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) [tomcat-coyote.jar:6.0.26]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) [tomcat-coyote.jar:6.0.26]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_72]
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
at ca.uhn.fhir.rest.method.BaseMethodBinding.invokeServerMethod(BaseMethodBinding.java:190) ~[hapi-fhir-base-0.8-SNAPSHOT.jar:na]
... 22 common frames omitted
Caused by: ca.uhn.fhir.context.ConfigurationException: Invalid path:
at ca.uhn.fhir.util.FhirTerser.getValues(FhirTerser.java:87) ~[hapi-fhir-base-0.8-SNAPSHOT.jar:na]
at ca.uhn.fhir.jpa.dao.BaseFhirDao.extractSearchParamNumber(BaseFhirDao.java:450) ~[hapi-fhir-jpaserver-base-0.8-SNAPSHOT.jar:na]
at ca.uhn.fhir.jpa.dao.BaseFhirDao.updateEntity(BaseFhirDao.java:1145) ~[hapi-fhir-jpaserver-base-0.8-SNAPSHOT.jar:na]
at ca.uhn.fhir.jpa.dao.FhirResourceDao.create(FhirResourceDao.java:161) ~[hapi-fhir-jpaserver-base-0.8-SNAPSHOT.jar:na]
at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:266) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) ~[spring-tx-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.1.0.RELEASE.jar:4.1.0.RELEASE]
at com.sun.proxy.$Proxy65.create(Unknown Source) ~[na:na]
at ca.uhn.fhir.jpa.provider.JpaResourceProvider.create(JpaResourceProvider.java:54) ~[hapi-fhir-jpaserver-base-0.8-SNAPSHOT.jar:na]
... 26 common frames omitted

Can you help me to understand this problem? Thanks.
I try the same way to create new Patient resource is OK.

@jamesagnew

This comment has been minimized.

Owner

jamesagnew commented Nov 14, 2014

Interesting- Need to check to confirm (will do so later today) but I'm guessing that this is due to the fact that ImagingStudy has a search param defined that has no path associated with it (size).

All other params that I'm aware of have a path associated with them (e.g. "name" on Patient has path "Patient.name") so there probably needs to be a special handling for this particular param

@shvoidlee

This comment has been minimized.

shvoidlee commented Nov 17, 2014

After my testing 48 regular resources, only 4 resources can't create:
DiagnosticOrder
DocumentManifest
DocumentReference
ImagingStudy

My testing is POST XML/JSON to endpoint like:
http://fhirtest.uhn.ca/base/DiagnosticOrder
http://fhirtest.uhn.ca/base/DocumentManifest
http://fhirtest.uhn.ca/base/DocumentReference
http://fhirtest.uhn.ca/base/ImagingStudy

Thanks.

@jamesagnew

This comment has been minimized.

Owner

jamesagnew commented Nov 17, 2014

Looks like this was indeed a case of empty paths causing issues for the server. I've pushed a fix to the public server, and I'm about to commit the same fix to git.

Thanks for reporting!

@jamesagnew

This comment has been minimized.

Owner

jamesagnew commented Nov 18, 2014

Reopening based on email

I am hapi-fhir issue#52 ( Create ImagingStudy Error ) reporter.
I test your 「Fix issue #52 - JPA module won't save resource types with empty path ...」 commit at both local server & uhn public server today.

ImagingStudy Resource allow create now, but those three resources still can't create.

DiagnosticOrder
DocumentManifest
DocumentReference

After trying add some xml config, but I can't solve this problem myself.
Sorry to bother you again.

@jamesagnew

This comment has been minimized.

Owner

jamesagnew commented Nov 18, 2014

Ok, it looks like there were two issues- Resources with empty search params, and resources with multiple paths in a patam (e.g. "path1 | path2").

I've just committed a fix to the latter and pushed a new snapshot. Would you mind to test if this fixes things on your end?

@shvoidlee

This comment has been minimized.

shvoidlee commented Nov 19, 2014

I've just only test uhn public server.
DiagnosticOrder allow create now, but DocumentManifest & DocumentReference still return "500 Failed to call access method".

my test:
1.POST http://fhirtest.uhn.ca/base/DocumentManifest
using XML sample
http://fhir.healthintersections.com.au/open/DocumentManifest/example
http://spark.furore.com/fhir/DocumentManifest/example

2.POST http://fhirtest.uhn.ca/base/DocumentReference
using XML sample
http://fhir.healthintersections.com.au/open/DocumentReference/example
http://spark.furore.com/fhir/DocumentReference/10017

jamesagnew added a commit that referenced this issue Nov 19, 2014

@shvoidlee

This comment has been minimized.

shvoidlee commented Nov 21, 2014

I've just only test uhn public server.
DocumentManifest & DocumentReference allow create now.

But because my testing mistake, I may find another issue related recently fix.

my test:
1.POST http://fhirtest.uhn.ca/base/DocumentManifest
using XML sample
http://fhir.healthintersections.com.au/open/DocumentReference/example
return 201 Created
GET http://fhirtest.uhn.ca/base/DocumentReference
TotalResults increase one.

2.POST http://fhirtest.uhn.ca/base/DocumentReference
using XML sample
http://fhir.healthintersections.com.au/open/DocumentManifest/example
return 201 Created
GET http://fhirtest.uhn.ca/base/DocumentManifest
TotalResults increase one.

3.POST http://fhirtest.uhn.ca/base/ImagingStudy
using XML sample
http://fhir.healthintersections.com.au/open/DocumentReference/example
return 201 Created
GET http://fhirtest.uhn.ca/base/DocumentReference
TotalResults increase one.

@jamesagnew

This comment has been minimized.

Owner

jamesagnew commented Dec 16, 2014

This looks to be properly fixed now, so I'm closing it. Please feel free to comment or email me if it still occurs.

@jamesagnew jamesagnew closed this Dec 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment