hi, your issue is quite simple. u have to setup log4j by doing two things: 1) copy log4j.jar to your JDKDIR\jre\lib\ext 2) copy the sample conf file log4j.properties (located in SMSLIBDIR\misc\Log4j Sample Configuration) to your SMSLIBDIR\dist\classes
Le mardi 13 novembre 2012 11:36:41 UTC, kechap a écrit : > > Hi, > > I am trying to get SMSServer working but with no luck. I followed the > tutorial to build it and I managed to run it using > > java -Dlog4j.configuration="C:\Users\tolis\Desktop\smslib\misc\Log4j >> Sample Configuration\log4j.properties" >> -Dsmsserver.configfile=SMSServer.conf -jar smsserver-3.5.2.jar >> >> > This is my config file > > # Set a different balancer than the default. > smsserver.balancer=RoundRobinLoadBalancer > > #Set a different router than the default. > #smsserver.router=NumberPoolRouter > > # Lets add a modem > gateway.0=modem1, SerialModem > modem1.port=COM6 > modem1.baudrate=9600 > modem1.manufacturer=Sony Ericsson > modem1.model=K750i > modem1.protocol=PDU > modem1.pin=1414 > modem1.inbound=yes > modem1.outbound=yes > modem1.smsc_number= > modem1.init_string=ATZ\rATZ\rATZ\r > > # Dummy gateways used for testing. > #gateway.1=Test1, TestGateway > #Test1.inbound=yes > #Test1.outbound=yes > #gateway.2=Test2, TestGateway > #Test2.inbound=no > #Test2.outbound=yes > #gateway.3=Test3, TestGateway > #Test3.inbound=no > #Test3.outbound=yes > #gateway.4=Test4, TestGateway > #Test4.inbound=no > #Test4.outbound=yes > #gateway.5=Test5, TestGateway > #Test5.inbound=no > #Test5.outbound=yes > #gateway.6=Test6, TestGateway > #Test6.inbound=no > #Test6.outbound=yes > #gateway.7=Test7, TestGateway > #Test7.inbound=no > #Test7.outbound=yes > #gateway.8=Test8, TestGateway > #Test8.inbound=no > #Test8.outbound=yes > > # Here is an example of a Microsoft SQL Server database interface. > #interface.0=db1, Database > > #db1.url=jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=smslib > #db1.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver > #db1.username=smslib > #db1.password=smslib > #db1.type=mssql > #db1.tables.sms_in= > #db1.tables.sms_out= > #db1.tables.calls= > #db1.batch_size=50 > #db1.retries=2 > #db1.update_outbound_on_statusreport=no > > # Here is an example of an Oracle database interface. > #interface.0=db1, Database > #db1.url=jdbc:oracle:thin:smslib/smslib@localhost:1521/XE > #db1.driver=oracle.jdbc.OracleDriver > #db1.username=smslib > #db1.password=smslib > #db1.type=oracle > #db1.tables.sms_in= > #db1.tables.sms_out= > #db1.tables.calls= > #db1.batch_size=50 > #db1.retries=2 > #db1.update_outbound_on_statusreport=no > > # Here is an example of a MySQL database interface. > interface.0=db1, Database > db1.type=mysql > db1.url=jdbc:mysql://localhost:3306/sms_center > db1.driver=com.mysql.jdbc.Driver > db1.username=root > #db1.password= > #db1.tables.sms_in=smsserver_in > #db1.tables.sms_out=smsserver_out > #db1.tables.calls=smsserver_calls > db1.batch_size=50 > db1.retries=2 > db1.update_outbound_on_statusreport=yes > > # Here is an example of a SimpleInboundFileLogger interface. > #interface.1=file1, SimpleInboundFileLogger, inbound > #file1.filename=f:/logger.txt > > # Here is an example of a HTTP interface. > #interface.2=http1, Http > #http1.get_url= > http://192.168.1.1/test.php?gatewayId=%gatewayId%&text=%text%&originator=%originator% > #http1.dlr_url= > http://192.168.1.1/dlr.php?gatewayId=%gatewayId%&text=%text%&from=%from%&refNo=%refNo% > #http1.method=GET > > #interface.3=httpServer, HttpServer > #httpServer.port=8080 > #httpServer.password.read=0000 > #httpServer.password.send=1111 > > #Interval for processing inbound messages (in seconds) > settings.inbound_interval=600 > #Interval for processing outbound queues (in seconds) > settings.outbound_interval=10 > > #After reading, should SMSServer delete the processed messages from the > gateways? > #Default is "no" for safety. Set to "yes" if you wish to delete messages. > #If you leave it to "no", SMSServer will process the same messages over > and over again! > settings.delete_after_processing=no > > # Should SMSServer work in sync or async sending mode? > # Async mode forwards messages to gateway queues. > # Values can be "sync" and "async". > settings.send_mode = async > > # Allowed dispatch time-fames per priority > settings.timeframe.low=0900-2200 > settings.timeframe.normal=0000-2359 > settings.timeframe.high=0000-2359 > > > Also I tried the example ReadMessages.java and it worked. I am using > Bluetooth for pc-mobile connection and I noticed that when I run SMSServer > it does not ask for a connection approval unlike the ReadMessages.java > example. So maybe I am doing something wrong with the config file and it > cant communicate with the device. > > Any ideas? > > This is the only output I get from SMSServer when I run it > > SMSLib: A Java API library for sending and receiving SMS via a GSM modem >> or othe >> r supported gateways. >> This software is distributed under the terms of the Apache v2.0 License. >> Web Site: http://smslib.org >> >> SMSLib API version: 3.5.2 >> SMSServer version: 3.5.2 >> log4j:WARN No appenders could be found for logger (smslib). >> log4j:WARN Please initialize the log4j system properly. >> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for >> more in >> fo. >> > -- You received this message because you are subscribed to the Google Groups "SMSLib Discussion Group" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msg/smslib/-/segyrsucULkJ. For more options, visit https://groups.google.com/groups/opt_out.
