|
From: mraible <ma...@ra...> - 2007-09-24 17:23:49
|
OK - I believe you that commons-el is not in the classpath. However, there's an issue that occurs on Jetty 6 with JSF 1.2 and not on Tomcat 6. http://issues.appfuse.org/browse/APF-856 Here's how to reproduce: 1. Create a new JSF project: mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject 2. cd myproject;mvn jetty:run-war -Ph2 3. Go to http://localhost:8080/foo.html and login with admin/admin. You'll get a blank screen with the error in the logs. 4. Ctrl+C and run "mvn -Ph2 -Dcargo.wait=true". This downloads Tomcat and runs it on Tomcat 6.0.14. 5. Go to http://localhost:8081/myproject-1.0-SNAPSHOT/foo.html and login with admin/admin. 404 page is served up correctly. Thanks, Matt janb wrote: > > Matt, > > Let me also add by way of explanation that what you are seeing are the > <dependencyManagement> elements from jetty's top level pom. A > dependencyManagement section merely lets the parent pom declare the > version of jars that can be used by the child poms in such a way that > the child poms don't have to repeat the version number. > > So, they're not the actual dependencies, just the possible set of > dependencies. > > The only way to really test this is to do as David suggests and build > it, then run it on your webapp with mvn -X jetty:run. > > You'll be looking for a section in the trace like this that will > show you what dependencies the maven-jetty-plugin has really > introduced at runtime: > > pluginArtifacts = [org.mortbay.jetty:jsp-2.1:jar:6.1-SNAPSHOT:runtime, > org.mortbay.jetty:servlet-api-2.5:jar:6.1-SNAPSHOT:runtime, > org.apache.maven:maven-plugin-tools-api:jar:2.0:runtime, > ant:ant:jar:1.6.5:runtime, > org.codehaus.plexus:plexus-utils:jar:1.1:runtime, > org.mortbay.jetty:jetty-plus:jar:6.1-SNAPSHOT:runtime, > org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar:1.0:runtime, > geronimo-spec:geronimo-spec-jta:jar:1.0.1B-rc4:runtime, > org.mortbay.jetty:jetty-management:jar:6.1-SNAPSHOT:runtime, > javax.mail:mail:jar:1.4:runtime, org.eclipse.jdt:core:jar:3.1.1:runtime, > org.mortbay.jetty:jetty-naming:jar:6.1-SNAPSHOT:runtime, > org.mortbay.jetty:jsp-api-2.1:jar:6.1-SNAPSHOT:runtime, > org.mortbay.jetty:jetty-util:jar:6.1-SNAPSHOT:runtime, > org.mortbay.jetty:jetty:jar:6.1-SNAPSHOT:runtime, > javax.activation:activation:jar:1.1:runtime, > org.mortbay.jetty:jetty-annotations:jar:6.1-SNAPSHOT:runtime, > org.apache.maven:maven-project:jar:2.0.3:runtime, > org.apache.maven:maven-artifact:j > ar:2.0.3:runtime, org.apache.maven:maven-plugin-api:jar:2.0.3:runtime] > > > cheers > Jan > > > David Yu wrote: >> "I have the latest version of Jetty SVN (I think)" >> What you need to do is do a full checkout and a full build of Jetty >> snapshot. Not just the maven-jetty-plugin. >> Having mx4j, mx4j-tools and commons-el jars in there definitely >> indicates that you havent done so. >> After the checkout-build, use mvn -X -o jetty:run. >> >> cheers >> >> mraible wrote: >>> I have the latest version of Jetty SVN (I think). I cd into >>> modules/maven-jetty and ran the following: >>> >>> mvn -X | tee mvn.log >>> >>> Then I looked at mvn.log and commons-el shows up right at the beginning: >>> >>> + Error stacktraces are turned on. >>> Maven version: 2.0.6 >>> [DEBUG] Building Maven user-level plugin registry from: >>> '/Users/mraible/.m2/plugin-registry.xml' >>> [DEBUG] Building Maven global-level plugin registry from: >>> '/opt/dev/tools/maven2/conf/plugin-registry.xml' >>> [INFO] Scanning for projects... >>> [DEBUG] Searching for parent-POM: >>> org.mortbay.jetty:project::6.1-SNAPSHOT of >>> project: org.mortbay.jetty:maven-jetty-plugin:maven-plugin:null in >>> relative >>> path: ../../pom.xml >>> [DEBUG] Using parent-POM from the project hierarchy at: '../../pom.xml' >>> for >>> project: org.mortbay.jetty:maven-jetty-plugin:maven-plugin:null >>> [DEBUG] Adding managed depedendencies for >>> org.mortbay.jetty:maven-jetty-plugin >>> [DEBUG] org.apache.maven:maven-plugin-tools-api:jar:2.0 >>> [DEBUG] junit:junit:jar:3.8.2 >>> [DEBUG] org.slf4j:jcl104-over-slf4j:jar:1.3.1 >>> [DEBUG] org.slf4j:slf4j-simple:jar:1.3.1 >>> [DEBUG] mx4j:mx4j:jar:3.0.1 >>> [DEBUG] mx4j:mx4j-tools:jar:3.0.1 >>> [DEBUG] xerces:xercesImpl:jar:${xerces-version} >>> [DEBUG] commons-el:commons-el:jar:1.0 >>> [DEBUG] ant:ant:jar:1.6.5 >>> [DEBUG] javax.mail:mail:jar:1.4 >>> [DEBUG] javax.activation:activation:jar:1.1 >>> >>> Unfortunately, even after removing commons-el from the root pom, the >>> issue >>> I'm having still seems to occur. :/ >>> >>> Index: pom.xml >>> =================================================================== >>> --- pom.xml (revision 2080) >>> +++ pom.xml (working copy) >>> @@ -346,11 +346,6 @@ >>> <version>${xerces-version}</version> >>> </dependency> >>> <dependency> >>> - <groupId>commons-el</groupId> >>> - <artifactId>commons-el</artifactId> >>> - <version>${commons-el-version}</version> >>> - </dependency> >>> - <dependency> >>> <groupId>ant</groupId> >>> <artifactId>ant</artifactId> >>> <version>${ant-version}</version> >>> @@ -386,7 +381,6 @@ >>> <properties> >>> <activation-version>1.1</activation-version> >>> <ant-version>1.6.5</ant-version> >>> - <commons-el-version>1.0</commons-el-version> >>> <jasper-version>5.5.15</jasper-version> >>> <jta-spec-version>1.0.1B-rc4</jta-spec-version> >>> <junit-version>3.8.2</junit-version> >>> >>> Matt >>> >>> >>> David Yu-2 wrote: >>> >>>> I did mvn -X on a 6.1-SNAPSHOT plugin and it sure didnt have commons-el >>>> on the classpath. >>>> >>>> After you checkout and build from head, run the plugin as mvn -X -o >>>> jetty:run , so that it will not fetch for the snapshot jars and use >>>> your "freshly-built" 6.1-SNAPSHOT jar on your repository. >>>> >>>> cheers >>>> >>>> mraible wrote: >>>> >>>>> I tried that and I still get the same error. Is it possible that >>>>> anonymous >>>>> svn is time delayed? If you do "mvn jetty:run -X | tee mvn.log" and >>>>> look >>>>> at >>>>> mvn.log - you have no references to commons-el? >>>>> >>>>> I don't know if having commons-el in my classpath is the cause of the >>>>> problem, but that's what the MyFaces mailing list seems to indicate. >>>>> >>>>> Matt >>>>> >>>>> >>>>> janb wrote: >>>>> >>>>> >>>>>> Matt, >>>>>> >>>>>> Hmmm, well that's definitely not right because the commons-el and ant >>>>>> jars >>>>>> no >>>>>> longer appear when I run mvn -X jetty:run. Everything is checked in >>>>>> at >>>>>> this >>>>>> end. >>>>>> >>>>>> Could you try again, but use <version>6.1-SNAPSHOT</version> as the >>>>>> version >>>>>> number of the jetty plugin? No idea if that really makes any >>>>>> difference, >>>>>> but >>>>>> it will definitely nail the version to the one you've built locally. >>>>>> >>>>>> cheers >>>>>> Jan >>>>>> >>>>>> mraible wrote: >>>>>> >>>>>> >>>>>>> I checked out from SVN, ran "mvn" from the root directory and then >>>>>>> removed >>>>>>> <version>6.1.5</version> from my project. I assume this is what I >>>>>>> need >>>>>>> to >>>>>>> do >>>>>>> in order to get the latest plugin that I installed locally. >>>>>>> >>>>>>> Unfortunately, no dice - the error still occurs. >>>>>>> >>>>>>> Caused by: javax.el.PropertyNotFoundException: ELResolver cannot >>>>>>> handle >>>>>>> a >>>>>>> null base Object with identifier 'errors' >>>>>>> at >>>>>>> com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:63) >>>>>>> at >>>>>>> com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:88) >>>>>>> at >>>>>>> com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206) >>>>>>> at >>>>>>> org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:67) >>>>>>> >>>>>>> Running mvn jetty:run-war -X > mvn.log and it seems that commons-el >>>>>>> is >>>>>>> still >>>>>>> a dependency of the plugin: >>>>>>> >>>>>>> [DEBUG] Adding managed depedendencies for >>>>>>> org.mortbay.jetty:maven-jetty-plugin[DEBUG] >>>>>>> org.apache.maven:maven-plugin-tools-api:jar:2.0 >>>>>>> [DEBUG] junit:junit:jar:3.8.2[DEBUG] >>>>>>> org.slf4j:jcl104-over-slf4j:jar:1.3.1 >>>>>>> [DEBUG] org.slf4j:slf4j-simple:jar:1.3.1 >>>>>>> [DEBUG] mx4j:mx4j:jar:3.0.1[DEBUG] mx4j:mx4j-tools:jar:3.0.1 >>>>>>> [DEBUG] xerces:xercesImpl:jar:${xerces-version}[DEBUG] >>>>>>> commons-el:commons-el:jar:1.0 >>>>>>> [DEBUG] ant:ant:jar:1.6.5 >>>>>>> [DEBUG] javax.mail:mail:jar:1.4[DEBUG] >>>>>>> javax.activation:activation:jar:1.1 >>>>>>> [DEBUG] maven-jetty-plugin: using locally installed snapshot >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> >>>>>>> janb wrote: >>>>>>> >>>>>>> >>>>>>>> Matt, >>>>>>>> >>>>>>>> I've just discovered some cruft in the jetty maven plugin pom that >>>>>>>> included an unneeded dependency on commons-el! I've removed that >>>>>>>> and tested the plugin and it seems to be working ok. >>>>>>>> >>>>>>>> However, it would be ideal if you could do acheckout of jetty >>>>>>>> svn head and a build and see if it is working with your >>>>>>>> application now commons-el is out of the picture completely? >>>>>>>> >>>>>>>> thanks >>>>>>>> Jan >>>>>>>> >>>>>>>> mraible wrote: >>>>>>>> >>>>>>>> >>>>>>>>> I'm using JDK 5 on OS X. For Tomcat, I tested it on version >>>>>>>>> 6.0.14. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> >>>>>>>>> >>>>>>>>> janb wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>>> Matt, >>>>>>>>>> >>>>>>>>>> You must be using jdk1.4 because for jdk1.5 and up, jasper does >>>>>>>>>> not >>>>>>>>>> require commons-el. >>>>>>>>>> >>>>>>>>>> If in fact you are using jdk1.4 and therefore jsp-2.0, then you >>>>>>>>>> are >>>>>>>>>> actually using >>>>>>>>>> jasper 5.5.15 from apache. I don't know whether those versions of >>>>>>>>>> myfaces >>>>>>>>>> etc are >>>>>>>>>> supposed to work with jsp2.0, but if they are, then you might try >>>>>>>>>> and >>>>>>>>>> verify that >>>>>>>>>> you get the same error when running under tomcat 5.5.15. >>>>>>>>>> >>>>>>>>>> regards >>>>>>>>>> Jan >>>>>>>>>> >>>>>>>>>> mraible wrote: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> Actually, I spoke too soon - removing commons-el causes a >>>>>>>>>>> NoClassDefFoundError. However, the following seems to work fine >>>>>>>>>>> on >>>>>>>>>>> Tomcat >>>>>>>>>>> 6.0.14 (with MyFaces 1.2.0, Tomahawk 1.1.6 and Facelets 1.13): >>>>>>>>>>> >>>>>>>>>>> <c:if test="${not empty errors}"> >>>>>>>>>>> <div class="error" id="errorMessages"> >>>>>>>>>>> <c:forEach var="error" items="${errors}"> >>>>>>>>>>> <c:url value= " >>>>>>>>>>> alt="<fmt:message key="icon.warning"/>" >>>>>>>>>>> class="icon" >>>>>>>>>>> /> >>>>>>>>>>> <c:out value="${error}" escapeXml="false"/><br /> >>>>>>>>>>> </c:forEach> >>>>>>>>>>> </div> >>>>>>>>>>> <c:remove var="errors" scope="session"/> >>>>>>>>>>> </c:if> >>>>>>>>>>> >>>>>>>>>>> Using maven-jetty-plugin 6.1.5, I get: >>>>>>>>>>> >>>>>>>>>>> Caused by: javax.faces.el.EvaluationException: ELResolver cannot >>>>>>>>>>> handle >>>>>>>>>>> a >>>>>>>>>>> null base Object with identifier 'errors' >>>>>>>>>>> >>>>>>>>>>> Any ideas? >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> >>>>>>>>>>> Matt >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> mraible wrote: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> I'm trying to solve the following issue and it appears that the >>>>>>>>>>>> maven-jetty-plugin's dependency on commons-el is causing the >>>>>>>>>>>> problem. >>>>>>>>>>>> >>>>>>>>>>>> http://tinyurl.com/2vq9rf >>>>>>>>>>>> >>>>>>>>>>>> Is there any way to exclude it in my plugin's configuration? >>>>>>>>>>>> I'm >>>>>>>>>>>> using >>>>>>>>>>>> version 6.1.5. >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> >>>>>>>>>>>> Matt >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Jan Bartel, Webtide LLC | ja...@we... | >>>>>>>>>> http://www.webtide.com >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------------------- >>>>>>>>>> This SF.net email is sponsored by: Splunk Inc. >>>>>>>>>> Still grepping through log files to find problems? Stop. >>>>>>>>>> Now Search log events and configuration files using AJAX and a >>>>>>>>>> browser. >>>>>>>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>>>>>>> _______________________________________________ >>>>>>>>>> Jetty-support mailing list >>>>>>>>>> Jet...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>> -- >>>>>>>> Jan Bartel, Webtide LLC | ja...@we... | http://www.webtide.com >>>>>>>> >>>>>>>> ------------------------------------------------------------------------- >>>>>>>> This SF.net email is sponsored by: Splunk Inc. >>>>>>>> Still grepping through log files to find problems? Stop. >>>>>>>> Now Search log events and configuration files using AJAX and a >>>>>>>> browser. >>>>>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>>>>> _______________________________________________ >>>>>>>> Jetty-support mailing list >>>>>>>> Jet...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>> -- >>>>>> Jan Bartel, Webtide LLC | ja...@we... | http://www.webtide.com >>>>>> >>>>>> ------------------------------------------------------------------------- >>>>>> This SF.net email is sponsored by: Splunk Inc. >>>>>> Still grepping through log files to find problems? Stop. >>>>>> Now Search log events and configuration files using AJAX and a >>>>>> browser. >>>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>>> _______________________________________________ >>>>>> Jetty-support mailing list >>>>>> Jet...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> ------------------------------------------------------------------------- >>>> This SF.net email is sponsored by: Splunk Inc. >>>> Still grepping through log files to find problems? Stop. >>>> Now Search log events and configuration files using AJAX and a browser. >>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>> _______________________________________________ >>>> Jetty-support mailing list >>>> Jet...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>>> >>>> >>>> >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Jetty-support mailing list >> Jet...@li... >> https://lists.sourceforge.net/lists/listinfo/jetty-support > > > -- > Jan Bartel, Webtide LLC | ja...@we... | http://www.webtide.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Jetty-support mailing list > Jet...@li... > https://lists.sourceforge.net/lists/listinfo/jetty-support > > -- View this message in context: http://www.nabble.com/Is-it-possible-to-exclude-commons-el-as-a-dependency-with-the-maven-jetty-plugin--tf4348944.html#a12864276 Sent from the Jetty Support mailing list archive at Nabble.com. |