Re: oracle jdbc abd OpenOffice 2.0





Harald Finster wrote:
Hello,

in the course of finding out how to connect an Oracle database
to OpenOffice 2.0 via JDBC I read a posting in this group:

"I use JDBC and it works flawlessly. Unfortunately, I'm running Linux."

but how?

I always get the error message:

Error while connecting to data source
io exception: The Network Adapter could not establish the connection

error code 17002
io exception: The Network Adapter could not establish the connection

I entered the following information into the connection form:

Name of database: db1
Server URL: localhost
Port number: 1521

Driver class: oracle.jdbc.driver.OracleDriver (Test class is ok)


A while ago, I wrote my own java class connecting successfully to the same database:

String driverName = "oracle.jdbc.driver.OracleDriver";
String databaseURL = "jdbc:oracle:oci8:@";
DriverManager.registerDriver( (Driver)Class.forName( driverName ).newInstance() );
conn = (OracleConnection)DriverManager.getConnection ( databaseURL, userName, password );


So, I think, the driver should work.

I also tried to use jdbc:oracle:oci8:@ as "Server URL" but got an error message
about a malformed URL:
io exception: invalid connection string format, a valid format is "host:port:sid"



Any hint appreciated!

Hi. The driver and it's exception are telling you pretty much what the problem is. Try this URL:

String databaseURL = "jdbc:oracle:oci8:localhost:1521:db1";

Joe Weinstein at BEA Systems


Greetings Harald

.



Relevant Pages

  • RE: Connecting to more than one oracle database
    ... In order to connect to an oracle database on a different machine ... I am currently connecting to an oracle database on a different ... CONFIDENTIALITY NOTICE This e-mail and any files or attachments may contain confidential and privileged information. ...
    (perl.dbi.users)
  • Re: media player wont play any streaming videos!!
    ... I get no error message that's why it's so frustrating ... > "More information" tab to get the error code. ... > code telling you WHY it isn't connecting it will be especially hard to ... >>> What does the Media Player say when it attempts to get the stream? ...
    (microsoft.public.windowsmedia.player)
  • Re: media player wont play any streaming videos!!
    ... "More information" tab to get the error code. ... code telling you WHY it isn't connecting it will be especially hard to ... >> What does the Media Player say when it attempts to get the stream? ...
    (microsoft.public.windowsmedia.player)
  • Intermittend ORA-12519, TNS:no appropriate service handler found
    ... connecting via JDBC we get intermittend ORA-12519 (reflected as TNS-12519 ... wise and memory wise). ... job scheduling to check whether there might be a job that eats up ... Oracle Database 10g Enterprise Edition ...
    (comp.databases.oracle.server)
  • Re: OCIServerAttach returns ORA-12514
    ... I have a small C application which connects to an Oracle database using ... Please find a code snippet below. ... the code works when connecting to certain database instances but not to ... But you say that "other applications are able to connect"? ...
    (comp.databases.oracle.server)