File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes CMP bean Deployment Problem with DataSource (mysql) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply locked New topic
Author

CMP bean Deployment Problem with DataSource (mysql)

Ketan Makadia
Greenhorn

Joined: Apr 27, 2007
Posts: 2
hello Friends ,
i am getting following errors while deploying cmp beans.

Error :
11:37:34,679 INFO [EJBDeployer] Deployed: file:/C:/jboss-3.2.6/server/default/d
eploy/ProductBean.jar
11:37:34,679 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
MBeans waiting for other MBeans:
ObjectName: jboss.j2ee:jndiName=FaqMstLocal,plugin=pool,service=EJB
state: CREATED
I Depend On:
Depends On Me:
ObjectName: jboss.j2ee:jndiName=FaqMstLocal,service=EJB
state: FAILED
I Depend On:
Depends On Me: MBeanException: org.jboss.deployment.DeploymentException: Error
in jbosscmp-jdbc.xml : datasource-mapping MySql not found
Cause: org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : da
tasource-mapping MySql not found

MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
ObjectName: jboss.j2ee:jndiName=FaqMstLocal,plugin=pool,service=EJB
state: CREATED
I Depend On:
Depends On Me:
ObjectName: jboss.j2ee:jndiName=FaqMstLocal,service=EJB
state: FAILED
I Depend On:
Depends On Me: MBeanException: org.jboss.deployment.DeploymentException: Error
in jbosscmp-jdbc.xml : datasource-mapping MySql not found
Cause: org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : da
tasource-mapping MySql not found
1 ) Contain of mysql-ds.xml File

<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml,v 1.1.2.1 2003/12/12 19:19:56 starksm Exp $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->

<datasources>

<local-tx-datasource>
<jndi-name>MySql</jndi-name>
<connection-url>jdbc:mysql://192.168.111.44:3306/temp</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>new_temp</user-name>
<password>temp</password>
</local-tx-datasource>
</datasources>

2) i have also add datasource mappping in standardjaws.xml and standardjbosscmp-jdbc.xml file
File :standardjaws.xml
<datasource>java:/MySql</datasource>
<type-mapping>MySql</type-mapping>

File : standardjbosscmp-jdbc.xml
<datasource>java:/MySql</datasource>
<datasource-mapping>MySql</datasource-mapping>

3)Contain of jbosscmp-jdbc.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">

<jbosscmp-jdbc>
<defaults>
<datasource>java:/MySql</datasource>
<datasource-mapping>MySql</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
</defaults>

<enterprise-beans>

<!--
To add beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called jbosscmp-jdbc-beans.xml
that contains the <entity></entity> markup for those beans.
-->

<entity>
<ejb-name>FaqMst</ejb-name>
<datasource></datasource>
<datasource-mapping></datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<table-name>FAQ_MST</table-name>

<cmp-field>
<field-name>faqCatId</field-name>
<column-name>faq_cat_id</column-name>

</cmp-field>
<cmp-field>
<field-name>faqCatName</field-name>
<column-name>faq_cat_name</column-name>

</cmp-field>
<cmp-field>
<field-name>faqCatDesc</field-name>
<column-name>faq_cat_desc</column-name>

</cmp-field>

<!-- jboss 3.2 features -->
<!-- optimistic locking does not express the exclusions needed -->
</entity>

</enterprise-beans>

</jbosscmp-jdbc>

Can Any one help me out to figure out this problem ?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Please do not duplicate post. You already have the same thread in the JBoss forum. I am going to close this thread.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CMP bean Deployment Problem with DataSource (mysql)
 
Similar Threads
failed to create new proxy target
failed to create new proxy target
JDataStoreDS not bound error
Help me to remove this Error in Entity Bean
JDataStoreDS not bound error