title: IBM Connections Java API without a Web Server
body: <p>The Connections Java API docs and examples make assumptions the user is using a Web server to interact with Connections. In my case, I want to use the Java API using jRuby and there is no web server.</p>
  
  <p>I want to upload a file to a Connections community, or more specifically connect to the Connections server directly, authenticate and do the upload. I tried the following code and hit a wall with the error:</p>
  
  <p>"SBT context is not initialized for the request"</p>
  
  <p>This error message seems to be complaining about a servlet which of course I don't have.</p>
  
  <p>Here is the code I tried...</p>
  
  <pre><code>    ep = new BasicEndpoint();
      ep.setUrl(connections_url);
      ep.login(userid, pw);
      service = new CommunityService();
      service.setEndpoint(ep);
      istream = new FileInputStream(temp_file);
      uploaded_file = service.uploadFile(istream, community_id, filename, filesize)
  </code></pre>
  
  <p>The API calls used above are just a guess on my part however the login to the Endpoint seems to work as the method returns true and that gave me some hope I was on the right track. But the upload failed with the context error so now I'm stuck.</p>
  
  <p>Any ideas to make this work?</p>