How to Checkout and Build Apache Trinidad

1. Download Maven from http://maven.apache.org/download.cgi. Un-zip Maven so that you have the mvn tool at, e.g. ~/apache-maven-3.2.3/bin/

2. Check out Apache Trinidad from its SVN repository

svn co http://svn.apache.org/repos/asf/myfaces/trinidad-maven/trunk trinidad-maven
svn co http://svn.apache.org/repos/asf/myfaces/trinidad/trunk/ trinidad

3. Update trinidad pom.xml with new trinidad-maven version

<trinidad-plugins.version>2.0.9-SNAPSHOT</trinidad-plugins.version>

4. Use Maven to build Trinidad

cd ~/trinidad-maven/
~/apache-maven-3.2.3/bin/mvn -Dmaven.test.failure.ignore=true clean install

cd ~/trinidad/
~/apache-maven-3.2.3/bin/mvn -Dmaven.test.failure.ignore=true clean install

5. Find trinidad-impl-2.1.1-SNAPSHOT.jar in trinidad-impl/target/

ls trinidad-impl/target/

Links to download the build results

trinidad-impl-2.1.1.jar

trinidad-api-2.1.1.jar

Advertisements

NullPointerException When Running an Apache Trinidad App in Internet Explorer 11 (IE 11)

When running a web app built with Apache Trinidad in IE 11, you may encounter NullPointerException.

java.lang.NullPointerException
at org.apache.myfaces.trinidadinternal.ui.RootRenderingContext.getRendererManager(RootRenderingContext.java:193)
at org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.getRenderer(UIXComponentUINode.java:379)
at org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:166)
at org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:70)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:839)

Same error with latest builds of Apache Trinidad versions 1.0, 1.2 and 2.0. This issue was actually fixed in Apache Trinidad 2.1 which you don’t currently see it on the official download page:

https://myfaces.apache.org/trinidad/download.html

To upgrade to Apache Trinidad 2.1 so that your app can run in IE 100 as well as other browsers, do the following.

1. Download Apache Trinidad 2.1 from Maven repository:

http://search.maven.org/#artifactdetails|org.apache.myfaces.trinidad|trinidad-impl|2.1.0|jar

2. Download the required compatible versions of MyFaces 2.1.x. Uppack the zip package to find the jars.

https://myfaces.apache.org/download.html

3. Download the required compatible versions of JSTL 1.2:

http://download.java.net/maven/1/jstl/jars/

4. Copy the jars to your WEB-INF folder. Remove older versions of Apache Trinidad/MyFaces and JSTL.