facebook

JasperException because jsp-api.jar is deployed

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

    Martin
    Member

    Hi,

    we use maven2 for the build and let the maven-eclipse-plugin create our eclipse configuration files (m2eclipse is not working well with our project). We defined the dependencies to the standard JEE libs as usual with scope “provided” in our poms. The problem is, that jsp-api.jar is added to the build-path by the maven-eclipse-plugin, and therefore myeclipse deploys it to the server (Tomcat 6) in WEB-INF/lib, which leads to a JasperException when accessing the app. (“Unable to read TLD “META-INF/fmt.tld” from JAR file “file:/D:/Projekte/epa/install/apache-tomcat-6.0.18/webapps/epa-web/WEB-INF/lib/jstl-1.2.jar”: org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlFmtTLV…”

    How can I make myeclipse access the jsp-api.jar when compiling the sources but NOT deploy the jsp-api.jar to Tomcat?

    Regards,
    Martin.

    #293887 Reply

    Riyad Kalla
    Member

    Martin,

    You can work with the Deployment rules under the project properties > Web > Deployment and re-add that JAR in some way that it’s filtered out… for example, filter out User Libraries, then create a single user library with that JAR and add it to the project.

    #294029 Reply

    Martin
    Member

    Hmm, adding the jar again as a user library does not work, because it’s already added. The error message is “Build path contains duplicate entry: ‘jsp-api-2.1.jar’ for project ‘my-project'” and the OK button is greyed out.

    #294138 Reply

    Riyad Kalla
    Member

    Martin,

    Sorry for the confusion, you would have to remove it from one resource and re-add it from another. If you can’t do that, there isn’t a way to filter deployments at this time in MyEclipse.

    #294144 Reply

    Martin
    Member

    Thanks, Riyad, for the tip. Removing the jar from the original resource means removing it from the pom, which will break the maven build.

    In our environment maven is the leading tool that handles all dependencies, and we use the maven-eclipse-plugin to create our .classpath files. Removing the file in the Java Build Path Dialog must be done again every time after we call the plugin.

    Maven and MyEclipse are both wonderful tools. To use them together is a everlasting search for workarounds.

    #294220 Reply

    Riyad Kalla
    Member

    Martin,

    I’m sorry about not having better news for you — if it’s any help I am pushing hard to get through management the addition of deployment exclusion which would fix this issue for you.

    #294266 Reply

    Martin
    Member

    Thanks Riyad.
    Having deployment exclusions would definitely be a nice feature. Or, more generally, all scopes that maven defines: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope. This would also handle the problem, that myeclipse also deploys test-classes and -resources.

    #294354 Reply

    Riyad Kalla
    Member

    Martin,

    We looked into this a bit closer and it looks like the deployer is actually honoring the Maven scopes… but I told the dev to look into it further to see why *this* wasn’t working for you, very strange.

    #294386 Reply

    Martin
    Member

    Maybe it’s honoring only the maven scopes, if maven4myeclipse is used. As I wrote, we use the maven-eclipse-plugin instead. I didn’t tried maven4myeclipse by now, because it says, it’s for myeclipse projects that want to use myeclipse and not the other way round, as we use it.

    #294395 Reply

    Riyad Kalla
    Member

    Ahhh that’s what’s going on then. Because you aren’t using the Maven4MyEclipse integration, MyEclipse is using it’s standard deployment code — ignoring the Maven scopes. The only way to get the best of both worlds is to use maven-enabled MyEclipse projects.

    Actually Maven-enabled MyEclipse projects create pom.xml files and use standard Maven conventions to build and package the projects — so you can take those projects and put them on another machine and just use command line maven just fine.

    I would encourage you to give it a try.

    #294474 Reply

    Martin
    Member

    Thanks, Riyad, for this information. This sounds nice, I will definitely give it a try!

    #296800 Reply

    Martin
    Member

    Hello, again. I actually could spare a little time for this again, but didn’t manage to activate Maven4MyEclipse for my existing project. The doc also says that this is not possible (see http://www.myeclipseide.com/documentation/quickstarts/maven_overview/, Chapter 4). Is this a “secret feature”?

    #297087 Reply

    Riyad Kalla
    Member

    No, no secret feature. The project during the creation-step needs to be created as a Maven project.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: JasperException because jsp-api.jar is deployed

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