Bug 841506 - Mysql datasource of jbossas-7 and jbosseap-6.0 app is not started
Summary: Mysql datasource of jbossas-7 and jbosseap-6.0 app is not started
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Bill DeCoste
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-19 09:01 UTC by jizhao
Modified: 2015-05-14 22:56 UTC (History)
2 users (show)

Fixed In Version: ami-29339a40
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 20:42:42 UTC
Target Upstream Version:
Embargoed:


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

Description jizhao 2012-07-19 09:01:23 UTC
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 21:07:28 UTC
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-26 02:55:04 UTC
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.