Solved

OCI8 JDBC Driver

Posted on 2001-07-14
12
760 Views
Last Modified: 2008-02-01
I installed "Oracle 8.1.5 Enterprise Edition" on Windows 2000. My Java JDBC programs works fine when I use the thin driver ie like "jdbc:oracle.thin:@hostname1:1521:sid1". But when I run my program trying  to use the OCI8 driver then it gives me exception something like (make_k_xxx() native error). The URL I am using like "jdbc:oracle.thin:@sid1". What is wrong. Do I need to install something else also. What is this "Oracle 8.1.5 Client" and "Oracle Programmer 8.1.5"

Thanks
javaq
0
Comment
Question by:javaq092999
  • 5
  • 2
  • 2
  • +2
12 Comments
 
LVL 1

Expert Comment

by:saschek
ID: 6282395
Oracle supports Win2000 since v. 8.1.6.
So it's possible that not all drivers of
v. 8.1.5 work properly.

BTW I would prefer the thin driver anyway.

-- Sven
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 6282974
The thin driver is a pure RMI based driver, while the OCI drivers run over SQL*Net, so your problem is most likeley caused by an incompatibility between Win 2000 and Oracles native protocol.
 
Try downloading the latest version of the JDBC drivers from technet.oracle.com . If that does not solve your promlem, you might want to try installing the SQL*Net for 8.1.6 or above on both client and server.


Since the thin driver runs over RMI (usualy on port 1099) without any additional requierment while OCI needs SQL*Net, you will find that it (the thin driver) will cause less problems and will require no additional work on the clients besides insrtalling the classes12.zip file.
0
 

Author Comment

by:javaq092999
ID: 6285573
I have not installed SQL*Net on my machine. And my CD doesn't seems to have it.

How to check if SQL*Net is installed on my machine or not.
0
 

Expert Comment

by:kar_yeow
ID: 6287754
The url for using oci is in the form of
jdbc:oracle:oci8:@<service name>.  If you want to use the OCI (native) driver (ie not pure java) you'll need the oracle client.  I believe the oracle programmer contains tools for submitting query to the database etc...
Hope this is helpful.
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 6288038
To check if SQL*Net is installed, open the Oracle group, select Network Administration and then Net8 Configuration Assistant.

When the Dialog appears, select the third option (Configure local service name) then the fifth option (test) and run the test.

If that works, then try connecting to the server with SQL*Plus.

If any of the above fails, then you have either not installed the client software or had a bad install. The simplest option here is to reinstall the client from the Oracle installation CD.
0
 
LVL 1

Expert Comment

by:saschek
ID: 6291239
Whereever you've installed SQL*Plus (e.g. as part of EnterpriseEdition)
Net8-Client is installed as a dependent product, too.
You'll then find a local tnsnames.ora file.

Don't forget, the connection looks like this:
Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@" +hostname,  user, password);

-- Sven
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:javaq092999
ID: 6292572
Hi All and Sven,

Yes Net8-Client is there. Does that mean SQL*Net is there! I use the SQL*Plus daily.

I am using the same syntax DriverManager.getConnection("jdbc:oracle:oci8:@" +hostname,  user, password); after loading the driver OracleJdbcDriver class. But when I run the program everytime I get the SQLException : make_c_state.

What is this "java.sql.SQLException : make_c_state (Native Error)" exception here. What is missing.

Regards
javaq
0
 

Author Comment

by:javaq092999
ID: 6292606
Just a note again -- I am using Oracle 8.1.5
0
 

Author Comment

by:javaq092999
ID: 6298293
I am answering my question myself. The problem was the trick I was trying. I was using 8.1.5 +JDK1.3 + classes12.zip (of 8.1.6) and the things were not working due to the internal incompatibility. I have upgraded to 8.1.6 and all the issues are resolved. Another thing is that 8.1.5 + OCI8 Driver works if you use jdk lower than 1.2. I was trying jdk1.3 hence that problem of make_c_state. Many thanks to all.
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6877694
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20023290.html
http://www.experts-exchange.com/questions/Q.20121869.html
http://www.experts-exchange.com/questions/Q.20126064.html
http://www.experts-exchange.com/questions/Q.20139990.html
http://www.experts-exchange.com/questions/Q.20143257.html
http://www.experts-exchange.com/questions/Q.20148988.html
http://www.experts-exchange.com/questions/Q.20150711.html
http://www.experts-exchange.com/questions/Q.20158263.html
http://www.experts-exchange.com/questions/Q.20163902.html
http://www.experts-exchange.com/questions/Q.20163903.html
http://www.experts-exchange.com/questions/Q.20181528.html
http://www.experts-exchange.com/questions/Q.20245208.html
http://www.experts-exchange.com/questions/Q.20245590.html
http://www.experts-exchange.com/questions/Q.20251382.html
http://www.experts-exchange.com/questions/Q.20253111.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20143170.html
http://www.experts-exchange.com/questions/Q.20143993.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 

Author Comment

by:javaq092999
ID: 6881866
I am answering my question myself. The problem was the trick I was trying. I was using 8.1.5 +JDK1.3
+ classes12.zip (of 8.1.6) and the things were not working due to the internal incompatibility. I have
upgraded to 8.1.6 and all the issues are resolved. Another thing is that 8.1.5 + OCI8 Driver works if
you use jdk lower than 1.2. I was trying jdk1.3 hence that problem of make_c_state. Many thanks to all.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6882902
Thank you for returning and adding your solution, found outside this question thread.

I have refunded to you the 20 points for this question.

Moondancer - EE Moderator
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now