Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Petclinic: Unable to read TLD "META-INF/c.tld"

  1. #1
    Join Date
    Jun 2008
    Location
    Zurich, Switzerland - Freiburg i. Breisgau, Germany
    Posts
    102

    Default Petclinic: Unable to read TLD "META-INF/c.tld"

    Hi,

    I have downloaded the petclinic source from the trunk svn. With mvn package I have create the war file as well.

    Now when starting it under Tomcat 6.0.24 I am getting this exception:
    org.apache.jasper.JasperException: /WEB-INF/jsp/uncaughtException.jsp(1,1) Unable to read TLD "META-INF/c.tld" from JAR file "file:/D:/Blistering/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/org.springframework.samples.petclinic/WEB-INF/lib/com.springsource.javax.servlet.jsp.jstl-1.2.0.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

    I can see that the com.springsource.javax.servlet.jsp.jstl-1.2.0.jar is in the war file.

    Does somebody know how to solve this problem?

    Thanks Tai
    Tai Truong
    pointsoftware.ch

  2. #2
    Join Date
    Apr 2010
    Posts
    9

    Default me too...

    Hi,

    I am having a very similar problem.

    Using STS 2.3.2. Created a project using : New -> Project -> SpringSourceToolSuite -> SpringTemplateProject -> SpringMVCProject

    When I RunAs -> RunOnServer -> SpringSourceTcServer6.0, I get basically the same error message.
    I also tried creating a SpringWebFlow project (via New -> Project -> SpringSourceToolSuite -> SpringTemplateProject), and that also has the same problem.

    Surely, this should be pretty basic stuff, right??

    Any idea would be greatly appreciated.

    Cheers,
    Gareth

  3. #3
    Join Date
    Jun 2008
    Location
    Zurich, Switzerland - Freiburg i. Breisgau, Germany
    Posts
    102

    Default

    When deploying the war file directly under tomcat it works fine. But running the petclinic project inside eclipse it just fails.

    I have also tried to rename the project from org.springframework.samples.petclinic to petclinic but that didn't help either.
    Tai Truong
    pointsoftware.ch

  4. #4
    Join Date
    Jun 2008
    Location
    Zurich, Switzerland - Freiburg i. Breisgau, Germany
    Posts
    102

    Default

    I tried to copy com.springsource.org.apache.taglibs.standard-1.1.2.jar to \apache-tomcat-6.0.26\lib but the same problem appears.

    This looks like a classloading problem with eclipse. Also copying org.springframework.instrument.tomcat-3.0.0.RELEASE.jar into tomcat's lib folder and modifying petclinic's context.xml by using a tomcat class loader didn't help.

    What annoys me is that the petclinic.war running outside eclipse/directly under tomcat is just working fine.

    Tai
    Tai Truong
    pointsoftware.ch

  5. #5
    Join Date
    Apr 2010
    Posts
    9

    Default

    Hi,

    as you say, it's frustrating that manually deploying the war file works ok (though, I guess it's better than not working at all!).

    What I don't understand though, is how there aren't hundreds of people all experiencing the same problem!

    Last week, I managed to get one of the examples from the "Spring Recipes" book working, using Spring 2.5. I did this by creating a "Dynamic Web Project", and manually added the various libraries.

    My problems started when using a "Spring Template Project". I'm (obviously) new to Spring, and also to Maven... and I suspect it's the latter where the problem lies.

    Anyway, I am just about to start another day of trying to get to grips with this stuff. Hopefully, today will be less frustrating...

    Gareth

  6. #6
    Join Date
    Jan 2008
    Posts
    3

    Default

    Try downgrading jstl version to 1.1.2

  7. #7
    Join Date
    Dec 2008
    Posts
    11

    Default

    Did anyone find a way around this?

    Quote Originally Posted by elixirsol View Post
    Using STS 2.3.2. Created a project using : New -> Project -> SpringSourceToolSuite -> SpringTemplateProject -> SpringMVCProject

    When I RunAs -> RunOnServer -> SpringSourceTcServer6.0, I get basically the same error message.
    <snip>
    Surely, this should be pretty basic stuff, right??
    Absolutely! I checked out a couple of samples from the SpringSource SVN repository and tried running them with the STS-provided tcServer, and got this error. I've tried all sort of variations of Maven builds (on command line and using m2eclipse functionality) but to no effect.

    I'm the first to admit that I've been mollycoddled with IDEs and servers that "just work" without me having to run builds and manually deploy WARs etc. I'm happy to learn this stuff. But it seems to me that if SpringSource is going to all this effort to convert their sample projects to Maven and to create STS with a one-click installation of Tomcat, we really shouldn't be getting stuck at this point! At least there could be slightly more help in the README?

  8. #8
    Join Date
    Aug 2010
    Posts
    1

    Default

    I met the same problem with other spring's web-app.

    If project is built by maven try change dependency scope to provided for jars : servlet-api and jsp-api
    Code:
    <dependency>
    	<groupId>javax.servlet</groupId>
    	<artifactId>servlet-api</artifactId>
    	<version>2.5</version>
    	<scope>provided</scope>
    </dependency>
    <dependency>
    	<groupId>javax.servlet.jsp</groupId>
    	<artifactId>jsp-api</artifactId>
    	<version>2.1</version>
    	<scope>provided</scope>
    </dependency>
    and build project by maven.

    If you run project by eclipse remove 2 jars from path below
    Code:
    WORKSPACE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PROJECT_NAME/WEB-INF/lib
    or in settings tell eclipse to not add 2 jars to app.war

  9. #9
    Join Date
    Jun 2007
    Posts
    16

    Default

    I gotta say this is ridiculous. I have tried everything to make a simple template work, and it just doesn't. I am using Helios with the nightly build of STS installed. I create a template project and it first complains about <resources> in the XML configuration, then I get this exact same problem at deployment. I've even created brand new workspaces.

    The solution about changing the scope to provided is moot because that's thew ay it shows up already from the template. I'm losing patience with STS entirely.

  10. #10

    Default

    Checkout the code from trunk repo of petclinic repo https://anonsvn.springframework.org/svn/spring-samples

    Right click on the project -> run on server -> springsource tc server works like a charm!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •