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 divita
Messages: 2
Registered: May 2013
Junior Member
Hello,
since yesterday I have this publish-exception in my java software (paho based) on tomcat:

MqttException (0) - java.io.FileNotFoundException: /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(MqttDefaultFilePersistence.java:176)
at org.eclipse.paho.client.mqttv3.internal.ClientState.send(ClientState.java:397)
at org.eclipse.paho.client.mqttv3.internal.ClientComms.internalSend(ClientComms.java:81)
at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:118)
at org.eclipse.paho.client.mqttv3.MqttTopic.publish(MqttTopic.java:62)
at com.integra.application.command.ApplicationCommand.publish(ApplicationCommand.java:47)
at com.integra.applicationCredit.ApplicationCredit.setCredit(ApplicationCredit.java:30)
at com.integra.servlet.ApplicationCreditListener.doPost(ApplicationCreditListener.java:44)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.FileNotFoundException: /Library/apache-tomcat-7.0.11/bin/applicationStatus6-tcp9524030961883/s-2.msg (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
at org.eclipse.paho.client.mqttv3.MqttDefaultFilePersistence.put(MqttDefaultFilePersistence.java
:16
3)


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?
thanks
marco
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'Leary
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,

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


Current Time: Wed Sep 17 03:35:16 GMT 2014

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

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