• 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 deployment problem

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hii,
I am using jboss-3.2.6 version.I am trying to deploy the ear file in jboss.But it is giving an exception:

19:07:32,921 ERROR [WebModule] Starting failed

jboss.web.deployment:war=DashboardWeb.war,id=296059945
org.jboss.deployment.DeploymentException: Error during deploy; - nested

throwable: (javax.naming.NamingException: resource-ref: jdbc/mySql has

no valid JNDI binding. Check the jboss-web/resource-ref.)
at

org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:329)
at org.jboss.web.WebModule.startModule(WebModule.java:62)


Which are the xml files i need to edit?
If anyone have any idea about this, please help
Sujith
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,if I'm not mistaken,you need to modified the standardjaws.xml,standardjbosscmp-jdbc.xml and login-config.xml.This files are located inside the conf folder.

Maybe with example, it will be easier for you to understand.
---------------------------------------------------------------------------
My mysql-ds.xml(which is created and put it inside the deploy folder):

<datasource>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost/icbm</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name></user-name>
<password></password>
<security-domain>MysqlDbRealm</security-domain>
</local-tx-datasource>
</datasource>

---------------------------------------------------------------------------
Then,u need to make some changes to the standardjaws.xml:
All you need to do is changes the current <datasource>x</datasource>
and the <type-mapping>y</type-mapping>...where x = jndi-name inside the mysql-ds.xml and the y = db type that you're using.For this, is using MySql.

<jaws>
<datasource>java:/MySqlDS</datasource>
<type-mapping>mySql</type-mapping>
<debug>false</debug>

<default-entity>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>true</tuned-updates>
<read-only>false</read-only>
....
.....
.....
</jaws>
---------------------------------------------------------------------------
Then,u need to make some changes to the standardjbossccmp.xml:
What are the things that you need to change?Well,will be exactly the same as above.

<jbosscmp-jdbc>

<defaults>
<datasource>java:/MySqlDS</datasource>
<datasource-mapping>mySql</datasource-mapping>

<create-table>true</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
...
...
...
----------------------------------------------------------------------------
Then, you need to add this few lines to your login-config.xml, which will tell the jboss to look/used the correct datasource for different applications that you have deployed in JBOSS.
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName"></module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>

----------------------------------------------------------------------------

P/s:Sorry for my bad English and hopes this will help you to deploy your application.
 
Are you okay? You look a little big. Maybe this tiny ad will help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic