RuntimeException with Java API 3.3 SR2 on Android

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RuntimeException with Java API 3.3 SR2 on Android

      Hello, I am new to this forum.
      When I try to use the Jedox Java SDK 3.3 SR2 in an Android application, I receive RuntimeExceptions like this:

      Source Code

      1. 07-23 10:46:10.761: E/AndroidRuntime(1258): java.lang.RuntimeException: Could not connect to palo server at host '' on port '7777 ==> 'null

      I set the Configuration like this:

      Source Code

      1. ConnectionConfiguration config = new ConnectionConfiguration();
      2. config.setHost("");
      3. config.setPort("7777");
      4. config.setUsername("viewer");
      5. config.setPassword("viewer");
      6. IConnection conn = ConnectionManager.getInstance().getConnection(config);

      Then I open the connection:

      Source Code


      Which works fine... sometimes. For instance, in an AsyncTask doInBackground method, this works, but directly in an Activity method like an onclickListener, it doesn't and I receive this runtime exception.
      If I open the connection in the AsyncTask doInBackground method and try to access it later, for instance in the onPostExecuted method, then I also receive this runtime exception.

      Any idea what I am doing wrong?
      Thanks in advance for your replies.
    • After further evaluation of this problem, I can now say for sure that calling methods on the Connection object only works in AsyncTasks and nowhere else. Not in the UI thread, not in a separate thread, not in a Service thread. This is really weird behavior and a huge problem, any help with this issue would be greatly appreciated.