• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jboss- DataSource Problem

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have Jboss 4.0.1 and mysql4.1 and j2sdk1.4.2_07. i have deployed a ear file which contains 1 entity bean . I get the following errors when i start the server

ObjectName: jboss.j2ee:jndiName=ejb/Example/Story,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data
source: java:/MySqlDS; - nested throwable: (javax.naming.NameNotFoundException:
MySqlDS not bound)

and in the browser i get following error

java.rmi.ServerException: RuntimeException; nested exception is: java.lang.IllegalStateException: createBeanClassInstanceCommand == null

Can somebody please help me with this problem .
 
Mukti Furtado
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
My problem is solved. I followed the steps mentioned below

1.Replace jboss-4.0.0/server/standard/deploy/hsqldb-ds.xml by a file named mysql-ds.xml with the following content:
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:mysql://localhost/test</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>jboss</user-name>
<security-domain>MySqlDbRealm</security-domain>
</local-tx-datasource>
</datasources>
2.Edit jboss-4.0.0/server/standard/conf/standardjaws.xml with the following parameters:
<datasource>java:/DefaultDS</datasource>
<type-mapping>mySQL</type-mapping>

3.Edit jboss-4.0.0/server/standard/conf/standardjbosscmp-jdbc.xml with the following parameters:
<datasource-mapping>mySQL</datasource-mapping>
...
<fk-constraint>true</fk-constraint>

4.Replace file jboss-4.0.0/server/standard/deploy/jms/hsql-jdbc2-service.xml by file jboss-4.0.0/docs/examples/jms/mysql-jdbc2-service.xml and change MySqlDs to DefaultDS (line 47) in that file.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic