Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » publish exception issue(publish exception issue)
publish exception issue [message #1053266] Fri, 03 May 2013 13:01 Go to next message
marco divita is currently offline marco divitaFriend
Messages: 2
Registered: May 2013
Junior Member
since yesterday I have this publish-exception in my java software (paho based) on tomcat:

MqttException (0) - /Library/apache-tomcat-7.0.11/bin/applicationStatus6-tcp9524030961883/s-2.msg (No such file or directory)
at org.eclipse.paho.client.mqttv3.MqttDefaultFilePersistence.put(
at org.eclipse.paho.client.mqttv3.internal.ClientState.send(
at org.eclipse.paho.client.mqttv3.internal.ClientComms.internalSend(
at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(
at org.eclipse.paho.client.mqttv3.MqttTopic.publish(
at com.integra.application.command.ApplicationCommand.publish(
at com.integra.applicationCredit.ApplicationCredit.setCredit(
at com.integra.servlet.ApplicationCreditListener.doPost(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: /Library/apache-tomcat-7.0.11/bin/applicationStatus6-tcp9524030961883/s-2.msg (No such file or directory)
at Method)
at org.eclipse.paho.client.mqttv3.MqttDefaultFilePersistence.put(

the folder applicationStatus6-tcp9524030961883 (where applicationstatus6 it's the client-id) doesn't exist, if I make it manually the application works.
It's strange because i hadn't this error before.
Of course when I restart the connection the framework deletes the folder. could be a permissions problem?
How can I fix it?
Re: publish exception issue [message #1053272 is a reply to message #1053266] Fri, 03 May 2013 13:23 Go to previous message
Nicholas O'Leary is currently offline Nicholas O'LearyFriend
Messages: 4
Registered: November 2012
Junior Member
Hi Marco,

It seems like a permissions issue in creating the directory.

You said you created the directory and then it worked; were you able to create it as the same user tomcat runs as, or did you have to use root?

You could tell the client to use a different directory entirely for the persistence data by:
1. create your own instance of MqttDefaultFilePersistence passing in your desired directory to the constructor
2. pass this instance of persistence to the appropriate MqttClient constructor.

Hope that helps,

Previous Topic:Segmentation Fault Issue
Next Topic:Puback not received
Goto Forum:

Current Time: Mon Nov 30 22:47:44 GMT 2015

Powered by FUDForum. Page generated in 0.02722 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software