This is a discussion on JavaServer Pages (JSP) and JSTL-JSP compiler problem within the Java Server Pages (JSP) forums, part of the Web Development category; Hi, I have a JSP based web application that works well when deployed in Tomcat 6. I am trying to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, I have a JSP based web application that works well when deployed in Tomcat 6. I am trying to deploy it in jboss 4.2.1, everything seems to be ok but when I try to access to a JSP page I have the following error java.lang.IllegalStateException: No Java compiler available org.apache.jasper.JspCompilationContext.createComp iler(JspCompilationContext.java:229) org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:561) org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet .java:803) my JAVA_HOME is set to use a JDK 1.5, but it should work with a JRE as the Tomcat embedded in jboss has its own compiler. I changed the web deployer configuration to use the sun compiler instead of the default but I have the same problem despite tools.jar is in the classpath. Has someone had this problem before or could someone help me on the issue ? Thanks, |
| Sponsored Links |
| |||
| This would probably be better posted in a JBoss forum. You might want to reformulate your question before posting though, as your current question sounds too much like "can I deploy a JSP based web application on JBoss", which could bring you some flaming replies. ![]()
__________________ cheers Aman |
| |||
| So what is in the JBOSS log at startup? It should display the JAVA_HOME settings among other things. Where have you changed the web deployer config?
__________________ thanx n regards jeyaprakash.c |
| |||
| Hi, here is what JBOSS displays at startup, everything seems to be right and points to a JDK JBOSS_HOME: D:\java\jboss\jboss-4.2.1.GA JAVA: D:\java\jdk1.5.0_12\bin\java JAVA_OPTS: -Djava.library.path="D:\java\jboss\jboss-4.2.1.GA\bin\native;..." -Dprogram.name=run.bat -server -Xms256m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 CLASSPATH: D:\java\jdk1.5.0_12\lib\tools.jar;D:\java\jboss\jb oss-4.2.1.GA\bin\run.jar To use sun compiler instead of jdt in tomcat I modified web.xml in JBOSS_HOME\server\default\deploy\jboss-web.deployer\conf and added the following to the jsp servlet configuration <init-param> <param-name>compilerClassName</param-name> <param-value>com.sun.tools.javac.main.Main</param-value> </init-param> <init-param> <param-name>compilerTargetVM</param-name> <param-value>1.5</param-value> </init-param> <init-param> <param-name>compilerSourceVM</param-name> <param-value>1.5</param-value> </init-param> but I have the same error as when I use the jdt compiler. I'm clueless on what else I could try from here, I posted also the issue on jboss forums last week but haven't got an answer so far, I suspect a classloader side effect with my application as I get the same error accessing the jboss web-console only when my application is deployed. |
| |||
| I checked that before and removed log4j.jar and commons-logging.jar from my application as they are already in JBOSS_HOME/server/default/lib but I have the same issue |
| |||
| No buggers like servlet.jar, jasper.jar...? It's hard to figure out the issue without some extra info, especially for something that sounds as trivial as deploying a web application on JBoss. Can you try again on a fresh install of JBoss? Have you tried to reduce the complexity of your application until you narrow down the problem location?
__________________ cheers Aman |
| |||
| I have the following third party jars remaining in my WEB-INF/lib axis-schema.jar axis.jar commons-dbcp-1.2.1.jar commons-discovery.jar commons-fileupload-1.0.jar commons-pool-1.3.jar jaxrpc.jar jms.jar ldap.jar ldapjdk.jar mail.jar ojdbc14.jar saaj.jar wsdl4j.jar my application runs also a web service using axis, I removed the axis servlet from the web.xml and all the jars related to it but I still have the issue |
| |||
| I tried with a fresh install of jboss on a different machine and I have the same issue, I tried also jboss 4.0.5 instead of 4.2.1 and I had the problem also |
| |||
| Though some jars are probably useless (mail, jms...) because provided by the J2EE container, I do not see anything there that could disrupt JSP compilation. One crazy idea: your web.xml targets Servlet 2.5/JSP 2.1 (ie JEE 5.0), which is fine on TC6, but not ok for JBoss 4.x that supports only Servlet 2.4/JSP 2.0 (ie J2EE 1.4). ? PS. I notice that you use DBCP and not JBoss connection pooling: why?
__________________ cheers Aman |
| |||
| I still have the issue after removing some more jars and the application web.xml doesn't target Servlet 2.5/JSP 2.1 so it should be fine. The application has never been deployed on jboss but was build against tomcat and we are in the process of migrating it to jboss, that's why we are not taking advantage of everything that jboss is offering right now. |
| |||
| All in all, this does not make sense or is a world's premiere, but this does not help you. Do you precompile your JSPs? Do you declare them as servlets in your web.xml?
__________________ cheers Aman |
| |||
| Yes I tried that also, I precompiled the JSPs to see if it solves my issue but no luck, strangely in this case jboss logs report the same exception "no java compiler available" but why is it looking for a compiler in this case ? |
| |||
| Honestly, at this point, without having a look at your WAR, I do not see what I can tell you further, as you seem to have thoroughly investigated the issue. Did you get any luck on the JBoss forums?
__________________ cheers Aman |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pascal Compiler | drecko | Pascal and Delphi | 2 | 11-06-2007 03:43 AM |
| UNIX OS with CC compiler & TC compiler | vigneshgets | C and C++ Programming | 0 | 08-01-2007 12:28 AM |
| compiler & interpreter | nssukumar | C and C++ Programming | 0 | 07-17-2007 11:24 PM |
| PHP on pages without a .php extension | sivaramakrishnan | PHP Programming | 1 | 07-17-2007 07:54 AM |
| Which C++ compiler do you guyz use? | drecko | C and C++ Programming | 4 | 03-09-2007 03:57 AM |