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

**URL:** <https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440>\
**Category:** App Development\
**Created:** [May 12, 2020, 4:15pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440 "2020-05-12T16:15:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 4:15pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/1 "2020-05-12T16:15:46Z")

</div>

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

> **[digital-asset/ex-cdm-swaps](https://github.com/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,

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 4:23pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/2 "2020-05-12T16:23:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 5:00pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/3 "2020-05-12T17:00:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 5:04pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/4 "2020-05-12T17:04:41Z")

</div>

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

```haskell
Compiling CdmSwaps to a DAR.
Created .daml/dist/CdmSwaps-1.0.0.dar.

```

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:10pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/5 "2020-05-12T18:10:31Z")

</div>

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…

```haskell
[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

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 6:12pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/6 "2020-05-12T18:12:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:14pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/7 "2020-05-12T18:14:29Z")

</div>

Here is it Moritz,

```haskell
[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

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 6:15pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/8 "2020-05-12T18:15:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:17pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/9 "2020-05-12T18:17:39Z")

</div>

Here Moritz,

```haskell
[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.

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 6:18pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/10 "2020-05-12T18:18:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:25pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/11 "2020-05-12T18:25:27Z")

</div>

I got this,

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

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 6:26pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/12 "2020-05-12T18:26:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:28pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/13 "2020-05-12T18:28:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 6:29pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/14 "2020-05-12T18:29:08Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:30pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/15 "2020-05-12T18:30:35Z")

</div>

I just ran it from the project folder:

```haskell
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 = {}

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 6:31pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/16 "2020-05-12T18:31:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:32pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/17 "2020-05-12T18:32:23Z")

</div>

Thanks.

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

This is wonderful support.

I really appreciate your kindness

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:47pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/18 "2020-05-12T18:47:46Z")

</div>

Hello Moritz,

Got this when I ran the Navigator command

```haskell
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

```

---

<div class="post-metadata">

**Author:** ![Olusegun](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/olusegun/32/873_2.png) [@Olusegun](https://forum.canton.network/u/Olusegun)\
**Post date:** [May 12, 2020, 6:50pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/19 "2020-05-12T18:50:24Z")

</div>

I mean this:

```haskell
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

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 12, 2020, 6:50pm UTC](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440/20 "2020-05-12T18:50:56Z")

</div>

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

[Next page](https://forum.canton.network/t/needs-help-on-error-invalid-dar-file-cdmswaps-1-0-0-dar/440.md?page=2)
