question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arguments aren't parsed exactly as they are by clojure.ps1

See original GitHub issue

Build process is:

> clj -A:aot
rotate-credentials.core

> clj -A:pack -C:aot mach.pack.alpha.aws-lambda lambda.zip

(side-note: On Windows 10 Pro, if I do -C:aot right before lambda.zip, it makes a file called aot)

Anyway, the problem is that the classes for my project don’t make it into the uberjar, only the dependencies (only .clj files exist in the non-lib directory):

├───lambda.zip
│   ├───data_access
│   ├───lib
│   └───rotate_credentials

When I run my lambda, I get this error:

Class not found: rotate-credentials.core: java.lang.ClassNotFoundException
java.lang.ClassNotFoundException: rotate-credentials.core
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)

This works fine if I build on linux. My java version is:

openjdk version "1.8.0_212"
OpenJDK Runtime Environment Corretto-8.212.04.1 (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM Corretto-8.212.04.1 (build 25.212-b04, mixed mode)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
SevereOverfl0wcommented, Jul 20, 2019

Just noticed that -C :aot worked, that’s great news, exactly what I’d expect. I’ve asked in #clj-on-windows in clojurians slack about the argument splitting. I’ll report back when I get an answer.

1reaction
johnjelinekcommented, Jul 20, 2019

that worked:

> clj -A:pack mach.pack.alpha.aws-lambda -C :aot lambda.zip
[trace] Arguments are:  ("-C" ":aot" "lambda.zip")
Read more comments on GitHub >

github_iconTop Results From Across the Web

lvh
The simplest possible regular expression is just a character, which matches itself: A . In our parse tree, this is an entry of...
Read more >
How to accept additional arguments for an option in tools.cli?
I'm a Clojure newbie. ... First one is a number, and other two have to be strings. ... Now, (1) Is there a...
Read more >
Developing Modules — Ansible Documentation - Read the Docs
The arguments file is just a string, so any form of arguments are legal. Here we'll do some basic parsing to treat the...
Read more >
Bug listing with status CONFIRMED as at 2022/12/14 03:46:34
... in a pipe without breaking it" status:CONFIRMED resolution: severity:normal ... Bug:84274 - "sci-libs/gedcom-parse - The GEDCOM parser library 0.90.0 ...
Read more >
CLOC -- Count Lines of Code
It is written entirely in Perl with no dependencies outside the standard ... this check does not apply to files explicitly passed as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found