Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhpVerticleFactory to pass Exceptions in Vertx reportException() to Php #17

Open
darkredz opened this issue Nov 15, 2013 · 0 comments
Open
Assignees

Comments

@darkredz
Copy link

I am trying to add a common features that is available in traditional PHP stack, global exception handling. I am modifying reportException() in PhpVerticleFactory.java

After compiling the class, all works fine but it throws an exception when I tried to run a module with:
vertx runmod xxxx -instances 2

Failed in deploying module
java.lang.ArrayIndexOutOfBoundsException: 256
at com.caucho.quercus.QuercusContext.setFunction(QuercusContext.java:1469)
at com.caucho.quercus.QuercusContext.initModuleInfo(QuercusContext.java:1963)
at com.caucho.quercus.QuercusContext.initModules(QuercusContext.java:1906)
at com.caucho.quercus.QuercusContext.init(QuercusContext.java:1835)
at io.vertx.lang.php.PhpVerticleFactory.initQuercusContext(PhpVerticleFactory.java:109)
at io.vertx.lang.php.PhpVerticleFactory.createVerticle(PhpVerticleFactory.java:178)
at org.vertx.java.platform.impl.DefaultPlatformManager$19.run(DefaultPlatformManager.java:1527)
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)

java.lang.NullPointerException
at io.vertx.lang.php.PhpVerticleFactory.initQuercusContext(PhpVerticleFactory.java:110)
at io.vertx.lang.php.PhpVerticleFactory.createVerticle(PhpVerticleFactory.java:178)
at org.vertx.java.platform.impl.DefaultPlatformManager$19.run(DefaultPlatformManager.java:1527)
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)

I noticed that in my compiled folder PhpVerticleFactory.java is compiled into 3 classes.
PhpVerticleFactory.class
PhpVerticleFactory$1.class
PhpVerticleFactory$PhpVerticle.class

while the php mod install/downloaded from vertx registry only has
PhpVerticleFactory.class
PhpVerticleFactory$PhpVerticle.class

@ghost ghost assigned kuujo Jan 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants