hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.05k stars 1.34k forks source link

Tests fail for Jpa-Server #180

Closed pogo61 closed 9 years ago

pogo61 commented 9 years ago

James, I'm getting these errors with doing a mvn install for the pom for api-fhir-jpaserver-base: /Users/paulpog/Documents/workspace/hapi-fhir/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu1Test.java:501: error: no suitable constructor found for ClassPathXmlApplicationContext(String,String) ourAppCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml"); ^ constructor ClassPathXmlApplicationContext.ClassPathXmlApplicationContext(String[],ApplicationContext) is not applicable (argument mismatch; String cannot be converted to String[]) constructor ClassPathXmlApplicationContext.ClassPathXmlApplicationContext(String[],boolean) is not applicable (argument mismatch; String cannot be converted to String[]) constructor ClassPathXmlApplicationContext.ClassPathXmlApplicationContext(String,Class) is not applicable (argument mismatch; String cannot be converted to Class) constructor ClassPathXmlApplicationContext.ClassPathXmlApplicationContext(String[],Class) is not applicable (argument mismatch; String cannot be converted to String[])

there are many for every test.

I've check the PM and it has this dependency:

org.springframework spring-core ${spring_version} commons-logging commons-logging

where ${spring_version} = 4.1.5.RELEASE. which mean that there are no constructors that take a String, they all take String[].

I've also checked the test classes, and they do indeed have these lines (or similar): ourAppCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml"); where ourAppCtx is declared: private static ClassPathXmlApplicationContext ourAppCtx;

So the tests would never work. This is the main Git, that is 1.1-SNAPSHOT. I'm surprised everyone isn't having this issue.

Paul

jamesagnew commented 9 years ago

Hi @pogo61 ,

That is very weird.

If I look in ClassPathXmlApplicationContext.java from spring-context-4.1.5.RELEASE-sources.jar, it has the following constructor:

    public ClassPathXmlApplicationContext(String... configLocations) throws BeansException {
        this(configLocations, true, null);
    }

That constructor should match, and indeed if I run the build locally it does. What platform/java version/etc are you running this on?

pogo61 commented 9 years ago

Hi James,Ah! You could be onto something. I'm running on java 1.8 on windows. 

Please excuse my fat fingers, as I'm using my iPhone

_____________________________

From: James Agnew notifications@github.com Sent: Thursday, June 4, 2015 9:45 pm Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180) To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com

Hi @pogo61 ,

That is very weird.

If I look in ClassPathXmlApplicationContext.java from spring-context-4.1.5.RELEASE.java, it has the following constructor: public ClassPathXmlApplicationContext(String... configLocations) throws BeansException { this(configLocations, true, null); }

That constructor should match, and indeed if I run the build locally it does. What platform/java version/etc are you running this on?

— Reply to this email directly or view it on GitHub.

jamesagnew commented 9 years ago

Hmm.. I was hoping it was an old/weird platform and that would explain this. :)

Can you paste in the contents of mvn dependency:tree for the hapi-fhir-jpaserver-base module into this ticket? Also can you create a clean build debug log and attach that? ( mvn -X clean install > tmp.log )

pogo61 commented 9 years ago

here is the result of mvn dependency:tree mvn dependency:tree [INFO] Scanning for projects... Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.8.2/maven-deploy-plugin-2.8.2.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.8.2/maven-deploy-plugin-2.8.2.pom (7 KB at 2.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom (5 KB at 10.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/12/maven-plugins-12.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/12/maven-plugins-12.pom (12 KB at 12.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.jar (24 KB at 25.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom (15 KB at 28.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/16/maven-plugins-16.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/16/maven-plugins-16.pom (13 KB at 27.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.jar (204 KB at 86.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom (12 KB at 20.4 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.jar (150 KB at 82.5 KB/sec) [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building HAPI FHIR JPA Server 1.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: https://maven.java.net/service/local/repositories/snapshots/content/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/maven-metadata.xml Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/maven-metadata.xml Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/maven-metadata.xml (2 KB at 0.2 KB/sec) Downloading: https://maven.java.net/service/local/repositories/snapshots/content/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/hapi-fhir-base-1.1-20150604.190516-5.pom Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/hapi-fhir-base-1.1-20150604.190516-5.pom Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/hapi-fhir-base-1.1-20150604.190516-5.pom (7 KB at 5.8 KB/sec) Downloading: https://maven.java.net/service/local/repositories/snapshots/content/ca/uhn/hapi/fhir/hapi-deployable-pom/1.1-SNAPSHOT/maven-metadata.xml Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-deployable-pom/1.1-SNAPSHOT/maven-metadata.xml Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-deployable-pom/1.1-SNAPSHOT/maven-metadata.xml (608 B at 0.6 KB/sec) Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-deployable-pom/1.1-SNAPSHOT/hapi-deployable-pom-1.1-20150604.190512-4.pom Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-deployable-pom/1.1-SNAPSHOT/hapi-deployable-pom-1.1-20150604.190512-4.pom (4 KB at 3.1 KB/sec) Downloading: https://maven.java.net/service/local/repositories/snapshots/content/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/maven-metadata.xml Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/maven-metadata.xml Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/maven-metadata.xml (2 KB at 1.1 KB/sec) Downloading: https://maven.java.net/service/local/repositories/snapshots/content/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/hapi-fhir-structures-dstu-1.1-20150604.190545-4.pom Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/hapi-fhir-structures-dstu-1.1-20150604.190545-4.pom Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/hapi-fhir-structures-dstu-1.1-20150604.190545-4.pom (11 KB at 14.4 KB/sec) Downloading: https://maven.java.net/service/local/repositories/snapshots/content/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/maven-metadata.xml Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/maven-metadata.xml Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/maven-metadata.xml (2 KB at 1.3 KB/sec) Downloading: https://maven.java.net/service/local/repositories/snapshots/content/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/hapi-fhir-structures-dstu2-1.1-20150604.190601-4.pom Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/hapi-fhir-structures-dstu2-1.1-20150604.190601-4.pom Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/hapi-fhir-structures-dstu2-1.1-20150604.190601-4.pom (13 KB at 11.9 KB/sec) Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/hapi-fhir-base-1.1-20150604.190516-5.jar Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/hapi-fhir-structures-dstu-1.1-20150604.190545-4.jar Downloading: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/hapi-fhir-structures-dstu2-1.1-20150604.190601-4.jar Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-base/1.1-SNAPSHOT/hapi-fhir-base-1.1-20150604.190516-5.jar (936 KB at 212.7 KB/sec) Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu2/1.1-SNAPSHOT/hapi-fhir-structures-dstu2-1.1-20150604.190601-4.jar (1913 KB at 253.5 KB/sec) Downloaded: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-structures-dstu/1.1-SNAPSHOT/hapi-fhir-structures-dstu-1.1-20150604.190545-4.jar (1169 KB at 99.2 KB/sec) [INFO] [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ hapi-fhir-jpaserver-base --- Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.pom (5 KB at 6.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-doxia-tools/1.0.2/maven-doxia-tools-1.0.2.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-doxia-tools/1.0.2/maven-doxia-tools-1.0.2.pom (6 KB at 9.9 KB/sec) Downloading: https://repo.maven.apache.org/maven2/commons-io/commons-io/1.4/commons-io-1.4.pom Downloaded: https://repo.maven.apache.org/maven2/commons-io/commons-io/1.4/commons-io-1.4.pom (13 KB at 18.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/7/commons-parent-7.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/7/commons-parent-7.pom (18 KB at 12.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.3/plexus-archiver-2.3.pom Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.3/plexus-archiver-2.3.pom (4 KB at 5.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.3/plexus-components-1.3.pom Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.3/plexus-components-1.3.pom (3 KB at 5.7 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.6/plexus-io-2.0.6.pom Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.6/plexus-io-2.0.6.pom (3 KB at 4.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.2/plexus-components-1.2.pom Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.2/plexus-components-1.2.pom (3 KB at 5.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.9/plexus-utils-3.0.9.pom Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.9/plexus-utils-3.0.9.pom (4 KB at 6.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/1.2.1/file-management-1.2.1.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/1.2.1/file-management-1.2.1.pom (4 KB at 7.1 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.pom (4 KB at 8.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/8/maven-shared-components-8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/8/maven-shared-components-8.pom (3 KB at 4.7 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/7/maven-parent-7.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/7/maven-parent-7.pom (21 KB at 20.4 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.2/maven-artifact-2.0.2.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.2/maven-artifact-2.0.2.pom (765 B at 1.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.2/maven-2.0.2.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.2/maven-2.0.2.pom (13 KB at 17.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom (767 B at 1.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.2/maven-artifact-manager-2.0.2.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.2/maven-artifact-manager-2.0.2.pom (2 KB at 3.1 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.2/maven-repository-metadata-2.0.2.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.2/maven-repository-metadata-2.0.2.pom (2 KB at 2.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.pom (588 B at 1.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon/1.0-alpha-6/wagon-1.0-alpha-6.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon/1.0-alpha-6/wagon-1.0-alpha-6.pom (7 KB at 12.0 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.4.6/plexus-utils-1.4.6.pom Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.4.6/plexus-utils-1.4.6.pom (3 KB at 4.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.4/maven-dependency-analyzer-1.4.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.4/maven-dependency-analyzer-1.4.pom (6 KB at 10.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.5/maven-project-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.5/maven-project-2.0.5.pom (2 KB at 3.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.5/maven-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.5/maven-2.0.5.pom (6 KB at 10.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.5/maven-settings-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.5/maven-settings-2.0.5.pom (2 KB at 3.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.0.5/maven-model-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.0.5/maven-model-2.0.5.pom (3 KB at 5.1 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.5/maven-profile-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.5/maven-profile-2.0.5.pom (2 KB at 3.1 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.5/maven-artifact-manager-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.5/maven-artifact-manager-2.0.5.pom (2 KB at 2.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.5/maven-repository-metadata-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.5/maven-repository-metadata-2.0.5.pom (2 KB at 3.2 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.5/maven-artifact-2.0.5.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.5/maven-artifact-2.0.5.pom (727 B at 1.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.pom (4 KB at 7.1 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.8/maven-artifact-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.8/maven-artifact-2.0.8.pom (2 KB at 3.0 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.pom (3 KB at 5.5 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.8/maven-settings-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.8/maven-settings-2.0.8.pom (3 KB at 3.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.8/maven-profile-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.8/maven-profile-2.0.8.pom (2 KB at 4.1 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.8/maven-artifact-manager-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.8/maven-artifact-manager-2.0.8.pom (3 KB at 4.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.8/maven-repository-metadata-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.8/maven-repository-metadata-2.0.8.pom (2 KB at 4.0 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-registry/2.0.8/maven-plugin-registry-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-registry/2.0.8/maven-plugin-registry-2.0.8.pom (2 KB at 3.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.8/maven-plugin-api-2.0.8.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.8/maven-plugin-api-2.0.8.pom (2 KB at 2.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.pom (5 KB at 9.8 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/12/maven-shared-components-12.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/12/maven-shared-components-12.pom (10 KB at 19.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/13/maven-parent-13.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/13/maven-parent-13.pom (23 KB at 28.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.pom Downloaded: https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.pom (18 KB at 20.7 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/17/commons-parent-17.pom Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/17/commons-parent-17.pom (31 KB at 30.4 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-doxia-tools/1.0.2/maven-doxia-tools-1.0.2.jar Downloading: https://repo.maven.apache.org/maven2/commons-io/commons-io/1.4/commons-io-1.4.jar Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.3/plexus-archiver-2.3.jar Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.9/plexus-utils-3.0.9.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar (21 KB at 27.3 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/1.2.1/file-management-1.2.1.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/1.2.1/file-management-1.2.1.jar (37 KB at 24.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar (39 KB at 16.7 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.jar Downloaded: https://repo.maven.apache.org/maven2/commons-io/commons-io/1.4/commons-io-1.4.jar (107 KB at 37.6 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.6/plexus-io-2.0.6.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-doxia-tools/1.0.2/maven-doxia-tools-1.0.2.jar (41 KB at 11.9 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.4/maven-dependency-analyzer-1.4.jar Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.6/plexus-io-2.0.6.jar (57 KB at 15.4 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.jar (42 KB at 11.4 KB/sec) Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.jar Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.3/plexus-archiver-2.3.jar (183 KB at 46.9 KB/sec) Downloading: https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.9/plexus-utils-3.0.9.jar (227 KB at 53.4 KB/sec) Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.4/maven-dependency-analyzer-1.4.jar (27 KB at 6.3 KB/sec) Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar (31 KB at 7.3 KB/sec) Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.jar (29 KB at 6.4 KB/sec) Downloaded: https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar (278 KB at 46.4 KB/sec) [INFO] ca.uhn.hapi.fhir:hapi-fhir-jpaserver-base:bundle:1.1-SNAPSHOT [INFO] +- ca.uhn.hapi.fhir:hapi-fhir-base:jar:1.1-SNAPSHOT:provided [INFO] | +- javax.json:javax.json-api:jar:1.0:provided [INFO] | +- org.glassfish:javax.json:jar:1.0.4:provided [INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:provided [INFO] | | +- javax.xml.stream:stax-api:jar:1.0-2:provided [INFO] | | - org.codehaus.woodstox:stax2-api:jar:3.1.4:provided [INFO] | +- org.apache.commons:commons-lang3:jar:3.3.2:provided [INFO] | +- commons-codec:commons-codec:jar:1.10:provided [INFO] | +- commons-io:commons-io:jar:2.4:provided [INFO] | +- org.slf4j:slf4j-api:jar:1.7.10:compile [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.4:provided [INFO] | - org.apache.httpcomponents:httpcore:jar:4.4:provided [INFO] +- ca.uhn.hapi.fhir:hapi-fhir-structures-dstu:jar:1.1-SNAPSHOT:compile [INFO] +- ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:jar:1.1-SNAPSHOT:compile [INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.10:compile [INFO] +- ch.qos.logback:logback-classic:jar:1.1.3:test [INFO] +- ch.qos.logback:logback-core:jar:1.1.3:test [INFO] +- org.hamcrest:java-hamcrest:jar:2.0.0.0:test [INFO] +- org.thymeleaf:thymeleaf:jar:2.1.4.RELEASE:test [INFO] | +- ognl:ognl:jar:3.0.8:test [INFO] | +- org.javassist:javassist:jar:3.16.1-GA:compile [INFO] | - org.unbescape:unbescape:jar:1.1.0.RELEASE:test [INFO] +- org.jscience:jscience:jar:4.3.1:compile [INFO] | - org.javolution:javolution:jar:5.2.3:compile [INFO] +- org.osgi:org.osgi.compendium:jar:5.0.0:provided [INFO] +- org.osgi:org.osgi.core:jar:6.0.0:provided [INFO] +- org.osgi:org.osgi.enterprise:jar:5.0.0:provided [INFO] +- junit:junit:jar:4.12:test [INFO] | - org.hamcrest:hamcrest-core:jar:1.3:test [INFO] +- org.apache.derby:derby:jar:10.11.1.1:test [INFO] +- commons-dbcp:commons-dbcp:jar:1.4:test [INFO] | - commons-pool:commons-pool:jar:1.5.4:test [INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:compile [INFO] +- aopalliance:aopalliance:jar:1.0:compile [INFO] +- org.springframework:spring-core:jar:4.1.5.RELEASE:compile [INFO] +- org.springframework:spring-orm:jar:4.1.5.RELEASE:compile [INFO] | - org.springframework:spring-jdbc:jar:4.1.5.RELEASE:compile [INFO] +- org.springframework:spring-context:jar:4.1.5.RELEASE:compile [INFO] | +- org.springframework:spring-aop:jar:4.1.5.RELEASE:compile [INFO] | - org.springframework:spring-expression:jar:4.1.5.RELEASE:compile [INFO] +- org.springframework:spring-beans:jar:4.1.5.RELEASE:compile [INFO] +- org.springframework:spring-tx:jar:4.1.5.RELEASE:compile [INFO] +- org.springframework:spring-context-support:jar:4.1.5.RELEASE:compile [INFO] +- org.hibernate:hibernate-core:jar:4.3.0.Final:compile [INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile [INFO] | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile [INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile [INFO] | +- dom4j:dom4j:jar:1.6.1:compile [INFO] | +- antlr:antlr:jar:2.7.7:compile [INFO] | - org.jboss:jandex:jar:1.1.0.Final:compile [INFO] +- org.hibernate:hibernate-entitymanager:jar:4.3.0.Final:compile [INFO] +- org.hibernate:hibernate-ehcache:jar:4.3.0.Final:compile [INFO] +- org.hibernate:hibernate-validator:jar:5.1.0.Final:compile [INFO] +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile [INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile [INFO] +- org.hibernate:hibernate-c3p0:jar:4.3.0.Final:compile [INFO] | - com.mchange:c3p0:jar:0.9.2.1:compile [INFO] | - com.mchange:mchange-commons-java:jar:0.2.3.4:compile [INFO] +- javax.transaction:jta:jar:1.1:compile [INFO] +- javax.mail:javax.mail-api:jar:1.5.0:provided [INFO] | - javax.activation:activation:jar:1.1:provided [INFO] +- javax.validation:validation-api:jar:1.1.0.Final:compile [INFO] +- javax.el:javax.el-api:jar:3.0.0:provided [INFO] +- org.glassfish:javax.el:jar:3.0.0:compile [INFO] +- com.google.guava:guava:jar:18.0:compile [INFO] +- com.fasterxml:classmate:jar:1.1.0:compile [INFO] +- com.phloc:phloc-commons:jar:4.3.6:compile [INFO] | - com.google.code.findbugs:annotations:jar:2.0.3:compile [INFO] +- com.phloc:phloc-schematron:jar:2.7.1:compile [INFO] | - net.sf.saxon:Saxon-HE:jar:9.5.1-5:compile [INFO] +- com.thoughtworks.paranamer:paranamer:jar:2.7:compile [INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.7:compile [INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:compile [INFO] | - xpp3:xpp3_min:jar:1.1.4c:compile [INFO] +- org.codehaus.fabric3.api:commonj:jar:1.1.1:compile [INFO] +- org.freemarker:freemarker:jar:2.3.22:compile [INFO] +- org.codehaus.groovy:groovy:jar:2.4.3:compile [INFO] +- org.eclipse.jetty:jetty-servlets:jar:9.2.6.v20141205:test [INFO] | +- org.eclipse.jetty:jetty-continuation:jar:9.2.6.v20141205:test [INFO] | +- org.eclipse.jetty:jetty-http:jar:9.2.6.v20141205:test [INFO] | - org.eclipse.jetty:jetty-io:jar:9.2.6.v20141205:test [INFO] +- org.eclipse.jetty:jetty-servlet:jar:9.2.6.v20141205:test [INFO] | - org.eclipse.jetty:jetty-security:jar:9.2.6.v20141205:test [INFO] +- org.eclipse.jetty:jetty-server:jar:9.2.6.v20141205:test [INFO] - org.eclipse.jetty:jetty-util:jar:9.2.6.v20141205:test [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:23 min [INFO] Finished at: 2015-06-05T07:17:12+10:00 [INFO] Final Memory: 18M/150M [INFO] ------------------------------------------------------------------------

pogo61 commented 9 years ago

James, Here is the log of the debug clean build.

PP

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir <reply+001c8b98671a50e655c3e4200d26e1dab3cc063ce00feff592cf0000000111881f049 2a169ce051065dc@reply.github.com> Date: Friday, 5 June 2015 12:13 am To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

Hmm.. I was hoping it was an old/weird platform and that would explain this. :)

Can you paste in the contents of mvn dependency:tree for the hapi-fhir-jpaserver-base module into this ticket? Also can you create a clean build debug log and attach that? ( mvn -X clean install > tmp.log )

‹ Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-108910700 .

pogo61 commented 9 years ago

James, I just looked at the contents of the tmp.log file, and the build worked. which is strange. maybe the the dependency tree build fixed maven?

jamesagnew commented 9 years ago

This kind of seems like it may have been a one time fluke. No idea why...... Argh.

Is it passing consistently for you now? If so, I guess let's close this one until is happens again. :)

pogo61 commented 9 years ago

James, it¹s happening again, this time with a different set of classes: Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.291 sec <<< FAILURE! - in ca.uhn.fhir.jpa.dao.FhirResourceDaoDstu1Test

ca.uhn.fhir.jpa.dao.FhirResourceDaoDstu1Test Time elapsed: 0.289 sec <<< ERROR!

java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.getMethod(Ljava/lang/Class;Ljava/lang/St ring;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

at org.springframework.core.convert.support.GenericConversionService.(G enericConversionService.java:81)

at org.springframework.core.env.AbstractPropertyResolver.(AbstractPropert yResolver.java:41)

at org.springframework.core.env.PropertySourcesPropertyResolver.(Property SourcesPropertyResolver.java:41)

at org.springframework.core.env.AbstractEnvironment.(AbstractEnvironment. java:112)

at org.springframework.core.env.StandardEnvironment.(StandardEnvironment. java:54)

at org.springframework.context.support.AbstractApplicationContext.createEnviron ment(AbstractApplicationContext.java:442)

at org.springframework.context.support.AbstractApplicationContext.getEnvironmen t(AbstractApplicationContext.java:281)

at org.springframework.context.support.AbstractRefreshableConfigApplicationCont ext.resolvePath(AbstractRefreshableConfigApplicationContext.java:122)

at org.springframework.context.support.AbstractRefreshableConfigApplicationCont ext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:80)

at org.springframework.context.support.ClassPathXmlApplicationContext.(Cl assPathXmlApplicationContext.java:137)

at org.springframework.context.support.ClassPathXmlApplicationContext.(Cl assPathXmlApplicationContext.java:93)

at ca.uhn.fhir.jpa.dao.FhirResourceDaoDstu1Test.beforeClass(FhirResourceDaoDstu 1Test.java:131)

ca.uhn.fhir.jpa.dao.FhirResourceDaoDstu1Test Time elapsed: 0.291 sec <<< ERROR!

java.lang.NullPointerException: null

at ca.uhn.fhir.jpa.dao.FhirResourceDaoDstu1Test.afterClass(FhirResourceDaoDstu1 Test.java:125)

It¹s the same symptom though, for some reason the builder assumes that they are 3.x versions of Spring, not 4.1.5.RELEASE.

I don¹t know where that¹s coming from?

PP

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir <reply+001c8b98944cd3fa7c4479701a3e1e0d7b987b6d9dd73e2492cf000000011188aea99 2a169ce051065dc@reply.github.com> Date: Friday, 5 June 2015 10:26 am To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

This kind of seems like it may have been a one time fluke. No idea why...... Argh.

Is it passing consistently for you now? If so, I guess let's close this one until is happens again. :)

‹ Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109102212 .

jamesagnew commented 9 years ago

This really is a mystery. It's not happening to any of our developers or on our build servers, so I assume so there must be something specific to your environment. But what?

Do you have the ability to try the build on other machines/other dev's workstations to see if it happens there? Does it happen consistently or only on occasional builds?

I suppose it might be worth trying to delete your local maven repo to see if maybe there is a corrupted file in there or something.

pogo61 commented 9 years ago

James, this happened again with another class...I did some digging and discovered that a change I made to api-fhir-base had caused an dependency to occur in here for version 2.5.0 of the spring source classes.

Once removed this was OK.

However, I'm getting this strange error (not related I'm sure) on the structure.dstu and structure.dstu2 builds: ca.uhn.fhir.rest.server.CreateTest Time elapsed: 0.558 sec <<< ERROR! javax.servlet.ServletException: Failed to initialize FHIR Restful server

Can you point me in the right direction,please?

jamesagnew commented 9 years ago

You should be able to find a complete stack trace for the error in the following file: hapi-fhir-structures-dstu/target/surefire-reports/ca.uhn.fhir.rest.server.CreateTest.txt

That should help to tell why it's failing to start a server for that test.

pogo61 commented 9 years ago

Thanks James. I found these in hapi-fhir-structures-dstu/target/surefire-reports/ca.uhn.fhir.rest.server.Cr eateTest-output.txt:

ERROR c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:802] - An error occurred while loading request handlers! ca.uhn.fhir.context.ConfigurationException: Method 'create' is annotated with @ResourceParam but has a type that is not an implemtation of ca.uhn.fhir.model.api.IResource at ca.uhn.fhir.rest.method.MethodUtil.getResourceParameters(MethodUtil.java:412 ) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseMethodBinding.(BaseMethodBinding.java:98) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBinding.(BaseOutcome ReturningMethodBinding.java:68) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBindingWithResourceParam.< init>(BaseOutcomeReturningMethodBindingWithResourceParam.java:49) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.CreateMethodBinding.(CreateMethodBinding.java: 41) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseMethodBinding.bindMethod(BaseMethodBinding.java: 428) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java :201) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java :190) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.init(RestfulServer.java:781) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at javax.servlet.GenericServlet.init(GenericServlet.java:244) [javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.doStart(ServletHandler.java:187) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.j ava:68) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle .java:132) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.Server.start(Server.java:387) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCyc le.java:114) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.jav a:61) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.Server.doStart(Server.java:354) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.j ava:68) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at ca.uhn.fhir.rest.server.CreateTest.beforeClass(CreateTest.java:228) [test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62 ) ~[na:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod. java:50) [junit-4.12.jar:4.12] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j ava:12) [junit-4.12.jar:4.12] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.ja va:47) [junit-4.12.jar:4.12] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24 ) [junit-4.12.jar:4.12] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12] at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java: 283) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provi der.java:173) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provide r.java:153) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:1 28) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoade r(ForkedBooter.java:203) [surefire-booter-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBoote r.java:155) [surefire-booter-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) [surefire-booter-2.18.1.jar:2.18.1] 18:11:42.694 [main] WARN o.e.j.server.handler.ContextHandler [ContextHandler.java:2495] - unavailable

I¹m not sure what it means?

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir <reply+001c8b98b0c9b5fd1b833fdffca78b7d2632a4d3ef299dc292cf00000001118957889 2a169ce051065dc@reply.github.com> Date: Friday, 5 June 2015 10:26 pm To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

You should be able to find a complete stack trace for the error in the following file: hapi-fhir-structures-dstu/target/surefire-reports/ca.uhn.fhir.rest.server.Cr eateTest.txt

That should help to tell why it's failing to start a server for that test.

‹ Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109278671 .

pogo61 commented 9 years ago

Hi James, I found the test class in the DSTU projectŠhere¹s the offending code:

public static class OrganizationProvider implements IResourceProvider {

@Create() public MethodOutcome create(@ResourceParam String theResourceBody, @ResourceParam EncodingEnum theEncoding) { ourLastResourceBody=theResourceBody; ourLastEncoding=theEncoding; return new MethodOutcome(new IdDt("001")); }

@Override public Class<? extends IResource> getResourceType() { return Organization.class; }

}

Notice that there is no resource in any of the parameters for the create method?

According to Git, this was changed 4 days agoŠsee the screen shot.

It¹s 11:42pm here in Australia, so I¹m hitting the hay.

PP

From: Paul Pogonoski paulpog@japarasolutions.com Date: Friday, 5 June 2015 10:37 pm To: jamesagnew/hapi-fhir <reply+001c8b98b0c9b5fd1b833fdffca78b7d2632a4d3ef299dc292cf00000001118957889 2a169ce051065dc@reply.github.com> Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

Thanks James. I found these in hapi-fhir-structures-dstu/target/surefire-reports/ca.uhn.fhir.rest.server.Cr eateTest-output.txt:

ERROR c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:802] - An error occurred while loading request handlers! ca.uhn.fhir.context.ConfigurationException: Method 'create' is annotated with @ResourceParam but has a type that is not an implemtation of ca.uhn.fhir.model.api.IResource at ca.uhn.fhir.rest.method.MethodUtil.getResourceParameters(MethodUtil.java:412 ) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseMethodBinding.(BaseMethodBinding.java:98) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBinding.(BaseOutcome ReturningMethodBinding.java:68) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBindingWithResourceParam.< init>(BaseOutcomeReturningMethodBindingWithResourceParam.java:49) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.CreateMethodBinding.(CreateMethodBinding.java: 41) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseMethodBinding.bindMethod(BaseMethodBinding.java: 428) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java :201) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java :190) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.init(RestfulServer.java:781) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at javax.servlet.GenericServlet.init(GenericServlet.java:244) [javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.doStart(ServletHandler.java:187) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.j ava:68) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle .java:132) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.Server.start(Server.java:387) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCyc le.java:114) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.jav a:61) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.Server.doStart(Server.java:354) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.j ava:68) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at ca.uhn.fhir.rest.server.CreateTest.beforeClass(CreateTest.java:228) [test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62 ) ~[na:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod. java:50) [junit-4.12.jar:4.12] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j ava:12) [junit-4.12.jar:4.12] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.ja va:47) [junit-4.12.jar:4.12] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24 ) [junit-4.12.jar:4.12] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.12.jar:4.12] at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12] at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java: 283) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provi der.java:173) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provide r.java:153) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:1 28) [surefire-junit4-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoade r(ForkedBooter.java:203) [surefire-booter-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBoote r.java:155) [surefire-booter-2.18.1.jar:2.18.1] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) [surefire-booter-2.18.1.jar:2.18.1] 18:11:42.694 [main] WARN o.e.j.server.handler.ContextHandler [ContextHandler.java:2495] - unavailable

I¹m not sure what it means?

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir <reply+001c8b98b0c9b5fd1b833fdffca78b7d2632a4d3ef299dc292cf00000001118957889 2a169ce051065dc@reply.github.com> Date: Friday, 5 June 2015 10:26 pm To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

You should be able to find a complete stack trace for the error in the following file: hapi-fhir-structures-dstu/target/surefire-reports/ca.uhn.fhir.rest.server.Cr eateTest.txt

That should help to tell why it's failing to start a server for that test.

‹ Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109278671 .

jamesagnew commented 9 years ago

Ok this one is a bit easier to follow. :)

I think you just caught the repo when it was in a failing state. Can you do a fresh git pull and see if it resolves in the morning?

pogo61 commented 9 years ago

James, I got that code from the Git repo, so I think it¹s still the same.

PP

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir <reply+001c8b98d428cba19be410e77941dbd80fd78cbc3bb9db7b92cf0000000111896e309 2a169ce051065dc@reply.github.com> Date: Saturday, 6 June 2015 12:03 am To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

Ok this one is a bit easier to follow. :)

I think you just caught the repo when it was in a failing state. Can you do a fresh git pull and see if it resolves in the morning?

‹ Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109303352 .

jamesagnew commented 9 years ago

It's still probably worth updating. The line numbers in that stack trace don't line up with the latest codebase, so its at least a bit out of date. If it still fails, pls paste an updated stack.

sent from my phone. On Jun 5, 2015 5:50 PM, "Paul Pogonoski" notifications@github.com wrote:

James, I got that code from the Git repo, so I think it¹s still the same.

PP

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir

<reply+001c8b98d428cba19be410e77941dbd80fd78cbc3bb9db7b92cf0000000111896e309 2a169ce051065dc@reply.github.com> Date: Saturday, 6 June 2015 12:03 am To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

Ok this one is a bit easier to follow. :)

I think you just caught the repo when it was in a failing state. Can you do a fresh git pull and see if it resolves in the morning?

‹ Reply to this email directly or view it on GitHub <https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109303352

.

— Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109448840 .

pogo61 commented 9 years ago

OK mate.

Will keep you posted.

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir <reply+001c8b98efe9411184f12bc08251259a5b0a7ba83526726092cf000000011189e6ea9 2a169ce051065dc@reply.github.com> Date: Saturday, 6 June 2015 8:38 am To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

It's still probably worth updating. The line numbers in that stack trace don't line up with the latest codebase, so its at least a bit out of date. If it still fails, pls paste an updated stack.

sent from my phone. On Jun 5, 2015 5:50 PM, "Paul Pogonoski" notifications@github.com wrote:

James, I got that code from the Git repo, so I think it¹s still the same.

PP

From: James Agnew notifications@github.com Reply-To: jamesagnew/hapi-fhir

<reply+001c8b98d428cba19be410e77941dbd80fd78cbc3bb9db7b92cf0000000111896e309 2a169ce051065dc@reply.github.com> Date: Saturday, 6 June 2015 12:03 am To: jamesagnew/hapi-fhir hapi-fhir@noreply.github.com Cc: Paul Pogonoski paulpog@japarasolutions.com Subject: Re: [hapi-fhir] Tests fail for Jpa-Server (#180)

Ok this one is a bit easier to follow. :)

I think you just caught the repo when it was in a failing state. Can you do a fresh git pull and see if it resolves in the morning?

‹ Reply to this email directly or view it on GitHub <https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109303352

.

— Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109448840 .

— Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109467918 .

pogo61 commented 9 years ago

Hmmmm, it fixed structure-dstu, but this is what I get with structure dust2:


T E S T S

Running ca.uhn.fhir.rest.server.CreateConditionalTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.017 sec - in ca.uhn.fhir.rest.server.CreateConditionalTest Running ca.uhn.fhir.model.dstu2.ModelInstantiationTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.709 sec - in ca.uhn.fhir.model.dstu2.ModelInstantiationTest Running ca.uhn.fhir.rest.server.DeleteConditionalTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.556 sec - in ca.uhn.fhir.rest.server.DeleteConditionalTest Running ca.uhn.fhir.rest.client.BundleTypeTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.162 sec - in ca.uhn.fhir.rest.client.BundleTypeTest Running ca.uhn.fhir.rest.server.SearchDstu2Test Tests run: 2, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 0.597 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.SearchDstu2Test testEncodeConvertsReferencesToRelativeJson(ca.uhn.fhir.rest.server.SearchDstu2Test) Time elapsed: 0.038 sec <<< ERROR! java.lang.NullPointerException: null at ca.uhn.fhir.rest.server.SearchDstu2Test.testEncodeConvertsReferencesToRelativeJson(SearchDstu2Test.java:71)

testEncodeConvertsReferencesToRelative(ca.uhn.fhir.rest.server.SearchDstu2Test) Time elapsed: 0.004 sec <<< FAILURE! java.lang.AssertionError: Expected: not a string containing "text" but: was "<feed xmlns=\"http://www.w3.org/2005/Atom\"><id>98b6420c-5074-4859-a06b-ac6e6070e0f8</id><link rel=\"self\" href=\"<a href="http://localhost:49990/Patient?_query=searchWithRef">http://localhost:49990/Patient?_query=searchWithRef</a>\"/><link rel=\"fhir-base\" href=\"<a href="http://localhost:49990">http://localhost:49990</a>\"/><os:totalResults xmlns:os=\"<a href="http://a9.com/-/spec/opensearch/1.1/\">1/os:totalResults">http://a9.com/-/spec/opensearch/1.1/\">1/os:totalResults</a><entry><title>Patient Patient/1/_history/1http://localhost:49990/Patient/12015-06-06T11:00:53.575+10:00<link rel=\"self\" href=\"http://localhost:49990/Patient/1/_history/1\"/><content type=\"text/xml\"><Patient xmlns=\"http://hl7.org/fhir\"><reference value=\"Organization/555\"/>" at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at org.junit.Assert.assertThat(Assert.java:956) at org.junit.Assert.assertThat(Assert.java:923) at ca.uhn.fhir.rest.server.SearchDstu2Test.testEncodeConvertsReferencesToRelative(SearchDstu2Test.java:50)

Running ca.uhn.fhir.rest.server.IncludeDstu2Test Tests run: 9, Failures: 4, Errors: 4, Skipped: 0, Time elapsed: 0.676 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.IncludeDstu2Test testOneIncludeXml(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.012 sec <<< ERROR! java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testOneIncludeXml(IncludeDstu2Test.java:90)

testOneIncludeJson(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.004 sec <<< ERROR! java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testOneIncludeJson(IncludeDstu2Test.java:110)

testIIncludedResourcesNonContained(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.007 sec <<< FAILURE! java.lang.AssertionError: expected: but was: at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:144) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testIIncludedResourcesNonContained(IncludeDstu2Test.java:146)

testIIncludedResourcesNonContainedInExtensionJson(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.008 sec <<< FAILURE! java.lang.AssertionError: expected: but was: at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:144) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testIIncludedResourcesNonContainedInExtensionJson(IncludeDstu2Test.java:198)

testIIncludedResourcesNonContainedInDeclaredExtension(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.012 sec <<< FAILURE! java.lang.AssertionError: expected: but was: at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:144) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testIIncludedResourcesNonContainedInDeclaredExtension(IncludeDstu2Test.java:225)

testNoIncludes(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.004 sec <<< ERROR! java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testNoIncludes(IncludeDstu2Test.java:71)

testIIncludedResourcesNonContainedInExtension(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.006 sec <<< FAILURE! java.lang.AssertionError: expected: but was: at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:144) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testIIncludedResourcesNonContainedInExtension(IncludeDstu2Test.java:172)

testTwoInclude(ca.uhn.fhir.rest.server.IncludeDstu2Test) Time elapsed: 0.005 sec <<< ERROR! java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at ca.uhn.fhir.rest.server.IncludeDstu2Test.testTwoInclude(IncludeDstu2Test.java:247)

Running ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest Tests run: 4, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.464 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest testTransactionWithJsonRequest(ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest) Time elapsed: 0.021 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<500> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest.testTransactionWithJsonRequest(TransactionWithBundleResourceParamTest.java:135)

testTransactionWithOperationOutcome(ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest) Time elapsed: 0.005 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<500> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest.testTransactionWithOperationOutcome(TransactionWithBundleResourceParamTest.java:186)

testTransactionWithXmlRequest(ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest) Time elapsed: 0.004 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<500> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.TransactionWithBundleResourceParamTest.testTransactionWithXmlRequest(TransactionWithBundleResourceParamTest.java:87)

Running ca.uhn.fhir.narrative.CustomThymeleafNarrativeGeneratorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.315 sec - in ca.uhn.fhir.narrative.CustomThymeleafNarrativeGeneratorTest Running ca.uhn.fhir.rest.client.GenericClientDstu2Test Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.111 sec - in ca.uhn.fhir.rest.client.GenericClientDstu2Test Running ca.uhn.fhir.validation.ValidationResultTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec - in ca.uhn.fhir.validation.ValidationResultTest Running ca.uhn.fhir.parser.XmlParserDstu2Test Tests run: 31, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.715 sec - in ca.uhn.fhir.parser.XmlParserDstu2Test Running ca.uhn.fhir.rest.client.OperationClientTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.101 sec - in ca.uhn.fhir.rest.client.OperationClientTest Running ca.uhn.fhir.validation.ResourceValidatorDstu2Test Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.967 sec - in ca.uhn.fhir.validation.ResourceValidatorDstu2Test Running ca.uhn.fhir.rest.server.OperationServerTest Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.613 sec - in ca.uhn.fhir.rest.server.OperationServerTest Running ca.uhn.fhir.util.FhirTerserDstu2Test Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - in ca.uhn.fhir.util.FhirTerserDstu2Test Running ca.uhn.fhir.rest.server.ServerInvalidDefinitionDstu2Test Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 sec - in ca.uhn.fhir.rest.server.ServerInvalidDefinitionDstu2Test Running ca.uhn.fhir.parser.JsonParserDstu2Test Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.411 sec - in ca.uhn.fhir.parser.JsonParserDstu2Test Running ca.uhn.fhir.rest.server.ETagServerTest Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.557 sec - in ca.uhn.fhir.rest.server.ETagServerTest Running ca.uhn.fhir.validation.ValidatorInstantiatorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in ca.uhn.fhir.validation.ValidatorInstantiatorTest Running ca.uhn.fhir.rest.server.UpdateConditionalTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.577 sec - in ca.uhn.fhir.rest.server.UpdateConditionalTest Running ca.uhn.fhir.rest.client.ETagClientTest Tests run: 5, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.035 sec <<< FAILURE! - in ca.uhn.fhir.rest.client.ETagClientTest testReadWithETag(ca.uhn.fhir.rest.client.ETagClientTest) Time elapsed: 0.016 sec <<< ERROR! java.lang.ClassCastException: ca.uhn.fhir.model.dstu.resource.Patient cannot be cast to ca.uhn.fhir.model.dstu2.resource.Patient at ca.uhn.fhir.rest.client.ETagClientTest.testReadWithETag(ETagClientTest.java:268)

testUpdateWithIfMatch(ca.uhn.fhir.rest.client.ETagClientTest) Time elapsed: 0.003 sec <<< ERROR! java.lang.ArrayIndexOutOfBoundsException: 0 at ca.uhn.fhir.rest.client.ETagClientTest.testUpdateWithIfMatch(ETagClientTest.java:193)

testUpdateWithIfMatchWithPreconditionFailed(ca.uhn.fhir.rest.client.ETagClientTest) Time elapsed: 0.003 sec <<< ERROR! java.lang.ArrayIndexOutOfBoundsException: 0 at ca.uhn.fhir.rest.client.ETagClientTest.testUpdateWithIfMatchWithPreconditionFailed(ETagClientTest.java:223)

Running ca.uhn.fhir.rest.server.ServerConformanceProviderDstu2Test Tests run: 6, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 0.544 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.ServerConformanceProviderDstu2Test testValidateGeneratedStatement(ca.uhn.fhir.rest.server.ServerConformanceProviderDstu2Test) Time elapsed: 0.217 sec <<< FAILURE! java.lang.AssertionError: null at org.junit.Assert.fail(Assert.java:86) at org.junit.Assert.assertTrue(Assert.java:41) at org.junit.Assert.assertTrue(Assert.java:52) at ca.uhn.fhir.rest.server.ServerConformanceProviderDstu2Test.testValidateGeneratedStatement(ServerConformanceProviderDstu2Test.java:148)

testExtendedOperationReturningBundle(ca.uhn.fhir.rest.server.ServerConformanceProviderDstu2Test) Time elapsed: 0.01 sec <<< ERROR! javax.servlet.ServletException: Failed to initialize FHIR Restful server at ca.uhn.fhir.rest.method.OperationMethodBinding.(OperationMethodBinding.java:91) at ca.uhn.fhir.rest.method.OperationMethodBinding.(OperationMethodBinding.java:124) at ca.uhn.fhir.rest.method.BaseMethodBinding.bindMethod(BaseMethodBinding.java:480) at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java:204) at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java:193) at ca.uhn.fhir.rest.server.RestfulServer.init(RestfulServer.java:792) at javax.servlet.GenericServlet.init(GenericServlet.java:244) at ca.uhn.fhir.rest.server.ServerConformanceProviderDstu2Test.testExtendedOperationReturningBundle(ServerConformanceProviderDstu2Test.java:126)

Running ca.uhn.fhir.rest.server.SearchWithDstu2BundleTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.448 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.SearchWithDstu2BundleTest testSearch(ca.uhn.fhir.rest.server.SearchWithDstu2BundleTest) Time elapsed: 0.005 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<500> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.SearchWithDstu2BundleTest.testSearch(SearchWithDstu2BundleTest.java:43)

Running ca.uhn.fhir.rest.server.ReadTest Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.509 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.ReadTest testReadJson(ca.uhn.fhir.rest.server.ReadTest) Time elapsed: 0.004 sec <<< FAILURE! java.lang.AssertionError: Expected: a string containing "p1ReadId" but: was "" at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at org.junit.Assert.assertThat(Assert.java:956) at org.junit.Assert.assertThat(Assert.java:923) at ca.uhn.fhir.rest.server.ReadTest.testReadJson(ReadTest.java:67)

testReadXml(ca.uhn.fhir.rest.server.ReadTest) Time elapsed: 0.002 sec <<< FAILURE! java.lang.AssertionError: Expected: a string containing "p1ReadId" but: was "" at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at org.junit.Assert.assertThat(Assert.java:956) at org.junit.Assert.assertThat(Assert.java:923) at ca.uhn.fhir.rest.server.ReadTest.testReadXml(ReadTest.java:52)

Running ca.uhn.fhir.rest.server.PreferTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.511 sec - in ca.uhn.fhir.rest.server.PreferTest Running ca.uhn.fhir.parser.RoundTripDstu2Test Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec - in ca.uhn.fhir.parser.RoundTripDstu2Test Running ca.uhn.fhir.rest.server.interceptor.LoggingInterceptorTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.529 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.interceptor.LoggingInterceptorTest ca.uhn.fhir.rest.server.interceptor.LoggingInterceptorTest Time elapsed: 0.529 sec <<< ERROR! javax.servlet.ServletException: Failed to initialize FHIR Restful server at ca.uhn.fhir.rest.method.OperationMethodBinding.(OperationMethodBinding.java:91) at ca.uhn.fhir.rest.method.OperationMethodBinding.(OperationMethodBinding.java:124) at ca.uhn.fhir.rest.method.BaseMethodBinding.bindMethod(BaseMethodBinding.java:480) at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java:204) at ca.uhn.fhir.rest.server.RestfulServer.findResourceMethods(RestfulServer.java:193) at ca.uhn.fhir.rest.server.RestfulServer.init(RestfulServer.java:784) at javax.servlet.GenericServlet.init(GenericServlet.java:244) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612) at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) at org.eclipse.jetty.servlet.ServletHandler.doStart(ServletHandler.java:187) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.server.Server.start(Server.java:387) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.Server.doStart(Server.java:354) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at ca.uhn.fhir.rest.server.interceptor.LoggingInterceptorTest.beforeClass(LoggingInterceptorTest.java:198)

Running ca.uhn.fhir.rest.server.BundleTypeInResponseTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.525 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.BundleTypeInResponseTest testSearch(ca.uhn.fhir.rest.server.BundleTypeInResponseTest) Time elapsed: 0.028 sec <<< FAILURE! java.lang.AssertionError: expected: but was: at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:144) at ca.uhn.fhir.rest.server.BundleTypeInResponseTest.testSearch(BundleTypeInResponseTest.java:55)

Running ca.uhn.fhir.rest.server.ValidateDstu2Test Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.563 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.ValidateDstu2Test testValidateWithOptions(ca.uhn.fhir.rest.server.ValidateDstu2Test) Time elapsed: 0.021 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<400> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.ValidateDstu2Test.testValidateWithOptions(ValidateDstu2Test.java:82)

testValidateWithNoParsed(ca.uhn.fhir.rest.server.ValidateDstu2Test) Time elapsed: 0.016 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<400> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.ValidateDstu2Test.testValidateWithNoParsed(ValidateDstu2Test.java:150)

testValidate(ca.uhn.fhir.rest.server.ValidateDstu2Test) Time elapsed: 0.019 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<400> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.ValidateDstu2Test.testValidate(ValidateDstu2Test.java:106)

testValidateWithResults(ca.uhn.fhir.rest.server.ValidateDstu2Test) Time elapsed: 0.017 sec <<< FAILURE! java.lang.AssertionError: expected:<200> but was:<400> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at ca.uhn.fhir.rest.server.ValidateDstu2Test.testValidateWithResults(ValidateDstu2Test.java:131)

Running ca.uhn.fhir.narrative.BaseThymeleafNarrativeGeneratorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in ca.uhn.fhir.narrative.BaseThymeleafNarrativeGeneratorTest Running ca.uhn.fhir.model.dstu2.BundleTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in ca.uhn.fhir.model.dstu2.BundleTest Running ca.uhn.fhir.rest.server.IncludeAndRevincludeParameterTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.421 sec - in ca.uhn.fhir.rest.server.IncludeAndRevincludeParameterTest Running ca.uhn.fhir.rest.server.provider.dstu2.Dstu2BundleFactoryTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 sec <<< FAILURE! - in ca.uhn.fhir.rest.server.provider.dstu2.Dstu2BundleFactoryTest ca.uhn.fhir.rest.server.provider.dstu2.Dstu2BundleFactoryTest Time elapsed: 0.006 sec <<< ERROR! ca.uhn.fhir.context.ConfigurationException: The following resource types have the same ID of 'organization' - ca.uhn.fhir.model.dstu.resource.Organization and ca.uhn.fhir.model.dstu2.resource.Organization at ca.uhn.fhir.context.ModelScanner.scanResource(ModelScanner.java:724) at ca.uhn.fhir.context.ModelScanner.scan(ModelScanner.java:317) at ca.uhn.fhir.context.ModelScanner.init(ModelScanner.java:207) at ca.uhn.fhir.context.ModelScanner.(ModelScanner.java:118) at ca.uhn.fhir.context.FhirContext.scanResourceTypes(FhirContext.java:424) at ca.uhn.fhir.context.FhirContext.(FhirContext.java:135) at ca.uhn.fhir.context.FhirContext.(FhirContext.java:108) at ca.uhn.fhir.context.FhirContext.(FhirContext.java:100) at ca.uhn.fhir.rest.server.provider.dstu2.Dstu2BundleFactoryTest.beforeClass(Dstu2BundleFactoryTest.java:35)

Running ca.uhn.fhir.model.primitive.BaseDateTimeDtTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec - in ca.uhn.fhir.model.primitive.BaseDateTimeDtTest

Results :

Failed tests: BundleTypeInResponseTest.testSearch:55 expected: but was: IncludeDstu2Test.testIIncludedResourcesNonContained:146 expected: but was: IncludeDstu2Test.testIIncludedResourcesNonContainedInDeclaredExtension:225 expected: but was: IncludeDstu2Test.testIIncludedResourcesNonContainedInExtension:172 expected: but was: IncludeDstu2Test.testIIncludedResourcesNonContainedInExtensionJson:198 expected: but was: ReadTest.testReadJson:67 Expected: a string containing "p1ReadId" but: was "" ReadTest.testReadXml:52 Expected: a string containing "p1ReadId" but: was "" SearchDstu2Test.testEncodeConvertsReferencesToRelative:50 Expected: not a string containing "text" but: was "<feed xmlns=\"http://www.w3.org/2005/Atom\"><id>98b6420c-5074-4859-a06b-ac6e6070e0f8</id><link rel=\"self\" href=\"<a href="http://localhost:49990/Patient?_query=searchWithRef">http://localhost:49990/Patient?_query=searchWithRef</a>\"/><link rel=\"fhir-base\" href=\"<a href="http://localhost:49990">http://localhost:49990</a>\"/><os:totalResults xmlns:os=\"<a href="http://a9.com/-/spec/opensearch/1.1/\">1/os:totalResults">http://a9.com/-/spec/opensearch/1.1/\">1/os:totalResults</a><entry><title>Patient Patient/1/_history/1http://localhost:49990/Patient/12015-06-06T11:00:53.575+10:00<link rel=\"self\" href=\"http://localhost:49990/Patient/1/_history/1\"/><content type=\"text/xml\"><Patient xmlns=\"http://hl7.org/fhir\"><reference value=\"Organization/555\"/>" SearchWithDstu2BundleTest.testSearch:43 expected:<200> but was:<500> ServerConformanceProviderDstu2Test.testValidateGeneratedStatement:148 null TransactionWithBundleResourceParamTest.testTransactionWithJsonRequest:135 expected:<200> but was:<500> TransactionWithBundleResourceParamTest.testTransactionWithOperationOutcome:186 expected:<200> but was:<500> TransactionWithBundleResourceParamTest.testTransactionWithXmlRequest:87 expected:<200> but was:<500> ValidateDstu2Test.testValidate:106 expected:<200> but was:<400> ValidateDstu2Test.testValidateWithNoParsed:150 expected:<200> but was:<400> ValidateDstu2Test.testValidateWithOptions:82 expected:<200> but was:<400> ValidateDstu2Test.testValidateWithResults:131 expected:<200> but was:<400> Tests in error: ETagClientTest.testReadWithETag:268 ClassCast ca.uhn.fhir.model.dstu.resource.... ETagClientTest.testUpdateWithIfMatch:193 ArrayIndexOutOfBounds 0 ETagClientTest.testUpdateWithIfMatchWithPreconditionFailed:223 ArrayIndexOutOfBounds IncludeDstu2Test.testNoIncludes:71 » IndexOutOfBounds Index: 0, Size: 0 IncludeDstu2Test.testOneIncludeJson:110 » IndexOutOfBounds Index: 0, Size: 0 IncludeDstu2Test.testOneIncludeXml:90 » IndexOutOfBounds Index: 0, Size: 0 IncludeDstu2Test.testTwoInclude:247 » IndexOutOfBounds Index: 0, Size: 0 SearchDstu2Test.testEncodeConvertsReferencesToRelativeJson:71 NullPointer ServerConformanceProviderDstu2Test.testExtendedOperationReturningBundle:126 » Servlet LoggingInterceptorTest.beforeClass:198 » Servlet Failed to initialize FHIR Res... Dstu2BundleFactoryTest.beforeClass:35 » Configuration The following resource t...

Tests run: 167, Failures: 17, Errors: 11, Skipped: 0

pogo61 commented 9 years ago

James, I refreshed and re-bult everything, but I'm no left with this error:

17:52:19.754 [qtp1319156415-23] 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:259) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBinding.invokeServer(BaseOutcomeReturningMethodBinding.java:154) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.CreateMethodBinding.invokeServer(CreateMethodBinding.java:35) [hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.handleRequest(RestfulServer.java:703) [hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.doPost(RestfulServer.java:159) [hapi-fhir-base-1.1-SNAPSHOT.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.Server.handle(Server.java:497) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:313) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25] Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at ca.uhn.fhir.rest.method.BaseMethodBinding.invokeServerMethod(BaseMethodBinding.java:254) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] ... 20 common frames omitted Caused by: java.lang.NumberFormatException: For input string: "1323123232349875324987529835" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_25] at java.lang.Long.parseLong(Long.java:592) ~[na:1.8.0_25] at java.lang.Long.parseLong(Long.java:631) ~[na:1.8.0_25] at ca.uhn.fhir.model.primitive.IdDt.getIdPartAsLong(IdDt.java:270) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.jpa.dao.BaseFhirDao.translateForcedIdToPid(BaseFhirDao.java:967) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirDao.extractResourceLinks(BaseFhirDao.java:219) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirDao.updateEntity(BaseFhirDao.java:1063) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirResourceDao.doCreate(BaseFhirResourceDao.java:1132) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirResourceDao.create(BaseFhirResourceDao.java:832) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirResourceDao.create(BaseFhirResourceDao.java:812) ~[classes/:na] at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy52.create(Unknown Source) ~[na:na] at ca.uhn.fhir.jpa.provider.JpaResourceProviderDstu1.create(JpaResourceProviderDstu1.java:52) ~[classes/:na] ... 25 common frames omitted

This is the strangest bit:

Caused by: java.lang.NumberFormatException: For input string: "1323123232349875324987529835" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_25]

I've had a look at the code, and I can't understand how that exception is thrown with that string value.

This happens for both the ca.uhn.fhir.jpa.provider.ResourceProviderDstu1Test and the ca.uhn.fhir.jpa.provider.ResourceProviderDstu2Test.

I've looked at the code and here is the test that failing:

@Test public void testTryToCreateResourceWithReferenceThatDoesntExist() { deleteToken("Patient", Patient.SP_IDENTIFIER, "urn:system", "testTryToCreateResourceWithReferenceThatDoesntExist01");

    Patient p1 = new Patient();
    p1.addIdentifier().setSystem("urn:system").setValue("testTryToCreateResourceWithReferenceThatDoesntExist01");
    p1.addName().addFamily("testTryToCreateResourceWithReferenceThatDoesntExistFamily01").addGiven("testTryToCreateResourceWithReferenceThatDoesntExistGiven01");
    **p1.setManagingOrganization(new ResourceReferenceDt("Organization/1323123232349875324987529835"));**

    try {
        ourClient.create().resource(p1).execute().getId();
        fail();
    } catch (InvalidRequestException e) {
        assertThat(e.getMessage(), containsString("Organization/1323123232349875324987529835"));
    }

}

The line with the \ at either end is the culprit.

This calls: /* * Constructor which accepts a reference directly (this can be an ID, a partial/relative URL or a complete/absolute * URL) * * @param theId * The reference itself / public ResourceReferenceDt(String theId) { setReference(new IdDt(theId)); }

which uses: /* * Create a new ID using a string. This String may contain a simple ID (e.g. "1234") or it may contain a complete URL (http://example.com/fhir/Patient/1234). * *

* Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length * limit of 36 characters. *

*

* regex: [a-z0-9-.]{1,36} *

/ @SimpleSetter public IdDt(@SimpleSetter.Parameter(name = "theId") String theValue) { setValue(theValue); }

notice that this expects a fully formed URL, while the using method says it can be partial/relative?

I suspect that the "/" is getting into the number and that's why the parseLong is failing. but its a guess.

I'm under the gun to get this working on our server, so any help would be very much appreciated.

PP

PP

jamesagnew commented 9 years ago

Hi Paul,

What test method is this happening for? Is this a completely unmodified/fresh checkout of the code or are there any changes you've made?

Cheers, James

On Sun, Jun 7, 2015 at 3:58 AM, Paul Pogonoski notifications@github.com wrote:

James, I refreshed and re-bult everything, but I'm no left with this error:

17:52:19.754 [qtp1319156415-23] 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:259) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBinding.invokeServer(BaseOutcomeReturningMethodBinding.java:154) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.method.CreateMethodBinding.invokeServer(CreateMethodBinding.java:35) [hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.handleRequest(RestfulServer.java:703) [hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.rest.server.RestfulServer.doPost(RestfulServer.java:159) [hapi-fhir-base-1.1-SNAPSHOT.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.Server.handle(Server.java:497) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:313) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25] Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at ca.uhn.fhir.rest.method.BaseMethodBinding.invokeServerMethod(BaseMethodBinding.java:254) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] ... 20 common frames omitted Caused by: java.lang.NumberFormatException: For input string: "1323123232349875324987529835" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_25] at java.lang.Long.parseLong(Long.java:592) ~[na:1.8.0_25] at java.lang.Long.parseLong(Long.java:631) ~[na:1.8.0_25] at ca.uhn.fhir.model.primitive.IdDt.getIdPartAsLong(IdDt.java:270) ~[hapi-fhir-base-1.1-SNAPSHOT.jar:na] at ca.uhn.fhir.jpa.dao.BaseFhirDao.translateForcedIdToPid(BaseFhirDao.java:967) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirDao.extractResourceLinks(BaseFhirDao.java:219) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirDao.updateEntity(BaseFhirDao.java:1063) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirResourceDao.doCreate(BaseFhirResourceDao.java:1132) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirResourceDao.create(BaseFhirResourceDao.java:832) ~[classes/:na] at ca.uhn.fhir.jpa.dao.BaseFhirResourceDao.create(BaseFhirResourceDao.java:812) ~[classes/:na] at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy52.create(Unknown Source) ~[na:na] at ca.uhn.fhir.jpa.provider.JpaResourceProviderDstu1.create(JpaResourceProviderDstu1.java:52) ~[classes/:na] ... 25 common frames omitted

This is the strangest bit:

Caused by: java.lang.NumberFormatException: For input string: "1323123232349875324987529835" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_25]

I've had a look at the code, and I can't understand how that exception is thrown with that string value.

This happens for both the ca.uhn.fhir.jpa.provider.ResourceProviderDstu1Test and the ca.uhn.fhir.jpa.provider.ResourceProviderDstu2Test.

Beat this one and I'm back on track (I hope) ;-)

PP

— Reply to this email directly or view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/180#issuecomment-109715263 .

jamesagnew commented 9 years ago

Hi once again- I think this report had cut off when I read it on my phone. I see the name of the test method in question in the report.

And you're right, this is failing for me too. I wonder why our Jenkins server didn't catch that? Wither way, it's fixed by https://github.com/jamesagnew/hapi-fhir/commit/78d98d4728bc965a64db60b91690ed6077f7c93a .

pogo61 commented 9 years ago

Great!Sorry for being such a pain. 

Please excuse my fat fingers, as I'm using my iPhone

On Mon, Jun 8, 2015 at 4:21 PM -0700, "James Agnew" notifications@github.com wrote:

Hi once again- I think this report had cut off when I read it on my phone. I see the name of the test method in question in the report.

And you're right, this is failing for me too. I wonder why our Jenkins server didn't catch that? Wither way, it's fixed by 78d98d4 .

— Reply to this email directly or view it on GitHub.

jamesagnew commented 9 years ago

Glad it's working! :)