FHIR Chat · installation issue · eCR Now FHIR App

Stream: eCR Now FHIR App

Topic: installation issue


view this post on Zulip Lewis Strasburg (Nov 11 2021 at 22:38):

We've compiled eCR Now and we're now trying to run "java -Djdbc.username=postgres -Djdbc.password=postgres -Dsecurity.key=test123 -jar ./target/ecr-now.war" from the eCRNow root folder (using PowerShell) but we're getting the following error: "Error: Could not find or load main class .username=postgres". We do the the ecr-now.war file in the expected place... not sure what's missing. What can we do to fix this issue?

view this post on Zulip Lewis Strasburg (Nov 11 2021 at 22:44):

From command line (in administrator mode):
Exception in thread "main" java.lang.reflect.InvocationTargetException
[...]
Caused by: java.lang.IllegalStateException: Logback configuration error detected: esourcesecrNow.log (The filename, directory name, or volume label syntax is incorrect)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
[...]

view this post on Zulip Lewis Strasburg (Nov 11 2021 at 22:52):

java : Exception in thread "main" java.lang.reflect.InvocationTargetException
At line:1 char:1
+ java -jar C:\repos\ecrnow\target\ecr-now.war -Djdbc.username=postgres -Djdbc.pas ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Exception in th...TargetException:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
    at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)
Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(C:eposeCRNowsrcmainesourcesecrNow.log,true) call failed.
java.io.FileNotFoundException: C:eposeCRNowsrcmainesourcesecrNow.log (The filename, directory name, or volume label syntax is incorrect)

view this post on Zulip Nagesh Bashyam (Nov 12 2021 at 14:08):

Please try
java "-Djdbc.username=postgres" "-Djdbc.password=postgres" "-Dsecurity.key=test123" -jar .\target\ecr-now.war (If you are running on windows you need quotes. I will add this to the Readme once you confirm.

view this post on Zulip Lewis Strasburg (Nov 12 2021 at 17:29):

OK, the quotes give us a different error.

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)
Caused by: java.lang.IllegalStateException: Logback configuration error detected:
esourcesecrNow.log (The filename, directory name, or volume label syntax is incorrect)
        at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169
)
        at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:8
0)
        at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
        at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
        at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListen
er.java:306)
        at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.jav
a:281)
        at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(Log
gingApplicationListener.java:239)
        at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationList
ener.java:216)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMu
lticaster.java:172)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMult
icaster.java:165)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:139)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:127)
        at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListe
ner.java:80)
        at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java
:53)
        at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
        at com.drajer.ecrapp.EcrApp.main(EcrApp.java:27)
        ... 8 more

view this post on Zulip Lewis Strasburg (Nov 12 2021 at 17:42):

Also tried with quotes around the last parameter path, like this:
java "-Djdbc.username=postgres" "-Djdbc.password=postgres" "-Dsecurity.key=test123" -jar ".\target\ecr-now.war"

We got the same error.

view this post on Zulip Lewis Strasburg (Nov 16 2021 at 18:38):

The error about the log file seems to be struggling to find the appropriate path, but I'm struggling to build a path that works. The file was missing, so I added a blank file of the correct type. In the application.properties file where the path is defined, I'm wondering if the backslashes are being interpreted as escape characters, hence the "esources" instead of "resources" but putting the path in quotes isn't helping, neither doing double backslashes (to escape the escape character). Does someone have any other ideas I can try?

view this post on Zulip Lewis Strasburg (Nov 16 2021 at 19:01):

Perhaps I need to do the "mvn clean install" each time I change the properties file... I'm not seeing any changes to the error when I try to save new things in it. However, attempting to use "mvn clean install" again with minor changes, I'm now seeing errors for "Failed to load ApplicationContext" which seems to be a path issue again.

view this post on Zulip Lewis Strasburg (Nov 16 2021 at 21:57):

Other log files are trying to open a file "D://ecrNow.log" but I don't have a D: drive mapped. Not sure where I can change that path, if it's possible.

view this post on Zulip Nagesh Bashyam (Nov 17 2021 at 17:41):

You do need to do a mvn clean install when you change the properties file
The log file location is defined in the application.properties file.
If you are still having issues, we can connect on screen share to see what is happening.

view this post on Zulip Lewis Strasburg (Nov 18 2021 at 16:38):

I figured out why changes to the application.properties file didn't have an effect. The file the install is pointing at now is in eCRNow\src\test\resources\application-test.properties instead of eCRNow\src\main\resources\application.properties. Should I work in the test folder or change something to point back at main?

view this post on Zulip Lewis Strasburg (Nov 18 2021 at 21:41):

Defining a valid path in the application-test.properties file seems to have done the job for installing and running the app (and yes we do need the quotation marks). Now I'm ready to try to use eCR Now UI.

view this post on Zulip Lewis Strasburg (Nov 18 2021 at 21:53):

Attempting to install eCR Now UI, I get the following error:

view this post on Zulip Lewis Strasburg (Nov 18 2021 at 21:54):

TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\socks-proxy-agent\dist\agent.js:114:44)

    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

view this post on Zulip Lewis Strasburg (Nov 18 2021 at 23:29):

We installed an earlier version of Node.js (14.18.1) rather than the latest (16.10.0 and later 16.13.0) and the installation was successful.... although "108 vulnerabilities" were found. Not sure if we need to address those. We could use a later version, perhaps, but the latest were definitely not working.

view this post on Zulip Lewis Strasburg (Nov 18 2021 at 23:43):

OK, trying to load the UI app and I get a blank page. PowerShell shows me this error:

PS C:\repos\eCRNow-UI> npm start

> myfirstreact@0.1.0 start C:\repos\eCRNow-UI
> react-scripts start

Failed to compile.

./src/App.js
Attempted import error: 'Switch' is not exported from 'react-router-dom'.

view this post on Zulip Lewis Strasburg (Nov 18 2021 at 23:46):

I briefly saw the following messages (but I did as instructed, it seemed to work, and tried again with the same result as above):

Starting the development server...

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

view this post on Zulip Lewis Strasburg (Nov 29 2021 at 21:43):

@Nagesh Bashyam, do you have suggestions for the "Switch" issue?

view this post on Zulip Nagesh Bashyam (Nov 30 2021 at 14:28):

Lewis - It might be good to connect for 30 minutes to get an idea of your environment and the issues...what timezone do you work in ?

view this post on Zulip Lewis Strasburg (Nov 30 2021 at 16:35):

Mountain time. We have a call today at 11AM my time (about an hour and a half). I'd be happy to connect sooner if you have the time.

view this post on Zulip Lewis Strasburg (Nov 30 2021 at 16:42):

I guess that call is actually with Allscripts about their FHIR server. It's only scheduled for 30 minutes, we could meet after if you like. I'm busy again between 2pm and 3pm. I'm open all day tomorrow.

view this post on Zulip Lewis Strasburg (Dec 01 2021 at 17:53):

This is a high priority for us, so if you let me know what time works for you, I'll make arrangements to make it happen.

view this post on Zulip Nagesh Bashyam (Dec 01 2021 at 17:56):

Pinging you with times on personal window.

view this post on Zulip Lewis Strasburg (Dec 02 2021 at 14:04):

For future reference, we resolved the import error for "Switch" but changing the eCRNow-UI properties.json file, by making this line "react-router-dom": "latest" into "react-router-dom": "^5.2.0" instead. We had to delete the folder ecrnow-ui/node_modules and reinstall with npm install.


Last updated: Apr 12 2022 at 19:14 UTC