Skip to content
Discussions/App Development/Needs help on Error: Invalid dar file: CdmSwaps-1.0.0.darForum ↗

Needs help on Error: Invalid dar file: CdmSwaps-1.0.0.dar

App Development26 posts757 views9 likesLast activity May 2020
OL
OlusegunOP
May 2020

Hello all,

Implement what I understand is now an outdated ex-cdm-swaps module but getting errors that the dar file is
Error: Invalid dar file: CdmSwaps-1.0.0.dar

Running on Centos 7 Google Cloud VM Instance

The repository example is here

GitHub

digital-asset/ex-cdm-swaps

Contribute to digital-asset/ex-cdm-swaps development by creating an account on GitHub.

It is for my financial engineering and I need the platform running in hours. I will appreciate any help

Could the conflict be with the newer sdk installed against the one the example references.

How can i roll the sdk back to the appropriate one.

Thanks

Best Regards,

CO
cocreature
May 2020

As long as you haven’t change the sdk-version in the daml.yaml things should still work.

At which step are you getting the error? The readme tells you to run daml sandbox .daml/dist/CdmSwaps-1.0.0.dar. It looks like you might be running daml sandbox CdmSwaps-1.0.0.dar without the proper path or you have forgotten the daml build step before that.

OL
Olusegun
May 2020

Thanks Moritz for coming in.

I did the daml build and the sbt compile before that.

I did the right path.

I got the error at the daml sandbox .daml/dist/CdmSwaps-1.0.0.dar step

Thanks

Best Regards,

Olusegun

CO
cocreature
May 2020

I’ve just cloned the repository and tried daml build followed by daml sandbox .daml/dist/CdmSwaps-1.0.0.dar and it seems to work for me. Are you sure you did not modify the daml.yaml file?

What output do you get from daml build? You should be getting something like

Compiling CdmSwaps to a DAR.
Created .daml/dist/CdmSwaps-1.0.0.dar.
OL
Olusegun
May 2020

Hello Moritz,

I did not change the yaml file

Could i run the build commands again.

I remember i had a warning with sbt compile stage .Here…

[olusegun_oluwajebe_wqu@group22 app]$ sbt compile
[info] Loading project definition from /home/olusegun_oluwajebe_wqu/wqu/ex-cdm-swaps/app/project
[info] Loading settings for project app from build.sbt ...
[info] Set current project to CdmSwaps (in build file:/home/olusegun_oluwajebe_wqu/wqu/ex-cdm-swaps/app/)
[info] Executing in batch mode. For better performance use sbt's shell
[warn] Credentials file /home/olusegun_oluwajebe_wqu/.sbt/.credentials.bintray does not exist
[success] Total time: 2 s, completed May 12, 2020 6:09:24 PM
CO
cocreature
May 2020

The sbt compile step doesn’t matter. If sandbox is throwing an error I need to see the full output of the daml build step and of the daml sandbox .daml/dist/CdmSwaps-1.0.0.dar step.

OL
Olusegun
May 2020

Here is it Moritz,

[olusegun_oluwajebe_wqu@group22 app]$ daml sandbox .daml/dist/CdmSwaps-1.0.0.dar
DAML SDK 1.0.1 has been released!
See https://github.com/digital-asset/daml/releases/tag/v1.0.1 for details.
Error: Invalid dar file: CdmSwaps-1.0.0.dar
Try --help for more information.
daml-helper: Received ExitFailure 1 when running
Raw command: java -jar /home/olusegun_oluwajebe_wqu/.daml/sdk/0.13.22/sandbox/sandbox.jar .daml/dist/CdmSwaps-1.
0.0.dar
CO
cocreature
May 2020

Can you please also show us the output of daml build.

OL
Olusegun
May 2020

Here Moritz,

[olusegun_oluwajebe_wqu@group22 ex-cdm-swaps]$ daml build
DAML SDK 1.0.1 has been released!
See https://github.com/digital-asset/daml/releases/tag/v1.0.1 for details.
Compiling CdmSwaps to a DAR.
Created .daml/dist/CdmSwaps-1.0.0.dar.
CO
cocreature
May 2020

Hm that looks fine. Can you run ls -l .daml/dist from the same directory where you are running daml sandbox from?

OL
Olusegun
May 2020

I got this,

[olusegun_oluwajebe_wqu@group22 app]$ ls -l .daml/dist
ls: cannot access .daml/dist: No such file or directory

CO
cocreature
May 2020

Are you sure you are running daml build and daml sandbox frm the same directory? daml build will create .daml/dist. If you cannot find it with ls it sounds like you might be in a different directory. You should run both commands from the root directory of the project.

OL
Olusegun
May 2020

am i supposed to run the saml build from the app folder?

CO
cocreature
May 2020

No you should run daml build as well as daml sandbox from the root directory, i.e., the one with the daml.yaml in it. The only command that you should run from app is sbt compile.

OL
Olusegun
May 2020

I just ran it from the project folder:

olusegun_oluwajebe_wqu@group22 ex-cdm-swaps]$ daml sandbox .daml/dist/CdmSwaps-1.0.0.dar
DAML SDK 1.0.1 has been released!
See https://github.com/digital-asset/daml/releases/tag/v1.0.1 for details.
Sandbox verbosity changed to INFO
/DAML LF Engine supports LF versions: 0, 0.dev, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.dev; Transaction versions: 
1, 2, 3, 4, 5, 6, 7, 8; Value versions: 1, 2, 3, 4, 5
Starting plainText server
listening on localhost:6865
   ____             ____
  / __/__ ____  ___/ / /  ___ __ __
 _\ \/ _ `/ _ \/ _  / _ \/ _ \\ \ /
/___/\_,_/_//_/\_,_/_.__/\___/_\_\
Initialized sandbox version 100.13.22 with ledger-id = sandbox-88d09319-cd73-4bbd-a4d9-53317ab1425b, port = 6865
, dar file = List(.daml/dist/CdmSwaps-1.0.0.dar), time mode = Static, ledger = in-memory, daml-engine = {}
CO
cocreature
May 2020

That looks right! So is everything working properly now or do you have other issues?

OL
Olusegun
May 2020

Thanks.

I need to follow the other steps. I will get back.

This is wonderful support.

I really appreciate your kindness

OL
Olusegun
May 2020

Hello Moritz,

Got this when I ran the Navigator command

ince 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[da-ui-backend]
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOfRange(Arrays.java:3664)
        at java.lang.String.<init>(String.java:207)
        at com.google.protobuf.Utf8$UnsafeProcessor.decodeUtf8(Utf8.java:1439)
        at com.google.protobuf.Utf8.decodeUtf8(Utf8.java:340)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readStringRequireUtf8(CodedInputStream.java:2296)
        at com.digitalasset.daml_lf.DamlLf1$DottedName.<init>(DamlLf1.java:3394)
        at com.digitalasset.daml_lf.DamlLf1$DottedName.<init>(DamlLf1.java:3349)
        at com.digitalasset.daml_lf.DamlLf1$DottedName$1.parsePartialFrom(DamlLf1.java:3969)
        at com.digitalasset.daml_lf.DamlLf1$DottedName$1.parsePartialFrom(DamlLf1.java:3963)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName.<init>(DamlLf1.java:5044)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName.<init>(DamlLf1.java:4984)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName$1.parsePartialFrom(DamlLf1.java:5837)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName$1.parsePartialFrom(DamlLf1.java:5831)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con.<init>(DamlLf1.java:15145)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con.<init>(DamlLf1.java:15096)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con$1.parsePartialFrom(DamlLf1.java:16158)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con$1.parsePartialFrom(DamlLf1.java:16152)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13825)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13763)
        at com.digitalasset.daml_lf.DamlLf1$Type$1.parsePartialFrom(DamlLf1.java:22182)
        at com.digitalasset.daml_lf.DamlLf1$Type$1.parsePartialFrom(DamlLf1.java:22176)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim.<init>(DamlLf1.java:16309)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim.<init>(DamlLf1.java:16252)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim$1.parsePartialFrom(DamlLf1.java:17205)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim$1.parsePartialFrom(DamlLf1.java:17199)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13839)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13763)
daml-helper: Received ExitFailure 255 when running
Raw command: java -jar /home/olusegun_oluwajebe_wqu/.daml/sdk/0.13.22/navigator/navigator.jar server
OL
Olusegun
May 2020

I mean this:

Frontend running at [http://localhost:4000.](http://localhost:4000./)Uncaught error from thread [da-ui-backend-akka.actor.default-dispatcher-4]: Java heap space, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[da-ui-backend]
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOfRange(Arrays.java:3664)
        at java.lang.String.<init>(String.java:207)
        at com.google.protobuf.Utf8$UnsafeProcessor.decodeUtf8(Utf8.java:1439)
        at com.google.protobuf.Utf8.decodeUtf8(Utf8.java:340)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readStringRequireUtf8(CodedInputStream.java:2296)
        at com.digitalasset.daml_lf.DamlLf1$DottedName.<init>(DamlLf1.java:3394)
        at com.digitalasset.daml_lf.DamlLf1$DottedName.<init>(DamlLf1.java:3349)
        at com.digitalasset.daml_lf.DamlLf1$DottedName$1.parsePartialFrom(DamlLf1.java:3969)
        at com.digitalasset.daml_lf.DamlLf1$DottedName$1.parsePartialFrom(DamlLf1.java:3963)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName.<init>(DamlLf1.java:5044)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName.<init>(DamlLf1.java:4984)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName$1.parsePartialFrom(DamlLf1.java:5837)
        at com.digitalasset.daml_lf.DamlLf1$TypeConName$1.parsePartialFrom(DamlLf1.java:5831)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con.<init>(DamlLf1.java:15145)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con.<init>(DamlLf1.java:15096)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con$1.parsePartialFrom(DamlLf1.java:16158)
        at com.digitalasset.daml_lf.DamlLf1$Type$Con$1.parsePartialFrom(DamlLf1.java:16152)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13825)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13763)
        at com.digitalasset.daml_lf.DamlLf1$Type$1.parsePartialFrom(DamlLf1.java:22182)
        at com.digitalasset.daml_lf.DamlLf1$Type$1.parsePartialFrom(DamlLf1.java:22176)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim.<init>(DamlLf1.java:16309)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim.<init>(DamlLf1.java:16252)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim$1.parsePartialFrom(DamlLf1.java:17205)
        at com.digitalasset.daml_lf.DamlLf1$Type$Prim$1.parsePartialFrom(DamlLf1.java:17199)
        at com.google.protobuf.CodedInputStream$StreamDecoder.readMessage(CodedInputStream.java:2364)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13839)
        at com.digitalasset.daml_lf.DamlLf1$Type.<init>(DamlLf1.java:13763)
daml-helper: Received ExitFailure 255 when running
Raw command: java -jar /home/olusegun_oluwajebe_wqu/.daml/sdk/0.13.22/navigator/navigator.jar server
CO
cocreature
May 2020

That looks like you are just running out of memory. How much RAM do you have?

AN
anthony
May 2020

Reminder: Please enclose all code, console output, logs, and config files in back ticks as such

    ```
    code/console output/config/logs
    ```
OL
Olusegun
May 2020

Hello Moritz ,

Thanks for helping out yesterday. The discussion board disallowed me from posting anymore yesterday indicating I had used the maximum 20 for a new user.

I took a cue from your question on RAM and destroyed the VM instance and recreated another one with 30G RAM.

I was able to set up the external IP.

Glad to let you know the platform is up and running.

I am now moving to ensuring persistence on DAML Ledger through PostgreSQL. Would have loved to give the Sawtooth on daml an attempt but time is not on my side.

Thanks.

Best Regards,

Olusegun,

PS: I can now go back to introduce yourself and introduce myself properly!

CO
cocreature
May 2020

Glad to hear you sorted it out. Welcome to the forums! We’re happy to have you here!

OL
Olusegun
May 2020

Hello again Moritz,

Anyway to use any on the contract templates to create an IRS of One year with specified 3month libor rates and 6 month fixed leg cashflows.

Or do i have to create it afresh?

Can any of these be done from the web interface?

Thanks.

MA
Martin_Huschenbett
May 2020

Hi Olusegun,

Your last question looks very unrelated to the rest of this conversation. Would you mind creating a new entry in the Questions section of the forum for it? Otherwise it will be really hard for other people to find and answer your question because it’s buried deep down here.

Many thanks,

Martin.

OL
Olusegun
May 2020

Thanks Martin

← Back to Discussions