java,android,http,crashRelated issues-Collection of common programming errors


  • Extreme Coders
    java sockets exception
    I’ve spent lot of time to find out where is the problem but with no success. Server is launching correctly, but when I launch Client I get “Unexpected Error” exception. I’ve changed ports too with no effects. What should I do to make this working?/* Server.java */ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket;public class Server { private static final int PORT = 50000;

  • MYou
    java encapsulation
    I was fooling around with how I could set up my encapsulation.But my program is executing in an unexpected order. Here is my rather simple code:The “Main”:package research.debug;public class Main {public static void main(String[] args) {Boolean b = Boolean.TRUE ; Debug.black.printVariable( b, “b” ) ;Debug.red.printVariable( b, “b” ) ;System.out.println( “SUPPOSED to be inbetween…” ) ;Debug.black.println( “Hello” ) ;Debug.red.println( “Howdie” ) ;}}”Debug”:package research.debug;public cla

  • biesior
    java database playframework db2 playframework-2.0
    I’m develloping a web application over Play Framework 2.0.Since I need to access a DB2 database, I added the following lines to my application’s application.conf file:db.mydb.driver=com.ibm.db2.jcc.DB2Driver db.mydb.url=”jdbc:db2://host:port/databaseName” db.mydb.user=user db.mydb.password=pass db.mydb.jndiName=databaseNameI connected sucessfully to this DB but got the following exceptions:[info] play – datasource [jdbc:db2://host:port/databaseName] bound to JNDI as databaseName [info] play – da

  • jwiklund
    java memory jhat
    How do you find a memory leak in Java (using for example JHat)? I have tried to load the heap dump up in JHat to take a basic look. However I do not understand how I am supposed to be able to find the root reference (ref) or whatever it is called. Basically I can tell that there are several hundred meg of hash table entries ([java.util.HashMap$Entry or something like that), but maps are used all over the place… Is there some way to search for large maps, or perhaps finding general roots of lar

  • Tomasz Nurkiewicz
    java spring hibernate
    We had Spring2 jar files in application. Upgraded all the Jar files to latest release and started seeing the following error message. Checked my Buildpath and classpath, cannot find anything from there. following is my spring-context.xml. xsd versions were 2.5 previously, I changes all the xsd versions to 3.0 (Depending on the latest version 3.0 and 2.3 for spring-webflow). attached my stacktrace. Any help is greatly appreciated!<?xml version=”1.0″ encoding=”UTF-8″?> <beans xmlns=”http:

  • Rasmus Faber
    java applet code-signing osx-mountain-lion osx-gatekeeper
    With the new release of OS X 10.8, the Gatekeeper will popup the following warning, when you try to start a signed Java applet:The applet has been signed with a valid code signing certificate and will work correctly on other platforms as well as previous versions of OS X. If I change “Allow applications downloaded from:” to “Anywhere”, it works correctly.As far as I can figure out “The digital signature could not be verified”, actually means something like “the signature has not been made with a

  • MHero
    java android spring rest
    I’m trying to POST to a rest service using spring for android(I’m new at this)The restful service has this structure@POST @Path(“/ider”) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public SearchOutRO hashTrackInJSON(SearchInRO in);with(shortened object code):public class SearchInRO implements Serializable {private Double latitud;private Double longitud; }public class SearchOutRO implements Serializable {private Integer searchId; }so I’m trying this(from android)St

  • Android Killer
    java serialization deserialization object-serialization
    I have an object as follows:public class Records implements java.io.Serializable{private int cId;private int pId;private int vlaue;private int tag;public Records(int c, int p, int v, int t){this.cId=c;this.pId=p;this.value=v;this.tag=t;} }I’ve collected lots of data, constructed objects as in the above class and seralized them to disk. One dump thing I’ve forgotten to include in the class file is methods to access the values for each object. For example, to access the cId value for a particular

  • jjnguy

  • Alex K
    java xml jasper-reports
    I try to use an XML on iReport, so I’ve read a tutorialBut when I compiled a report, I get this error :Error filling print… XPath compilation failed. Expression:  net.sf.jasperreports.engine.JRException: XPath compilation failed. Expression:   at net.sf.jasperreports.engine.util.xml.JaxenXPathExecuter.getXPath JaxenXPathExecuter.java:66)       at net.sf.jasperreports.engine.util.xml.JaxenXPathExecuter.selectNodeList(JaxenXPathExecuter.java:77)       at net.sf.jasperreports.engine.data.JRXmlDat

  • Peter Knuke Oberrauner
    android web-services soap ksoap2 android-ksoap2
    After searching for a whole day I still cannot find a solution to my problem.I have an WebService, which gives me the following WSDL file, that i uploaded to pastebin cause it’s really big.For the beginning I’d like to implement the ping function, which you call with a string value and which returns the string value to the client. I think the relevant parts are:<wsdl:operation name=”ping”> <wsdl:input message=”tns:ping” name=”ping”></wsdl:input> <wsdl:output message=”tns:pin

  • Uriel Arvizu
    android websocket socket.io titanium titanium-modules
    I’m working with Titanium SDK 3.1.3 and trying to build an application with a chat that connects to a node js server. So far I’ve tried two different modules to do this, but haven’t had any luck with both of them. The first module I’ve tried was socket.io-titanijm, my code for it looks like this:var io = require(‘socket.io-titanium’);var socket = io.connect(‘IP:PORT’, {‘force new connection’:true});socket.on(‘connect’, function() {// Connected, let’s sign-up for to receive messages for this room

  • user1701098
    android camera zxing autofocus
    I am using ZXing Barcode Scanner library in my app and I’m experiencing the following bug: camera auto focus works only if the device is plugged to the charger. As soon as I unplug the device, the camera stops continious auto focusing, but once the device is plugged again, auto focusing immidiately resumes (image focuses every 2000 milliseconds). The battery of the test device is fully charged.It should be noted that the sample code from XZing works properly, but since I am using some part of it

  • Herry
    android gridview scrollview
    Here is My GridView implement for android application. For Program First time it Work well.But after making some Scrolling Up and Down My problem is when in gridview i scroll it some time put wrong textview in unexpected position.My Source Code For GridView Adapter is Following.@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);mGridView=(GridView)findViewById(R.id.gridview_id);InitializeVariable();mGridView.setAdapter(new

  • mcwadar
    android lifecycle
    I have been developing an application for a few months now and getting ready to go to release. I have been using the Motorola Xoom with Android 4.0.4 for testing throughout the process and everything has worked without fail. I purchased a Nexus 7 from Google (running Jelly Bean 4.1) and I am now getting all kinds of problems with the activity life cycle when the device sleeps or turns off.I created a new project for the sole purpose of checking the life cycle and this is the results I came up wi

  • MHero
    java android spring rest
    I’m trying to POST to a rest service using spring for android(I’m new at this)The restful service has this structure@POST @Path(“/ider”) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public SearchOutRO hashTrackInJSON(SearchInRO in);with(shortened object code):public class SearchInRO implements Serializable {private Double latitud;private Double longitud; }public class SearchOutRO implements Serializable {private Integer searchId; }so I’m trying this(from android)St

  • user2084934
    android android-cursor
    I am creating an Android app with Eclipse and trying to use a Cursor to query a SQLite database. I can’t figure out what is causing this cursor to fail:public List<Word> getAllWords() {List<Word> words = new ArrayList<Word>(); Cursor cursor = db.query(TABLE_NAME, new String[] {FIELD_PRIMARY_DEFINITION}, null, null, null, null, null);cursor.close();return words; }When I run this code, my Android emulator says the program has stopped. When I comment out the cursor line, it runs f

  • Bilal Javed Iqbal
    android android-ndk mips toolchain
    Possible Duplicate:How to build android standalone toolchain in windows 7 I am trying to build standalone toolchain using ndk 8 for mips by following “docs\STANDALONE-TOOLCHAIN.html” but when I run following command “make-standalone-toolchain.sh –platform=android-14 –install-dir=/tmp/my-android-toolchain” in command prompt I got errors such as command not found etc. Error details are following:./../core/ndk-common.sh: line 21: basename: command not found ./../core/ndk-common.sh: line 324: exp

  • Szymon
    android android-4.4
    I decided to start testing my app with Android 4.4 and noticed that the Android HTTP connection APIs are much stricter than before? I have never had this issue and I assume it is some type of bug.I’m connecting to SHOUTcast broadcasts that contain the particular icy header response.Has anyone seen this issue? How can I get around it?URL used for this test: http://50.117.121.162:80Logcat of exception: 11-01 23:47:57.299: E/ConnectHelper(3081): java.net.ProtocolException:Unexpected status line:

  • Tamas
    android amazon proguard in-app-purchase
    I’m trying to set up a basic proguard with amazon iap integrated. However when I’m trying to export my apk, I got the following errors:[2012-06-17 10:59:44 – sc] Proguard returned with error code 1. See console [2012-06-17 10:59:44 – sc] Unexpected error while performing partial evaluation: [2012-06-17 10:59:44 – sc] Class = [com/amazon/inapp/purchasing/KiwiResponseHandler$PurchaseResponseHandlerRunnable] [2012-06-17 10:59:44 – sc] Method = [run()V] [2012-06-17 10:59:44 – sc] Ex

  • Bobrovsky
    http base64 mime
    I’m writing a web service that returns a base64-encoded PDF file, so my plan is to add two headers to the response:Content-Type: application/pdf Content-Transfer-Encoding: base64My question is: Is Content-Transfer-Encoding a valid HTTP header? I think it might only be for MIME. If not, how should I craft my HTTP response to represent the fact that I’m returning a base64-encoded PDF? Thanks.EDIT: It looks like HTTP does not support this header. From RFC2616 Section 14:Note: while the definiti

  • Dmitri
    java http jetty httpclient
    So, I’ve come to the conclusion that Apache HttpComponents 4 is one of the most overwrought APIs I’ve ever come across. Things that seem like they should be simple are taking hundreds of lines of code (and I’m still not sure resources get cleaned up correctly).Plus it wants me to do things like:List<NameValuePair> qparams = new ArrayList<NameValuePair>(); qparams.add(new BasicNameValuePair(“q”, “httpclient”)); qparams.add(new BasicNameValuePair(“btnG”, “Google Search”)); qparams.add

  • Veger
    http caching proxy
    I use PHP to generate dynamic Web pages. As stated on the following tutorial (see link below), the MIME type of XHTML documents should be “application/xhtml+xml” when $_SERVER[‘HTTP_ACCEPT’] allows it. Since you can serve the same page with 2 different MIMEs (“application/xhtml+xml” and “text/html”) you should set the “Vary” HTTP header to “Accept”. This will help the cache on proxies.Link: http://keystonewebsites.com/articles/mime%5Ftype.phpNow I’m not sure of the implication of: header(‘Vary:

  • John K
    asp.net http encoding character-encoding vcard
    I’m downloading a vCard to the browser using Response.Write to output .NET strings with special accented characters. Mime type is text/x-vcard and French characters are appearing wrong in Outlook, for example Montréal;Québec .NET string shows as Montréal Québec in browser.Apparently vCard default format is ASCII. .NET strings are Unicode UTF-16.I’m using this vCard generator code from CodeProject.comI’ve played with the System.Encoding sample code at the bottom of this linked MSDN page to co

  • user3329002
    java angularjs http post csv
    So , I have some thing like this in the back end.response.setContentType(“text/csv; name=” + fileName);response.addHeader(“content-disposition”, “attachment; filename=\”” + fileName + “\””);try {final String csvBuilder = this.reportService.tripSummaryCsvBuilder(trips);response.getOutputStream().write(csvBuilder.getBytes());} catch (Exception e) {logger.error(“downloadTripSummary() – Unexpected exception: “, e);throw new ServerErrorException(“download trip summary csv file failed”);}So, All the b

  • Sankar V
    android http google-drive-sdk
    I am Creating a small Apps from that user can upload his MS office file to his registered mail ID G_Drive account from android device. and export that file into PDF Format.for that i taken help form below link :https://developers.google.com/drive/v2/reference/files/insert#exampleshttps://developers.google.com/drive/manage-downloads#downloading_google_documentsi created application, and its working fine for small size(< 1MB) file, but when i am sending large size to the g_Drive than i am getti

  • cirne100
    perl http ftp tcp
    The following code is a (pseudo!) http server. It just sends back the http request. The unexpected comportment occurs with ftp requests from browser, like ftp://localhost:8888/. With this, the browser connects and stays connected forever.I don’t understand what is happening! How can I control this behavior and ignore ftp requests?#!/usr/bin/perl use strict; use Socket; use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK); use IO::Poll;local *S; socket (S, PF_INET , SOCK_STREAM , getprotobyname(‘tcp’

  • Neil

  • 0__
    http scala dispatch
    The following is a valid query in a browser (e.g. Firefox):http://www.freesound.org/api/sounds/search/?q=barking&api_key=074c0b328aea46adb3ee76f6918f8faeyielding a JSON document:{“num_results”: 610, “sounds”: [{“analysis_stats”: “http://www.freesound.org/api/sounds/115536/analysis/”, “analysis_frames”: “http://www.freesound.org/data/analysis/115/115536_1956076_frames.json”, “preview-hq-mp3”: “http://www.freesound.org/data/previews/115/115536_1956076-hq.mp3”, “original_filename”: “Two Barks.w

  • crockpotveggies
    java http scala gzip
    Because Scala Dispatch 0.9.5 doesn’t seem to have a default handler for decompressing GZIP streams, I’m attempting to modify it’s as.stream.Lines handler for incoming data. Since the same project is also using Spray.io, I attempted to use it’s GzipDecompressor on the HttpResponseBodyPart bytes, but it threw an exception. See below:def onBodyPartReceived(bodyPart: HttpResponseBodyPart) = {if (state == CONTINUE) {val decomp = new GzipDecompressorval bytes = decomp.decompress( bodyPart.getBodyPartB

  • user3421610
    php wordpress website crash syntax-error
    I tried editing the function.php file in my WordPress theme.Somehow I messed up and have a T_STRING error problem. So, I looked it up, and find I need to add a double ” speech mark on line 64.BUT, now the site is crashed. If I try to go in to do the edit I just get an error message telling me there’s a syntax error, unexpected T_STRING in /mysite/wp-content/themes/sahifa/functions/theme-functions.php on line 64I mean, I don’t get into the dashboard AT ALL, just this error message.So how can I

  • Madhu
    crash ios7 uitextview range nsattributedstring
    Hi Everyone i have a UITextView where i am changing the font with range by using the below code. it is working fine in iPhone 4 with iOS 7 , but when i run the same in iPhone 5 with iOS 7 it was crashing and showing up “Range out of bounds”. i was breaking my head for this unexpected behavior. Please help me out. thank you.- (void)setFont:(UIFont *)font range:(NSRange)range{NSMutableAttributedString *text = [[NSMutableAttributedString alloc]initWithAttributedString: self.attributedText];

  • hoss
    android exception crash android-studio
    I was working on a project in Android Studio and was regularly compiling the code running it on my device to make sure everything was in working order. Suddenly the main activity crashes, several times after compiling several separate times. I checked the logcat and the error was reported as being due to failure to recognize the layout. I didn’t understand why, as I hadn’t changed any of the code in the main activity.In fact the only thing that had changed over the course of those few days was t

  • Harlandraka
    windows-7 ssd crash bsod
    I have a Windows 7 computer with this hardware:Asus P8P67 PRO Intel i7 2600k 8GB RAM AMD Radeon HD 6970 2TB HDD (used for storing data) 128GB SSD OCZ Vertex III (used for the OS)The PC works fine but Windows crashes after some time (sometimes after an hour, sometimes after 4 hours, etc). I can see it because when I open an application, it hangs and doesn’t open, and if I click on the start button, explorer crashes. After that, if I wait it goes to blue screen and re-crashes (never reboots): I ha

  • Psycogeek
    power-supply freeze crash gpu htpc
    Subject says most of it. My HTPC will occasionally be found in this hard-locked/crashed state when nothing of note was being done. The past couple times, it has been while the screensaver was running over top of the Steam client (not Big Picture, just the normal client) and nothing else of note was running. I’ve not experienced this crash when watching TV via Windows Media Center, nor when playing Steam games like Dark Souls. Checking Event Viewer has been fruitless, as no BugChecks or other err

  • Dynde
    windows-7 hard-drive boot ssd crash
    I’ve been having some weird random crashes that I can’t seem to locate, and I’m unsure if it’s windows or hardware related.It’s a brand new computer and very powerful. I’ve run into a couple of these random crashes, now I don’t know what causes them, as it happens during the night, when I’m sleeping. When I wake up, all I see is a boot manager screen that says Exception: 0xc00000e “Boot device inaccessible”. A simple restart doesn’t fix the problem – it seems to struggle locating my primary hdd

  • the_mandrill
    windows-7 crash shutdown
    I’ve got a problem with a Win7 machine that up until now has been very reliable. During the boot it will just power off — no warnings or BSOD. Sometimes it gets as far as the login screen but shuts down on login, other times during the splash screen. System repair and System Restore don’t make any difference. I can boot into safe mode or onto a boot disk, which suggests it’s not a CPU overheating problem. I wondered if it was some kind of disk corruption, but I wouldn’t have thought it wou

  • Alexis Li
    mavericks retina-macbook-pro google-chrome crash hang
    I bought rMBP around November last year. As I open Chrome, it crash without log. I can’t move the mouse, and the mms stream player keep working.The only solution is to restart it with power button.I can’t find the report by chrome://crashes and ~/Library/Logs/.I think the kernel_task doesn’t make it.Are there anyone else got the same problem and solution? How to identify the unexpected shutdown by power button in shutdown_monitor.log or /var/log/system.log?Version:10.9.1(13B3116) Chrome Version

  • boldnik
    wireless lenovo thinkpad crash
    Just a few days ago I installed new wifi driver and everything seemed to work fine on Lenovo ThinkPad S440. But now I experience a problem with wifi: the speed slows down to zero that no page could load in web browser. The second problem (not sure if they are connected but maybe) is system crashes unexpectedly. this is a pastebin of dmesg output so you could see what’s happening. When the system crashes, X and all other programs crash. I can’t even switch to tty and restart X. Can’t be reproduce

  • Julio Gorgé
    xcode crash iphone uitabview
    Using XCode 4, with the iPhone iOS 4.2Hey everyone, I’m using a tabBar interface for my new app that I’m trying to finish. I have declared the UILabels and as soon as I connect them in the interface builder to the actual labels, the whole app will crash upon selection of its tab at runtime, in the simulator and on my iphone. I’m hoping there’s a really simple answer out there, but I really have no idea where to look (I am a novice). Thanks in advance,

Web site is in building