on 12-29-2005 4:11 AM
Hi,
I have created a new Database in SAPDB and i have registered the Data Source in Netweaver Server using Visual Administration tool witn datasource name say "TestDataSource"
Now i want to connect my application to the databse using the datasource which i have created.
When i open <b>data-source-aliase.xml</b> file i found the "data-source-name" declared as "${com.sap.datasource.default}" as given below,
<b><data-source-name>${com.sap.datasource.default}</data-source-name></b>
How can i define newly created datasource instead of com.sap.datasource.default?
I tried to deploy my application by replacing the "${com.sap.datasource.default}" to "TestDataSource"
but i got deployment exception.
Could you please help me how to define the datasources in data-source-aliase.xml?
Thanks and Regards,
Sudheesh
Hi Sudheesh,
Try to do like this...
[code]<?xml version="1.0"?>
<data-source-aliases>
<aliases>
<data-source-name> ${com.sap.datasource.default} </data-source-name>
<alias>TestDataSource</alias>
</aliases>
</data-source-aliases>[/code]
Note: In the generated XML, the name
${com.sap.datasource.default} represents the default
DataSource stored in the server.
Check this link it may be helpful.
Hope this solves the problem.
Regards,
Maheswaran.B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1) you have also the option to define a DS in visual admin .. gui env. .. good to make the first steps.
2) once you defined a DS, like in 1, in your ejb module project, you can reference this DS in the DS reference section .. you can also export the DS as xml document for later automatic deployment, say with the admin shell.
Regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi gregor
Is it possible to create a DataSource.xml with NWDS( not with visual admin).
Also i had created a DS using the visual admin , but wanted to know where is this configuration stored . Is this stored in DB or some files , as i thought the DS configuartion details might be written to file system , but when i checked i was unable to find that ..
regards
rajesh kr
Hi
How do you create a data-source-aliase.xml.Is it possible through NW studio?
please let me know on this as rt now Iam creating through admin console.
regards
rajesh kr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rajesh,
I think the datasource-aliase.xml can be created through NDS(Netweaver developer Studio). Please create a enterprise application project(by clicking file -> new-> projects -> J2EE -> Enterprise aplication project)[I hope you have already created it :-)]. Once you have created the project, you can create the datasource-aliase.xml by invoking the context menu on the created enterprise project (you should be in the J2ee perspective).
If you want to create a new Data-Source, you can create it using Visual Administration console available with netweaver (will be found in <installation directory>:\usr\sap\J2E\JC00\j2ee\admin).
Visual Administration -> Server -> services -> JDBC Connector...
Best regards,
Sudheesh...
Hi,
Please check if the xml is in the format below
<data-source-aliases>
<aliases>
<data-source-name>TestDataSource</data-source-name>
<alias>alias/TestDataSource</alias>
</aliases>
</data-source-aliases>
you will have to refer this DataSource (in the java code) using the alias name 'alias/TestDataSource'.
Regards,
S.Divakar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Without replacing default data source, try adding a new <data-source-name> in new
Also, refer this for more information.
Hope this helps.
Regards,
Uma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.