• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code works in debug but does not work in regular run

 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I renamed one of the local classes (Formatter.java to MyAppFormatter.java) in old perfectly working jar. I also renamed manually all refrences to this class in other classes. After compile, code works in debug and does not work in regular run. The developement was done in RAD 7.0. It runs on WedShere 5.1 server. Any suggestion?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My first guess would be a classpath or deployment issue.
 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. I verified classpath the first thing - it is correct. In regards of deployment - it works in debug mode, but when restart server in 'Run" does not work. The only change - class was renamed and all references to it chnaged.
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not sure what you mean by "Code Works" and "Code does not work"??
If you are talking about a specific functionality in your application then you might need to check the call to that method.
Sometime we tend to write something like this..


Now this will affect your program when you switch off the debugging and also comment out the SOP or debugging statement, as your callthismethod() will not be invoked as debug being false and your method call came in the conditional if statement.

You can check the specific code for thing like this..this may help.

Regards,
Amit
 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works when you start the server in "debug mode" (RAD or WSAD) and same version of the code does not work without any recompile when I start the server in "run mode". It gives "null". The servlet does not even go there. During the debug mode I do not stop in any methods. The difference is only in the way how the server started. I cannot debug it, because it works in debug, so going thru debugger does not help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic