java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by ashish967
, 1 year ago
Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference
at net.ossrs.yasea.rtmp.amf.AmfString.writeTo(AmfString.java:60)
at net.ossrs.yasea.rtmp.packets.VariableBodyRtmpPacket.writeVariableData(VariableBodyRtmpPacket.java:71)
at net.ossrs.yasea.rtmp.packets.Command.writeBody(Command.java:74)
at net.ossrs.yasea.rtmp.packets.RtmpPacket.writeTo(RtmpPacket.java:32)
at net.ossrs.yasea.rtmp.io.WriteThread.run(WriteThread.java:54)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.