Announcement Announcement Module
Collapse
No announcement yet.
STS 2.7.1 ThreadLocalLeakPreventionListener ClassNotFound for a tomcat-6 server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS 2.7.1 ThreadLocalLeakPreventionListener ClassNotFound for a tomcat-6 server

    Hello:

    I'm trying to create in STS 2.7.1 a server using as Runtime Environment a tomcat-6 version (and a IBM RAD 7 JRE) as I did in STS 2.6.1, but it doesn't work. I had no problems in STS 2.6.1 with the same configuration.

    I presume that the problem relies on the existing spring-insight-instance that it's available to use when creating a new server.

    The one from the vfabric-tc-server-developer, the server that comes with STS 2.7.1, creates a server not compatible with tomcat-6, in spite the fact that it has a tomcat-6.0.32.B.RELEASE.

    The server.xml that it's created within the new server contains a Listener whose class (org.apache.catalina.core.ThreadLocalLeakPreventio nListener) is only available in tomcat 7:
    Code:
    GRAVE: Begin event threw exception
    java.lang.ClassNotFoundException: org.apache.catalina.core.ThreadLocalLeakPreventionListener
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:496)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
    	at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
    	at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
    	at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1378)
    	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1664)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:618)
    	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    In order to avoid these problems using as Runtime Environment, the one from the STS 2.6.1, I mean, in the Server Runtime Environment configuration (Preferences -> Servers) I use the STS 2.6.1 directory ([STS_ROOT]\springsource-2.6.0\tc-server-developer-2.1.1.RELEASE) and it works.

    It's also possible to copy an existing server.xml file to the new server. I used the one from the server that I created in the STS 2.6.1.

    However, if you don't have a previous STS version, you can't do that.

    Can you take a look to this issue?

    Thanks.

  • #2
    Hi!

    How exactly did you create the server instance within STS? I tried to reproduce the problem, but I don't see the error.

    Here is what I tried:
    - startup STS 2.7.1
    - create a new server from the Servers view
    - select vFabric tc Server 2.5
    - clicked on the "add" hyperlink behind the "Server runtime environment" dropdown
    - chose the vFabric tc Server installation directory that comes with STS 2.7.1 (tc Server 2.5)
    - selected Tomcat 6 from the dropdown at the bottom, gave the server a name and pressed "Finish"
    - clicked "next" on the create new server dialog and selected "create new instance", pressed "next"
    - selected, for example, "base" and "bio" from the list of choices, gave the instance a name and pressed "next", followed by "finish"

    Now I have a tomcat-6-based tc Server instance in my servers view that starts fine and lets you deploy apps into it. And this instance is completely separated from the spring-insight-instance that was created automatically using the tomcat-7-based tc Server config.

    Can you try this within your setting to see if that works there as well?

    HTH,
    Martin

    Comment


    • #3
      Thank you very much for the response.

      It worked as you said.

      The problem, as you expected, was that I chose the existing spring-insight-instance instead of creating a new one.

      Now I have my problem solved but a lot of questions about tc server

      Only one, if you don't mind: what are the templates used in the creation of the spring-insight-instance?

      I don't want to bother you, so I supose the next step is to go to http://static.springsource.com/proje...g-started.html

      While I am writing this answer, I realize that there are a difference in the "Templates Provided by tc Runtime", the version 2.5 adds 3 base templates: one general, another for tomcat 6 and the last for tomcat 7.

      This was my error as you guessed right.

      Thank you very much again.

      P.S.: apologies for any weird expression, but I'm Spanish. I do the best I can with the English language.

      Comment


      • #4
        STS creates a default instance using just the insight template. I don't know in detail what other parts that template contains (I guess it will use base and bio, but it is just a guess).
        Put your link to the tc server documentation seem to be the right point to look for further information.

        Originally posted by jbbarquero View Post
        P.S.: apologies for any weird expression, but I'm Spanish. I do the best I can with the English language.
        No problem at all... I am also not a native speaker... :-)

        Cheers,
        -Martin

        Comment


        • #5
          Thanks and cheers

          Javier.
          Last edited by jbbarquero; Aug 31st, 2011, 08:14 AM. Reason: typo

          Comment

          Working...
          X