Hi All,
I downloaded and built jsftemplating code. However I was having problems
in building the demo.war application. When I closely looked at the build
output put I found that the problem seemed to be with apt.exe on my
system. I am using Windows XP with JDK1.5. The error was:
############################# START OUTPUT
##################################
C:\workspace\GlassFish\jsftemplating>ant build
Buildfile: build.xml
init:
[echo] Using c:\ant/bin/ant.bat
[echo] java.home=c:\jdk15\jre
[echo] ant.home=c:\ant
[exec] Apache Ant version 1.6.5 compiled on June 2 2005
compile-apt-files:
[echo] c:\jdk15\jre
jar-apt-files:
compile:
[exec] Buildfile: aptbuild.xml
[exec] compile:
[exec] [apt] Compiling 302 source files to
C:\workspace\GlassFish\jsftemplating\build
[exec]/* BUILD FAILED*/
[exec] C:\workspace\GlassFish\jsftemplating\aptbuild.xml:31: Error
running C:\jdk15\bin\apt.exe compiler
[exec] Total time: 0 seconds
jar:
build:
BUILD SUCCESSFUL
Total time: 2 seconds
############################ END OUTPUT ###################################
Notice that even though the build failed, the output is successful.
Anyways it seems that the apt.exe was failing which caused the
jsftemplating.jar file not to contain all the classes for JSFTemplating.
This led to compilation errors in the demo application.
I changed fork="false" to see what the errors were. There were no errors
only warnings. I am not sure why the apt task failed though. Maybe its
because the apt compiler generates an error code on warnings and that
causes the apt task to fail. The warnings that I get are as follows:
########################## START OUTPUT ####################################
C:\workspace\GlassFish\jsftemplating>ant build
Buildfile: build.xml
init:
[echo] Using c:\ant/bin/ant.bat
[echo] java.home=c:\jdk15\jre
[echo] ant.home=c:\ant
[exec] Apache Ant version 1.6.5 compiled on June 2 2005
compile-apt-files:
[echo] c:\jdk15\jre
jar-apt-files:
compile:
[exec] Buildfile: aptbuild.xml
[exec] compile:
[exec] [apt] Compiling 302 source files to
C:\workspace\GlassFish\jsftemplating\build
[exec] [apt] warning: Bad annotation processor factory:
java.lang.ClassCastException:
com.sun.jsftemplating.annotation.FormatDefinitio
nAPFactory
[exec] [apt] warning: Bad annotation processor factory:
java.lang.ClassCastException:
com.sun.jsftemplating.annotation.UIComponentFact
oryAPFactory
[exec] [apt] warning: Bad annotation processor factory:
java.lang.ClassCastException:
com.sun.jsftemplating.annotation.HandlerAPFactor
y
[exec] [apt] warning: Annotation types without processors:
[com.sun.jsftemplating.annotation.UIComponentFactory, com.sun.jsftemplating
.annotation.HandlerInput,
com.sun.jsftemplating.annotation.HandlerOutput,
com.sun.jsftemplating.annotation.Handler, java.lang.Override, com.sun.j
sftemplating.annotation.FormatDefinition]
[exec] [apt] Note: Some input files use or override a
deprecated API.
[exec] [apt] Note: Recompile with -Xlint:deprecation for details.
[exec] [apt] 4 warnings
[exec] [apt] Note: Some input files use or override a
deprecated API.
[exec] [apt] Note: Recompile with -Xlint:deprecation for details.
[exec] [apt] Note: Some input files use unchecked or unsafe
operations.
[exec] [apt] Note: Recompile with -Xlint:unchecked for details.
[exec] BUILD SUCCESSFUL
[exec] Total time: 6 seconds
jar:
[jar] Updating jar:
C:\workspace\GlassFish\jsftemplating\dist\jsftemplating.jar
build:
BUILD SUCCESSFUL
Total time: 9 seconds
######################### END OUPTUT
####################################
Is this a known issue on Windows.
Warm Rgds,
Irfan.
--
Irfan Ahmed
Sun Microsystems Inc., Bangalore, India.