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.

Coursier and Ivy => None.get

See original GitHub issue

I thought I’ll open the issue here too: https://github.com/sbt/sbt/issues/4798

steps

sbt version: 1.3.0-RC2

problem

> update
java.util.concurrent.RejectedExecutionException: Task scala.concurrent.impl.CallbackRunnable@31361a63 rejected from java.util.concurrent.ThreadPoolExecutor@3ff1f235[Shutting down, pool size = 6, active threads = 1, queued tasks = 0, completed tasks = 32280]
	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
  | => pat scala.concurrent.impl.ExecutionContextImpl$$anon$4.execute(ExecutionContextImpl.scala:138)
	at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:72)
	at scala.concurrent.impl.Promise$DefaultPromise.$anonfun$tryComplete$1(Promise.scala:288)
	at scala.concurrent.impl.Promise$DefaultPromise.$anonfun$tryComplete$1$adapted(Promise.scala:288)
	at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:288)
	at scala.concurrent.Promise.$anonfun$tryCompleteWith$1(Promise.scala:75)
	at scala.concurrent.Promise.$anonfun$tryCompleteWith$1$adapted(Promise.scala:75)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at scala.concurrent.BatchingExecutor$Batch.processBatch$1(BatchingExecutor.scala:67)
	at scala.concurrent.BatchingExecutor$Batch.$anonfun$run$1(BatchingExecutor.scala:82)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
	at scala.concurrent.BatchingExecutor$Batch.run(BatchingExecutor.scala:59)
	at scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:874)
	at scala.concurrent.BatchingExecutor.execute(BatchingExecutor.scala:110)
	at scala.concurrent.BatchingExecutor.execute$(BatchingExecutor.scala:107)
	at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:872)
	at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:72)
	at scala.concurrent.impl.Promise$KeptPromise$Kept.onComplete(Promise.scala:372)
	at scala.concurrent.impl.Promise$KeptPromise$Kept.onComplete$(Promise.scala:371)
	at scala.concurrent.impl.Promise$KeptPromise$Successful.onComplete(Promise.scala:379)
	at scala.concurrent.Promise.tryCompleteWith(Promise.scala:75)
	at scala.concurrent.Promise.tryCompleteWith$(Promise.scala:73)
	at scala.concurrent.impl.Promise$DefaultPromise.tryCompleteWith(Promise.scala:187)
	at scala.concurrent.Promise.completeWith(Promise.scala:67)
	at scala.concurrent.Promise.completeWith$(Promise.scala:67)
	at scala.concurrent.impl.Promise$DefaultPromise.completeWith(Promise.scala:187)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:44)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[error] java.util.NoSuchElementException: None.get
[error] 	at scala.None$.get(Option.scala:366)
[error] 	at scala.None$.get(Option.scala:364)
[error] 	at lmcoursier.internal.shaded.coursier.maven.PomParser$$anon$5.end(PomParser.scala:517)
[error] 	at lmcoursier.internal.shaded.coursier.maven.PomParser.$anonfun$endElement$1(PomParser.scala:53)
[error] 	at lmcoursier.internal.shaded.coursier.maven.PomParser.$anonfun$endElement$1$adapted(PomParser.scala:47)
[error] 	at scala.Option.foreach(Option.scala:274)
[error] 	at lmcoursier.internal.shaded.coursier.maven.PomParser.endElement(PomParser.scala:47)
[error] 	at lmcoursier.internal.shaded.coursier.core.compatibility.package$XmlHandler.endElement(package.scala:48)
[error] 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
[error] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
[error] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967)
[error] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
[error] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
[error] 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
[error] 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
[error] 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[error] 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[error] 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
[error] 	at lmcoursier.internal.shaded.coursier.core.compatibility.package$.xmlParseSax(package.scala:64)
[error] 	at lmcoursier.internal.shaded.coursier.maven.MavenRepository$.parseRawPomSax(MavenRepository.scala:70)
[error] 	at lmcoursier.internal.shaded.coursier.maven.MavenRepository.$anonfun$findVersioning$1(MavenRepository.scala:358)
[error] 	at lmcoursier.internal.shaded.coursier.util.EitherT.$anonfun$flatMap$1(EitherT.scala:16)
[error] 	at lmcoursier.internal.shaded.coursier.util.Task$.$anonfun$flatMap$2(Task.scala:11)
[error] 	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
[error] 	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
[error] 	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (update) java.util.NoSuchElementException: None.get
[error] Total time: 0 s, completed Jun 11, 2019 9:18:39 AM

The .get: https://github.com/coursier/coursier/blob/6d0e24205a6c8d3ecf2c0d4674984a4366b1cd59/modules/core/shared/src/main/scala/coursier/maven/PomParser.scala#L517

Sounds like it tries to resolve it as a maven dependency whereas my repo config has isMavenCompatible = false:

val repoPattern = Patterns(
  Vector("[orgPath]/[module]/[revision]/[module]-[revision]-ivy.[ext]"),
  Vector("[orgPath]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"),
  isMavenCompatible = false,
  descriptorOptional = false,
  skipConsistencyCheck = true
)

Related PR: https://github.com/coursier/coursier/pull/221 But couldn’t find any code checking the isMavenCompatible: https://github.com/coursier/coursier/search?q=isMavenCompatible&unscoped_q=isMavenCompatible

Workaround

Disabling coursier:

useCoursier := false

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexarchambaultcommented, Jun 12, 2019

Reproduction with the CLI:

$ coursier fetch com.netflix.karyon:karyon-eureka:1.0.28
Exception in thread "main" java.util.NoSuchElementException: None.get
	at scala.None$.get(Option.scala:366)
	at scala.None$.get(Option.scala:364)
	at coursier.maven.PomParser$$anon$5.end(PomParser.scala:517)
	at coursier.maven.PomParser.$anonfun$endElement$1(PomParser.scala:53)
	at coursier.maven.PomParser.$anonfun$endElement$1$adapted(PomParser.scala:47)
	at scala.Option.foreach(Option.scala:274)
	at coursier.maven.PomParser.endElement(PomParser.scala:47)
	at coursier.core.compatibility.package$XmlHandler.endElement(package.scala:48)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
	at coursier.core.compatibility.package$.xmlParseSax(package.scala:64)
	at coursier.maven.MavenRepository$.parseRawPomSax(MavenRepository.scala:70)
	at coursier.maven.MavenRepository.$anonfun$findVersioning$1(MavenRepository.scala:358)
	at coursier.util.EitherT.$anonfun$flatMap$1(EitherT.scala:16)
	at coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
1reaction
eed3si9ncommented, Jun 11, 2019

@joan38 Do you have a public project we can use to reproduce the error on our machine?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coursier and Ivy => None.get · Issue #4798 · sbt/sbt - GitHub
steps sbt version: 1.3.0-RC2 problem > update java.util.concurrent.RejectedExecutionException: Task scala.concurrent.impl.
Read more >
API - Coursier
To get started with the high level API, add the settings below to build.sbt ... files for Maven repositories, and ivy.xml files for...
Read more >
Application descriptors - Coursier
Pass any missing Maven / Ivy repository via the -r / --repository option. ... For example, the default channel, io.get-coursier:apps is JAR-based.
Read more >
Version handling - Coursier
To get items, versions are split at . , - , and _ (and those separators are ... Literal items go before non-zero...
Read more >
Overview - Coursier
Under the hood, coursier is a dependency resolver / fetcher à la Maven / Ivy, entirely rewritten from scratch in Scala. It aims...
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