• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Code works in debug but does not work in regular run

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic