Bug 841506 - Mysql datasource of jbossas-7 and jbosseap-6.0 app is not started
Mysql datasource of jbossas-7 and jbosseap-6.0 app is not started
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Bill DeCoste
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-19 05:01 EDT by jizhao
Modified: 2015-05-14 18:56 EDT (History)
2 users (show)

See Also:
Fixed In Version: ami-29339a40
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-07 16:42:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
jsp program which connects to the Mysql datasource (1016 bytes, application/octet-stream)
2012-07-19 05:01 EDT, jizhao
no flags Details

  None (edit)
Description jizhao 2012-07-19 05:01:23 EDT
Created attachment 599096 [details]
jsp program which connects to the Mysql datasource

Description of problem:
Create a jbossas-7 or jbosseap-6.0 app and embed mysql-5.1 to it. Write jsp code to use the Mysql datasource. Get error: "Error looking up datasources/MysqlDS, service service jboss.naming.context.java.jboss.datasources.MysqlDS is not started"

Version-Release number of selected component (if applicable):
devenv_1902

How reproducible:
Always

Steps to Reproduce:
1.Create a jbossas-7 or jbosseap-6.0 app and embed mysql to it
2.Copy the attached mysql.jsp to src/main/webapp and git push all the changes.
3.Visit <app_url>/mysql.jsp
  
Actual results:
<------------------output-------------------->
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.naming.NameNotFoundException: Error looking up datasources/MysqlDS, service service jboss.naming.context.java.jboss.datasources.MysqlDS is not started
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
	org.apache.jsp.mysql_jsp._jspService(mysql_jsp.java:87)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

root cause

javax.naming.NameNotFoundException: Error looking up datasources/MysqlDS, service service jboss.naming.context.java.jboss.datasources.MysqlDS is not started
	org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:126)
	org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:74)
	org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
	org.jboss.as.naming.InitialContext.lookup(InitialContext.java:129)
	org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)
	javax.naming.InitialContext.lookup(InitialContext.java:411)
	org.apache.jsp.mysql_jsp._jspService(mysql_jsp.java:62)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
<-------------------------------------------->

Expected results:
Mysql datasource should be connected successfully.

Additional info:
ExampleDS and PostgreSQLDS work fine.
Comment 1 Dan Mace 2012-07-23 17:07:28 EDT
The jboss-as7-modules and jboss-eap6-modules packages are not getting installed properly on the dev instances. Assigning to Bill DeCoste who maintains the pacakges.
Comment 2 jizhao 2012-07-25 22:55:04 EDT
Verified on devenv_1912.

Steps to verify:
1.Create a jbossas-7 or jbosseap-6.0 app and embed mysql to it
2.Copy the attached mysql.jsp to src/main/webapp and git push all the changes.
3.Visit <app_url>/mysql.jsp

Actual results:
MySQL datasource works fine.

Note You need to log in before you can comment on or make changes to this bug.