Error in mvn clean package for ex-market-data-service-main
- cagrawalOP
Hi,
I am trying to run the ex-market-data-service-main example and going through the README file.
I have DAML, JAVA, Maven and Pipenv installed.However, my mvn clean package is getting stuck with following error:
[ERROR] Command execution failed. java.io.IOException: Cannot run program "pipenv" (in directory "C:\Users\Chandan.Agrawal\source\repos\DA\DA\ex-market-data-service-main\scripts"): CreateProcess error=2, The system cannot find the file specifiedThe pipenv is definitely installed on my system, see below:
C:\Users\Chandan.Agrawal\source\repos\DA\DA\ex-market-data-service-main>pip install pipenv --user --proxy proxy-am.shell.com:8080 Requirement already satisfied: pipenv in c:\users\chandan.agrawal\appdata\roaming\python\python37\site-packages (2021.5.29) Requirement already satisfied: setuptools>=36.2.1 in c:\program files\python37\lib (from pipenv) (57.0.0) Requirement already satisfied: virtualenv in c:\users\chandan.agrawal\appdata\roaming\python\python37\site-packages (from pipenv) (20.7.0) Requirement already satisfied: certifi in c:\program files\python37\lib (from pipenv) (2020.12.5) Requirement already satisfied: virtualenv-clone>=0.2.5 in c:\users\chandan.agrawal\appdata\roaming\python\python37\site-packages (from pipenv) (0.5.6) Requirement already satisfied: pip>=18.0 in c:\program files\python37\lib\site-packages (from pipenv) (20.1.1) Requirement already satisfied: platformdirs<3,>=2 in c:\users\chandan.agrawal\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (2.2.0) Requirement already satisfied: filelock<4,>=3.0.0 in c:\users\chandan.agrawal\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (3.0.12) Requirement already satisfied: backports.entry-points-selectable>=1.0.4 in c:\users\chandan.agrawal\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (1.1.0) Requirement already satisfied: distlib<1,>=0.3.1 in c:\users\chandan.agrawal\appdata\roaming\python\python37\site-packages (from virtualenv->pipenv) (0.3.2) Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in c:\program files\python37\lib\site-packages (from virtualenv->pipenv) (4.2.0) Requirement already satisfied: six<2,>=1.9.0 in c:\program files\python37\lib\site-packages (from virtualenv->pipenv) (1.15.0) Requirement already satisfied: typing-extensions>=3.6.4; python_version < "3.8" in c:\program files\python37\lib\site-packages (from importlib-metadata>=0.12; python_version < "3.8"->virtualenv->pipenv) (3.7.4.3) Requirement already satisfied: zipp>=0.5 in c:\program files\python37\lib\site-packages (from importlib-metadata>=0.12; python_version < "3.8"->virtualenv->pipenv) (3.4.1)Can you please help?
Thanks
- bernhard
Is
pipenvin your path? Ie can you run the commandpipenvfrom a command prompt in the same shell you are runningmvn? If not, that might be the issue. - cagrawal 1
Hi,
Thanks for your reply.
I have since gone a long way but stuck with this error and I have no idea what it means or if it a environment error or DAML error:[INFO] Checking licenses... [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/launchers/sandbox+navigator+jsonapi [WARNING] Missing header in: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/maven-failsafe-plugin-3.0.0-M3.pom.xml [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/pip.ini [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/LICENSE [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/img/publishing.dot [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/launchers/automationBots [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/data/au-market.csv [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/data/example.csv [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/img/Makefile [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/data/default-1.csv [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/launchers/populate+automationTriggers [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/data/default-1000.csv [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/ui-backend.conf [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/scripts/Pipfile.lock [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/scripts/Pipfile [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/Pipfile.lock [WARNING] Unknown file extension: C:/Users/Chandan.Agrawal/source/repos/DA/DA/ex-market-data-service-main/Pipfile [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:40 min [INFO] Finished at: 2021-08-09T12:11:41+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project market-data-service: Some files do not have the expected license header -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.Can you please help?
Thanks
- Richard_Kapolnai 1
For some mysterious reasons, the license check fail now.
I recommend simply turning it off by removing the<execution>tag from the pluginlicense-maven-pluginin the filepom.xml. So in short, pls try applying this patch:diff --git a/pom.xml b/pom.xml index 4243cbd..19fbb0a 100644 --- a/pom.xml +++ b/pom.xml @@ -186,12 +186,6 @@ </mapping> </configuration> <executions> - <execution> - <phase>prepare-package</phase> - <goals> - <goal>check</goal> - </goals> - </execution> </executions> </plugin> <plugin>PS: you can also try clean up your local changes, local files, run
mvn license:formatas alternative approaches to tackle with the license issue. But for a quick try, removing it the easiest. - cagrawal
Hi,
A lot of toil but I have reached the point where I am able to run two launchers, however struggling with populateAutomationTrigger.
DO you have the Windows equivalent of this?set -e PORT=${1:-6865} export PIPENV_PIPFILE=scripts/Pipfile pipenv run scripts/populate.py "$PORT" echo "DAML script executed" exec pipenv run scripts/startTriggers.py "$PORT"Thanks
- Gary_Verhaegen 1
I don’t have a Windows machine handy right now to test this, but I think the following should work if run one line at a time from a
cmd.exeprocess (in the appropriate directory):set PIPENV_PIPFILE=scripts/Pipfile pipenv run scripts/populate.py 6865 pipenv run scripts/startTriggers.py 6865This assumes you have a Daml ledger running on localhost, port 6865, which is the default. If you have set a different port when starting your Daml ledger, you’ll need to set the same port here instead of 6865.
- cagrawal 1
Gary_Verhaegen:set PIPENV_PIPFILE=scripts/Pipfile pipenv run scripts/populate.py 6865 pipenv run scripts/startTriggers.py 6865I am afraid it does not work:
C:\Users\Chandan.Agrawal\source\repos\DA\DA\ex-market-data-service-main\launchers>cd…C:\Users\Chandan.Agrawal\source\repos\DA\DA\ex-market-data-service-main>set PIPENV_PIPFILE=scripts/Pipfile
C:\Users\Chandan.Agrawal\source\repos\DA\DA\ex-market-data-service-main>pipenv run scripts/populate.py 6865
‘scripts’ is not recognized as an internal or external command,
operable program or batch file.C:\Users\Chandan.Agrawal\source\repos\DA\DA\ex-market-data-service-main>pipenv run scripts/startTriggers.py 6865
‘scripts’ is not recognized as an internal or external command,
operable program or batch file.C:\Users\Chandan.Agrawal\source\repos\DA\DA\ex-market-data-service-main>pause
Press any key to continue . . . - Gary_Verhaegen 1
I’m not very familiar with either Python or Windows (or the
ex-market-data-servicerepo, for that matter), so I’m not sure what’s going here, but here’s what I’d try:- Run the same commands, but with quotes:
pipenv run "scripts/populate.py" 6865 pipenv run "scripts/startTriggers.py" 6865 - Move into the scripts folder and try running things from there, i.e.:
cd scripts pipenv run populate.py 6865 pipenv run startTriggers.py 6865
In either case you can stop after the
populateline if it has not worked; if the first command fails there’s not much point in trying the second one. - Run the same commands, but with quotes:
- cagrawal 1
Do you have a colleague who can help? I am totally stuck here. I already tried those things you suggested before pinging you.
- cocreature 1
Maybe try backslashes, e.g.,
pipenv run scripts\populate.py 6865 - Richard_Kapolnai 1
Can you please try this?
- (Start the sandbox, and start the Java bots.)
- Copy the DAR file
target\market-data-service.darto thescriptsfolder. - Make sure that your current directory is the
scriptsfolder (let us know if you need guidance on this part). - From scripts folder inline the populate command:
daml script --ledger-host localhost --ledger-port 6865 --dar market-data-service.dar --script-name DA.RefApps.MarketDataService.MarketSetupScript:setupMarketForSandbox - Edit
startTriggers.py, change line 15 todar = 'market-data-service.dar' - Start it, still from the
scriptsfolder:pipenv run startTriggers.py 6865