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

Null pointer Exception #10

Open
gosemathraj opened this issue Dec 28, 2016 · 2 comments
Open

Null pointer Exception #10

gosemathraj opened this issue Dec 28, 2016 · 2 comments

Comments

@gosemathraj
Copy link

I followed the instructions given for video chat. When i run the application on local host it gives null pointer exception and the ROOM NAME option is not visible. So how i can connect to a room
Exception :

[main] INFO com.github.javafaker.Faker - Using default locale en
[Thread-0] INFO org.eclipse.jetty.util.log - Logging initialized @3072ms
[Thread-0] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-0] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-0] INFO org.eclipse.jetty.server.Server - jetty-9.3.z-SNAPSHOT
[Thread-0] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnect
or@28749c36{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[Thread-0] INFO org.eclipse.jetty.server.Server - Started @8306ms
[qtp153863947-20] ERROR spark.webserver.MatcherFilter -
java.lang.NullPointerException
at com.twilio.jwt.Jwt.toJwt(Jwt.java:54)
at com.twilio.Webapp.lambda$main$0(Webapp.java:47)
at spark.RouteImpl$1.handle(RouteImpl.java:58)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle
r.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:
52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.jav
a:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:245)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
[qtp153863947-14] ERROR spark.webserver.MatcherFilter -
java.lang.NullPointerException
at com.twilio.jwt.Jwt.toJwt(Jwt.java:54)
at com.twilio.Webapp.lambda$main$0(Webapp.java:47)
at spark.RouteImpl$1.handle(RouteImpl.java:58)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle
r.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:
52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.jav
a:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstra
ctConnection.java:245)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoin
t.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceA
ndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Exec
uteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:572)
at java.lang.Thread.run(Unknown Source)
twilioexception

@AgentKnopf
Copy link
Contributor

@gosemathraj did you make modifications to the sample code? You're getting an NPE when trying to create the JWT tokenv ia toJWT - check your stacktrace, it also tells you the line on which this is happening in the target class as well as your Webapp class. And if you didn't use the exact same code as provided in the sample those variations would be relevant.

@zjbpku
Copy link

zjbpku commented Jan 3, 2019

solve the NPE by removing export in .env file.

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

3 participants