Skip to Content
0

JCoDestination Is not responding

Sep 12, 2017 at 04:01 PM

28

avatar image
Former Member

I have provided my code my issue is below code is working on local but when deploy it on production JCoDestination Is not responding after below line, not even error or log.

destination = JCoDestinationManager.getDestination("mySAPSystem");

check my code once -

public class SapTest {

private static JCoDestination destination=null;
private static String DESTINATION_NAME1 = "mySAPSystem";

public static void main(String[] args) {

Properties connectProperties = new Properties();
connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "xxx.xx.xx.xx");
connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "xx");
connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "xxx");
connectProperties.setProperty(DestinationDataProvider.JCO_USER, "279824");
connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "xxxxxxx");
connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "EN");

createDestinationDataFile(DESTINATION_NAME1, connectProperties);

try {

destination = JCoDestinationManager.getDestination("mySAPSystem");

destination.ping();

}catch (JCoException e) {
e.printStackTrace();
}

}

private static void createDestinationDataFile(String destinationName, Properties connectProperties) {

File destCfg = new File(destinationName+".jcoDestination");
try
{
FileOutputStream fos = new FileOutputStream(destCfg, false);
connectProperties.store(fos, "for tests only !");
fos.close();
}
catch (Exception e)
{
throw new RuntimeException("Unable to create the destination files", e);
}

}

}

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers