2016-11-22 8 views
0

dynamoDBとlombokアノテーションを使用してVertxサーバーを実行しようとしていますが、正しく動作させることができません。私は、クラスパスにvertx、dynamoDB、およびlombokの.jarファイルを追加しました。 IntelliJではすべてがうまくコンパイルされますが、私はそれを私の端末から正しく実行することはできません。Vertx runによりリソースが見つかりませんでしたエラー

私が取得:

Users-MacBook-Pro:Server User$ vertx run Server.java 
java.lang.RuntimeException: Resource not found: Server.java 
    at io.vertx.core.impl.verticle.CompilingClassLoader.<init>(CompilingClassLoader.java:73) 
    at io.vertx.core.impl.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:38) 
    at io.vertx.core.impl.DeploymentManager.createVerticles(DeploymentManager.java:184) 
    at io.vertx.core.impl.DeploymentManager.lambda$doDeployVerticle$2(DeploymentManager.java:157) 
    at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:158) 
    at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100) 
    at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:130) 
    at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:102) 
    at io.vertx.core.impl.DeploymentManager.deployVerticle(DeploymentManager.java:90) 
    at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:574) 
    at io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer.deploy(VertxIsolatedDeployer.java:46) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at io.vertx.core.impl.launcher.commands.ClasspathHandler.deploy(ClasspathHandler.java:160) 
    at io.vertx.core.impl.launcher.commands.RunCommand.deploy(RunCommand.java:389) 
    at io.vertx.core.impl.launcher.commands.RunCommand.run(RunCommand.java:262) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.execute(VertxCommandLauncher.java:230) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:365) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:328) 
    at io.vertx.core.Launcher.main(Launcher.java:49) 
Failed in deploying verticle 
java.lang.RuntimeException: Resource not found: Server.java 
    at io.vertx.core.impl.verticle.CompilingClassLoader.<init>(CompilingClassLoader.java:73) 
    at io.vertx.core.impl.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:38) 
    at io.vertx.core.impl.DeploymentManager.createVerticles(DeploymentManager.java:184) 
    at io.vertx.core.impl.DeploymentManager.lambda$doDeployVerticle$2(DeploymentManager.java:157) 
    at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:158) 
    at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100) 
    at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:130) 
    at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:102) 
    at io.vertx.core.impl.DeploymentManager.deployVerticle(DeploymentManager.java:90) 
    at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:574) 
    at io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer.deploy(VertxIsolatedDeployer.java:46) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at io.vertx.core.impl.launcher.commands.ClasspathHandler.deploy(ClasspathHandler.java:160) 
    at io.vertx.core.impl.launcher.commands.RunCommand.deploy(RunCommand.java:389) 
    at io.vertx.core.impl.launcher.commands.RunCommand.run(RunCommand.java:262) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.execute(VertxCommandLauncher.java:230) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:365) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:328) 
    at io.vertx.core.Launcher.main(Launcher.java:49) 

java.lang.RuntimeException: Resource not found: Server.java 
    at io.vertx.core.impl.verticle.CompilingClassLoader.<init>(CompilingClassLoader.java:73) 
    at io.vertx.core.impl.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:38) 
    at io.vertx.core.impl.DeploymentManager.createVerticles(DeploymentManager.java:184) 
    at io.vertx.core.impl.DeploymentManager.lambda$doDeployVerticle$2(DeploymentManager.java:157) 
    at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:158) 
    at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100) 
    at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:130) 
    at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:102) 
    at io.vertx.core.impl.DeploymentManager.deployVerticle(DeploymentManager.java:90) 
    at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:574) 
    at io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer.deploy(VertxIsolatedDeployer.java:46) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at io.vertx.core.impl.launcher.commands.ClasspathHandler.deploy(ClasspathHandler.java:160) 
    at io.vertx.core.impl.launcher.commands.RunCommand.deploy(RunCommand.java:389) 
    at io.vertx.core.impl.launcher.commands.RunCommand.run(RunCommand.java:262) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.execute(VertxCommandLauncher.java:230) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:365) 
    at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:328) 
    at io.vertx.core.Launcher.main(Launcher.java:49) 

はこれでいくつかの助けをお願い申し上げます!

+0

コンパイルしているコードと、エラーメッセージの取得に使用したコマンドラインも表示できますか? 'vertx run .java'を実行しますか?それはおそらく動作しません。 –

+0

vertx run .javaは、より小さいvertxプロジェクトで動作します。ただし、小さなものをテストする場合にのみ使用してください。私は私の問題を修正することができました。私が下に投稿する答えを見てください。 – jkurs

答えて

1

このエラーは、現在の作業ディレクトリでVert.x CLIがServer.javaファイルを検出できなかったことを示しています。

コンパイル時にコードを変更するLombokを使用すると、IDEまたはビルドツールでコンパイルした後にVerticleを実行することをお勧めします。ここで

は、私は私のプロジェクトのうち、脂肪のjarモジュールを作成することで、この問題を解決することができましたpossibilities to start a Verticle

+0

コンパイルにIDEを使用しないでください。 – jkurs

関連する問題