Stream: hapi
Topic: hapi-fhir: issue 295: Unable to build JPA Server with Maven
Zulip HAPI Bot (Feb 16 2016 at 20:48):
thygek opened issue 295
Installation process:
1. Fresh RHEL 7.1 VM
2. Install Maven (3.2.2) & Oracle JDK (1.8.0_17)
3. Clone jamesagnew/hapi-fhir.git
4. cd to wd and run, "mvn install"Results : Tests in error: ExampleServerIT.testCreateAndRead:38 » UnclassifiedServerFailure HTTP 503 Serv... Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] [INFO] --- maven-failsafe-plugin:2.19.1:verify (default) @ hapi-fhir-jpaserver-example --- [DEBUG] Configuring mojo org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-failsafe-plugin:2.19.1, parent: sun.misc.Launcher$AppClassLoader@5c647e05] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify' with basic configurator --> [DEBUG] (s) basedir = /opt/fhir/hapi-fhir-jpaserver-example [DEBUG] (f) encoding = UTF-8 [DEBUG] (s) reportsDirectory = /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports [DEBUG] (s) skip = false [DEBUG] (f) summaryFile = /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports/failsafe-summary.xml [DEBUG] (s) testClassesDirectory = /opt/fhir/hapi-fhir-jpaserver-example/target/test-classes [DEBUG] (s) testFailureIgnore = false [DEBUG] (f) session = org.apache.maven.execution.MavenSession@7876d598 [DEBUG] -- end configuration -- [DEBUG] Failsafe report directory: /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 37.289 s [INFO] Finished at: 2016-02-16T22:29:54-06:00 [INFO] Final Memory: 21M/678M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project hapi-fhir-jpaserver-example: There are test failures. [ERROR] [ERROR] Please refer to /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports for the individual test results. [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project hapi-fhir-jpaserver-example: There are test failures. Please refer to /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports for the individual test results. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures. Please refer to /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports for the individual test results. at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:91) at org.apache.maven.plugin.failsafe.VerifyMojo.execute(VerifyMojo.java:202) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 moreI'm guessing I'm over looking something quiet obvious.
Zulip HAPI Bot (Feb 16 2016 at 21:44):
KevinMayfield commented on issue 295
Had similar problems but I don’t think it’s the same.
Solved my HTTP 503 by getting my db connection params corrected - I’m using MySQL.
Also needed to set permissions on /var/lucene/indexes but I think was after resolving the 503 errorHave you looked at the output files in /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports
On 16 Feb 2016, at 20:48, thygek <notifications@github.com> wrote:
Installation process:
Fresh RHEL 7.1 VM
Install Maven (3.2.2) & Oracle JDK (1.8.0_17)
Clone jamesagnew/hapi-fhir.git
cd to wd and run, "mvn install"
Results :Tests in error:
ExampleServerIT.testCreateAndRead:38 » UnclassifiedServerFailure HTTP 503 Serv...Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] --- maven-failsafe-plugin:2.19.1:verify (default) @ hapi-fhir-jpaserver-example ---
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-failsafe-plugin:2.19.1, parent: sun.misc.Launcher$AppClassLoader@5c647e05]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify' with basic configurator -->
[DEBUG] (s) basedir = /opt/fhir/hapi-fhir-jpaserver-example
[DEBUG] (f) encoding = UTF-8
[DEBUG] (s) reportsDirectory = /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports
[DEBUG] (s) skip = false
[DEBUG] (f) summaryFile = /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports/failsafe-summary.xml
[DEBUG] (s) testClassesDirectory = /opt/fhir/hapi-fhir-jpaserver-example/target/test-classes
[DEBUG] (s) testFailureIgnore = false
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@7876d598
[DEBUG] -- end configuration --
[DEBUG] Failsafe report directory: /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.289 s
[INFO] Finished at: 2016-02-16T22:29:54-06:00
[INFO] Final Memory: 21M/678M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project hapi-fhir-jpaserver-example: There are test failures.
[ERROR]
[ERROR] Please refer to /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project hapi-fhir-jpaserver-example: There are test failures.Please refer to /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports for the individual test results.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.Please refer to /opt/fhir/hapi-fhir-jpaserver-example/target/failsafe-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:91)
at org.apache.maven.plugin.failsafe.VerifyMojo.execute(VerifyMojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 moreI'm guessing I'm over looking something quiet obvious.
—
Reply to this email directly or view it on GitHub <https://github.com/jamesagnew/hapi-fhir/issues/295>.
Zulip HAPI Bot (Feb 17 2016 at 00:00):
Hey Kevin;
Where are you editing the DB Connection parameters? I wasn't going to touch those until I had the server up running with default Apache Derby.
Here's each of my output files (4 in total):
failsafe-summary.xml
<?xml version="1.0" encoding="UTF-8"?> <failsafe-summary result="255" timeout="false"> <completed>1</completed> <errors>1</errors> <failures>0</failures> <skipped>0</skipped> <failureMessage/> </failsafe-summary>
ca.uhn.fhir.jpa.demo.ExampleServerIT
`-------------------------------------------------------------------------------
Test set: ca.uhn.fhir.jpa.demo.ExampleServerIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 9.683 sec <<< FAILURE! - in ca.uhn.fhir.jpa.demo.ExampleServerIT
testCreateAndRead(ca.uhn.fhir.jpa.demo.ExampleServerIT) Time elapsed: 0.169 sec <<< ERROR!
ca.uhn.fhir.rest.server.exceptions.UnclassifiedServerFailureException: HTTP 503 Service Unavailable
at ca.uhn.fhir.jpa.demo.ExampleServerIT.testCreateAndRead(ExampleServerIT.java:38)
`And a very truncated version of ca.uhn.fhir.jpa.demo.ExampleServerIT-output.txt
`
2016-02-17 01:26:56.092 [main] INFO ca.uhn.fhir.util.VersionUtil [VersionUtil.java:51] HAPI FHIR version is: 1.5-SNAPSHOT
2016-02-17 01:26:56.099 [main] INFO ca.uhn.fhir.context.FhirContext [FhirContext.java:137] Creating new FHIR context for FHIR version [DSTU2]
2016-02-17 01:26:56.376 [main] INFO ca.uhn.fhir.jpa.demo.ExampleServerIT [ExampleServerIT.java:59] Project base path is: /opt/fhir/hapi-fhir-jpaserver-example
2016-02-17 01:26:56.890 [main] INFO org.eclipse.jetty.util.log [Log.java:186] Logging initialized @1224ms
2016-02-17 01:26:56.970 [main] INFO org.eclipse.jetty.server.Server [Server.java:345] jetty-9.3.7.v20160115
2016-02-17 01:26:57.182 [main] INFO o.e.j.w.StandardDescriptorProcessor [StandardDescriptorProcessor.java:280] NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2016-02-17 01:26:57.204 [main] INFO / [ContextHandler.java:2140] Initializing Spring root WebApplicationContext
2016-02-17 01:26:57.204 [main] INFO o.s.web.context.ContextLoader [ContextLoader.java:307] Root WebApplicationContext: initialization started
2016-02-17 01:26:57.266 [main] INFO o.s.w.c.s.AnnotationConfigWebApplicationContext [AbstractApplicationContext.java:578] Refreshing Root WebApplicationContext: startup date [Wed Feb 17 01:26:57 CST 2016]; root of context hierarchy
2016-02-17 01:26:57.314 [main] INFO o.s.w.c.s.AnnotationConfigWebApplicationContext [AnnotationConfigWebApplicationContext.java:227] Successfully resolved class for [ca.uhn.fhir.jpa.demo.FhirServerConfig]
2016-02-17 01:26:58.716 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean [LocalContainerEntityManagerFactoryBean.java:339] Building JPA container EntityManagerFactory for persistence unit 'HAPI_PU'
2016-02-17 01:26:58.734 [main] INFO o.h.jpa.internal.util.LogHelper [LogHelper.java:31] HHH000204: Processing PersistenceUnitInfo [
name: HAPI_PU
...]
2016-02-17 01:26:58.809 [main] INFO org.hibernate.Version [Version.java:37] HHH000412: Hibernate Core {5.1.0.Final}
2016-02-17 01:26:58.811 [main] INFO org.hibernate.cfg.Environment [Environment.java:213] HHH000206: hibernate.properties not found
2016-02-17 01:26:58.812 [main] INFO org.hibernate.cfg.Environment [Environment.java:317] HHH000021: Bytecode provider name : javassist
2016-02-17 01:26:58.850 [main] INFO o.h.annotations.common.Version [JavaReflectionManager.java:66] HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2016-02-17 01:26:59.285 [main] INFO org.hibernate.dialect.Dialect [Dialect.java:156] HHH000400: Using dialect: org.hibernate.dialect.DerbyTenSevenDialect
2016-02-17 01:26:59.874 [main] INFO o.h.validator.internal.util.Version [Version.java:30] HV000001: Hibernate Validator 5.2.3.Final
2016-02-17 01:27:00.062 [main] INFO org.hibernate.search.engine.Version [Version.java:26] HSEARCH000034: Hibernate Search 5.5.2.Final
2016-02-17 01:27:00.829 [main] INFO o.h.h.i.QueryTranslatorFactoryInitiator [QueryTranslatorFactoryInitiator.java:47] HHH000397: Using ASTQueryTranslatorFactory
2016-02-17 01:27:01.302 [main] INFO ca.uhn.fhir.context.FhirContext [FhirContext.java:137] Creating new FHIR context for FHIR version [DSTU2]
2016-02-17 01:27:01.913 [main] INFO ca.uhn.fhir.context.FhirContext [FhirContext.java:137] Creating new FHIR context for FHIR version [DSTU1]
2016-02-17 01:27:02.059 [main] WARN o.s.w.c.s.AnnotationConfigWebApplicationContext [AbstractApplicationContext.java:546] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'subscriptionSecurityInterceptor' defined in ca.uhn.fhir.jpa.demo.FhirServerConfig: Unsatisfied dependency expressed through bean property 'dao': : Error creating bean with name 'mySubscriptionDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySpecimenDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myStructureDefinitionDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySubstanceDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySupplyDeliveryDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySupplyRequestDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySupportingDocumentationDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myTestDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myTestScriptDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myUserDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myValueSetDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myVisionPrescriptionDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myDocumentationDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.myResourceDaos; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEligibilityRequestDaoDstu2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.u...
Zulip HAPI Bot (Feb 17 2016 at 02:15):
jamesagnew commented on issue 295
Boy, that's a strange issue. The important bit would be:
Factory method 'fhirContextDstu2Hl7Org' threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import org.apache cannot be resolved
StringUtils cannot be resolvedSo.. it's not finding the commons-lang library for some reason.
Does this happen consistently? If you look in
hapi-fhir-jpaserver-example/target/hapi-fhir-jpaserver-example/WEB-INF/lib/
, is the commons-lang3-3.4.jar file found in there?
Last updated: Apr 12 2022 at 19:14 UTC