By default, the server will reject this reference, as only local references are permitted by the server. This can be changed however.
If you want the server to recognize that this URL is actually a local reference (i.e. because the server will be deployed to the base URL http://example.com/fhir/) you can configure the server to recognize this URL via the following DaoConfig setting:
1 2 3 4 5 6 7 | @Bean()public DaoConfig daoConfig() { DaoConfig retVal = new DaoConfig(); // ... other config ... return retVal;} |
On the other hand, if you want the server to be configurable to allow remote references, you can set this with the confguration below. Using the setAllowInlineMatchUrlReferences means that it will be possible to search for references that refer to these external references.
1 2 3 4 5 6 7 8 9 10 11 | @Bean()public DaoConfig daoConfig() { DaoConfig retVal = new DaoConfig(); // Allow external references retVal.setAllowInlineMatchUrlReferences(true); // If you are allowing external references, it is recommended to // also tell the server which references actually will be local return retVal;} |
--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/020f6943-95b4-4bc9-bb36-80aded9dd3e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/7ba5a04d-1085-48a7-abfc-06e3dbc9a27d%40googlegroups.com.
13-Jul-2016 13:36:24.837 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to l
istener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ca.uhn.fhir.jpa.demo.FhirServerConfig: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: @OneToOne or @ManyToOne on ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.myChild references an unknown entity: ca.uhn.fhir.jpa.entity.TermConcept
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1795)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.myChild references an unknown entity: ca.uhn.fhir.jpa.entity.TermConcept
at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:97)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processEndOfQueue(InFlightMetadataCollectorImpl.java:1787)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processFkSecondPassesInOrder(InFlightMetadataCollectorImpl.java:1730)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1617)
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/9c5f7898-ef0b-4ff2-aef2-079876e4265a%40googlegroups.com.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] HAPI-FHIR .......................................... SUCCESS [ 3.146 s]
[INFO] HAPI FHIR - Deployable Artifact Parent POM ......... SUCCESS [ 1.280 s]
[INFO] HAPI FHIR - Core Library ........................... SUCCESS [ 28.078 s]
[INFO] HAPI FHIR - Validation Resources (DSTU3) ........... SUCCESS [ 5.187 s]
[INFO] HAPI Tinder Plugin ................................. SUCCESS [ 14.238 s]
[INFO] HAPI FHIR Structures - DSTU1 (FHIR v0.80) .......... SUCCESS [01:02 min]
[INFO] HAPI FHIR - Validation Resources (DSTU2) ........... SUCCESS [ 5.650 s]
[INFO] HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) ......... SUCCESS [01:02 min]
[INFO] HAPI FHIR - Minimal Dependency Test - Client ....... FAILURE [ 2.242 s]
[INFO] HAPI FHIR - Minimal Dependency Test - Server ....... SKIPPED
[INFO] HAPI Tinder Plugin - Test Project .................. SKIPPED
[INFO] HAPI FHIR Structures - HL7.org DSTU2 ............... SKIPPED
[INFO] HAPI FHIR Structures - DSTU3 ....................... SKIPPED
[INFO] HAPI FHIR JAX-RS Server ............................ SKIPPED
[INFO] HAPI FHIR JAX-RS Server - Example .................. SKIPPED
[INFO] HAPI FHIR JPA Server ............................... SKIPPED
[INFO] HAPI FHIR TestPage Overlay ......................... SKIPPED
[INFO] HAPI FHIR JPA Server - Example ..................... SKIPPED
[INFO] HAPI FHIR Sample RESTful Server .................... SKIPPED
[INFO] HAPI FHIR Sample RESTful Server - Tests ............ SKIPPED
[INFO] HAPI FHIR - fhirtest.uhn.ca Deployable WAR ......... SKIPPED
[INFO] HAPI FHIR - Android ................................ SKIPPED
[INFO] HAPI FHIR - Command Line Client - Base Project ..... SKIPPED
[INFO] HAPI FHIR - Command Line Client - Server WAR ....... SKIPPED
[INFO] HAPI FHIR - Command Line Client - Application ...... SKIPPED
[INFO] HAPI FHIR - Distribution Archive ................... SKIPPED
[INFO] HAPI FHIR - Examples (for site) .................... SKIPPED
[INFO] hapi-fhir-base-example-embedded-ws ................. SKIPPED
[INFO] HAPI FHIR - JaCoCo Test Coverage ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:05 min
[INFO] Finished at: 2016-07-14T08:17:18-04:00
[INFO] Final Memory: 81M/580M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project hapi-fhir-base-testmindeps-client: There are test failures.
-------------------------------------------------------------------------------
Test set: ca.uhn.fhir.rest.client.ClientTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.818 sec <<< FAILURE! - in ca.uhn.fhir.rest.client.ClientTest
testTransaction(ca.uhn.fhir.rest.client.ClientTest) Time elapsed: 0.753 sec <<< ERROR!
ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException: Response contains non FHIR Content-Type 'text/html' : <html><head><meta http-equiv="refresh" content="0;url=http://www.dnsrsearch.com/index.php?origURL=http://this_is_an_invalid_host_name_yes_it_is/fhir/metadata&bc="/></head><body><script type="text/javascript">window.location="http://www.dnsrsearch.com/index.php?origURL="+escape(window.location)+"&r="+escape(document.referrer)+"&bc=";</script></body></html>
at ca.uhn.fhir.rest.client.ClientTest.testTransaction(ClientTest.java:25)
<testcase name="testTransaction" classname="ca.uhn.fhir.rest.client.ClientTest" time="0.753">
<error message="Response contains non FHIR Content-Type 'text/html' : <html><head><meta http-equiv="refresh" content="0;url=http://www.dnsrsearch.com/index.php?origURL=http://this_is_an_invalid_host_name_yes_it_is/fhir/metadata&bc="/></head><body><script type="text/javascript">window.location="http://www.dnsrsearch.com/index.php?origURL="+escape(window.location)+"&r="+escape(document.referrer)+"&bc=";</script></body></html>" type="ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException"><![CDATA[ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException: Response contains non FHIR Content-Type 'text/html' : <html><head><meta http-equiv="refresh" content="0;url=http://www.dnsrsearch.com/index.php?origURL=http://this_is_an_invalid_host_name_yes_it_is/fhir/metadata&bc="/></head><body><script type="text/javascript">window.location="http://www.dnsrsearch.com/index.php?origURL="+escape(window.location)+"&r="+escape(document.referrer)+"&bc=";</script></body></html>
at ca.uhn.fhir.rest.client.ClientTest.testTransaction(ClientTest.java:25)
]]></error>
<system-err><![CDATA[7 [main] INFO ca.uhn.fhir.util.VersionUtil - HAPI FHIR version is: 1.6
21 [main] INFO ca.uhn.fhir.context.FhirContext - Creating new FHIR context for FHIR version [DSTU1]
769 [main] WARN ca.uhn.fhir.rest.client.apache.ApacheHttpResponse - Response did not specify a charset.
]]></system-err>
</testcase>
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/ef857a7e-88f1-4dc3-9c39-ef8b893a17a5%40googlegroups.com.
/**
* Configure FHIR properties around the the JPA server via this bean
*/
@Bean()
public DaoConfig daoConfig() {
DaoConfig retVal = new DaoConfig();
retVal.setSubscriptionEnabled(true);
retVal.setSubscriptionPollDelay(5000);
retVal.setSubscriptionPurgeInactiveAfterMillis(DateUtils.MILLIS_PER_HOUR);
retVal.setAllowMultipleDelete(true);
retVal.setAllowExternalReferences(true);
return retVal;
}
[INFO] HAPI-FHIR .......................................... SUCCESS [ 3.745 s]
[INFO] HAPI FHIR - Deployable Artifact Parent POM ......... SUCCESS [ 1.128 s]
[INFO] HAPI FHIR - Core Library ........................... SUCCESS [ 28.758 s]
[INFO] HAPI FHIR - Validation Resources (DSTU3) ........... SUCCESS [ 5.400 s]
[INFO] HAPI Tinder Plugin ................................. SUCCESS [ 16.276 s]
[INFO] HAPI FHIR Structures - DSTU1 (FHIR v0.80) .......... SUCCESS [ 58.646 s]
[INFO] HAPI FHIR - Validation Resources (DSTU2) ........... SUCCESS [ 3.323 s]
[INFO] HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) ......... SUCCESS [ 50.994 s]
[INFO] HAPI FHIR - Minimal Dependency Test - Client ....... SUCCESS [ 1.142 s]
[INFO] HAPI FHIR - Minimal Dependency Test - Server ....... SUCCESS [ 2.706 s]
[INFO] HAPI Tinder Plugin - Test Project .................. SUCCESS [ 8.357 s]
[INFO] HAPI FHIR Structures - HL7.org DSTU2 ............... SUCCESS [01:56 min]
[INFO] HAPI FHIR Structures - DSTU3 ....................... SUCCESS [01:15 min]
[INFO] HAPI FHIR JAX-RS Server ............................ SUCCESS [ 9.807 s]
[INFO] HAPI FHIR JAX-RS Server - Example .................. SUCCESS [ 7.498 s]
[INFO] HAPI FHIR JPA Server ............................... SUCCESS [05:01 min]
[INFO] HAPI FHIR TestPage Overlay ......................... SUCCESS [ 7.672 s]
[INFO] HAPI FHIR JPA Server - Example ..................... SUCCESS [ 21.964 s]
[INFO] HAPI FHIR Sample RESTful Server .................... SUCCESS [ 10.796 s]
[INFO] HAPI FHIR Sample RESTful Server - Tests ............ SUCCESS [ 4.755 s]
[INFO] HAPI FHIR - fhirtest.uhn.ca Deployable WAR ......... SUCCESS [ 4.076 s]
[INFO] HAPI FHIR - Android ................................ SUCCESS [ 11.357 s]
[INFO] HAPI FHIR - Command Line Client - Base Project ..... SUCCESS [ 0.006 s]
[INFO] HAPI FHIR - Command Line Client - Server WAR ....... SUCCESS [ 5.432 s]
[INFO] HAPI FHIR - Command Line Client - Application ...... SUCCESS [ 18.067 s]
[INFO] HAPI FHIR - Distribution Archive ................... SUCCESS [ 0.018 s]
[INFO] HAPI FHIR - Examples (for site) .................... SUCCESS [ 1.248 s]
[INFO] hapi-fhir-base-example-embedded-ws ................. SUCCESS [ 0.234 s]
[INFO] HAPI FHIR - JaCoCo Test Coverage ................... SUCCESS [ 40.071 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:37 min
[INFO] Finished at: 2016-07-14T15:10:30-04:00
[INFO] Final Memory: 162M/795M
[INFO] ------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/79cc3ba2-4022-4658-a457-96446b1264b3%40googlegroups.com.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] HAPI-FHIR .......................................... SUCCESS [ 1.039 s]
[INFO] HAPI FHIR - Deployable Artifact Parent POM ......... SUCCESS [ 0.714 s]
[INFO] HAPI FHIR - Core Library ........................... SUCCESS [ 15.889 s]
[INFO] HAPI Tinder Plugin ................................. SUCCESS [ 21.791 s]
[INFO] HAPI FHIR Structures - DSTU1 (FHIR v0.80) .......... SUCCESS [ 52.649 s]
[INFO] HAPI FHIR - Validation Resources (DSTU2) ........... SUCCESS [ 3.183 s]
[INFO] HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) ......... SUCCESS [ 44.251 s]
[INFO] HAPI FHIR - Minimal Dependency Test - Client ....... SUCCESS [ 1.477 s]
[INFO] HAPI FHIR - Minimal Dependency Test - Server ....... SUCCESS [ 2.982 s]
[INFO] HAPI FHIR - Validation Resources DSTU2.1 (2016May) . SUCCESS [ 3.083 s]
[INFO] HAPI FHIR Structures - DSTU2.1 (2016May) ........... SUCCESS [01:00 min]
[INFO] HAPI FHIR - Validation Resources (DSTU3) ........... SUCCESS [ 3.566 s]
[INFO] HAPI FHIR Structures - DSTU3 ....................... FAILURE [01:53 min]
[INFO] HAPI FHIR Structures - HL7.org DSTU2 ............... SKIPPED
[INFO] HAPI Tinder Plugin - Test Project .................. SKIPPED
[INFO] HAPI FHIR JAX-RS Server ............................ SKIPPED
[INFO] HAPI FHIR JAX-RS Server - Example .................. SKIPPED
[INFO] HAPI FHIR JPA Server ............................... SKIPPED
[INFO] HAPI FHIR TestPage Overlay ......................... SKIPPED
[INFO] HAPI FHIR JPA Server - Example ..................... SKIPPED
[INFO] HAPI FHIR Sample RESTful Server .................... SKIPPED
[INFO] HAPI FHIR Sample RESTful Server - Tests ............ SKIPPED
[INFO] HAPI FHIR - fhirtest.uhn.ca Deployable WAR ......... SKIPPED
[INFO] HAPI FHIR OkHttp Client ............................ SKIPPED
[INFO] HAPI FHIR - Android ................................ SKIPPED
[INFO] HAPI FHIR - Converter .............................. SKIPPED
[INFO] HAPI FHIR - Command Line Client - Base Project ..... SKIPPED
[INFO] HAPI FHIR - Command Line Client - Server WAR ....... SKIPPED
[INFO] HAPI FHIR - Command Line Client - Application ...... SKIPPED
[INFO] HAPI FHIR - Distribution Archive ................... SKIPPED
[INFO] HAPI FHIR - Examples (for site) .................... SKIPPED
[INFO] hapi-fhir-base-example-embedded-ws ................. SKIPPED
[INFO] hapi-fhir-standalone-overlay-example ............... SKIPPED
[INFO] HAPI FHIR - JaCoCo Test Coverage ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:25 min
[INFO] Finished at: 2017-08-11T17:41:57-04:00
[INFO] Final Memory: 82M/1546M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project hapi-fhir-structures-dstu3: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/Freerange/Documents/Frontive/hapi-fhir/hapi-fhir-structures-dstu3/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :hapi-fhir-structures-dstu3