Building JSF from source
I would like to build the JSF jars from source so that I can integrate a bug fix that was added.
This is the bug I need fixed:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6223295
I have CVS access to the javaserverfaces-source project on java.net and can pull the code down. I am wonder if there is a particular code branch what would be recommended to upgrade my current 1.1_01 jars.
Can someone tell me the JSF_1_1_ROLLING branch contains all the latest bug fixes for JSF 1.1_0x?
How about the JSF_1_1_02 branch?
Thanks,
Noah
[583 byte] By [
jsfnoaha] at [2007-10-2 10:41:43]

Hello,
JSF_1_1_ROLLING is the branch you want to look at. This branch is for ongoing 1.1 development.
The JSF_1_1_02 branch represents what will be, at some point in the future, our 1.1_02 release, so no further work will be done there.
This should definately be ported to 1.1.
Thanks. Should I be able to build by just checking out the JSF_1_1_ROLLING branch? I'm running in to a lot of build problems.
Here is my current setup.
1. Checked out the JSF_1_1_ROLLING branch
- had some trouble with "\jsf-ri\src\com\sun\faces\taglib\htmlbasic"
- received this error: Input_TextAreaTag.java,v is ambiguous; could mean Input_TextareaTag.java,v or Input_TextAreaTag.java
- worked around the error for now.
2. Installed Tomcat 5.5x
3. Setup the Tomcat 5.5x specific build.properties file by specifing:
- jsf.build.home
- container.home
- dependency.base.dir
4. Installed all fo the dependency jars to the dependency.base.dir.
5. Installed the correct version of Ant
6. ran ant from the base directory.
The first build error I encountered was from "\jsf-ri\build.xml" line 148:
<copy file="${build.generate.tld.dir}/html_basic.tld"
toDir="${build.classes.dir}/META-INF"/>
The file "html_basic.tld" does not exist. Looking for it in CVS, it in "jsf-ri\conf\share" it does not exist and according to CVS history, the file is in the attic.
So, to proceed, I commented out this line in build script. The next error I get is an xslt error in the same build.xml. It fails xslt translation here:
<xslt in="${build.dir}/classes/com/sun/faces/standard-html-renderkit.xml"
out="merged.xml"
style="conf/xslt/merge-config.xsl">
<xmlcatalog id="facesDTDs">
<dtd publicId="-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
location="${build.dir}/classes/com/sun/faces/web-facesconfig_1_1.dtd"/>
<dtd publicId="-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
location="${build.dir}/classes/com/sun/faces/web-facesconfig_1_0.dtd"/>
</xmlcatalog>
</xslt>
Any help would be appreciated.
Thanks,
Noah
Is jsf-tools in your source tree? html_basic.tld is generated (it should be anyway).
Yes, jsf-tools was in my source tree. I decided to run ant from just jsf-tools and discovered I had a problem with my "jsf.build.home". It was set like this:
jsf.build.home=C:\javaserverfaces-sources
I changed it to this:
jsf.build.home=C:/javaserverfaces-sources
This fixed my problem with the "html_basic.tld" not being found. Thanks for the help on this.
Now I am left with one remaining problem during the xslt of the standard-html-renderkit.xml. Here is my full error:
create.runtime.config:
[xslt] Processing C:\javaserverfaces-sources\jsf-ri\build\classes\com\sun\faces\standard-html-renderkit.xml to C:\javaserverfaces-sources\jsf-ri\merged.xml
[xslt] Loading stylesheet C:\javaserverfaces-sources\jsf-ri\conf\xslt\merge-config.xsl
[xslt] C:/javaserverfaces-sources/jsf-ri/conf/xslt/merge-config.xsl:0:0: Fatal Error! java.lang.NullPointerException Cause: java.lang.NullPointerException
[xslt] Failed to process C:\javaserverfaces-sources\jsf-ri\build\classes\com\sun\faces\standard-html-renderkit.xml
BUILD FAILED
C:\javaserverfaces-sources\build.xml:61: The following error occurred while executing this line:
C:\javaserverfaces-sources\build.xml:32: The following error occurred while executing this line:
C:\javaserverfaces-sources\jsf-ri\build.xml:305: Fatal error during transformation
I haven't tried building on win32 as of late. I'll track a box down and give it a shot.
Here is some more information. I ran ant with the "-debug" argument and got this information about the error:
create.runtime.config:
Could not load a dependent class (junit/framework/TestListener) for type junit
Adding reference: facesDTDs
[xslt] Using class org.apache.tools.ant.taskdefs.optional.TraXLiaison
[xslt] In file C:\javaserverfaces-sources\jsf-ri\build\classes\com\sun\faces\standard-html-renderkit.xml time: 1138854592792
[xslt] Out file C:\javaserverfaces-sources\jsf-ri\merged.xml time: 0
[xslt] Style file conf/xslt/merge-config.xsl time: 1092762322000
[xslt] Processing C:\javaserverfaces-sources\jsf-ri\build\classes\com\sun\faces\standard-html-renderkit.xml to C:\javaserverfaces-sources\jsf-ri\merged.xml
[xslt] Loading stylesheet C:\javaserverfaces-sources\jsf-ri\conf\xslt\merge-config.xsl
resolveEntity: 'null': 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/standard-html-renderkit-impl.xml'
Class org.apache.tools.ant.types.resolver.ApacheCatalogResolver loaded from parent loader (parentFirst)
Apache resolver library found, xml-commons resolver will be used
Using catalogpath ''
No matching catalog entry found, parser will use: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/standard-html-renderkit-impl.xml'
resolveEntity: '-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN': 'http://java.sun.com/dtd/web-facesconfig_1_1.dtd'
Matching catalog entry found for publicId: '-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN' location: 'build/classes/com/sun/faces/web-facesconfig_1_1.dtd'
fileName C:\javaserverfaces-sources\jsf-ri\build\classes\com\sun\faces\web-facesconfig_1_1.dtd
catalog entry matched a readable file: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/web-facesconfig_1_1.dtd'
resolveEntity: 'null': 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/uicolumn-props.xml'
No matching catalog entry found, parser will use: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/uicolumn-props.xml'
resolveEntity: 'null': 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/uicomponent-props.xml'
No matching catalog entry found, parser will use: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/uicomponent-props.xml'
resolveEntity: 'null': 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/uicommand-props.xml'
...
...
...
No matching catalog entry found, parser will use: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/focus-attrs.xml'
resolveEntity: 'null': 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/i18n-attrs.xml'
No matching catalog entry found, parser will use: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/i18n-attrs.xml'
resolveEntity: 'null': 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/input-attrs.xml'
No matching catalog entry found, parser will use: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/input-attrs.xml'
resolveEntity: 'null': 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/selectone-radio-attrs.xml'
No matching catalog entry found, parser will use: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/selectone-radio-attrs.xml'
resolve: '../../build/classes/com/sun/faces/jsf-ri-config.xml' with base: 'file:///C:/javaserverfaces-sources/jsf-ri/conf/xslt/merge-config.xsl'
resolveEntity: '-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN': 'http://java.sun.com/dtd/web-facesconfig_1_1.dtd'
Matching catalog entry found for publicId: '-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN' location: 'build/classes/com/sun/faces/web-facesconfig_1_1.dtd'
fileName C:\javaserverfaces-sources\jsf-ri\build\classes\com\sun\faces\web-facesconfig_1_1.dtd
catalog entry matched a readable file: 'file:///C:/javaserverfaces-sources/jsf-ri/build/classes/com/sun/faces/web-facesconfig_1_1.dtd'
[xslt] C:/javaserverfaces-sources/jsf-ri/conf/xslt/merge-config.xsl:0:0: Fatal Error! java.lang.NullPointerException Cause: java.lang.NullPointerException
[xslt] Failed to process C:\javaserverfaces-sources\jsf-ri\build\classes\com\sun\faces\standard-html-renderkit.xml
[subant] Exiting C:\javaserverfaces-sources\jsf-ri\build.xml.
I tried to build on linux and received the same error. It looks to me like it is having trouble resolving the referenced xml files in standard-html-renderkit.xml .Any help would be appreciated.Thanks,Noah
In my continued effort to debug the xslt step in the jsf-ri build.xml, I decided to load "standard-html-renderkit.xml" in a JUnit test to figure out if the problem is with the entity resolution or the XSL Translation. I found that the entity resolution is fine.
When I try to perform the XSLT in my JUnit test, I get this error:
[Fatal Error] :1:95: White spaces are required between publicId and systemId.
Error: javax.xml.transform.TransformerException: org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
Any ideas? (I am trying to build the JSF_1_1_ROLLING branch)
I finally got this built. The only way I could get around the XSLT error was to build using JDK1.5.