我正在尝试在我的vert.x mods目录中安装PHP语言。我尝试了两个分支,并且都处理了不同的答案。
尝试使用这个简单的PHP脚本在git repo中构建或在命令行中运行vertx run app.php
时,会产生所有这些结果和错误:
<?php
use Vertx\Pump;
$server = Vertx::createNetServer();
$server->connectHandler(function($socket) {
$pump = new Pump($socket, $socket);
$pump->start();
})->listen(1234, 'localhost');
当我尝试运行当前的主分支时,这就是Maven告诉我的:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running io.vertx.lang.php.integration.PhpIntegrationTests
log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Starting test: src/test/resources/buffer|buffer_test.php|testMagic
feb 08, 2014 9:25:37 PM org.vertx.java.core.logging.impl.JULLogDelegate error
SEVERE: Unhandled exception
java.lang.NullPointerException
at io.vertx.lang.php.PhpVerticleFactory.close(PhpVerticleFactory.java:245)
at org.vertx.java.platform.impl.ModuleReference.decRef(ModuleReference.java:61)
at org.vertx.java.platform.impl.DefaultPlatformManager$23.handle(DefaultPlatformManager.java:1816)
at org.vertx.java.platform.impl.DefaultPlatformManager$23.handle(DefaultPlatformManager.java:1814)
at org.vertx.java.core.impl.CountingCompletionHandler.callHandler(CountingCompletionHandler.java:73)
at org.vertx.java.core.impl.CountingCompletionHandler.checkDone(CountingCompletionHandler.java:91)
at org.vertx.java.core.impl.CountingCompletionHandler.setHandler(CountingCompletionHandler.java:68)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1814)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1738)
at org.vertx.java.platform.impl.DefaultPlatformManager.handleDeployFailure(DefaultPlatformManager.java:1702)
at org.vertx.java.platform.impl.DefaultPlatformManager.access$1900(DefaultPlatformManager.java:59)
at org.vertx.java.platform.impl.DefaultPlatformManager$20.run(DefaultPlatformManager.java:1664)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:176)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:722)
feb 08, 2014 9:25:37 PM org.vertx.java.core.logging.impl.JULLogDelegate error
SEVERE: Unhandled exception
java.lang.NullPointerException
at io.vertx.lang.php.PhpVerticleFactory.close(PhpVerticleFactory.java:245)
at org.vertx.java.platform.impl.ModuleReference.decRef(ModuleReference.java:61)
at org.vertx.java.platform.impl.DefaultPlatformManager$23.handle(DefaultPlatformManager.java:1816)
at org.vertx.java.platform.impl.DefaultPlatformManager$23.handle(DefaultPlatformManager.java:1814)
at org.vertx.java.core.impl.CountingCompletionHandler.callHandler(CountingCompletionHandler.java:73)
at org.vertx.java.core.impl.CountingCompletionHandler.checkDone(CountingCompletionHandler.java:91)
at org.vertx.java.core.impl.CountingCompletionHandler.setHandler(CountingCompletionHandler.java:68)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1814)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1738)
at org.vertx.java.platform.impl.DefaultPlatformManager.handleDeployFailure(DefaultPlatformManager.java:1702)
at org.vertx.java.platform.impl.DefaultPlatformManager.access$1900(DefaultPlatformManager.java:59)
at org.vertx.java.platform.impl.DefaultPlatformManager$20.run(DefaultPlatformManager.java:1664)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:176)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:722)
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 30.322 sec <<< FAILURE!
io.vertx.lang.php.integration.PhpIntegrationTests Time elapsed: 30.014 sec <<< FAILURE!
java.lang.AssertionError: Timed out waiting for test to complete
at org.vertx.testtools.JavaClassRunner.waitForLatch(JavaClassRunner.java:329)
at org.vertx.testtools.JavaClassRunner.runChild(JavaClassRunner.java:292)
at org.vertx.testtools.JavaClassRunner.runChild(JavaClassRunner.java:60)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:158)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
Results :
Failed tests:
Timed out waiting for test to complete
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ lang-php ---
[INFO] Building jar: /Users/mriemers/Projects/Vertx LazyFIFA Autobuyer PHP/mod-lang-php/target/lang-php-0.1.0-SNAPSHOT-sources.jar
[INFO]
[INFO] --- maven-failsafe-plugin:2.14:verify (default) @ lang-php ---
[INFO] Failsafe report directory: /Users/mriemers/Projects/Vertx LazyFIFA Autobuyer PHP/mod-lang-php/target/failsafe-reports
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.910s
[INFO] Finished at: Sat Feb 08 21:26:07 CET 2014
[INFO] Final Memory: 22M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.14:verify (default) on project lang-php: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/mriemers/Projects/Vertx LazyFIFA Autobuyer PHP/mod-lang-php/target/failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
这就是当我尝试运行非常简单的PHP脚本时Vert.x告诉我的内容:
Unhandled exception
java.lang.NullPointerException
at io.vertx.lang.php.PhpVerticleFactory.close(PhpVerticleFactory.java:245)
at org.vertx.java.platform.impl.ModuleReference.decRef(ModuleReference.java:61)
at org.vertx.java.platform.impl.DefaultPlatformManager$24.handle(DefaultPlatformManager.java:1852)
at org.vertx.java.platform.impl.DefaultPlatformManager$24.handle(DefaultPlatformManager.java:1850)
at org.vertx.java.core.impl.CountingCompletionHandler.callHandler(CountingCompletionHandler.java:73)
at org.vertx.java.core.impl.CountingCompletionHandler.checkDone(CountingCompletionHandler.java:91)
at org.vertx.java.core.impl.CountingCompletionHandler.setHandler(CountingCompletionHandler.java:68)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1850)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1774)
at org.vertx.java.platform.impl.DefaultPlatformManager.handleDeployFailure(DefaultPlatformManager.java:1738)
at org.vertx.java.platform.impl.DefaultPlatformManager.access$2000(DefaultPlatformManager.java:56)
at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1700)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:176)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:722)
Unhandled exception
java.lang.NullPointerException
at io.vertx.lang.php.PhpVerticleFactory.close(PhpVerticleFactory.java:245)
at org.vertx.java.platform.impl.ModuleReference.decRef(ModuleReference.java:61)
at org.vertx.java.platform.impl.DefaultPlatformManager$24.handle(DefaultPlatformManager.java:1852)
at org.vertx.java.platform.impl.DefaultPlatformManager$24.handle(DefaultPlatformManager.java:1850)
at org.vertx.java.core.impl.CountingCompletionHandler.callHandler(CountingCompletionHandler.java:73)
at org.vertx.java.core.impl.CountingCompletionHandler.checkDone(CountingCompletionHandler.java:91)
at org.vertx.java.core.impl.CountingCompletionHandler.setHandler(CountingCompletionHandler.java:68)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1850)
at org.vertx.java.platform.impl.DefaultPlatformManager.doUndeploy(DefaultPlatformManager.java:1774)
at org.vertx.java.platform.impl.DefaultPlatformManager.handleDeployFailure(DefaultPlatformManager.java:1738)
at org.vertx.java.platform.impl.DefaultPlatformManager.access$2000(DefaultPlatformManager.java:56)
at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1700)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:176)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:722)
它继续这样,我最终必须让它停止。
但是当我尝试构建eventbus-bridge
分支时,Maven会返回很多:
src/test/resources/http|route_matcher_test.php|testGetWithRegex(io.vertx.lang.php.integration.PhpIntegrationTests) Time elapsed: 0.013 sec <<< ERROR!
org.vertx.java.core.VertxException: route_matcher_test.php is not a valid PHP verticle.
at io.vertx.lang.php.PhpVerticleFactory.createVerticle(PhpVerticleFactory.java:180)
at org.vertx.java.platform.impl.DefaultPlatformManager$20.run(DefaultPlatformManager.java:1662)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:176)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:722)
结束于此:
Tests in error:
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx buffer_test.php is not a valid PHP verticle.
» Vertx context_test.php is not a valid PHP verticle.
» Vertx context_test.php is not a valid PHP verticle.
» Vertx deploy_test.php is not a valid PHP verticle.
» Vertx deploy_test.php is not a valid PHP verticle.
» Vertx deploy_test.php is not a valid PHP verticle.
» Vertx deploy_test.php is not a valid PHP verticle.
» Vertx deploy_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx eventbus_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx filesystem_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx http_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx route_matcher_test.php is not a valid PHP verticle.
» Vertx include_test.php is not a valid PHP verticle.
» Vertx include_test.php is not a valid PHP verticle.
» Vertx include_test.php is not a valid PHP verticle.
» Vertx net_test.php is not a valid PHP verticle.
» Vertx net_test.php is not a valid PHP verticle.
» Vertx net_test.php is not a valid PHP verticle.
» Vertx net_test.php is not a valid PHP verticle.
» Vertx record_parser_test.php is not a valid PHP verticle.
» Vertx shareddata_test.php is not a valid PHP verticle.
» Vertx shareddata_test.php is not a valid PHP verticle.
» Vertx shareddata_test.php is not a valid PHP verticle.
» Vertx shareddata_test.php is not a valid PHP verticle.
» Vertx shareddata_test.php is not a valid PHP verticle.
» Vertx timer_test.php is not a valid PHP verticle.
» Vertx timer_test.php is not a valid PHP verticle.
Tests run: 98, Failures: 0, Errors: 98, Skipped: 0
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ lang-php ---
[INFO] Building jar: /Users/mriemers/Projects/Vertx LazyFIFA Autobuyer PHP/mod-lang-php/target/lang-php-0.1.0-SNAPSHOT-sources.jar
[INFO]
[INFO] --- maven-failsafe-plugin:2.14:verify (default) @ lang-php ---
[INFO] Failsafe report directory: /Users/mriemers/Projects/Vertx LazyFIFA Autobuyer PHP/mod-lang-php/target/failsafe-reports
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.238s
[INFO] Finished at: Sat Feb 08 21:09:38 CET 2014
[INFO] Final Memory: 21M/51M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.14:verify (default) on project lang-php: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/mriemers/Projects/Vertx LazyFIFA Autobuyer PHP/mod-lang-php/target/failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
当我使用vertx run app.php
运行脚本时,它就会返回给我:
app.php不是有效的PHP Verticle。