-
15. Re: database binding issue
srinivas.bijjam Dec 26, 2012 7:44 AM (in response to jaikiran)Dear Jaikiran
I configured the dirver and I am attaching all the required files here
The zip contains
application.xml
config-ds.xml ----- this is my ds.xml files
jboss-deployment-structure.xml
module.xml -- this module is related to ojdbc6 driver
serverlog.log
standalone-full.xml
I am deploying my application using the command
standalone.bat -c standalone-full.xml
Regards
Srini
-
allFiles.zip 10.3 KB
-
-
16. Re: database binding issue
nickarls Dec 26, 2012 11:05 AM (in response to srinivas.bijjam)Where is the datasource -> driver module reference?
-
17. Re: database binding issue
srinivas.bijjam Dec 26, 2012 11:24 AM (in response to nickarls)Dear Nicklas
In jboss-deployment-structure.xml I refered as
<module name="com.oracle.ojdbc6" export="true"/> If my understanding is wrong, I am sorry for that but let me know some more information so that I will give the information
Regards
Srini
-
18. Re: database binding issue
nickarls Dec 26, 2012 2:35 PM (in response to srinivas.bijjam)Hmm. The jboss-deployment-stucture.xml is application specific but if you throw the *-ds.xml file in the deployment directory, it will probably deploy (and need the driver module reference) since the DS is application server specific. Not that I see any CNFE:s but it is worth a try to have explicit driver module references in the -ds.xml files.
-
19. Re: database binding issue
srinivas.bijjam Dec 26, 2012 9:52 PM (in response to nickarls)Dear Nicklas
I changed the ds.xml as said below
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<xa-datasource enabled="true" jndi-name="java:/sw-schedulerDataSource-oraclePool" pool-name="sw-schedulerDataSource-oraclePool" type="javax.sql.DataSource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6.jar</driver>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</xa-datasource>
<xa-datasource enabled="true" jndi-name="java:/sw-dataSource-oraclePool" pool-name="sw-dataSource-oraclePool" type="javax.sql.DataSource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6.jar</driver>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</xa-datasource>
<drivers>
<driver name="ojdbc6" module="com.oracle.ojdbc6">
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
but still getting the error(new error) as
JBAS014775: New missing/unsatisfied dependencies:
service jboss.data-source.java:/sw-dataSource-oraclePool (missing) dependents: [service jboss.deployment.subunit."MyAdminServer.ear"."ctorcmp.jar".component.BusinessObject.jdbc.store-manager.INIT, service jboss.deployment.subunit."MyAdminServer.ear"."dqrulescmp.jar".component.DIInstObj.jdbc.store-manager.INIT, service jboss.deployment.subunit."MyAdminServer.ear"."servicescmp.jar".component.EmailService.jdbc.store-manager.INIT, service jboss.deployment.subunit."MyAdminServer.ear"."jobscmp.jar".component.JobInst.jdbc.store-manager.INIT, JBAS014799: ... and 53 more ]
service jboss.jdbc-driver.ojdbc6_jar (missing) dependents: [service jboss.data-source.sw-dataSource-oraclePool, service jboss.data-source.sw-schedulerDataSource-oraclePool]
Regards
Srini
-
20. Re: database binding issue
jaikiran Dec 27, 2012 1:25 AM (in response to srinivas.bijjam)The attached config-ds.xml is not the same as the one you have been posting throughout this thread (for example, the attached file has no mention of the <driver> element). Please make sure you are posting/using the correct files.
-
21. Re: database binding issue
srinivas.bijjam Dec 27, 2012 3:12 AM (in response to jaikiran)Jaikiran
I posted the above one after Mr Nicklas said in one of the above comment
Hmm. The jboss-deployment-stucture.xml is application specific but if you throw the *-ds.xml file in the deployment directory, it will probably deploy (and need the driver module reference) since the DS is application server specific. Not that I see any CNFE:s but it is worth a try to have explicit driver module references in the -ds.xml files.
I changed the ds.xml and tested as per my understanding of his comment. Even it was giving error
But I am using the one which I have attached.
Regards
Srini
-
22. Re: database binding issue
jaikiran Dec 27, 2012 6:23 AM (in response to srinivas.bijjam)Srinivas Reddy Bijjam wrote:
Jaikiran
I posted the above one after Mr Nicklas said in one of the above comment
...
But I am using the one which I have attached.
I was talking about the attached config-ds.xml which has no <driver> element at all.
-
23. Re: database binding issue
srinivas.bijjam Dec 27, 2012 10:35 AM (in response to jaikiran)Dear Jaikiran
As I kept the driver in standlone-full.xml, I am not using the same in ds.xml.
But even I tried the same but still I got the errors which I posted in reply to Mr Nicklas in the following comment
19. Dec 27, 2012 8:22 AM (in response to Nicklas Karlsson)
-
24. Re: database binding issue
nickarls Dec 28, 2012 2:04 AM (in response to srinivas.bijjam)if your driver is named ojdbc6, you can't refer to it with <driver>ojdbc6.jar</driver>, the mapping has to be 1:1
-
25. Re: database binding issue
srinivas.bijjam Dec 28, 2012 6:03 AM (in response to nickarls)Dear Nicklas
Is it possible for you to share a sample ds.xml that suits JBOSS 7.1.1 Application server so that It will help me to find where I am going wrong?
Regards
Srini
-
26. Re: database binding issue
nickarls Dec 28, 2012 6:08 AM (in response to srinivas.bijjam)This is a stripped-down version of my DS def
<subsystem xmlns="urn:jboss:domain:datasources:1.0"> <datasources> <datasource jndi-name="java:jboss/datasources/MyDataSource" pool-name="MyPool" enabled="true"> <connection-url>jdbc:oracle:thin:@host:port:sid</connection-url> <driver>oracle</driver> <security> <user-name>un</user-name> <password>pw</password> </security> </datasource> <drivers> <driver name="oracle" module="com.oracle.db"/> </drivers> </datasources> </subsystem>
com.oracle.db is a module defined in the normal way (check docs)
-
27. Re: database binding issue
srinivas.bijjam Dec 31, 2012 12:58 PM (in response to nickarls)Dear Nicklas
The main problem for me is if I keep the following code in standalone-full.xml under datasources it is working fine with out errors(not using ds.xml) but when I keep the same in config-ds.xml then I am getting the missing dependiences error
<xa-datasource enabled="true" jndi-name="java:jboss/sw-schedulerDataSource-oraclePool" pool-name="sw-schedulerDataSource-oraclePool" type="javax.sql.DataSource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
</xa-datasource>
<xa-datasource enabled="true" jndi-name="java:jboss/sw-dataSource-oraclePool" pool-name="sw-dataSource-oraclePool" type="javax.sql.DataSource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
</xa-datasource>
The only difference between datasource defination in standalone-full.xml to my config-ds.xml is , in my config-ds.xml I am not putting the below code but I kept it in my standalone-full.xml
<driver name="ojdbc6" module="com.oracle.ojdbc6"> <driver-class>oracle.jdbc.OracleDriver</driver-class> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> </driver> Here is the code in these two files
standalone-full.xml
<subsystem xmlns="urn:jboss:domain:datasources:1.1">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="ojdbc6" module="com.oracle.ojdbc6">
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
<driver name="sqljdbc4" module="com.sqlServer.jdbc">
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
</driver>
</drivers>
</datasources>
</subsystem>
Config-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<xa-datasource enabled="true" jndi-name="java:jboss/sw-schedulerDataSource-oraclePool" pool-name="sw-schedulerDataSource-oraclePool" type="javax.sql.DataSource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>DQPLUS</user-name>
<password>changeme</password>
</security>
</xa-datasource>
<xa-datasource enabled="true" jndi-name="java:jboss/sw-dataSource-oraclePool" pool-name="sw-dataSource-oraclePool" type="javax.sql.DataSource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>DQPLUS</user-name>
<password>changeme</password>
</security>
</xa-datasource>
</datasources>
I am suspecting some thing wrong in jbosscmp xml file. Here are the details of the same
Is there any problem with these files and code.
jbosscmp-jdbc.xml
<entity>
<ejb-name>XXXTable</ejb-name>
<datasource>java:jboss/sw-dataSource-oraclePool</datasource>
<datasource-mapping>Oracle9i</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<table-name>table_name1</table-name>
<cmp-field>
<field-name>colName</field-name>
<column-name>col1</column-name>
</cmp-field>
<cmp-field>
<field-name>colName</field-name>
<column-name>col2</column-name>
</cmp-field>
</entity>
CMP code to generate jbosscmp-jdbc.xml
/**
* @ejbgen:entity
* ejb-name = xxxParam
* table-name = xxx
* data-source-name = sw-dataSource-oraclePool
* concurrency-strategy = Database
* prim-key-class = java.lang.String
* max-beans-in-cache = 250
* abstract-schema-name = TemplateParamSchema
* reentrant = False
* default-transaction = Supports
*
* @ejbgen:jndi-name
* local = java:global/MyAdminServer/servicescmp/xxxParam!com.xxx.services.cmp.xxxParamHome
*
*
*
*/
/**
* @ejb.bean
* name="xxxParam"
* cmp-version="2.x"
* local-jndi-name="java:global/MyAdminServer/servicescmp/TemplateParam!com.xxx.services.cmp.xxxParamHome"
* view-type="local"
* primkey-field="paramId"
* schema="TemplateParamSchema"
* reentrant="False"
*
*
*
* @ejb.persistence
* table-name="xxx"
*
* @ejb.value-object
* name="xxxParam"
*
* @ejb.transaction type="Supports"
* @ejb.transaction-type type="Container"
*
*
* @jboss.persistence
* datasource="java:jboss/sw-dataSource-oraclePool"
* datasource-mapping="Oracle9i"
*
*/
Regards
Srini
-
28. Re: database binding issue
jaikiran Dec 31, 2012 11:28 PM (in response to srinivas.bijjam)So what's the new error that you see when you have specified the correct driver name in your -ds.xml? The previous post containing the dependency errors is now irrelevant since it was using an incorrect driver name. Please make sure you post relevant information including the correct files, logs and error messages, otherwise it just becomes too difficult to provide any help. As you can see, so far we have gone into the second page of this discussion and still haven't seen the real error message when the correct config is used.
-
29. Re: database binding issue
srinivas.bijjam Jan 1, 2013 12:34 AM (in response to jaikiran)Jaikiran
I am still getting the same error
JBAS014775: New missing/unsatisfied dependencies:
service jboss.data-source.java:jboss/sw-dataSource-oraclePool (missing) dependents: [service jboss.deployment.subunit."MyAdminServer.ear"."ctorcmp.jar".component.BusinessObject.jdbc.store-manager.INIT, service jboss.deployment.subunit."MyAdminServer.ear"."dqrulescmp.jar".component.DIInstObj.jdbc.store-manager.INIT, service jboss.deployment.subunit."MyAdminServer.ear"."servicescmp.jar".component.EmailService.jdbc.store-manager.INIT, service jboss.deployment.subunit."MyAdminServer.ear"."jobscmp.jar".component.JobInst.jdbc.store-manager.INIT, JBAS014799: ... and 53 more ]
If I use the same datasource that I defined in my config-ds.xml in standalone-full.xml , it is working perfectly
Regrets for making the discussion lengthy and confusion.
Attached once gain the log file and standalone-full.xml and config-ds.xml
Regards
Srini
-
serverlog.txt.zip 4.2 KB
-
standalone-full.xml 17.2 KB
-
config-ds.xml 1.5 KB
-