2016-11-22 2 views
0

Ich versuche, einen Vertx-Server mit DynamoDB und Lombok Annotationen auszuführen, und ich kann es nicht richtig funktionieren. Ich habe die JAR-Dateien für Vertx, DynamoDB und Lombok zu meinem Klassenpfad hinzugefügt. Alles wird in IntelliJ gut kompiliert, aber ich kann es nicht richtig von meinem Terminal laufen lassen.Vertex-Ausführung führt zu Ressource nicht gefunden Fehler

ich:

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) 

mit diesem etwas Hilfe schätzen würde!

+0

Können Sie uns auch den Code zeigen, den Sie kompilieren, und die Befehlszeile, die Sie verwendeten, um die Fehlermeldung zu erhalten? Verwenden Sie run 'vertx run .java'? Das wird wahrscheinlich nicht funktionieren. –

+0

vertx run .java funktioniert für kleinere vertex-Projekte. Es sollte aber nur so verwendet werden, um kleinere Dinge zu testen. Ich konnte mein Problem beheben, siehe die Antwort, die ich im Folgenden veröffentlichen werde. – jkurs

Antwort

1

Dieser Fehler weist Sie einfach darauf hin, dass die CLI Vert.x die Datei Server.java im aktuellen Arbeitsverzeichnis nicht finden konnte.

Vorausgesetzt, dass Sie Lombok verwenden (was Code bei der Kompilierung ändert), würde ich empfehlen, Ihr Verticle auszuführen, nachdem Sie es mit Ihrer IDE oder Ihrem Build-Tool kompiliert haben. Hier

ist eine Liste von possibilities to start a Verticle

+0

Ich wollte vermeiden, eine IDE für die Kompilierung zu verwenden. – jkurs

Verwandte Themen