Tuesday, October 6, 2009

Glassfish doesn't compile JSP

Well, I have everything set correctly:
All of JDK, JAVA_HOME and CLASSPATH are set correctly.
But as soon as I deploy a Hello World web app, this is what Glassfish returned
org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP
PWC1406: Servlet.service() for servlet
threw exception java.lang.NullPointerException
 at org.apache.jasper.compiler.Jsr199JavaCompiler.compile

There is direct solution to it. Update <glassfish_home>/domains/<DOMAIN_NAME>/config/domain.xml

<java-config classpath-suffix="" ... java-home="${com.sun.aas.javaRoot}" java-options="-g" ...></java-config>
<java-config classpath-suffix="" ... java-home="C:/Program Files/Java/jdk1.6.0_14" java-options="-g" ...></java-config>

what I did is I hard coded JDK_HOME (C:/Program Files/Java/jdk1.6.0_14) in the XML .

Monday, October 5, 2009

The php5apache2_2.dll Chaos.

I am a Java developer by my heart and soul. But you can't just ignore all this people pestering you for being conventionalist and non-agile developer. So, I happened to have install PHP on machine. I decided to install PHP and NOT WAMP because I already had MySQL 5 and Apache 2.2 on my WinXp Box.

After setting everything.. nothing worked... seemed like I have to do something with php5apache2_2.dll. People suggest weird stuffs and wasted half of the day stubbornly.

To cut the long story short, there are two type of Zip file released. One of them contains php5apache2_2.dll and other DON'T. To specify:

1. The Thread-safe version CONTAINS php5apache2_2.dll
2. The non-Thread-safe version DOES NOT contain php5apache2_2.dll

So, be cautious which one you're downloading.