Skip to Main Content

Java SE (Java Platform, Standard Edition)

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Dicom-Data

843799Nov 23 2004 — edited Dec 17 2004
Hi Everybody!

I'm searching for Informations to read and visualize Dicom-Data (medical 3-D data ). If anybody has an idea, send it to me.

Thanks in advance

Stephan Theisen

Comments

Zlatko Sirotic

Try this:

"jdbc:oracle:thin:jts_db_user/*******@gpdv6.sandia.gov:1525:gpdv6..world"

:gpdv6..world instead of /gpdv6..world

Regards,

Zlatko

beckyjmcd

That appears to be the SID style connection.  I just tried that but I am still getting the "Invalid Oracle URL specified".  Interestingly, if I use the ojdbc7.jar file instead of ojdbc8.jar, the SID and Service URLs both works fine.  It appears to be an issue with ojdbc8.jar but all of the documentation indicates you can pass username/password on the URL.

beckyjmcd

I wrote this test code to debug a jdbc connection issue I'm having with a COTS application and that COTS app requires jdbc8.jar.

Zlatko Sirotic

I tried to work with two database versions (11.2.0.4 and 12.1.0.2) and with three versions of ojdbc.jar (ojdbc7.jar, ojdbc8.jar / 12.2, ojdbc8.jar / 18.3).

In all six combinations getConnection(url) works well, with both variants (:SID and /SERVICE_NAME).

I use Java SE 8u202.

Regards,

Zlatko

Gaz in Oz

One issue will be you have 2 dots in your database string, between gpdv6 and world:

   String url = "jdbc:oracle:thin:jts_db_user/********@gpdv6.sandia.gov:1525/gpdv6..world";

   //                                                                              ^

Use a single dot.

beckyjmcd

The service name has two dots.  I tried removing one of the dots but I am still getting:

SQLSTate = "99999"

vendorCode = 17067

detailMessage = "Invalid Oracle URL specified"

cause = (SQLException@1307) "java.sql.SQLException:Invalid Oracle URL specified"

The weird thing is that the 2 dot syntax works fine with ojdbc7.jar.

This is against an Oracle 11.2.04 database but we tried it with a 12.2 database and both give the same error.

It's almost like we have something configured incorrectly at the database level.  My DBA has submitted an Oracle Service Request to help troubleshoot.

beckyjmcd

It's like we have some sort of database configuration issue because I cannot get ojdbc8.jar to work with 11.2.04 or 12.2 but the ojdbc7.jar works fine.  My DBA has submitted an Oracle Service Request to help troubleshoot the issue.

beckyjmcd

This is the configuration for the Oracle listener:

LISTENER11_gpdv6 =

  (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = IPC)(KEY = gpdv6.world))

    (ADDRESS = (PROTOCOL = IPC)(KEY = gpdv6))

    (ADDRESS = (PROTOCOL = TCP)(Host = gpdv6)(Port = 1525))

  )

PASSWORDS_LISTENER11_gpdv6 = (xxxxxxxxxxxxx)

VALID_NODE_CHECKING_REGISTRATION_LISTENER11_gpdv6 = ON

SID_LIST_LISTENER11_gpdv6 =

  (SID_LIST =

   (SID_DESC =

      (SID_NAME = gpdv6)

      (GLOBAL_DBNAME = gpdv6..world)

    )

  )

Gaz in Oz

The service name has two dots.

Indeed, 2 dot service names seem to be acceptable and work, as you have mentioned.

Setting up a 2 dot service_name for my 11.2.0.2.0 XE db by adding "xe..world" in listener.ora and compiling below java code with

ojdbc8.jar - Oracle JDBC driver: Release 12.2.0.1.0 from instantclient_12_2 and using JDK 1.8.0_144, works.

import java.sql.*;

import java.io.*;

import java.util.*;

public class conn {

   public static void main(String[] argv) throws SQLException, ClassNotFoundException {

      try {

         Class.forName("oracle.jdbc.driver.OracleDriver");

         String url = "jdbc:oracle:thin:gaz/gaz@localhost:1521/xe..world";

         System.out.println("Connect String: " + url);

         Connection conn = DriverManager.getConnection(url);

         System.out.println("Connected.");

         conn.close();

         conn = null;

      } catch(SQLException e) {

         // e.printStackTrace();

         System.out.println("ERROR: " + e.getMessage());

      }

   }

}

F:\java>javac conn.java

F:\java>java conn

Connect String: jdbc:oracle:thin:gaz/gaz@localhost:1521/xe..world

Connected.

F:\java>

beckyjmcd

I have had other people say they are able to get the exact same Java code to connect with ojdbc8.jar so I'm thinking there must be an issue on the Oracle server side (maybe a configuration setting) that is causing this not to work.

My DBA has opened a support case with Oracle technical support.  Still waiting for a resolution.  This is very odd.

1 - 10
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 14 2005
Added on Nov 23 2004
2 comments
325 views