aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes org.springframework.web.context.ContextLoaderListener not found / IntelliJ and Glassfish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "org.springframework.web.context.ContextLoaderListener not found / IntelliJ and Glassfish" Watch "org.springframework.web.context.ContextLoaderListener not found / IntelliJ and Glassfish" New topic
Author

org.springframework.web.context.ContextLoaderListener not found / IntelliJ and Glassfish

J Krewson
Greenhorn

Joined: Oct 10, 2007
Posts: 7

In the past, I have developed Spring apps using IntelliJ and Glassfish, yet I still am rather new to this. I am currently running up against an error that is driving me nuts a bit.

When attempting to run an app in Glassfish via the IntelliJ interface, I receive the following error:

[#|2009-11-02T18:14:54.322-0500|SEVERE|glassfish|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|WebModule[/util/UserManager]PWC1257: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.glassfish.web.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2009)

I have confirmed that the spring.jar is in fact ending up in the .war filed generated from the build.

My web.xml file contains the following listener configuration:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

I am not sure how to proceed, as I have confirmed that the spring.jar is in fact ending up in the compiled .war file, located here: out\Web.war\WEB-INF\lib\

Attached is the list of lib files.

Any help or troubleshooting suggestions would be greatly appreciated.






[Thumbnail for lib.jpg]

Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3938
    
  17

Sorry, not a GlassFish user, but does GlassFish have a working directory where it expands the WAR file? Could it be a mismatch between the deployed (exploded) WAR and the WAR you are putting into the directory for deployment? Just a guess, but if you put the new WAR in, then go and delete the application's working directory structure it might solve the problem. Also, I think GlassFish has a manual deployment page where you can redeploy an app from a web interface. Try using that and/or restarting the application or the entire GlassFish server.


Steve
J Krewson
Greenhorn

Joined: Oct 10, 2007
Posts: 7
I appreciate the input. I believe my problem(s) stem from the fact that I don't understand why Glassfish needs various jars that my app has already bundled. It seems, at first try, that using the IDE helper simply allows one to create a config for app deployment and doesn't check to make sure Glassfish has the .jars needed to deploy the app.

Thanks again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.springframework.web.context.ContextLoaderListener not found / IntelliJ and Glassfish
 
Similar Threads
Error listenerStart : Using spring with tomcat
struts2-spring-plugin-2.0.11
Spring Framework configuration
Trying to deploy an web application on tomcat 6 and getting following error:
Unable to load configuration - struts-plugin.xml on Struts 2 startup