IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Linux Discussion :

problème d'envoi des sms avec Linux


Sujet :

Linux

  1. #1
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut problème d'envoi des sms avec Linux
    Salut,
    J'ai un module d'envoi des sms, à l'aide de l'API SmsLib et d'un modem , qui marche très bien sur windows(dans un programme java et dans un projet war sous jboss),mais sur linux c pas pareil; le programme java fonctionne bien alors que j'ai trouvé des problèmes avec le projet war sous jboss et sous tomcat aussi;il m'affiche l'erreur suivante lors de l'envoi du sms(jboss ou tomcat sous linux):
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     org.smslib.GatewayException: Comm library exception: java.lang.RuntimeException: gnu.io.NoSuchPortException
    2011-07-26 16:34:45,676 INFO  [STDOUT]  at org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java:97)
    2011-07-26 16:34:45,676 INFO  [STDOUT]  at org.smslib.modem.AModemDriver.connect(AModemDriver.java:113)
    2011-07-26 16:34:45,677 INFO  [STDOUT]  at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:187)
    2011-07-26 16:34:45,677 INFO  [STDOUT]  at org.smslib.Service$1Starter.run(Service.java:321)
    Cette erreur s'affiche aussi lorsque je débranche le modem(si j'exécute le programme java). J'ai posté l'erreur sur le forum de SmsLib mais j'ai pas trouvé des solutions et à mon avis et d'après les tests que j'ai effectués, le problème ne provient pas de l'API.
    j'espère que je trouve la solution sur ce forum.

  2. #2
    Expert éminent sénior

    Avatar de Siguillaume
    Homme Profil pro
    Conseil - Consultant en systèmes d'information
    Inscrit en
    Août 2007
    Messages
    6 180
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Conseil - Consultant en systèmes d'information
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Août 2007
    Messages : 6 180
    Points : 25 358
    Points
    25 358
    Par défaut
    Bonjour, je ne connais pas les spécificités de ce que tu veux faire, mais l'envoi et la réception des SMS sont bien gérés par des outils tels que Kannel.
    Vous avez envie de contribuer au sein du Club Developpez.com ? Contactez-nous maintenant !
    Vous êtes passionné, vous souhaitez partager vos connaissances en informatique, vous souhaitez faire partie de la rédaction.
    Il suffit de vous porter volontaire et de nous faire part de vos envies de contributions :
    Rédaction d'articles/cours/tutoriels, Traduction, Contribution dans la FAQ, Rédaction de news, interviews et témoignages, Organisation de défis, de débats et de sondages, Relecture technique, Modération, Correction orthographique, etc.
    Vous avez d'autres propositions de contributions à nous faire ? Vous souhaitez en savoir davantage ? N'hésitez pas à nous approcher.

  3. #3
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    Bonjour,
    J'ai une application qui est composé de plusieurs modules, parmis les quels j'ai le module d'envoi des sms, donc je pense que ces outils ne me servent à rien
    mon problème est sur Linux, sur windows tout marche bien

  4. #4
    Expert confirmé
    Avatar de Loceka
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    2 276
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 2 276
    Points : 4 845
    Points
    4 845
    Par défaut
    Citation Envoyé par ja1985va Voir le message
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     org.smslib.GatewayException: Comm library exception: java.lang.RuntimeException: gnu.io.NoSuchPortException
    Le problème ne viendrait pas d'un port non ouvert, comme le dit l'exception ?

  5. #5
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    non, le port est ouvert, et cette exception c comme si le modem n'est pas branché

  6. #6
    Expert éminent sénior

    Avatar de Siguillaume
    Homme Profil pro
    Conseil - Consultant en systèmes d'information
    Inscrit en
    Août 2007
    Messages
    6 180
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Conseil - Consultant en systèmes d'information
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Août 2007
    Messages : 6 180
    Points : 25 358
    Points
    25 358
    Par défaut
    Citation Envoyé par ja1985va Voir le message
    c comme si le modem n'est pas branché
    Tu as fait un dmesg pour voir si le modem est branché et reconnu par le système?
    Vous avez envie de contribuer au sein du Club Developpez.com ? Contactez-nous maintenant !
    Vous êtes passionné, vous souhaitez partager vos connaissances en informatique, vous souhaitez faire partie de la rédaction.
    Il suffit de vous porter volontaire et de nous faire part de vos envies de contributions :
    Rédaction d'articles/cours/tutoriels, Traduction, Contribution dans la FAQ, Rédaction de news, interviews et témoignages, Organisation de défis, de débats et de sondages, Relecture technique, Modération, Correction orthographique, etc.
    Vous avez d'autres propositions de contributions à nous faire ? Vous souhaitez en savoir davantage ? N'hésitez pas à nous approcher.

  7. #7
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    oui le modem est bien reconnu voilà le resultat de dmesg:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    usb 7-2: FTDI USB Serial Device converter now attached to ttyUSB0
    usb 7-2: New USB device found, idVendor=0403, idProduct=6001
    usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    usb 7-2: Product: Teltonika ModemUSB/G10
    usb 7-2: Manufacturer: Teltonika
    usb 7-2: SerialNumber: 00253161
    j'ai déjà envoyé un sms avec du programme java (en exécutant un .jar), le problème dans le projet web sous tomcat et jboss

  8. #8
    Invité
    Invité(e)
    Par défaut
    Salut,

    Vérifier ce point.

    http://smslib.org/doc/smslib/trouble...tectable_ports

    Linux and undetectable ports
    If you using USB/Bluetooth/IrDA connections on Linux, RxTx may not recognize your serial device / port. You may get a NoSuchPortException.

    Assuming that your port is named /dev/xyz-port , you can:

    Either set the gnu.io.rxtx.SerialPorts system property with your device name.
    Create a symbolic link of your /dev/xyz-port to something resembling a standard serial port, like /dev/ttyS20, and use this one instead

  9. #9
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    oui j'ai testé la deuxième solution (lien symbolique) mais j'ai toujours la même exception
    il faut trouver un moyen pour verifier si tomcat se connect au port "/dev/ttyUSB0" ou non

  10. #10
    Invité
    Invité(e)
    Par défaut
    Re,

    Peux-tu fournir le résultat de cette commande?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
     ls -l /dev/ttyUSB0
    Avec quelle user démarres-tu tes instances jboss ou tomcat? root aussi?

    As-tu un caused by dans ta stacktrace?

  11. #11
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    salut,
    voilà le résultat de la command
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    crw-rw---- 1 root uucp 188, 0 août  3 09:19 /dev/ttyUSB0
    les instances jboss et tomcat sont démarrés par root.
    ya pas caused by dans l'exception.
    D'autre part, j'ai essayé de se connecter au port /dev/ttyUSB0 dans la servlet au lieu d'envoyer un sms avec le code suivant:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    private SerialPort serialPort;
    	    private OutputStream outStream;
    	    private InputStream inStream;
     
    	    public void connect() throws IOException {
    	        try {
    	            // Obtain a CommPortIdentifier object for the port you want to open
    	            CommPortIdentifier portId =
    	                    CommPortIdentifier.getPortIdentifier("/dev/ttyUSB0");
     
    	            // Get the port's ownership
    	            serialPort =
    	                    (SerialPort) portId.open("Demo application", 5000);
     
    	            // Set the parameters of the connection.
    	            setSerialPortParameters();
     
    	            // Open the input and output streams for the connection. If they won't
    	            // open, close the port before throwing an exception.
    	            outStream = serialPort.getOutputStream();
    	            System.out.println("outStream: "+outStream.toString());
    	            inStream = serialPort.getInputStream();
    	        } catch (Exception e) {
    	            e.printStackTrace();
    	            serialPort.close();
    	            //throw e;
    	        }
    	    }
     
    	    /**
    	     * Get the serial port input stream
    	     * @return The serial port input stream
    	     */
    	    public InputStream getSerialInputStream() {
    	        return inStream;
    	    }
     
    	    /**
    	     * Get the serial port output stream
    	     * @return The serial port output stream
    	     */
    	    public OutputStream getSerialOutputStream() {
    	        return outStream;
    	    }
     
    	    /**
    	     * Sets the serial port parameters
    	     */
    	    private void setSerialPortParameters() throws IOException {
    	        int baudRate = 115200; // 57600bps
     
    	        try {
    	            // Set serial port to 57600bps-8N1..my favourite
    	            serialPort.setSerialPortParams(
    	                    baudRate,
    	                    SerialPort.DATABITS_8,
    	                    SerialPort.STOPBITS_1,
    	                    SerialPort.PARITY_NONE);
     
    	            serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN);
    	        } catch (Exception ex) {
    	            throw new IOException("Unsupported serial port parameter");
    	        }
    	    }
    il affiche la même exception:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    java.lang.RuntimeException: java.lang.RuntimeException: gnu.io.NoSuchPortException
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.smslib.helper.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:212)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at servlet.OpenSerialPort.connect(OpenSerialPort.java:21)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at servlet.SendSms.Process(SendSms.java:42)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at servlet.SendSms.doGet(SendSms.java:25)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    2011-08-04 13:25:18,844 INFO  [STDOUT]  at java.lang.Thread.run(Thread.java:619)
    2011-08-04 13:25:18,844 INFO  [STDOUT] Caused by: java.lang.RuntimeException: gnu.io.NoSuchPortException
    2011-08-04 13:25:18,844 INFO  [STDOUT]  ... 25 more
    2011-08-04 13:25:18,845 INFO  [STDOUT] java.lang.NullPointerException
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at servlet.OpenSerialPort.connect(OpenSerialPort.java:37)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at servlet.SendSms.Process(SendSms.java:42)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at servlet.SendSms.doGet(SendSms.java:25)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    2011-08-04 13:25:18,846 INFO  [STDOUT]  at java.lang.Thread.run(Thread.java:619)

  12. #12
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    J'ai essayé aussi d'afficher les ports disponibles avec le code suivant:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    public class CommTest
    {
    	static CommPortIdentifier portId;
    	static Enumeration portList;
    	static int bauds[] = { 19200, 38400, 115200 };
     
    	public void foundPort(){
    		portList = CommPortIdentifier.getPortIdentifiers();
    		while (portList.hasMoreElements())
    		{
    			portId = (CommPortIdentifier) portList.nextElement();
    			if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
    			{
    				System.out.println("Found port: " + portId.getName());
    				for (int i = 0; i < bauds.length; i++)
    				{
    					System.out.print("	Trying at " + bauds[i] + "...");
    					try
    					{
    						SerialPort serialPort;
    						InputStream inStream;
    						OutputStream outStream;
    						int c;
    						String response;
    						serialPort = (SerialPort) portId.open("SMSLibCommTester", 1971);
    						serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN);
    						serialPort.setSerialPortParams(bauds[i], SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
    						inStream = serialPort.getInputStream();
    						outStream = serialPort.getOutputStream();
    						serialPort.enableReceiveTimeout(2000);
    						c = inStream.read();
    						while (c != -1)
    							c = inStream.read();
    						outStream.write('A');
    						outStream.write('T');
    						outStream.write('\r');
    						outStream.write('A');
    						outStream.write('T');
    						outStream.write('\r');
    						outStream.write('A');
    						outStream.write('T');
    						outStream.write('\r');
    						try { Thread.sleep(1000); } catch (Exception e) {}
    						response = "";
    						c = inStream.read();
    						while (c != -1)
    						{
    							response += (char) c;
    							c = inStream.read();
    						}
    						serialPort.close();
    						if (response.indexOf("OK") >= 0)
    						{
    							System.out.print("  Getting Info...");
    							Service srv = new Service();
    							SerialModemGateway gateway = new SerialModemGateway("modem.com3",portId.getName(), bauds[i], "", "");
    							try
    							{   
    								srv.addGateway(gateway);
    								srv.startService();
    								System.out.println("  Found: " + srv.getSettings());
    								srv.stopService();
    							}
    							catch (Exception e)
    							{
    								System.out.println("  Nobody here!");
    							}
    							srv = null;
    						}
    						else System.out.println("  Nobody here!");
    					}
    					catch (Exception e)
    					{
    						System.out.println("  Nobody here!");
    					}
    				}
    			}
    		}
     
    	}
    }
    dans un programme java (.jar), voilà le résultat:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    Experimental:  JNI_OnLoad called.
    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version   = RXTX-2.1-7
    Found port: /dev/ttyUSB0
            Trying at 19200...  Nobody here!
            Trying at 38400...  Nobody here!
            Trying at 115200...  Getting Info...log4j:WARN No appenders could be found for logger (smslib).
    log4j:WARN Please initialize the log4j system properly.
    Found port: /dev/ttyS0
            Trying at 19200...  Nobody here!
            Trying at 38400...  Nobody here!
            Trying at 115200...  Nobody here!
    c clair ici,il a trouvé le modem sur le port /dev/ttyUSB0 avec baudRate = 115200
    mais dans la servlet du projet web il n'a rien affiché

  13. #13
    Invité
    Invité(e)
    Par défaut
    Salut,

    Peux-tu lister les process du serveur applicatif que tu utilises(tomcat ou jboss)?

  14. #14
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    comment ça?
    j'ai pas compris !!!

  15. #15
    Invité
    Invité(e)
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    ps -ef | egrep 'jboss|tomcat|java'

  16. #16
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    ok voila
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    [root@yebnidata java]# ps -ef | egrep 'jboss'
    jboss    23186     1  0 11:55 ?        00:00:00 /bin/sh /usr/local/jboss/bin/run.sh
    jboss    23192 23186  0 11:55 ?        00:00:30 /usr/local/jdk1.6.0_18/bin/java -server -Xms512m -Xmx1024m -Dprogram.name=run.sh -Djava.endorsed.dirs=/usr/local/jboss/lib/endorsed -classpath /usr/local/jboss/bin/run.jar:/usr/local/jdk1.6.0_18/lib/tools.jar org.jboss.Main
    root     23539 21869  0 13:54 pts/0    00:00:00 egrep jboss

  17. #17
    Invité
    Invité(e)
    Par défaut
    A mon avis ça ne fonctionne pas pour la raison suivante

    Le owner du process jboss est l'utilisateur jboss et non l'utilisateur root comme tu l'avais signalé précédemment.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    jboss    23192 23186  0 11:55 ?        00:00:30 /usr/local/jdk1.6.0_18/bin/java -server -Xms512m -Xmx1024m -Dprogram.name=run.sh -Djava.endorsed.dirs=/usr/local/jboss/lib/endorsed -classpath /usr/local/jboss/bin/run.jar:/usr/local/jdk1.6.0_18/lib/tools.jar org.jboss.Mai
    D'après les permissions que l'on peut voir sur le device /dev/ttyUSB0, seul le user root et les membres du groupe uucp peuvent accéder en lecture/écriture.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    crw-rw---- 1 root uucp 188, 0 août  3 09:19 /dev/ttyUSB0
    A titre de test pourrais-tu donc ajouter ton user jboss au groupe uucp et voir ce que ça donne?

    Editer et rechercher la ligne contenant le groupe uucp dans le fichier /etc/group et ajouter jboss

    Dernière modification par Invité ; 05/08/2011 à 15h34.

  18. #18
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    dans /etc/group, j'ai changé
    à
    mais rien n'est changé

  19. #19
    Invité
    Invité(e)
    Par défaut
    Peux-tu redémarrer l'instance jboss et refaire le test?

    peux-tu également renvoyer le résultat de la commande suivante?


  20. #20
    Nouveau membre du Club
    Inscrit en
    Juin 2010
    Messages
    71
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 71
    Points : 38
    Points
    38
    Par défaut
    j'ai déjà redemarré jboss avant de tester et toujours la même exception
    la command:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    [root@yebnidata java]# groups jboss
    jboss : jboss uucp

Discussions similaires

  1. Problème d'envoi des emails avec HtmlMimeMail5
    Par ahmedbj dans le forum Langage
    Réponses: 0
    Dernier message: 17/12/2012, 23h02
  2. Problème d'envoi des messages avec outlook
    Par titedeveloppeuse dans le forum Outlook
    Réponses: 4
    Dernier message: 20/05/2011, 00h50
  3. Problème d'envoi de fax sous Linux CentOS 5.4 avec AvantFAX et HylaFAX
    Par Kiyoshi_Aiko dans le forum RedHat / CentOS / Fedora
    Réponses: 3
    Dernier message: 03/02/2011, 14h59
  4. envoie des SMS dans centre d'appel avec du java
    Par ja1985va dans le forum Général Java
    Réponses: 8
    Dernier message: 17/01/2011, 10h41
  5. Problème d'envoie de mail avec PHP sur le serveur Linux
    Par Nessma dans le forum Administration système
    Réponses: 0
    Dernier message: 03/09/2007, 16h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo