| Author |
Message |
|
|
Post subject: JasperException because jsp-api.jar is deployed
Posted: Jan 22, 2009 - 05:29 PM
|
|

Joined: Dec 19, 2006
Posts: 35
|
|
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. |
_________________ Martin
|
| |
|
|
|
 |
|
|
Post subject: RE: JasperException because jsp-api.jar is deployed
Posted: Jan 23, 2009 - 07:33 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 27, 2009 - 04:30 PM
|
|

Joined: Dec 19, 2006
Posts: 35
|
|
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. |
_________________ Martin
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 29, 2009 - 08:01 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 29, 2009 - 08:47 PM
|
|

Joined: Dec 19, 2006
Posts: 35
|
|
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. |
_________________ Martin
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 02, 2009 - 03:36 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 03, 2009 - 10:27 AM
|
|

Joined: Dec 19, 2006
Posts: 35
|
|
|
|
|
 |
|
|
Post subject:
Posted: Feb 04, 2009 - 06:53 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 05, 2009 - 06:45 AM
|
|

Joined: Dec 19, 2006
Posts: 35
|
|
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. |
_________________ Martin
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 05, 2009 - 02:10 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 06, 2009 - 05:55 AM
|
|

Joined: Dec 19, 2006
Posts: 35
|
|
Thanks, Riyad, for this information. This sounds nice, I will definitely give it a try! |
_________________ Martin
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Mar 26, 2009 - 01:57 PM
|
|

Joined: Dec 19, 2006
Posts: 35
|
|
|
|
|
 |
|
|
Post subject:
Posted: Apr 01, 2009 - 01:36 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
No, no secret feature. The project during the creation-step needs to be created as a Maven project. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|