Running java Code Throws Exception while Debugging Code Doesn't [closed]









up vote
-4
down vote

favorite












So whenever I start my java class it throws an exception.
When I debug the exact same java class it works perfectly (without exception)!



I'm using Eclipse as IDE and I'm using JRE 1.7.



Any ideas?










share|improve this question















closed as off-topic by yshavit, Majid, Thomas Fritsch, Thorbjørn Ravn Andersen, GBlodgett Nov 10 at 19:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – yshavit, Majid, Thomas Fritsch, GBlodgett
If this question can be reworded to fit the rules in the help center, please edit the question.












  • What exception? And code as well.
    – Nicholas K
    Nov 10 at 18:02











  • Can you show the exception?
    – Hélio Márcio Filho
    Nov 10 at 18:02






  • 4




    And it's not complaining. You haven't included enough information for use to be able to help. Us blindly guessing isn't very helpful.
    – Carcigenicate
    Nov 10 at 18:17







  • 1




    @gala_m Because the most likely explanation is either that the string being passed or the behavior of the function is changing depending on how the program is run (and again, without sufficient context, we can't say for sure), or your debugger is swallowing an exception for some reason, which depends on how you have it configured. Eliminating the first case is a good start to debugging this. Post the function causing the error, and verify that the data is in fact the same between runs/not unexpected.
    – Carcigenicate
    Nov 10 at 18:25







  • 2




    The exception occurs inside the method getProfessionalQualifications. Showing only how it's called without the implementation doesn't really help. Also it would be useful to show what values username and password have when running the program normally and when debugging.
    – QBrute
    Nov 10 at 19:59














up vote
-4
down vote

favorite












So whenever I start my java class it throws an exception.
When I debug the exact same java class it works perfectly (without exception)!



I'm using Eclipse as IDE and I'm using JRE 1.7.



Any ideas?










share|improve this question















closed as off-topic by yshavit, Majid, Thomas Fritsch, Thorbjørn Ravn Andersen, GBlodgett Nov 10 at 19:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – yshavit, Majid, Thomas Fritsch, GBlodgett
If this question can be reworded to fit the rules in the help center, please edit the question.












  • What exception? And code as well.
    – Nicholas K
    Nov 10 at 18:02











  • Can you show the exception?
    – Hélio Márcio Filho
    Nov 10 at 18:02






  • 4




    And it's not complaining. You haven't included enough information for use to be able to help. Us blindly guessing isn't very helpful.
    – Carcigenicate
    Nov 10 at 18:17







  • 1




    @gala_m Because the most likely explanation is either that the string being passed or the behavior of the function is changing depending on how the program is run (and again, without sufficient context, we can't say for sure), or your debugger is swallowing an exception for some reason, which depends on how you have it configured. Eliminating the first case is a good start to debugging this. Post the function causing the error, and verify that the data is in fact the same between runs/not unexpected.
    – Carcigenicate
    Nov 10 at 18:25







  • 2




    The exception occurs inside the method getProfessionalQualifications. Showing only how it's called without the implementation doesn't really help. Also it would be useful to show what values username and password have when running the program normally and when debugging.
    – QBrute
    Nov 10 at 19:59












up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











So whenever I start my java class it throws an exception.
When I debug the exact same java class it works perfectly (without exception)!



I'm using Eclipse as IDE and I'm using JRE 1.7.



Any ideas?










share|improve this question















So whenever I start my java class it throws an exception.
When I debug the exact same java class it works perfectly (without exception)!



I'm using Eclipse as IDE and I'm using JRE 1.7.



Any ideas?







java eclipse debugging






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 19:33

























asked Nov 10 at 18:00









gala_m

46




46




closed as off-topic by yshavit, Majid, Thomas Fritsch, Thorbjørn Ravn Andersen, GBlodgett Nov 10 at 19:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – yshavit, Majid, Thomas Fritsch, GBlodgett
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by yshavit, Majid, Thomas Fritsch, Thorbjørn Ravn Andersen, GBlodgett Nov 10 at 19:22


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – yshavit, Majid, Thomas Fritsch, GBlodgett
If this question can be reworded to fit the rules in the help center, please edit the question.











  • What exception? And code as well.
    – Nicholas K
    Nov 10 at 18:02











  • Can you show the exception?
    – Hélio Márcio Filho
    Nov 10 at 18:02






  • 4




    And it's not complaining. You haven't included enough information for use to be able to help. Us blindly guessing isn't very helpful.
    – Carcigenicate
    Nov 10 at 18:17







  • 1




    @gala_m Because the most likely explanation is either that the string being passed or the behavior of the function is changing depending on how the program is run (and again, without sufficient context, we can't say for sure), or your debugger is swallowing an exception for some reason, which depends on how you have it configured. Eliminating the first case is a good start to debugging this. Post the function causing the error, and verify that the data is in fact the same between runs/not unexpected.
    – Carcigenicate
    Nov 10 at 18:25







  • 2




    The exception occurs inside the method getProfessionalQualifications. Showing only how it's called without the implementation doesn't really help. Also it would be useful to show what values username and password have when running the program normally and when debugging.
    – QBrute
    Nov 10 at 19:59
















  • What exception? And code as well.
    – Nicholas K
    Nov 10 at 18:02











  • Can you show the exception?
    – Hélio Márcio Filho
    Nov 10 at 18:02






  • 4




    And it's not complaining. You haven't included enough information for use to be able to help. Us blindly guessing isn't very helpful.
    – Carcigenicate
    Nov 10 at 18:17







  • 1




    @gala_m Because the most likely explanation is either that the string being passed or the behavior of the function is changing depending on how the program is run (and again, without sufficient context, we can't say for sure), or your debugger is swallowing an exception for some reason, which depends on how you have it configured. Eliminating the first case is a good start to debugging this. Post the function causing the error, and verify that the data is in fact the same between runs/not unexpected.
    – Carcigenicate
    Nov 10 at 18:25







  • 2




    The exception occurs inside the method getProfessionalQualifications. Showing only how it's called without the implementation doesn't really help. Also it would be useful to show what values username and password have when running the program normally and when debugging.
    – QBrute
    Nov 10 at 19:59















What exception? And code as well.
– Nicholas K
Nov 10 at 18:02





What exception? And code as well.
– Nicholas K
Nov 10 at 18:02













Can you show the exception?
– Hélio Márcio Filho
Nov 10 at 18:02




Can you show the exception?
– Hélio Márcio Filho
Nov 10 at 18:02




4




4




And it's not complaining. You haven't included enough information for use to be able to help. Us blindly guessing isn't very helpful.
– Carcigenicate
Nov 10 at 18:17





And it's not complaining. You haven't included enough information for use to be able to help. Us blindly guessing isn't very helpful.
– Carcigenicate
Nov 10 at 18:17





1




1




@gala_m Because the most likely explanation is either that the string being passed or the behavior of the function is changing depending on how the program is run (and again, without sufficient context, we can't say for sure), or your debugger is swallowing an exception for some reason, which depends on how you have it configured. Eliminating the first case is a good start to debugging this. Post the function causing the error, and verify that the data is in fact the same between runs/not unexpected.
– Carcigenicate
Nov 10 at 18:25





@gala_m Because the most likely explanation is either that the string being passed or the behavior of the function is changing depending on how the program is run (and again, without sufficient context, we can't say for sure), or your debugger is swallowing an exception for some reason, which depends on how you have it configured. Eliminating the first case is a good start to debugging this. Post the function causing the error, and verify that the data is in fact the same between runs/not unexpected.
– Carcigenicate
Nov 10 at 18:25





2




2




The exception occurs inside the method getProfessionalQualifications. Showing only how it's called without the implementation doesn't really help. Also it would be useful to show what values username and password have when running the program normally and when debugging.
– QBrute
Nov 10 at 19:59




The exception occurs inside the method getProfessionalQualifications. Showing only how it's called without the implementation doesn't really help. Also it would be useful to show what values username and password have when running the program normally and when debugging.
– QBrute
Nov 10 at 19:59












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Except from having different configurations, debug mode may invoke assignment / initialization code used in Expressions tab which will prevent/cause errors as NullPointerException/StringIndexOutOfBoundsException






share|improve this answer




















  • No, there aren't any expressions - so there is no NullPointerException
    – gala_m
    Nov 10 at 18:03










  • @gala_m can you show code and exception?
    – user7294900
    Nov 10 at 18:05










  • @gala_m when you Run as Java or maybe as Test? How to you execute the Run?
    – user7294900
    Nov 10 at 18:07










  • I run my code and debug direct from my IDE Eclipse - Check my Question again
    – gala_m
    Nov 10 at 18:09











  • @gala_m click run configuration and debug configuration and compare the arguments sent
    – user7294900
    Nov 10 at 18:14

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Except from having different configurations, debug mode may invoke assignment / initialization code used in Expressions tab which will prevent/cause errors as NullPointerException/StringIndexOutOfBoundsException






share|improve this answer




















  • No, there aren't any expressions - so there is no NullPointerException
    – gala_m
    Nov 10 at 18:03










  • @gala_m can you show code and exception?
    – user7294900
    Nov 10 at 18:05










  • @gala_m when you Run as Java or maybe as Test? How to you execute the Run?
    – user7294900
    Nov 10 at 18:07










  • I run my code and debug direct from my IDE Eclipse - Check my Question again
    – gala_m
    Nov 10 at 18:09











  • @gala_m click run configuration and debug configuration and compare the arguments sent
    – user7294900
    Nov 10 at 18:14














up vote
0
down vote













Except from having different configurations, debug mode may invoke assignment / initialization code used in Expressions tab which will prevent/cause errors as NullPointerException/StringIndexOutOfBoundsException






share|improve this answer




















  • No, there aren't any expressions - so there is no NullPointerException
    – gala_m
    Nov 10 at 18:03










  • @gala_m can you show code and exception?
    – user7294900
    Nov 10 at 18:05










  • @gala_m when you Run as Java or maybe as Test? How to you execute the Run?
    – user7294900
    Nov 10 at 18:07










  • I run my code and debug direct from my IDE Eclipse - Check my Question again
    – gala_m
    Nov 10 at 18:09











  • @gala_m click run configuration and debug configuration and compare the arguments sent
    – user7294900
    Nov 10 at 18:14












up vote
0
down vote










up vote
0
down vote









Except from having different configurations, debug mode may invoke assignment / initialization code used in Expressions tab which will prevent/cause errors as NullPointerException/StringIndexOutOfBoundsException






share|improve this answer












Except from having different configurations, debug mode may invoke assignment / initialization code used in Expressions tab which will prevent/cause errors as NullPointerException/StringIndexOutOfBoundsException







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 10 at 18:03









user7294900

17.9k93056




17.9k93056











  • No, there aren't any expressions - so there is no NullPointerException
    – gala_m
    Nov 10 at 18:03










  • @gala_m can you show code and exception?
    – user7294900
    Nov 10 at 18:05










  • @gala_m when you Run as Java or maybe as Test? How to you execute the Run?
    – user7294900
    Nov 10 at 18:07










  • I run my code and debug direct from my IDE Eclipse - Check my Question again
    – gala_m
    Nov 10 at 18:09











  • @gala_m click run configuration and debug configuration and compare the arguments sent
    – user7294900
    Nov 10 at 18:14
















  • No, there aren't any expressions - so there is no NullPointerException
    – gala_m
    Nov 10 at 18:03










  • @gala_m can you show code and exception?
    – user7294900
    Nov 10 at 18:05










  • @gala_m when you Run as Java or maybe as Test? How to you execute the Run?
    – user7294900
    Nov 10 at 18:07










  • I run my code and debug direct from my IDE Eclipse - Check my Question again
    – gala_m
    Nov 10 at 18:09











  • @gala_m click run configuration and debug configuration and compare the arguments sent
    – user7294900
    Nov 10 at 18:14















No, there aren't any expressions - so there is no NullPointerException
– gala_m
Nov 10 at 18:03




No, there aren't any expressions - so there is no NullPointerException
– gala_m
Nov 10 at 18:03












@gala_m can you show code and exception?
– user7294900
Nov 10 at 18:05




@gala_m can you show code and exception?
– user7294900
Nov 10 at 18:05












@gala_m when you Run as Java or maybe as Test? How to you execute the Run?
– user7294900
Nov 10 at 18:07




@gala_m when you Run as Java or maybe as Test? How to you execute the Run?
– user7294900
Nov 10 at 18:07












I run my code and debug direct from my IDE Eclipse - Check my Question again
– gala_m
Nov 10 at 18:09





I run my code and debug direct from my IDE Eclipse - Check my Question again
– gala_m
Nov 10 at 18:09













@gala_m click run configuration and debug configuration and compare the arguments sent
– user7294900
Nov 10 at 18:14




@gala_m click run configuration and debug configuration and compare the arguments sent
– user7294900
Nov 10 at 18:14



這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3