Скрипт управления шлюзом (недописан)
Код:
import java.util.*;
import bitel.billing.server.util.DefaultServerSetup;
import ru.bitel.common.Utils;
import bitel.billing.server.util.telnet.TelnetSession;
import bitel.billing.server.contract.bean.ContractStatusManager;
import bitel.billing.common.KernelConst;
import bitel.billing.server.contract.bean.ContractStatus;
import ru.bitel.bgbilling.modules.phone.server.bean.*;
import ru.bitel.bgbilling.modules.phone.common.bean.*;
import bitel.billing.server.phone.bean.*;
void doSync()
{
host = gate.getHost();
port = gate.getPort();
gid = gate.getId();
gateSetup = new DefaultServerSetup( gate.getConfig(), "\r\n" );
login = "LGI:op=\"login\",PWD =\"password\",SER=\"192.168.103.2---O&M System\";";
//SSHSession session = null;
session = null;
try
{
session = new TelnetSession( host, port );
session.setEndString( "" );
session.connect();
System.out.println( session.doCommand( login ) );
session.setEndString("END");
//Получаем статус договора
ContractStatusManager csm = new ContractStatusManager( con );
ContractStatus contractStatus = csm.getStatus( cid, new java.util.Date() );
ClientItemManager cim = new ClientItemManager(con, mid);
java.util.List clientItem = cim.getItemList(cid);
}
catch ( Exception e )
{
throw new RuntimeException ( e );
}
finally
{
if( session != null )
{
session.disconnect();
}
}
}
Его кусок
Код:
ClientItemManager cim = new ClientItemManager(con, mid);
java.util.List clientItem = cim.getItemList(cid);
вызывает следующую ошибку
Код:
06-13/13:28:30 ERROR [pool-1-thread-1] LoggingPrintStream - com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'bgbilling.phone_client_item_19559' doesn't exist
06-13/13:28:30 ERROR [pool-1-thread-1] LoggingPrintStream - at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
06-13/13:28:30 ERROR [pool-1-thread-1] LoggingPrintStream - at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
06-13/13:28:30 ERROR [pool-1-thread-1] LoggingPrintStream - at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
19559 - это ID договора.