Note that there are some explanatory texts on larger screens.

plurals
  1. POError at Java HTTP request
    primarykey
    data
    text
    <p>I'm trying to upload a name and a score to with a HTTP post request on a button click, but I get a weird error. Here is my code.</p> <pre><code>public void onClick(View v) { // TODO Auto-generated method stub switch (v.getId()) { case R.id.bMenu: Intent i = new Intent(ShowScore.this, Menu.class); startActivity(i); break; case R.id.bUpload: postData(); break; } } private void postData() { // Create a new HttpClient and Post Header HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.ratemyplays.com/form.php"); try { // Add your data List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2); nameValuePairs.add(new BasicNameValuePair("name", "Steve")); nameValuePairs.add(new BasicNameValuePair("score", "24")); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); // Execute HTTP Post Request // HttpResponse response = httpclient.execute(httppost); // Execute HTTP Post Request ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler(); String responseBody = httpclient.execute(httppost, responseHandler); // Just display the response back displayToastMessage(responseBody); } catch (ClientProtocolException e) { // TODO Auto-generated catch block } catch (IOException e) { // TODO Auto-generated catch block } } private void displayToastMessage(String responseBody) { // TODO Auto-generated method stub } </code></pre> <p>Here is my error</p> <blockquote> <p>Invalid layout of <code>java.lang.String</code> at value</p> <p>A fatal error has been detected by the Java Runtime Environment:</p> <p>Internal Error (javaClasses.cpp:136), pid=9736, tid=10668 fatal error: Invalid layout of preloaded class</p> <p>JRE version: (7.0_40-b43) (build ) Java VM: Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode windows-amd64 compressed oops) Failed to write core dump. Minidumps are not enabled by default on client versions of Windows</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload