Moved from Kubuntu to OS X (bought macbook). Set up environment to build my project with the following (downloaded from official websites, not the repositories):
Project technology stack:
Build with maven goes ok on Windows 7, Kubuntu 14.04 and Mac OS X Mavericks 10.9.3. Deployment onto Apache Tomcat 7 goes ok too (no errors, warnings appear). Once project is deployed, going to login screen, loading the main page, surfing through project views until I get to an Invoices page, that contain
#{rich:element('some_id')}.some_action().
Rendering this page falls with error below:
ERROR com.skeds.core.component.exceptions.SkedsCustomExceptionHandler Function 'rich:element' not found
javax.el.ELException: Function 'rich:element' not found
at org.jboss.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:176)
at org.jboss.el.parser.SimpleNode.accept(SimpleNode.java:129)
at org.jboss.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:138)
at org.jboss.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:152)
at org.jboss.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:195)
at org.jboss.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68)
at com.sun.faces.facelets.el.ELText$ELTextVariable.apply(ELText.java:203)
at com.sun.faces.facelets.el.ELText$ELTextComposite.apply(ELText.java:184)
at com.sun.faces.facelets.compiler.TextInstruction.apply(TextInstruction.java:96)
at com.sun.faces.facelets.compiler.UIInstructionHandler.apply(UIInstructionHandler.java:141)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
I can go to one of another pages and sometimes can render Invoices page without this error, but still clicking on some another page with this EL gives the same error.
What was tried:
During code investigation found the following dependency fail at the org.richfaces.function.RichFunction class:
import org.richfaces.cdk.annotations.Function;
Which is the most likely reason of an error. Added the following dependency to my pom.xml:
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>annotations</artifactId>
<version>4.3.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
The IDE precompiler shows that dependency is resolved. mvn clean install and redeployment of a project gives no results. The same error appear.
el-api.jdk within some of the package in the project classpath. At the tomcat7 lib directory there is one el-api.jdk, at the pom.xml there are three exclusions on the dependencies that possibly can contain el-api.jdk that can conflict. Also at the target/WEB-INF/lib directory there are no el-api.jdk files that can conflict too. catalina.sh. Also tried with mvn package -DskipTests jetty:run - all options give the same result.EDIT: Problem appeared on kubuntu 14.04 and ubuntu 12.10. Also tested on Windows 7 - the same issue. So this is not an OS based error.
Any suggestions will be MUCH appreciated.
Resolved. As it is always happened, the cause of an issue was totally stupid. Intellij IDEA has an option to auto-clean unused namespaces on JSF .xhtml views. The Invoices page contain an include that has #{rich:element('some_id')} within, but Rich Function is not an actual namespace usage, which is for instance a tagname <rich:calendar>. That is why Idea cleaned it on one of project's rebuilds. A namespace xmlns:rich="http://richfaces.org/rich" was defined only in the outer invoices.xhtml. And rendering the inner include without declared namespace cause the RestoreView phase to crash with the given error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With