6

I'm trying to deploy my application through IntelliJ IDEA 11.0, and it is giving me the following error:

09:35:52,997 WARN  [JAXWSDeployerHookPreJSE] Cannot load servlet class: org.springframework.web.servlet.ViewRendererServlet
09:35:52,999 INFO  [TomcatDeployer] deploy, ctxPath=/my-portlet-1.0, warUrl=.../tmp/deploy/tmp555932443707493677my-portlet-1.0-exp.war/
09:35:53,386 ERROR [0]] Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
    ...
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
09:35:53,391 ERROR [0]] Skipped installing application listeners due to previous error(s)
09:35:53,391 ERROR [StandardContext] Error listenerStart
09:35:53,391 ERROR [StandardContext] Context [/my-portlet-1.0] startup failed due to previous errors
09:35:53,402 WARN  [ServiceController] Problem starting service jboss.web.deployment:war=my-portlet-1.0.war,id=-135869088
org.jboss.deployment.DeploymentException: URL file:/C:/JBOSS/jboss-portal-2.7.2/server/default/tmp/deploy/tmp555932443707493677my-portlet-1.0-exp.war/ deployment failed
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:386)
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
    ...
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
09:35:53,407 ERROR [MainDeployer] Could not start deployment: file:C:/Users/Abbas/Projects/my-app/my-portlet/target/my-portlet-1.0.war
org.jboss.deployment.DeploymentException: URL file:/C:/JBOSS/jboss-portal-2.7.2/server/default/tmp/deploy/tmp555932443707493677my-portlet-1.0-exp.war/ deployment failed
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:386)
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
    ...
    at java.lang.Thread.run(Thread.java:662)
[2012-07-25 09:35:53,431] Artifact my-portlet:war: Error during artifact deployment. See server log for details.

Does anyone know how to fix this?

3
  • can you post your project's dependencies (pom.xml file or libraries used)? Commented Jul 25, 2012 at 10:17
  • pom.xml: pastebin.com/35Efzzrc Commented Jul 25, 2012 at 10:48
  • 1
    It's weird, because org.springframework.web.context.ContextLoaderListener is inside org.springframework-3.0.4.RELEASE.jar and is present in your pom.xml file. Check your classpath / war file and ensure this jar is in right place. Commented Jul 25, 2012 at 11:01

2 Answers 2

1

Actually I was also facing the same problem and after wasting a lot of time. I realized that actually it is a very silly error. You must have changed the pom file and update the dependencies. But once we do so the jar files of maven dependencies are removed from deployment Assembly.

All you need to do is:

  • Right click the project folder.
  • click on properties.
  • click on Web Deployment Assembly.
  • check if maven dependencies are listed or not.
  • if not click the add button
  • from the list select the maven dependencies and done, apply and OK!

Hope this solve your problem. If you still have it!

Sign up to request clarification or add additional context in comments.

Comments

0

ContextLoaderListener is in org.springframework.web-3.0.4.RELEASE.jar

You mentioned a file called org.springframework-3.0.4.RELEASE.jar, which is different.

Maybe you have a typo in your dependencies file?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.