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 exception #6

Open
lucasjinreal opened this issue Oct 23, 2021 · 0 comments
Open

null exception #6

lucasjinreal opened this issue Oct 23, 2021 · 0 comments

Comments

@lucasjinreal
Copy link

java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
	at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
	at java.base/java.util.Properties.put(Properties.java:1334)
	at com.db.MyBatis.getProperties(MyBatis.java:18)
	at com.db.MyBatis.getSession(MyBatis.java:29)
	at com.db.MyBatis.getUser(MyBatis.java:35)
	at com.chat.authorizers.authentication.connectAuthorizers.LoginAuthorizer.authorize(LoginAuthorizer.java:22)
	at com.chat.authorizers.authentication.MyAuthenticatorProvider.lambda$getAuthenticator$0(MyAuthenticatorProvider.java:49)
	at com.hivemq.extensions.auth.ConnectSimpleAuthTask.call(ConnectSimpleAuthTask.java:44)
	at com.hivemq.extensions.auth.ConnectSimpleAuthTask.call(ConnectSimpleAuthTask.java:28)
	at com.hivemq.extensions.auth.AbstractAuthTask.apply(AbstractAuthTask.java:55)
	at com.hivemq.extensions.auth.ConnectSimpleAuthTask.apply(ConnectSimpleAuthTask.java:28)
	at com.hivemq.extensions.auth.AbstractAuthTask.apply(AbstractAuthTask.java:31)
	at com.hivemq.extensions.executor.task.PluginTaskExecutor$PluginTaskExecutorRunnable.runInOutTask(PluginTaskExecutor.java:332)
	at com.hivemq.extensions.executor.task.PluginTaskExecutor$PluginTaskExecutorRunnable.runTask(PluginTaskExecutor.java:302)
	at com.hivemq.extensions.executor.task.PluginTaskExecutor$PluginTaskExecutorRunnable.executeTask(PluginTaskExecutor.java:251)
	at com.hivemq.extensions.executor.task.PluginTaskExecutor$PluginTaskExecutorRunnable.run(PluginTaskExecutor.java:164)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
2021-10-24 03:27:53,153 INFO  - nextExtensionOrDefault must not be called if authenticateSuccessfully, failAuthentication, continueAuthentication or nextExtensionOrDefault has already been called.
2021-10-24 03:27:53,156 INFO  - Client disconnected with id: demo_mqtt_pub 

I using a very simple python code test mqtt connection, just got above error. why??

import paho.mqtt.client as mqtt

def on_publish(client, userdata, mid):
    print("message ID ", mid)
    client.disconnect()

def on_connect(client, userdata, flags, rc):
    if rc == 0:
        client.publish("test", payload="hello world", qos=1)
    else:
        print("connection failed ", rc)

mqtt_client = mqtt.Client(client_id="demo_mqtt_pub", clean_session=False)
mqtt_client.on_connect = on_connect
mqtt_client.on_publish = on_publish
mqtt_client.username_pw_set(username="[email protected]",password="123")

mqtt_client.connect("127.0.0.1", 1883)
mqtt_client.loop_forever()
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

1 participant