-1

My application is working fine in simulator. when i am installed the application into device I am getting the following exception "screenjava.lang.NullPointerException". Because of this my application is not responding. How to handle it? can anybody help me.

Following one is Logcat:

06-30 15:42:54.528: DEBUG/dalvikvm(231): GC freed 2362 objects / 145704 bytes in 186ms

06-30 15:42:56.017: DEBUG/AndroidRuntime(1371): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

06-30 15:42:56.027: DEBUG/AndroidRuntime(1371): CheckJNI is ON

06-30 15:42:56.268: DEBUG/AndroidRuntime(1371): --- registering native functions ---

06-30 15:42:56.627: DEBUG/ddm-heap(1371): Got feature list request

06-30 15:42:57.028: DEBUG/AndroidRuntime(1371): Shutting down VM

06-30 15:42:57.037: DEBUG/dalvikvm(1371): DestroyJavaVM waiting for non-daemon threads to exit

06-30 15:42:57.037: DEBUG/dalvikvm(1371): DestroyJavaVM shutting VM down

06-30 15:42:57.037: DEBUG/dalvikvm(1371): HeapWorker thread shutting down

06-30 15:42:57.048: DEBUG/dalvikvm(1371): HeapWorker thread has shut down

06-30 15:42:57.048: DEBUG/jdwp(1371): JDWP shutting down net...

06-30 15:42:57.057: INFO/dalvikvm(1371): Debugger has detached; object registry had 1 entries

06-30 15:42:57.067: DEBUG/dalvikvm(1371): VM cleaning up

06-30 15:42:57.087: ERROR/AndroidRuntime(1371): ERROR: thread attach failed

06-30 15:42:57.107: DEBUG/dalvikvm(1371): LinearAlloc 0x0 used 628628 of 5242880 (11%)

06-30 15:42:57.617: DEBUG/AndroidRuntime(1379): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

06-30 15:42:57.617: DEBUG/AndroidRuntime(1379): CheckJNI is ON

06-30 15:42:57.916: DEBUG/AndroidRuntime(1379): --- registering native functions ---

06-30 15:42:58.267: DEBUG/ddm-heap(1379): Got feature list request

06-30 15:42:58.667: INFO/ActivityManager(51): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.ibkr.roadbrake/.RB_Login }

06-30 15:42:58.727: DEBUG/AndroidRuntime(1379): Shutting down VM

06-30 15:42:58.737: DEBUG/dalvikvm(1379): DestroyJavaVM waiting for non-daemon threads to exit

06-30 15:42:58.747: DEBUG/dalvikvm(1379): DestroyJavaVM shutting VM down

06-30 15:42:58.747: DEBUG/dalvikvm(1379): HeapWorker thread shutting down

06-30 15:42:58.758: DEBUG/dalvikvm(1379): HeapWorker thread has shut down

06-30 15:42:58.768: DEBUG/jdwp(1379): JDWP shutting down net...

06-30 15:42:58.768: INFO/dalvikvm(1379): Debugger has detached; object registry had 1 entries

06-30 15:42:58.787: DEBUG/dalvikvm(1379): VM cleaning up

06-30 15:42:58.797: ERROR/AndroidRuntime(1379): ERROR: thread attach failed

06-30 15:42:59.027: DEBUG/dalvikvm(1379): LinearAlloc 0x0 used 638596 of 5242880 (12%)

06-30 15:42:59.287: INFO/System.out(231): User Exit->false

06-30 15:42:59.427: INFO/ActivityManager(51): Displayed activity com.ibkr.roadbrake/.RB_Login: 735 ms (total 735 ms)

06-30 15:43:01.848: WARN/KeyCharacterMap(231): No keyboard for id 0

06-30 15:43:01.858: WARN/KeyCharacterMap(231): Using default keymap: 
/system/usr/keychars/qwerty.kcm.bin

06-30 15:43:05.196: DEBUG/dalvikvm(106): GC freed 312 objects / 16168 bytes in 141ms

06-30 15:43:10.107: INFO/System.out(231): {"status":"SUCCESS","reason":"SUCCESS","response":{"userid":"1"}}

06-30 15:43:10.156: INFO/System.out(231): The Id is -- 1
06-30 15:43:10.247: INFO/System.out(231): Insert Start
06-30 15:43:10.257: INFO/System.out(231): Insert End
06-30 15:43:10.328: INFO/System.out(231): User not there in DB
06-30 15:43:10.367: INFO/System.out(231): 1false
06-30 15:43:10.388: INFO/System.out(231): 2true
06-30 15:43:10.417: INFO/System.out(231): 3false
06-30 15:43:10.417: INFO/System.out(231): 4false
06-30 15:43:10.417: INFO/System.out(231): 5false

06-30 15:43:10.447: INFO/ActivityManager(51): Starting activity: Intent { cmp=com.ibkr.roadbrake/.RB_UpcomingExits }

06-30 15:43:10.697: DEBUG/GpsLocationProvider(51): setMinTime 100

06-30 15:43:10.836: INFO/System.out(231): Request Value->GetUpcomingExits{strlatitude1=; strLongitude1=; strlatitude2=; strLongitude2=; nPrevHighway=0; headingdirection=0; strStates=; strHighways=; strCities=; strCategories=; strChains=; strCuisines=; strFavDishes=; strAlcohol=; strDining=; strFeatures=; totalRating=; restroomrating=; kidsrating=; strFoodQuality=; strServiceQuality=; strAtmosphere=; distance=; exits=; businesses=; keywords=; numReviews=; reviewedinLastDays=; rbPercent=; numFavs=; addedInLastDays=; strDiningReservations=; strDiningOthers=; strDiningOpenFor=; strPriceLow=; strPriceHigh=; strWifi=; strBusinessType=; nPage=1; nPageSize=2; }
06-30 15:43:11.178: INFO/ActivityManager(51): Displayed activity com.ibkr.roadbrake/.RB_UpcomingExits: 698 ms (total 698 ms)

06-30 15:43:11.236: INFO/System.out(231): Soap Method Error ->SoapFault - faultcode: 'soap:Server' faultstring: 'Server was unable to process request. ---> Input string was not in a correct format.' faultactor: 'null' detail: org.kxml2.kdom.Node@44e5e7b8

06-30 15:43:11.387: INFO/System.out(231): Error from WSResponse:java.lang.NullPointerException

06-30 15:43:19.666: INFO/ActivityManager(51): Starting activity: Intent { cmp=com.ibkr.roadbrake/.RB_StaticSearchFilters }

06-30 15:43:20.226: INFO/System.out(231): Filtertabopenornot:0

06-30 15:43:20.258: INFO/System.out(231): Request Value->GetUserSavedSearches{strUserName=mohan.g; }

06-30 15:43:20.797: INFO/ActivityManager(51): Displayed activity 
com.ibkr.roadbrake/.RB_StaticSearchFilters: 1089 ms (total 1089 ms)

06-30 15:43:21.137: INFO/System.out(231): web service response->{"status":"SUCCESS","reason":"SUCCESS","response":[{"filtersetId":4,"name":"CT-95 exit 55","description":"entities around 55 exit of 95 highway in CT","filters":{"State":"Connecticut","HighWay":"95","Exit":"55"}},{"filtersetId":13,"name":"secaucus \u003c 1mi","description":"sdf dsf ","filters":{"State":"New Jersey","City":"Secaucus","Distance":"\u003c= 1"}},{"filtersetId":14,"name":"exit 17","description":"","filters":{"State":"New Jersey","City":"Secaucus","Exit":"17","Distance":"\u003c= 1"}},{"filtersetId":16,"name":"businesses - one  review","description":"All businesses having at lease one review.","filters":{"MinNumReviews":"1"}},{"filtersetId":56,"name":"fastfood in californio","description":"california center","filters":{"State":"California,"}}]}

06-30 15:43:21.618: INFO/System.out(231): User selected spineer:Select saved search

06-30 15:43:21.618: INFO/System.out(231): User selected position:0

06-30 15:43:21.626: INFO/System.out(231): User selected getfiltersetId:0

thanks

Android
  • 8,995
  • 9
  • 67
  • 108
naresh
  • 155
  • 2
  • 6
  • 12
  • 1
    Please add the complete stacktrace from logcat to your post and possibly also the code part that is causing the error – THelper Jun 30 '11 at 09:56
  • in simulator its working fine but i am getting exception in device only. – naresh Jun 30 '11 at 10:06
  • If you do not know how to get the stacktrace from your device, then read [this post](http://stackoverflow.com/questions/3060982/logging-messages-from-real-device-on-logcat) or [this post](http://stackoverflow.com/questions/601503/how-do-i-obtain-crash-data-from-my-android-application) – THelper Jun 30 '11 at 10:13
  • posted the logcat file in the above. please see – naresh Jun 30 '11 at 10:30
  • i am not clear about enable USB. I need to enable the device usb or emulator usb. ? – naresh Jun 30 '11 at 10:43
  • i enabled the device(samsung) usb(in settings) but it doesn't show in the DDMS.please help me – naresh Jun 30 '11 at 10:46
  • Connect your device and run this command `adb devices` on your OS command-line. If your device is not listed, there is probably a driver problem. – THelper Jun 30 '11 at 11:11
  • How to open OS command line in device – naresh Jun 30 '11 at 11:27
  • No, not on your device! Use the command line of your computer. If the ADB doesn't detect your device, you won't have access to it in Eclipse DDMS either. Check [this post](http://stackoverflow.com/questions/2981498/android-sdk-not-recognizing-debug-able-device) – THelper Jun 30 '11 at 11:53

1 Answers1

0

The NPE I see in your stacktrace is caused by something called WSResponse. It looks like you are using a 3rd party library for WSDL/SOAP communications. Am I correct?

My guess is that the error message just above the NPE is causing the problem. According to the error message you are not formatting our "input string" properly, probably because you provided a null value. So first, check if the input string you are providing to your WSDL/SOAP library is correct.

If that doesn't help, check the API of this library and see if there is documentation on what may be causing the "Soap Method Error" in your stacktrace. If the API is open source you can also check the code of the WSResponse class to see what may be causing the NPE.

THelper
  • 15,333
  • 6
  • 64
  • 104