1

私のプロジェクトは Google サーバー上でまったく問題なく動作しますが、VerifyError が発生します。

java.lang.VerifyError: (class: org/restlet/ext/servlet/ServerServlet, 
method: createServer 
signature: (Ljavax/servlet/http/HttpServletRequest;)
Lorg/restlet/engine/http/HttpServerHelper;) 
Incompatible object argument for function call
4

1 に答える 1

0

大規模な試行錯誤の結果、間違った Scala バージョンを使用していることに気付きました。2.7.7 から 2.7.6 にダウングレードしましたが、すべて正常に動作します。理由はわかりません。おそらくリフトの相互運用性。

結果の pom.xml (短いバージョン):

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!-- The Basics -->
    <groupId>com.beecourt</groupId>
    <artifactId>site2</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <properties>
        <gae.version>1.3.4</gae.version>
        <gae.alternate>1.3.3.1</gae.alternate>
        <restlet.version>2.0-RC4</restlet.version>

        <!-- this was 2.7.6 -->
        <scala.version>2.7.6</scala.version>

        <project_charset>UTF-8</project_charset>
    </properties>

    <dependencies>
        ...    
        <!-- customized -->
        <dependency>
            <groupId>net.liftweb</groupId>
            <artifactId>lift-util</artifactId>
            <version>1.1-M8</version>
        </dependency>
        <dependency>
            <groupId>org.restlet.gae</groupId>
            <artifactId>org.restlet</artifactId>
            <version>${restlet.version}</version>
        </dependency>
        <dependency>
            <groupId>org.restlet.gae</groupId>
            <artifactId>org.restlet.ext.servlet</artifactId>
            <version>${restlet.version}</version>
        </dependency>

        <!-- file upload -->
        <dependency>
            <groupId>org.restlet</groupId>
            <artifactId>org.restlet.ext.fileupload</artifactId>
            <version>2.0-M3</version>
        </dependency>
        <dependency>
            <groupId>com.noelios.restlet</groupId>
            <artifactId>restlet</artifactId>
            <version>1.0.5</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- testing -->
        <dependency>
            <groupId>org.scala-tools.testing</groupId>
            <artifactId>specs</artifactId>
            <version>1.6.2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>
    </dependencies>

    <!-- Build Settings -->
    <build>
        <finalName>site2</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>src/test/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <outputEncoding>${project_charset}</outputEncoding>
                    <inputEncoding>${project_charset}</inputEncoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.kindleit</groupId>
                <artifactId>maven-gae-plugin</artifactId>
                <version>0.5.9</version>
                <configuration>
                    <port>8080</port>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <args>
                        <arg>-target:jvm-1.5</arg>
                    </args>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <repositories>...
    </repositories>
    <pluginRepositories>...
    </pluginRepositories>
</project>
于 2011-08-23T11:44:44.847 に答える