Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

able to connect through sqlplus but not through jdbc

714235Feb 25 2011 — edited Nov 20 2014
Hi All,

I am trying to connect with oracle db from my osgi OCEP bundle. I am able to login to the db server from sql*Plus. But while starting the server using its configuration I am not able to do. Anything I am missing here?
The error I get is so vague that i am not able to understand what can be the issue.

"Error: The Network Adapter could not establish the connection" Following is my configuration on OCEP server.

<data-source>
<name>StockDs</name>
<data-source-params>
<global-transactions-protocol>None</global-transactions-protocol>
</data-source-params>
<connection-pool-params>
<test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
<initial-capacity>5</initial-capacity>
<max-capacity>10</max-capacity>
</connection-pool-params>
<driver-params>
<url>jdbc:oracle:thin:@myhostname:1521:orcl</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>
<properties>
<element>
<name>user</name>
<value>wlevs</value>
</element>
<element>
<name>password</name>
<value>wlevs</value>
</element>

</properties>
<use-xa-data-source-interface>false</use-xa-data-source-interface>
</driver-params>


</data-source>


Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2011
Added on Feb 25 2011
6 comments
1,645 views