Amit Ashok wrote:
> Hi ,
> I am trying for the last 2 days to connect jboss 3.2.1 to oracle 9i
> using OCI client as thin client is not giving me the required output .
>
> I have modified oracle-ds.xml
>
> <datasources>
> <local-tx-datasource>
> <jndi-name>CLKS1</jndi-name>
>
> <connection-url>jdbc:oracle:oci:@(protected)>
>
> <!--
>
> <connection-url>jdbc:oracle:thin:@(protected)>
>
> -->
> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
> <user-name>jb</user-name>
> <password>jb</password>
>
> <exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
> </local-tx-datasource>
>
> </datasources>
> I have tried oci , oci8 ,oci9 but in all the cases I have been denied
> connection . in case of oci8 with oracle 8i server I got the following
> error message
>
>
> at
java.lang.Thread.run (
Thread.java:479)
>
org.jboss.util.NestedSQLException: Could not create connection; - nested
> throwable: (
java.sql.SQLException: Error w
> hile trying to retrieve text for error
ORA-06401> ); - nested throwable: (
org.jboss.resource.JBossResourceException: Could
> not create connection; - nested throwable:
> (
java.sql.SQLException: Error while trying to retrieve text for error
>
ORA-06401> ))
>
> while with oracle 9i and 9i drivers I keep getting
>
>
>
> com.niit.cliks.control.common.GeneralFailureException: null;
> CausedByException is:
> Could not create connection; - nested throwable:
> (
java.sql.SQLException:
ORA-06401: NETCMN: invalid driver
> designator
> ); - nested throwable: (
org.jboss.resource.JBossResourceException: Could
> not create connection; - nested throwable:
> (
java.sql.SQLException:
ORA-06401: NETCMN: invalid driver designator
> ))
>
>
> my url string was
> <connection-url>jdbc:oracle:oci:@(protected)>
>
>
>
> then i changed the url string to
> <connection-url>jdbc:oracle:oci9:@(protected)>
> the exception changed to
>
> com.niit.cliks.control.common.GeneralFailureException: null;
> CausedByException is:
> Apparently wrong driver class specified for URL: class:
> oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:o
> ci9:@(protected):
> (
org.jboss.resource.JBossResourceException: Apparently wrong dri
> ver class specified for URL: class: oracle.jdbc.driver.OracleDriver,
> url: jdbc:oracle:oci9:@(protected)
> 1)
>
> can some one help me .
Look in the Oracle documentation. For the OCI driver, your URL should
look like this:
jdbc:oracle:oci:@(protected)
where mytnsname is defined in your tnsnames file. The host and port are
obtained from there. The documentation specifically states that a URL
with a hostname and port is for the thin client only.
--
Guy Rouillier
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
JBoss-user@(protected)
https://lists.sourceforge.net/lists/listinfo/jboss-user