• 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

IllegalStateException - Could not load 'DispatcherServlet.properties' issue

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dears ,

I spent more than 10 hours try to solve this problem but I lost !
Any help will be appreciated.

Am trying to deploy Spring MVC application on webshpere using RSA 7.5.

1- I created a new profile and adjusted all profile setting.
2- I created a new server to work with the new profile.
3- I configured the workspace class path with all the needed jars.

But while publishing/starting the application on the server I always found the below exception.



I can't understand why he couldn't load DispatcherServlet.properties while it is already exist at spring-webmvc.jar in my webinf/lib

Thanks in advance.
 
Ranch Hand
Posts: 43
Spring Tomcat Server Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it is fast to reinstall RSA, I would do so, but I think it is not.

Anyway, reinstalling sounds funny.

But just in case this is a proprietary bug in the IBM software, maybe you can temporarily extract that DispatcherServlet.properties into a location that you are sure is in the classpath.

Below is a code from https://github.com/spring-projects/spring-framework/blob/master/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java.



Based on above, the DispatcherServlet.properties must be in the same path as the DispatcherServlet.class file.
 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks John ,

But as i told DispatcherServlet.properties is already exist at spring-webmvc.jar in my webinf/lib.

I can try your suggestion , please inform which class path you mean ?

1- Java build path under configure build path at RSA workspace
2- From WAS admin console Application servers > server1 > Process Definition > Java Virtual Machine > Classpath
 
John Cruz
Ranch Hand
Posts: 43
Spring Tomcat Server Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try inside web-inf/classes/org/springframework/web/servlet/DispatcherServlet.properties

It probably gets deleted when you build, so try put together in your main source like: /src/main/java/org/springframework/web/servlet/DispatcherServlet.properties

This is a workaround just in case it is an RSA bug.
 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello John,

Thanks again for your help.

I tried what you mentioned to insert DispatcherServlet.properties at

web-inf/classes/org/springframework/web/servlet/DispatcherServlet.properties
/src/main/java/org/springframework/web/servlet/DispatcherServlet.properties

But then I faced another strange issue that my spring context file is invalid; nested exception is org.xml.sax.SAXParseException: Content is not allowed in prolog.
While my WEB-INF/ECorp-Spring-Context.xml taken from my colleague which doesn't have any issue.

Any ideas about this?



 
John Cruz
Ranch Hand
Posts: 43
Spring Tomcat Server Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im sure you are frustrated already as these problems has nothing to do with your programs.

Better take a step back, isolate the problem.

I wonder if you can just re-setup things somewhere else.

Like, build and/or deploy in another machine (like your teammate's), and see if your code works. If yes, then your workspace or RSA-proprietary stuff are the problem. I would just reinstall even if it takes a day. You see, now you already spent more than a day on this thing.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic