This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.IllegalStateException: jboss.jca:name=MySQLDS,service=ManagedConnectionFactory is already

 
abir jelassi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I have a big big problem. When i deploy my ear project composed by a dynamin web project and an ejb project in jboss i have this error:
i'm sure that i have only one mysql-ds.xml under meta inf and i deleted the mysql-ds.xml of jboss_home/server/default/deploy:
i need your help, pleaaaaaaaase

 
abir jelassi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Voilà mon mysql-ds.xml



Does anyone have a solution??
 
abir jelassi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have errors anymore following this forum
but, can't see the execution of my application
Thanks anyway
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is that -ds.xml located? And do you have more than one such file somewhere within your application?
 
abir jelassi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mysql-ds.xml is under meta inf of the ejb project with persistence.xml,orm.xml, ejb-jar.xml and beans.xml
thanks for your reply
 
Raghav Viswanathan
Greenhorn
Posts: 26
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Abir,

The issue is due to a conflict with already existing JNDI MySQLDS. You can try one of the following

1. Remove your application .ear file and start JBOSS as such. Now check in the admin console under datasources link if you already have one with the given JNDI name.
Two things could be possible
a. If you have a datasource with the JNDI name as MySQLDS, then there is a -ds.xml in your deploy folder with the same JNDI name. All you could do is a search for the word "MySQLDS" in your folder search/file search of the folder.
b. If there are no data sources listed then it must be inside of your .ear file.

2. Change the JNDI name ( Probably not the right way to do but would work).

Please note that there are few other ds.xml files even inside the folders of the deploy folder. For instance there is a folder called jbossesb.esb under the deploy folder which has a message-store-ds.xml which also creates a JNDI binding of the data source.

Just a word of advice, do not manually edit the ds.xml file for your server configuration even while changing the DB from HSQLDB. Run the ant script available in /jboss-as/tools/schema. Its is scripted beautifully and is very user-friendly.


Thanks and regards
Raghav.V



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic