java.lang.NoSuchMethodError:scala.Predef $ .augmentString(Ljava / lang / String;)Lscala / collection / immutable / StringOps;

时间:2013-09-17 13:02:06

标签: scala maven jersey swagger

我在这里遇到了错误,这与我的依赖项存在某种冲突。我想看看hte source会提供一个线索,所以我去了org.fusesource.scalate.jersey.ScalateTemplateProcessor,它带我到http://scalate.fusesource.org/maven/1.3/scalate-core/scaladocs/org/fusesource/scalate/jersey/ScalateTemplateProcessor.html。我希望能在本课程中找到一些帮助我理解java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;所指的内容。不幸的是,我仍然对这里发生的事情感到非常困惑。

scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;指的是什么类?

INFO: Initiating Jersey application, version 'Jersey: 1.17.1 02/28/2013 12:47 PM'
Sep 17, 2013 8:54:40 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Adding the following classes declared in META-INF/services/jersey-server-components to the resource configuration:
  class org.fusesource.scalate.rest.NodeWriter
  class org.fusesource.scalate.rest.TransformerWriter
  class org.fusesource.scalate.rest.ViewWriter
  class org.fusesource.scalate.jersey.ScalateTemplateProcessor
  class org.fusesource.scalate.jersey.ScalateTemplateProvider
Sep 17, 2013 8:54:40 AM com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider
SEVERE: The provider class, class org.fusesource.scalate.jersey.ScalateTemplateProcessor, could not be instantiated. Processing will continue but the class will not be utilized
java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;
    at org.fusesource.scalate.util.Log$.apply(Logging.scala:33)
    at org.fusesource.scalate.TemplateEngine$.<init>(TemplateEngine.scala:42)
    at org.fusesource.scalate.TemplateEngine$.<clinit>(TemplateEngine.scala)
    at org.fusesource.scalate.servlet.ServletHelper$.errorUris(ServletHelper.scala:30)
    at org.fusesource.scalate.jersey.ScalateTemplateProcessor.<init>(ScalateTemplateProcessor.scala:61)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at com.sun.jersey.core.spi.component.ComponentConstructor._getInstance(ComponentConstructor.java:209)
    at com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:179)
    at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:166)
    at com.sun.jersey.core.spi.component.ProviderFactory._getComponentProvider(ProviderFactory.java:159)
    at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:153)
    at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:131)
    at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:256)
    at com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(ProviderServices.java:173)
    at com.sun.jersey.server.impl.template.TemplateFactory.<init>(TemplateFactory.java:63)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1166)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:168)
    at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:774)
    at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:770)
    at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:770)
    at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:172)
    at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:134)
    at com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory.createHttpServer(GrizzlyServerFactory.java:242)
    at com.production.api.Main.startServer(Main.java:34)
    at com.production.api.Main.main(Main.java:52)

我的 pom.xml

<dependencies>
    <dependency>
        <groupId>org.glassfish.grizzly</groupId>
        <artifactId>grizzly-http-servlet</artifactId>
        <version>2.2.21</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.23</version>
    </dependency>

    <!-- Swagger -->
    <dependency>
        <groupId>com.wordnik</groupId>
        <artifactId>swagger-core_2.10</artifactId>
        <version>1.3.0</version>
    </dependency>
    <dependency>
        <groupId>com.wordnik</groupId>
        <artifactId>swagger-jersey-jaxrs_2.10</artifactId>
        <version>1.3.0</version>
        <exclusions>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.github.kongchen</groupId>
        <artifactId>swagger-maven-plugin</artifactId>
        <version>1.1.1</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
    </dependency>

    <!-- Jersey -->
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-core</artifactId>
        <version>1.17.1</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-server</artifactId>
        <version>1.17.1</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-json</artifactId>
        <version>1.17.1</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-servlet</artifactId>
        <version>1.17.1</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-grizzly2</artifactId>
        <version>1.17.1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        <version>2.7.6</version>
    </dependency>

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>1.9.13</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-xc</artifactId>
        <version>1.9.13</version>
    </dependency>

    <!-- Hibernate/Spring -->
    <dependency>
        <groupId>org.hibernate.javax.persistence</groupId>
        <artifactId>hibernate-jpa-2.0-api</artifactId>
        <version>1.0.1.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.2.5.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>4.2.5.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.5.6-Final</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>3.2.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>3.2.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
        <version>1.3.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.5</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-jdk14</artifactId>
        <version>1.7.5</version>
    </dependency>
    <dependency>
        <groupId>com.mysql</groupId>
        <artifactId>management</artifactId>
        <version>1.1.6</version>
        <exclusions>
            <exclusion>
                <groupId>com.sun.jmx</groupId>
                <artifactId>jmxri</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.sun.jdmk</groupId>
                <artifactId>jmxtools</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

0 个答案:

没有答案