Missing or Invalid Dependency after upgrading to specs2 3.6

663 views
Skip to first unread message

benj...@needstyping.com

unread,
May 26, 2015, 10:04:32 AM5/26/15
to specs2...@googlegroups.com
Hi

I'm getting the following error when building my project since upgrading from specs2 2.X to 3.6

[error] missing or invalid dependency detected while loading class file 'Specs2Interface.class'.
[error] Could not access type SpecificationStructure in package org.specs2.specification,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'Specs2Interface.class' was compiled against an incompatible version of org.specs2.specification.

I have tried adding the flag suggested above to inspect the classpath and as you can see below there is only the 3.6 specs2 jars being brought in.

Tried update, clean etc.

Any suggestions?

Ben



Classpath output:


[info] [search path for class files: /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/Extensions/DBusJava.jar:/Library/Java/Extensions/RXTXcomm.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/Users/benparker/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.6.jar:/Users/benparker/development/scala/import-it/target/scala-2.11/test-classes:/Users/benparker/development/scala/import-it/target/scala-2.11/classes:/Users/benparker/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.9.jar:/Users/benparker/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.9-sources.jar:/Users/benparker/.ivy2/cache/com.typesafe/config/jars/config-1.2.1.jar:/Users/benparker/.ivy2/cache/com.typesafe/config/jars/config-1.2.1-sources.jar:/Users/benparker/.ivy2/cache/io.spray/spray-can_2.11/jars/spray-can_2.11-1.3.3.jar:/Users/benparker/.ivy2/cache/io.spray/spray-io_2.11/bundles/spray-io_2.11-1.3.3.jar:/Users/benparker/.ivy2/cache/io.spray/spray-util_2.11/bundles/spray-util_2.11-1.3.3.jar:/Users/benparker/.ivy2/cache/io.spray/spray-http_2.11/bundles/spray-http_2.11-1.3.3.jar:/Users/benparker/.ivy2/cache/org.parboiled/parboiled-scala_2.11/jars/parboiled-scala_2.11-1.1.7.jar:/Users/benparker/.ivy2/cache/org.parboiled/parboiled-core/jars/parboiled-core-1.1.7.jar:/Users/benparker/.ivy2/cache/io.spray/spray-routing_2.11/jars/spray-routing_2.11-1.3.3.jar:/Users/benparker/.ivy2/cache/io.spray/spray-httpx_2.11/bundles/spray-httpx_2.11-1.3.3.jar:/Users/benparker/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.3.jar:/Users/benparker/.ivy2/cache/org.jvnet.mimepull/mimepull/jars/mimepull-1.9.5.jar:/Users/benparker/.ivy2/cache/com.chuusai/shapeless_2.11/jars/shapeless_2.11-1.2.4.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-native_2.11/jars/json4s-native_2.11-3.2.11.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-native_2.11/jars/json4s-native_2.11-3.2.11-sources.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-core_2.11/jars/json4s-core_2.11-3.2.11.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-ast_2.11/jars/json4s-ast_2.11-3.2.11.jar:/Users/benparker/.ivy2/cache/com.thoughtworks.paranamer/paranamer/jars/paranamer-2.6.jar:/Users/benparker/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.6.jar:/Users/benparker/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.6.jar:/Users/benparker/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.3.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-ext_2.11/jars/json4s-ext_2.11-3.2.11.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-ext_2.11/jars/json4s-ext_2.11-3.2.11-sources.jar:/Users/benparker/.ivy2/cache/com.rabbitmq/amqp-client/jars/amqp-client-3.5.0.jar:/Users/benparker/.ivy2/cache/org.scalautils/scalautils_2.11/jars/scalautils_2.11-2.1.5-sources.jar:/Users/benparker/.ivy2/cache/org.scalautils/scalautils_2.11/jars/scalautils_2.11-2.1.5.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/home-office-schemas_2.11/1.0-SNAPSHOT/jars/home-office-schemas_2.11.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/home-office-schemas_2.11/1.0-SNAPSHOT/jars/home-office-schemas_2.11-tests.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/akka-it_2.11/jars/akka-it_2.11-1.0-SNAPSHOT-tests.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/akka-it_2.11/jars/akka-it_2.11-1.0-SNAPSHOT.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/io-it_2.11/jars/io-it_2.11-1.0-SNAPSHOT-tests.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/io-it_2.11/jars/io-it_2.11-1.0-SNAPSHOT-sources.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/io-it_2.11/jars/io-it_2.11-1.0-SNAPSHOT.jar:/Users/benparker/.ivy2/cache/com.github.fge/json-schema-validator/jars/json-schema-validator-2.2.6-sources.jar:/Users/benparker/.ivy2/cache/com.github.fge/json-schema-validator/jars/json-schema-validator-2.2.6.jar:/Users/benparker/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-3.0.0.jar:/Users/benparker/.ivy2/cache/com.googlecode.libphonenumber/libphonenumber/jars/libphonenumber-6.2.jar:/Users/benparker/.ivy2/cache/com.github.fge/json-schema-core/jars/json-schema-core-1.2.5.jar:/Users/benparker/.ivy2/cache/com.github.fge/uri-template/jars/uri-template-0.9.jar:/Users/benparker/.ivy2/cache/com.github.fge/msg-simple/jars/msg-simple-1.1.jar:/Users/benparker/.ivy2/cache/com.github.fge/btf/jars/btf-1.2.jar:/Users/benparker/.ivy2/cache/com.google.guava/guava/bundles/guava-16.0.1.jar:/Users/benparker/.ivy2/cache/com.github.fge/jackson-coreutils/jars/jackson-coreutils-1.8.jar:/Users/benparker/.ivy2/cache/org.mozilla/rhino/jars/rhino-1.7R4.jar:/Users/benparker/.ivy2/cache/javax.mail/mailapi/jars/mailapi-1.4.3.jar:/Users/benparker/.ivy2/cache/javax.activation/activation/jars/activation-1.1.jar:/Users/benparker/.ivy2/cache/net.sf.jopt-simple/jopt-simple/jars/jopt-simple-4.6.jar:/Users/benparker/.ivy2/cache/com.typesafe.akka/akka-testkit_2.11/jars/akka-testkit_2.11-2.3.9-sources.jar:/Users/benparker/.ivy2/cache/com.typesafe.akka/akka-testkit_2.11/jars/akka-testkit_2.11-2.3.9.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/test-it_2.11/jars/test-it_2.11-1.0-SNAPSHOT.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/test-it_2.11/jars/test-it_2.11-1.0-SNAPSHOT-sources.jar:/Users/benparker/.ivy2/cache/uk.gov.homeoffice/test-it_2.11/jars/test-it_2.11-1.0-SNAPSHOT-tests.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/rabb-it_2.11/1.0-SNAPSHOT/jars/rabb-it_2.11-tests.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/rabb-it_2.11/1.0-SNAPSHOT/jars/rabb-it_2.11.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/spray-it_2.11/1.0-SNAPSHOT/jars/spray-it_2.11-tests.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/spray-it_2.11/1.0-SNAPSHOT/jars/spray-it_2.11.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/registered-traveller-caseworker-domain_2.11/1.0-SNAPSHOT/jars/registered-traveller-caseworker-domain_2.11.jar:/Users/benparker/.ivy2/local/uk.gov.homeoffice/registered-traveller-caseworker-domain_2.11/1.0-SNAPSHOT/jars/registered-traveller-caseworker-domain_2.11-tests.jar:/Users/benparker/.ivy2/cache/com.typesafe.play/twirl-api_2.11/jars/twirl-api_2.11-1.0.3.jar:/Users/benparker/.ivy2/cache/org.apache.commons/commons-lang3/jars/commons-lang3-3.3.2.jar:/Users/benparker/.ivy2/cache/org.joda/joda-convert/jars/joda-convert-1.7.jar:/Users/benparker/.ivy2/cache/org.apache.poi/poi-ooxml/jars/poi-ooxml-3.11-beta3.jar:/Users/benparker/.ivy2/cache/org.apache.poi/poi/jars/poi-3.11-beta3.jar:/Users/benparker/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.9.jar:/Users/benparker/.ivy2/cache/org.apache.poi/poi-ooxml-schemas/jars/poi-ooxml-schemas-3.11-beta3.jar:/Users/benparker/.ivy2/cache/org.apache.xmlbeans/xmlbeans/jars/xmlbeans-2.6.0.jar:/Users/benparker/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:/Users/benparker/.ivy2/cache/org.mongodb/casbah-core_2.11/jars/casbah-core_2.11-2.8.1.jar:/Users/benparker/.ivy2/cache/org.mongodb/casbah-commons_2.11/jars/casbah-commons_2.11-2.8.1.jar:/Users/benparker/.ivy2/cache/com.github.nscala-time/nscala-time_2.11/jars/nscala-time_2.11-2.0.0.jar:/Users/benparker/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.7.jar:/Users/benparker/.ivy2/cache/org.mongodb/mongo-java-driver/jars/mongo-java-driver-2.13.1.jar:/Users/benparker/.ivy2/cache/org.mongodb/casbah-query_2.11/jars/casbah-query_2.11-2.8.1.jar:/Users/benparker/.ivy2/cache/com.novus/salat-util_2.11/jars/salat-util_2.11-1.9.9.jar:/Users/benparker/.ivy2/cache/org.scala-lang/scalap/jars/scalap-2.11.2.jar:/Users/benparker/.ivy2/cache/com.novus/salat-core_2.11/jars/salat-core_2.11-1.9.9.jar:/Users/benparker/.ivy2/cache/com.github.scopt/scopt_2.11/jars/scopt_2.11-3.2.0.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-jackson_2.11/jars/json4s-jackson_2.11-3.2.11.jar:/Users/benparker/.ivy2/cache/com.fasterxml.jackson.core/jackson-databind/bundles/jackson-databind-2.3.1.jar:/Users/benparker/.ivy2/cache/com.fasterxml.jackson.core/jackson-annotations/bundles/jackson-annotations-2.3.0.jar:/Users/benparker/.ivy2/cache/com.fasterxml.jackson.core/jackson-core/bundles/jackson-core-2.3.1.jar:/Users/benparker/.ivy2/cache/org.json4s/json4s-mongo_2.11/jars/json4s-mongo_2.11-3.2.11.jar:/Users/benparker/.ivy2/cache/org.clapper/classutil_2.11/jars/classutil_2.11-1.0.5.jar:/Users/benparker/.ivy2/cache/org.ow2.asm/asm/jars/asm-5.0.2.jar:/Users/benparker/.ivy2/cache/org.ow2.asm/asm-commons/jars/asm-commons-5.0.2.jar:/Users/benparker/.ivy2/cache/org.ow2.asm/asm-tree/jars/asm-tree-5.0.2.jar:/Users/benparker/.ivy2/cache/org.ow2.asm/asm-util/jars/asm-util-5.0.2.jar:/Users/benparker/.ivy2/cache/org.clapper/grizzled-scala_2.11/jars/grizzled-scala_2.11-1.2.jar:/Users/benparker/.ivy2/cache/org.scala-lang.modules/scala-async_2.11/bundles/scala-async_2.11-0.9.1.jar:/Users/benparker/.ivy2/cache/jline/jline/jars/jline-2.6.jar:/Users/benparker/.ivy2/cache/org.clapper/grizzled-slf4j_2.11/jars/grizzled-slf4j_2.11-1.0.2.jar:/Users/benparker/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.7.jar:/Users/benparker/.ivy2/cache/org.scala-lang.modules/scala-pickling_2.11/jars/scala-pickling_2.11-0.10.0.jar:/Users/benparker/.ivy2/cache/org.specs2/specs2-core_2.11/jars/specs2-core_2.11-3.6.jar:/Users/benparker/.ivy2/cache/org.specs2/specs2-matcher_2.11/jars/specs2-matcher_2.11-3.6.jar:/Users/benparker/.ivy2/cache/org.specs2/specs2-common_2.11/jars/specs2-common_2.11-3.6.jar:/Users/benparker/.ivy2/cache/org.scalaz/scalaz-core_2.11/bundles/scalaz-core_2.11-7.1.1.jar:/Users/benparker/.ivy2/cache/org.scalaz/scalaz-concurrent_2.11/bundles/scalaz-concurrent_2.11-7.1.1.jar:/Users/benparker/.ivy2/cache/org.scalaz/scalaz-effect_2.11/bundles/scalaz-effect_2.11-7.1.1.jar:/Users/benparker/.ivy2/cache/org.scalaz.stream/scalaz-stream_2.11/bundles/scalaz-stream_2.11-0.7a.jar:/Users/benparker/.ivy2/cache/org.scodec/scodec-bits_2.11/bundles/scodec-bits_2.11-1.0.6.jar:/Users/benparker/.ivy2/cache/org.specs2/specs2-mock_2.11/jars/specs2-mock_2.11-3.6.jar:/Users/benparker/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar:/Users/benparker/.ivy2/cache/org.mockito/mockito-core/jars/mockito-core-1.9.5.jar:/Users/benparker/.ivy2/cache/org.objenesis/objenesis/jars/objenesis-1.0.jar:/Users/benparker/.ivy2/cache/io.spray/spray-testkit_2.11/jars/spray-testkit_2.11-1.3.3.jar:/Users/benparker/.ivy2/cache/org.scoverage/scalac-scoverage-runtime_2.11/jars/scalac-scoverage-runtime_2.11-1.0.4.jar:/Users/benparker/.ivy2/cache/org.scoverage/scalac-scoverage-plugin_2.11/jars/scalac-scoverage-plugin_2.11-1.0.4.jar]

etorreborre

unread,
May 26, 2015, 10:58:05 PM5/26/15
to specs2...@googlegroups.com, benj...@needstyping.com
Specs2Interface seems to be compiled for a version of specs2 that's < 3.0. I guess that you need a more recent version of spray compiled with specs2 3.6.

etorreborre

unread,
May 26, 2015, 10:59:24 PM5/26/15
to specs2...@googlegroups.com, benj...@needstyping.com
Apparently you need to ask the spray team to update their project: 


E.


On Wednesday, May 27, 2015 at 12:04:32 AM UTC+10, benj...@needstyping.com wrote:

Benjamin Parker

unread,
May 27, 2015, 5:19:56 AM5/27/15
to specs2...@googlegroups.com
Thanks for that. Couple of questions

1. How could you tell that spray was the problem?  I couldn’t see any clues in my classpath

2. If I don’t want to change my version of spray is there anything I can do.  I’ve tried exclusions but they don’t resolve this


--
You received this message because you are subscribed to a topic in the Google Groups "specs2-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/specs2-users/89Xsl2zxuf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to specs2-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

etorreborre

unread,
May 27, 2015, 9:10:39 AM5/27/15
to specs2...@googlegroups.com, benj...@needstyping.com
 1. I just googled "Specs2Interface" which I knew was not part of specs2

 2. I think that the only way out is to ask the Spray team to do the upgrade

Basically they need to implement something like that:

import org.specs2.execute._
import org.specs2.specification._

trait Specs2Interface extends TestFrameworkInterface with SpecificationStructure with AfterAll {

  def failTest(msg: String) = {
    val trace = new Exception().getStackTrace.toList
    val fixedTrace = trace.drop(trace.indexWhere(_.getClassName.startsWith("org.specs2")) - 1)
    throw new FailureException(Failure(msg, stackTrace = fixedTrace))
  }

  def afterAll = cleanUp()
}

Eric.
To unsubscribe from this group and all its topics, send an email to specs2-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages