JBoss As 5.1.0.GA Switch DefaultDS to Oracle DS
grdzeli_kaci Apr 17, 2010 1:42 PMhi all,
I found many topics about this problem but they can't help me.
What I did :
1. copy oracle jdbc driver.
2. remove hsqls datasource file from deply. (alos i remove hsql database jars from library)
3. copy oracle datasource xml file into deploy. this file looks like :
<datasources> <xa-datasource> <jndi-name>XAOracleDS</jndi-name> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> <xa-datasource-property name="URL">jdbc:oracle:thin:@192.168.9.151:1521:DEVSTR</xa-datasource-property> <xa-datasource-property name="User">jbossadmin</xa-datasource-property> <xa-datasource-property name="Password">jbossadmin</xa-datasource-property> <security-domain>OracleDbRealm</security-domain> <security-domain-and-application>OracleDbRealm</security-domain-and-application> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> <metadata> <type-mapping>Oracle9i</type-mapping> </metadata> </xa-datasource> <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter" name="jboss.jca:service=OracleXAExceptionFormatter"> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends> </mbean> </datasources>
4. Remove HsqlDbRealm from login-config.xml
5. add oracle configuration into login-config.xml
<application-policy name="OracleDbRealm"> <authentication> <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule" flag="required"> <module-option name="principal">jbossadmin</module-option> <module-option name="userName">jbossadmin</module-option> <module-option name="password">jbossadmin</module-option> <module-option name="managedConnectionFactoryName">jboss.jca:service=XATxCM,name=XAOracleDS</module-option> </login-module> </authentication> </application-policy>
6. For messaging I remove hsqldb-persistence-service.xml file from server/all/deploy/messaging
7.copy oracle-persistence-service.xml into server/all/deploy/messaging
8.I've changed name to "XAOracleDS" into oracle-persistence-service.xml file.
9.I've also changed file server/all/conf/standardjbosscmp-jdbc.xml.
<jbosscmp-jdbc> <defaults> <datasource>java:/XAOracleDS</datasource> <datasource-mapping>Oracle9i</datasource-mapping> <create-table>true</create-table> ...................
But not success, when jboss started i got an error :
010-04-17 21:11:51,904 WARN [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main) XAExceptionFormatters are not supported by the JBossTS Transaction Service - this warn 2010-04-17 21:11:52,330 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=XAOra 2010-04-17 21:11:56,587 ERROR [org.jboss.messaging.util.ExceptionUtil] (main) org.jboss.messaging.core.jmx.JDBCPersistenceManagerService@f7ad813 startService java.sql.SQLException: ORA-00942: table or view does not exist at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) ......................................... 2010-04-17 21:12:00,175 WARN [org.jboss.ejb.txtimer.DatabasePersistencePolicy] (main) Unable to get timer handles for containerId: jboss.j2ee:jar=profileservice-secured.jar,name= java.sql.SQLException: ORA-00942: table or view does not exist
What I misssed ?
Any idea ??
How to create Tables into database ? i thik that jboss must create them itself.
Regards,
Paata Lominadze.