Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 959993

Summary: Show "No Java compiler available" when access jbossews app after update jbosseap6.1
Product: OpenShift Container Platform Reporter: xjia <xjia>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.1.1CC: libra-onpremise-devel, lmeyer, pruan, wdecoste, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: With both JBoss EAP and JBoss EWS 1 channels enabled, the version of Tomcat installed was incompatible with JBoss EWS 1. Consequence: JBoss EWS apps would fail to execute with errors like "java.lang.IllegalStateException: No Java compiler available" Fix: This is not so much an OpenShift bug as a requirement to manage dependencies exactly right. Follow directions in https://access.redhat.com/site/articles/316613 to get the correct Tomcat for JBoss EWS under OSE 1.1. For OSE 1.2, this still applies and the documentation and example scripts have been adjusted. Result: This problem should no longer occur.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-09 18:59:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
mysql.jsp
none
mysql-connector-java-5.1.20-bin.jar none

Description xjia 2013-05-06 11:22:04 UTC
Description of problem:
Install environment from RHN, and create jbossews app embedded mysql cartridge. Then update jbosseap package to the version 6.1. Then access the app, show error message:
java.lang.IllegalStateException: No Java compiler available


Version-Release number of selected component (if applicable):
OSE-1.1
http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-6.1.0.ER5/rpms/jbappplatform-6-x86_64-server-6-rpm/

How reproducible:
100%

Steps to Reproduce:
1.Deploy jbossews app.
Attach two files: mysql.jsp and mysql-connector-java-5.1.20-bin.jar
(1) Create jbossews and embed mysql cartridge.
(2) Use these command to deploy this app.

cp -rf mysql.jsp ${jbossews_app}/src/main/webapp/ 
mkdir -p ${jbossews_app}/src/main/webapp/WEB-INF/lib 
cp -rf mysql-connector-java-5.1.20-bin.jar ${jbossews_app}/src/main/webapp/WEB-INF/lib 
cd ${jbossews_app}/src/main/webapp/ 
sed -i -e 's/#host/${db_host}/g' mysql.jsp && sed -i -e 's/#port/${db_port}/g' mysql.jsp 
sed -i -e 's/#dbname/${jbossews_app}/g' mysql.jsp 
sed -i -e 's/#user/admin/g' mysql.jsp 
sed -i -e 's/#passwd/${db_passwd}/g' mysql.jsp 
git add . && git commit -amt && git push

2.Access http://jbewsapp-jia.ose11.com/mysql.jsp?action=insert
3.Update jbosseap version 6.0 to version 6.1
4.Restart node
5.Access http://jbewsapp-jia.ose11.com/mysql.jsp?action=insert
  
Actual results:
5.  The page show error:

java.lang.IllegalStateException: No Java compiler available
	org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:229)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:584)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Expected results:
5. Some info like this:
Gear DNS: jbewsapp-jia.ose11.com
SQL statements:
INSERT INTO info VALUES(NULL, 'This is testing data for testing snapshoting and restoring big data in mysql database.This is testing data for testing snapshoting and restoring big data in mysql database.');
500 records have been inserted into mysql

Additional info:

Comment 1 xjia 2013-05-06 11:23:28 UTC
Created attachment 744080 [details]
mysql.jsp

Comment 2 xjia 2013-05-06 11:24:08 UTC
Created attachment 744081 [details]
mysql-connector-java-5.1.20-bin.jar

Comment 3 xjia 2013-05-06 11:25:38 UTC
If fresh install this environment with http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-6.1.0.ER5/rpms/jbappplatform-6-x86_64-server-6-rpm/ , this issue also happens.

Comment 6 Bill DeCoste 2013-05-06 18:59:58 UTC
Not seeing this problem in a devenv. JSPs compile without issue.

Comment 7 Brenton Leanhardt 2013-05-07 19:02:13 UTC
I was able to reproduce this.  The reason it wasn't happening before was because my test environment have the EAP 6.1 repo and EWS 2.0 enabled.  For OpenShift Enterprise we instruct users to have only EAP and EWS 1.0 repos enabled.  I'll track down exactly which package is causing the issue.

Comment 8 Brenton Leanhardt 2013-05-07 20:22:25 UTC
When the EWS 2.0 yum repository is enabled a newer version of tomcat6 is installed:

tomcat6-lib-6.0.35-29_patch_06.ep6.el6.noarch 
tomcat6-6.0.35-29_patch_06.ep6.el6.noarch     
tomcat6-servlet-2.5-api-6.0.35-29_patch_06.ep6.el6.noarch 
tomcat6-jsp-2.1-api-6.0.35-29_patch_06.ep6.el6.noarch 
tomcat6-el-1.0-api-6.0.35-29_patch_06.ep6.el6.noarch 
apache-commons-pool-tomcat-eap6-1.5.6-8.redhat_2.ep6.el6.1.noarch 
apache-commons-logging-tomcat-eap6-1.1.1-6.9_redhat_1.ep6.el6.noarch 
apache-commons-dbcp-tomcat-eap6-1.4-13.1.redhat_2.ep6.el6.noarch 
apache-commons-daemon-eap6-1.0.15-2.redhat_1.ep6.el6.noarch 
apache-commons-collections-tomcat-eap6-3.2.1-13.redhat_2.ep6.el6.1.noarch

With those packages installed the issue goes away.

Comment 9 Bill DeCoste 2013-05-07 20:24:35 UTC
EWS1 contains tomcat 5 and 6
EWS2 contains tomcat 6 and 7

Comment 10 Brenton Leanhardt 2013-05-07 20:33:26 UTC
The solution for now is to enable the EWS 2.0 content set and disable EWS 1.0.  We are planning to update https://access.redhat.com/site/articles/316613 if it passes the tests.

yum-config-manager --enable jb-eap-6-for-rhel-6-server-rpms
yum-config-manager --enable jb-ews-2-for-rhel-6-server-rpms
yum-config-manager --disable jb-ews-1-for-rhel-6-server-rpms
yum-config-manager --disable jb-eap-5-for-rhel-6-server-rpms

Comment 11 xjia 2013-05-08 07:15:01 UTC
Verify:
Follow comment #10 , I can get the expected results.

Comment 13 errata-xmlrpc 2013-07-09 18:59:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1032.html