facebook

Pn with Spring launcher listener

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #272732 Reply

    PERRYALAIN
    Member

    Hi,

    I’m very disappointed.
    I’ve got a web app under Eclipse (3.2) and Sysdeo Tomcat plug-in.
    This web app use the Spring Framework and works fine.

    I want to migrate this web app under MyEclipse.
    I tried first MyEclipse 5.5.1 and then MyEclipse 6.
    In both cases, I get the same beheavior :
    Tomcat tells that it can’t find the ContextLoaderListener ; here is the trace :

    ERROR [main] – Erreur lors de la configuration de la classe d’écoute de l’application (application listener) org.springframework.web.context.ContextLoaderListener
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    ERROR [main] – L’installation des écouteurs (listeners) de l’application a été sautée suite aux erreurs précédentes

    In fact, when I give Spring capabilities to a project, the libraries uploaded don’t have this package at all (neither Spring 1, nor Spring 2).
    So I suppressed MyEclipse Spring capabilities and I copied the spring.jar from my right project under Eclipse/Tomcat Plugin into my WEB-INF/lib under MyEclipse, and put it in the classpath.
    Of course, the spring.jar gets the cllass in the right package, but impossible to get a right launch from Tomcat.

    How is it possible ; what’s wrong with me ; it seems so basic and I spent so much time on this problem.

    Thanks very very very much for a good idea.

    Regards

    #272763 Reply

    Riyad Kalla
    Member

    Please remove the spring.jar you added to your /lib dir, and then go back to your Java Build Path, to the Libraries tab, and the Spring Core and Spring Web (2.0 if you like) back to your biuld path as seen in the screenshot below.

    The classes you need are in the Spring Web library.

    Attachments:
    You must be logged in to view attached files.
    #272794 Reply

    PERRYALAIN
    Member

    @support-rkalla wrote:

    Please remove the spring.jar you added to your /lib dir, and then go back to your Java Build Path, to the Libraries tab, and the Spring Core and Spring Web (2.0 if you like) back to your biuld path as seen in the screenshot below.

    The classes you need are in the Spring Web library.

    Thanks a lot, a lot, a lot.
    I had to place somes others lib (like spring-webmvc and some dependancies) but you gave me the right direction ; again thanks.

    By the way, when you give capabilities to a project (by the appropriate menu/item), then suppress (by hand) theses capabilities, you could not use anymore the possibility to give back theses capabilities, because the item has became disable in the menu.
    The consequence is that it is harder to get the right lib by hand.
    Well, couldn’t be possible to edit some parameter file where it is marked that the project has capabilities, and that way find again the initial use of the menu/item ?

    #272846 Reply

    Riyad Kalla
    Member

    Thanks a lot, a lot, a lot.
    I had to place somes others lib (like spring-webmvc and some dependancies) but you gave me the right direction ; again thanks.

    I’m glad it helped.

    By the way, when you give capabilities to a project (by the appropriate menu/item), then suppress (by hand) theses capabilities, you could not use anymore the possibility to give back theses capabilities, because the item has became disable in the menu.

    If you mean the libraries (for example, you forget to add all the libraries the first time) you can always get back to them from the Libraries tab, under Add Library then “MyEclipse Libraries”.

    Well, couldn’t be possible to edit some parameter file where it is marked that the project has capabilities, and that way find again the initial use of the menu/item ?

    It’s possible to manually remove capabilities by removing those natures from the .project file, but it’s not encouraged.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Pn with Spring launcher listener

You must be logged in to post in the forum log in