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.

maven transitive dependency on slf4j and 'ceylon run --assembly'

See original GitHub issue

In this example project, I had to use --flat-classpath (only) when running using --assembly:

 ceylon run --flat-classpath --assembly=example.jooq-1.0.0.cas

Otherwise I get this error:

Gavins-MacBook-Pro-2:ceylon-jooq-example gavin$ ceylon run  --assembly example.jooq-1.0.0.cas 
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
	at com.zaxxer.hikari.HikariConfig.<clinit>(HikariConfig.java:51)
	at example.jooq.createDataSource_.createDataSource(dataSource.ceylon:34)
	at example.jooq.run_.run(run.ceylon:35)
	at example.jooq.run_.main(run.ceylon)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

@FroMage I’ve tried all kinds of stuff in overrides.xml to try and fix this, with no luck at all. The slf4j API jar is there in the assembly (which is why it works with --flat-classpath), but for some reason Hikari simply can’t find it at runtime.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
FroMagecommented, Jul 19, 2017

Oh, you’re using an override. It works without any override, though.

0reactions
gavinkingcommented, Jul 19, 2017

I’ll open a separate issue for the problem with the overrides.

Actually, no, let’s move the discussion to #7062 since that issue, since you already reopened that issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing SLF4J in an application with many transitive ...
I would like to use slf4j , with log4j2 as the underlying logging implementation. However, the application includes some Spring dependencies.
Read more >
Maven – Optional Dependencies and Dependency Exclusions
Since Maven resolves dependencies transitively, it is possible for unwanted dependencies to be included in your project's classpath.
Read more >
Maven excludes all transitive dependencies - Java Code Geeks
So I looked a way to ignore all the transitive dependencies, and found that we can ignore all the associated dependencies of a...
Read more >
Solving Dependency Conflicts in Maven - DZone
17 of log4j is depended on by “slf4j-log4j12”. During compilation and runtime, log4j version 1.2.16 will be used, since its node is nearest...
Read more >
Learning the Basics - Gradle User Manual
Upgrading versions of transitive dependencies; Downgrading versions and ... To declare the Maven Central repository for your build add this to your script:....
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