Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
[CLOUD-297] App Cloud: JSP runs in App Cloud but fails in Codenvy Created: 18/Oct/14 Updated: 20/Oct/14 Resolved: 20/Oct/14 Status: Project: Component/s: Affects Version/s: Fix Version/s: Resolved WSO2 Cloud None None Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Bug Dmitry Sotnikov Fixed None Not Specified Attachments: Failure in Codenvy container.png Major Moderate None Highest Sanjaya Ratnaweera 0 Priority: Assignee: Votes: Not Specified Not Specified OK in App Cloud.png Severity: Estimated Complexity: Test cases added: Yes Description This simple JSP runs in App Cloud but fails in Codenvy. This discrepancy makes it impossible to debug apps inside the IDE and force me to push back all my edits. <%@ page import="java.io.,java.util.,java.sql.*"%> <%@ page import="javax.servlet.http.,javax.servlet." %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> <html> <head> <title>SELECT Operation</title> </head> <body> <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://mysql-dev-01.cloud.wso2.com:3306/MyNewDB_wso2dmitry2639" user="User2_FaR4cRWk" password="password_removed"/> <sql:query dataSource="$ {snapshot} " var="result"> SELECT * from Customer; </sql:query> <table border="1" width="100%"> <tr> <th>Name</th> <th>Category</th> <th>Region</th> </tr> <c:forEach var="row" items="$ {result.rows} "> <tr> <td><c:out value="$ {row.Name} "/></td> <td><c:out value="$ {row.Category} "/></td> <td><c:out value="$ {row.Region} "/></td> </tr> </c:forEach> </table> </body> </html> Error when run in Codenvy: http://ide-runner.cloud.wso2.com:55265/ HTTP Status 500 - In <driver>, invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" type Exception report message In <driver>, invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" description The server encountered an internal error that prevented it from fulfilling this request. exception javax.servlet.ServletException: In <driver>, invalid driver class name: "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:944) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:879) org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:107) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) root cause java.lang.ClassNotFoundException: com.mysql.jdbc.Driver org.wso2.carbon.webapp.mgt.loader.CarbonWebappClassLoader.loadClass(CarbonWebappClassLoader.java:13 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:270) org.apache.taglibs.standard.tag.common.sql.DataSourceWrapper.setDriverClassName(DataSourceWrapper.java org.apache.taglibs.standard.tag.common.sql.SetDataSourceTagSupport.doStartTag(SetDataSourceTagSupport.ja org.apache.jsp.index_jsp._jspx_meth_sql_setDataSource_0(org.apache.jsp.index_jsp:128) org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.34 logs. Apache Tomcat/7.0.34 Comments Comment by Amila Maharachchi [ 18/Oct/14 ] Know the reason for this. We have missed to pack the mysql connector jar to the docker image of AppServer. Sanjaya, please fix this. Comment by Sanjaya Ratnaweera [ 20/Oct/14 ] Added mysql connecer jar to repository/components/lib of appserver. Generated at Fri May 05 23:00:42 IST 2017 using JIRA 7.2.2#72004sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.