On 4/20/06, Marc Farrow <[EMAIL PROTECTED]> wrote: > jsp: > [echo] /home/frs/test_web_tomcat > [echo] /usr/local/jdk1.5.0_06_32bit/jre > [echo] /usr/local/jdk1.5.0_06_32bit/jre > [echo] Generating java files out of root jsps > [jasper2] java.lang.IllegalStateException: No Java compiler available > > This looks like your "compiler" is pointing to a JRE instead of JDK. >
Yes, but how? The $JAVA_HOME variable is pointing to the jdk, other build scripts running fine. The java.home in this special build file seems to point into false direction, but I don't know what could twist it? leon > > > On 4/20/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > in our deployment scripts we precompile jsps for live deployment. > > However, we are in the process of switching from 5.0.x to 5.5.16 and > > the precompilation fails. > > I've searched the net and checked the 5.5 docs but haven't found any > > hints. > > > > Here's the exception: > > > > [EMAIL PROTECTED]:~/bin/testsystem$ ant -f build_web.xml > > Buildfile: build_web.xml > > > > jsp: > > [echo] /home/frs/test_web_tomcat > > [echo] /usr/local/jdk1.5.0_06_32bit/jre > > [echo] /usr/local/jdk1.5.0_06_32bit/jre > > [echo] Generating java files out of root jsps > > [jasper2] java.lang.IllegalStateException: No Java compiler available > > [jasper2] at > > org.apache.jasper.JspCompilationContext.createCompiler( > > JspCompilationContext.java:224) > > [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:979) > > [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1135) > > [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > Method) > > [jasper2] at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java > > :39) > > [jasper2] at > > sun.reflect.DelegatingMethodAccessorImpl.invoke( > > DelegatingMethodAccessorImpl.java:25) > > [jasper2] at java.lang.reflect.Method.invoke(Method.java:585) > > [jasper2] at > > org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123) > > [jasper2] at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > > [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364) > > [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341) > > [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369) > > [jasper2] at > > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > > [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java > > :1185) > > [jasper2] at > > org.apache.tools.ant.helper.DefaultExecutor.executeTargets( > > DefaultExecutor.java:40) > > [jasper2] at > > org.apache.tools.ant.Project.executeTargets(Project.java:1068) > > [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:668) > > [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:187) > > [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java > > :246) > > [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java > > :67) > > > > BUILD FAILED > > /home/frs/bin/testsystem/build_web.xml:41: > > org.apache.jasper.JasperException: No Java compiler available > > > > > > and here's the buildfile: > > <project name="datingr4p1" default="jsp" basedir="."> > > > > <property name="tomcat.home" location="/home/frs/test_web_tomcat"/> > > <property name="root.classes" > > location="${tomcat.home}/work/Catalina/localhost/_/"/> > > <property name="root.src" location="${tomcat.home}/webapps/ROOT"/> > > > > > > <target name="jsp"> > > <!-- > > The Ant JSPC task doesn't work with Tomcat 5.0 > > so in the meantime we need to define our own task. > > --> > > <echo>${tomcat.home}</echo> > > > > <echo>${java.home}</echo> > > <property name="java.home" location="/usr/local/java"/> > > <echo>${java.home}</echo> > > <taskdef classname="org.apache.jasper.JspC" onerror="report" > > name="jasper2"> > > <classpath id="jspc.classpath"> > > <pathelement location="/usr/local/java/lib/tools.jar"/> > > <fileset dir="${tomcat.home}/common/lib"> > > <include name="*.jar"/> > > </fileset> > > <fileset dir="${tomcat.home}/bin"> > > <include name="*.jar"/> > > </fileset> > > <fileset dir="${tomcat.home}/server/lib"> > > <include name="*.jar"/> > > </fileset> > > </classpath> > > </taskdef> > > > > > > <echo>Generating java files out of root jsps</echo> > > <jasper2 outputDir="${root.classes}" > > uriroot="${root.src}" > > verbose="9" > > package="org.apache.jsp" > > compilerSourceVM="1.5" > > compilerTargetVM="1.5" > > validateXml="false"> > > </jasper2> > > > > <echo>Compiling root java files </echo> > > <javac srcdir="${root.classes}" > > destdir="${root.classes}" > > verbose="false" > > debug="true" > > optimize="false" > > includes="**/*.java" > > fork="yes" > > compilerSourceVM="1.5" > > compilerTargetVM="1.5" > > memoryInitialSize="800m" > > memoryMaximumSize="800m" > > > > > <classpath> > > <pathelement location="${java.home}/../lib/tools.jar"/> > > <pathelement > > path="${tomcat.home}/webapps/ROOT/WEB-INF/classes"/> > > <fileset dir="${tomcat.home}/common/lib"> > > <include name="*.jar"/> > > </fileset> > > <fileset dir="${tomcat.home}/webapps/ROOT/WEB-INF/lib"> > > <include name="*.jar"/> > > </fileset> > > </classpath> > > </javac> > > </target> > > > > > > > > </project> > > > > suspicious java.home property seems to point to the jre, whether > > system JAVA_HOME variable point to the jdk: > > /usr/local/java/ -> jdk1.5.0_06_32bit > > > > I've checked the source code and found that the code in > > org.apache.jasper.JspCompilationContext.createCompiler( > > JspCompilationContext.java:224) > > tries to load the JDT or JAVAC compiler by name. Is it a classloading > > issue? > > > > Thanx in advance > > > > regards > > Leon > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Marc Farrow > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]