1

実行時に次のエラーが発生しますmvn jetty:run-war

2009-11-14 15:19:28.459:/:INFO:  Initializing Spring root WebApplicationContext
* ERROR 15:19:28,491 Context initialization failed (ContextLoader.java [main])
java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccessible(Ljava/lang/reflect/Constructor;)V
...

(スタックトレース全体は含まれません)

WindowsとOSXの両方で完全に正常に動作するため、コードに問題はないことを私は知っています。現在、Ubuntu karmicコアラを使用していて、apt-getを介してmavenをインストールしていますが、Linuxで機能させるために構成するのを忘れているものはありますか?mvnクリーンインストールを実行してもエラーは発生しません。

誰?

4

2 に答える 2

0

問題はローカルリポジトリにあると思います。あなたのMavenレポはroot/.m2/repositoryのように保存されていたと思います古いjarが問題かもしれません

以下のようにJettyの依存関係を書いたと思います

<plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>${jetty.version}</version>
            <configuration>
                <webAppSourceDirectory>WebContent</webAppSourceDirectory>
                <!-- <classesDirectory>WebContent/WEB-INF/classes</classesDirectory> -->
                <!-- Redeploy every 1 seconds if changes are detected, 0 for no automatic 
                    redeployment -->
                <scanIntervalSeconds>0</scanIntervalSeconds>
                <!-- reload manually by hitting enter on console -->
                <reload>manual</reload>
                <webApp>
                    <contextPath>/</contextPath>
                    <descriptor>WebContent/WEB-INF/web.xml</descriptor>
                </webApp>
                <connectors>
                    <connector implementation="org.eclipse.jetty.server.bio.SocketConnector">
                        <port>8080</port>
                        <maxIdleTime>600000</maxIdleTime>
                    </connector>
                </connectors>
            </configuration>
        </plugin>

Check if the the "mvn install" is a Sucess then run Jetty.

于 2013-05-01T15:11:33.073 に答える