This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes Problem in Debug mode only, works in Run mode! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Problem in Debug mode only, works in Run mode!" Watch "Problem in Debug mode only, works in Run mode!" New topic
Author

Problem in Debug mode only, works in Run mode!

Daniel Moussa
Greenhorn

Joined: Jul 07, 2008
Posts: 20
If I start my WAS 5.1 in debug mode I get crazy pile of exceptions during the startup. I have a Struts 1 project that runs inside an EAR project on WAS 5.1.
Starting WAS in Run mode works fine, problem only in Debug mode.
The Struts project also used Spring and Hibernate.

The console throws all sorts of errors mainly related to class-loader confusion that I cannot list all here, but here is a glimpse of my nightmare with WAS 5.1:
The following console error gets thrown hundred times.



after hundred times of this error it throws this exception saying it cannot load the Servlet. Aparantly the Servlet crashed during init:



If this sounds familiar, please help!
This only happens in Debug mode, Run mode is manageable

Thanks to all..
Daniel
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3199
    
    5
Please, try to switch WAS classloader to PARENT_LAST mode: this will give your application's classloader higher priority.

Read more here and here.

HTH,
MZ


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Daniel Moussa
Greenhorn

Joined: Jul 07, 2008
Posts: 20
Many thanks Mikalai (well done on the SCEA Study Guide ),
I tried that with different "WAR classloader Policy" modes (Module/Application). The crashes are gone, but so as the application which fails to start.

Class Loader Setup:
for [my EAR App]
Classloader mode: PARENT_LAST
WAR Class Loader Policy: APPLICATION
Start weight: 10

For [my Web module]
Classloader mode: PARENT_LAST
Start weight: 10000

There is that fine tuning mystery which I don't know yet!
See console below:



back to my wall
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3199
    
    5
Hi,

It's not possible to tell exactly why it failed to start - too few info in logs.

Quick question: do you have WAR file name with spaces ? Good practice is to give EAR/WAR names without spaces (as well as deploy EARs to folders without spaces)

Regards,
MZ
Daniel Moussa
Greenhorn

Joined: Jul 07, 2008
Posts: 20
Hi,
No spaces in my EAR and WEB (I just replaced the real names with aliases, sorry if that confused).

Thanks,

Daniel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Debug mode only, works in Run mode!
 
Similar Threads
WSAD Relies on PARENT_FIRST classloading to support webservices
Linkage error in debug mode only
GZipFilter inside JSP and WSAD 5.1.1
forEach taglib problem with IBM WSAD 5.1
web project dependency