How to connect oracle8i with jdbc?
environment: redhat7.0+oracle8iR2(8.1.6)+jdk1.2.2
classpath: $JDBCPATH/classes12.zip;nls_character12.zip
run JDBCVersion.java
import java.sql.*;
import oracle.jdbc.driver.*;
class JDBCVersion {
public static void main (String args[]) throws SQLException {
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@localhost:1521:ora81","scott","tiger");
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();
// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());
error report:
Exception in thread "main" java.lang.NoClassDefFoundError: JDBCVersion/class
what's problem?who can answer me?
thanks.
this is problem of classpath setting, all the code in your program is just fine, i think you should add "./" in your classpath(classpath=./;***.zip;***.jar), and so jvm will find your program and execute it
Similar Messages
-
How to connect ORACLE8i and xml
this is sethu involving in the effort to do a project in xml and oracle 8i in the environment of weblogic.
i need how to connect oracle8i using xml
which enable me to start my project.
with regards
sethu
email:[email protected]
nullI agree with the rest of you folks. JDOM will be your best bet for integration. I am currently using JDOM to parse and/or create xml documents. As mentioned the tutorials are very good to check out. If you just want to hit the JDOM highlights and hit the ground running check out this link. http://www.jdom.org/downloads/docs.html
Take some time to check out the first 3 links on that page. They are JDOM and XML Parsing, Part 1, Part 2, and Part 3. Very good information about JDOM and XML parsing.
Hope some of this will help! -
How to connect java with oracle
can any body show me the code of how to connect java with oracle database.
thank youTo configure Oracle JDBC:
1. Add Oracle JDBC JAR file classes12.zip or ojdbc14.zip to classpath.
2. Load and register the JDBC driver.
Class.forName("oracle.jdbc.driver.OracleDriver");
3. Obtain a connection:
String url="jdbc:oracle:thin:@<host>:1521:<database>
Connection con = DriverManager.getConnection(url,
"myLogin", "myPassword");
4. Create a SQL statement.
Statement stmt = con.createStatement();
5. Obtain a result set.
ResultSet rs = stmt.executeQuery(
"SELECT ..."); -
Hi
Hi I just got my new Apple TV and I cant figure out how to connect it with My MacBook Air (11-inch, Late 2010- Processor 1.4 GHz Intel Core 2 Duo) OSX Version 10.8Are you referring to mirroring or you just unable to set up homesharing.
AirPlay Mirroring requires a second-generation Apple TV or later, OS X 10.8 or better and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer). It also requires the computer to be using wi-fi. -
How to connect TL494 with IR2110
HI, does anyone know how to connect TL494 with IR2110 H bridge inverter??
Hello,
These arn't chips I've used before but a quick search did yield some interesting (and maybe useful!) results:
http://hmin.tripod.com/als/fsmyth/pages/timers7.html
http://www.edaboard.com/thread90160.html
http://www.diyaudio.com/forums/class-d/148287-doing-class-d-amp-project-using-tl494.html
Other than that the datasheets are probably teh first port of call:
http://www.ti.com/lit/ds/symlink/tl494.pdf
http://www.irf.com/product-info/datasheets/data/ir2110.pdf
Regards
Nick C.
Cardiff University -
How to connect JSP with MySql Database?
HI All...
I want to know or How to connect Mysql with JSP or JSF any other software is available? please help me.....I want to know or How to connect Mysql
with JSP or JSF any other software isavailable?
please help me.....First you need to find 25 m of a CatV cable and...The DB files need to be located on the ninth device of a SCSI Daisy Chain with the total SCSI cable length being over 150 m (and the devices (and cables) need to be mix of Differential and Non-Differential).
Edit: And forget the terminator, who needs it? -
How to connect portal with msaccess database
we have to develop oracle portal applications with msaccess as a back end.how to connect portal to access.
thanks in anticipation.I want to know or How to connect Mysql
with JSP or JSF any other software isavailable?
please help me.....First you need to find 25 m of a CatV cable and...The DB files need to be located on the ninth device of a SCSI Daisy Chain with the total SCSI cable length being over 150 m (and the devices (and cables) need to be mix of Differential and Non-Differential).
Edit: And forget the terminator, who needs it? -
How to connect SPA112 with Fritzbox7490
Well thats the question:
how to connect SPA112 with (internatiuonal) FritzBox7490 to use the phone(s) There must be a way to connect phone1 or two with DSL/Tel on the FritzboxYou can plug two analogue phones directly to the FON1 and FON2 ports.
-
How i connect iBooks with itunes on my nas?
How i connect iBooks with itunes on my nas?
I have been suckered by this problem too. I had all my e-books, mostly PDFs, saved on my NAS and available in iTunes. I wanted to access them from my old iMac with OS X 10.6.8 and my new iMac with OS X 10.9. But when the files were moved to iBooks, they disappeared from the NAS and now I'm in a mess. Thanks, Apple :-(
-
Connection to Personal Oracle8 with JDBC - JDK 1.2
I am new to development with java and have been struggling the last four days implementing connecting to Personal Oracle8 via JDBC, JDK 1.2.
I have Personal Oracle8 installed on my machine along with JDK 1.2. I am confused on how to construct the URL that would point to my Local Database along with which driver to use. Can someone help me in out.
Thanks
Clif Dawes
Application BuildersHi,
Openlink Software provides JDBC 2.0 Core API compliancy in Type-1, Type-2, and Type-3 JDBC driver suites. This Multi-Tier Driver Suite offers the high performance, scalability and security that you won't find in other JDBC drivers on the market.
Try a free non-expiring limited seat license at http://www.openlinksw.com
Specific information on contructing the URL string with these drivers can be found at: http://www.openlinksw.com/info/docs/rel3doc/jdbc/cliclass.htm
Best regards,
Stephen Schadt http://www.openlinksw.com -
How to connect oracle10g with dev10g
hi all
i installed oracle database10g then dev10g on winXP, everything was good but i can't connect the dev with the engin, the problem was i the TNS Protocole.
any suggeetions?Hi,
How to use the oracle.jdbc.OracleDriver driver.? Do i have to download this driver and initialize.?
Need help on how to set this driver.?
regards
sowm -
How to connect the database (JDBC) using service name rather than SID
How should we make the connection to the database using service name. Initially, we are using the SID to make the database connection, with following setting in the data-source.xml in OC4J using ABCDB as the SID.
<data-sources>
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="jdbc/ABCDB"
location="jdbc/ABCDB"
pooled-location="jdbc/OracleDSPooled"
xa-location="jdbc/xa/OracleDSXA"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="ABC"
password="ABC"
url="jdbc:oracle:thin:@191.1.4.126:1521:ABCDB"
/>
</data-sources>
It work, but now we need to make the connection using this service name ABCSERVICE, but it doesn't work in the OC4J (JDBC). May I know how should we handle this connection?
Thanks and Regards,
PangFinally, I got the solution to make the database connection using service name, with putting the tnsname setting in URL portion.
url="jdbc:oracle:thin:@(description=(address=(host=191.1.4.126)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME = ABCSERVICE)))"
And now, it is working fine.
Regards,
Pang -
How to connect to oracle jdbc?
How to connect to oracle database if jdbc thin driver is used? Any example ?
I saw this in a tutorial but I can't get what are inside the parenthesis.
OracleConnection connect = (OracleConnection)DriverManager.getConnection(" ", , );
Anyone can help?Thx!I still can't get it.
It said:
# Thin Driver, a 100% Java driver for client-side use without an Oracle installation, particularly with applets. The Thin driver type is thin. To connect user scott with password tiger to a database with SID (system identifier) orcl through port 1521 of host myhost, using the Thin driver, you would write :
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@myhost:1521:orcl", "scott", "tiger");
I don't even know my SID , port & host. How to get them? -
How to connect Air with Thunderbolt?
How do I connect Air with Thunderbolt?
Bought Air in Oct 2011 and Thunderbolt today.
Does Mac OS X (10.6.5) work with Thunderbolt?
Do I need a special cable other than what came in box?Hey moxiedoggy,
Welcome to Apple Support Communities! It sounds like you want to use Target Display Mode to use your iMac as a second screen to your MacBook Air. Since your said your MacBook Air is from 2011, it should have the thunderbolt, and you can connect the two computers using the following instructions:
Use an iMac with Thunderbolt as a display
If you have an iMac with Thunderbolt, any other Mac with Thunderbolt can use it as a display. The iMac will play both the video and audio from the other Mac.
Connect the Thunderbolt cable to the Thunderbolt ports on each computer.
Make sure both Mac computers are turned on and awake.
Press Command (⌘)-F2 on the keyboard of the external display Mac.
If you want the external display Mac to play audio as well as video from the primary Mac, choose Apple menu > System Preferences, click Sound, and then click Output. Select the external display Mac from the list of devices.
You'll want to go over the requirements for using Target Display Mode here, along with other FAQs:
Target Display Mode: Frequently Asked Questions (FAQ)
http://support.apple.com/kb/ht3924
Take care,
David -
How to connect websocket with weblogic.
Hi,
Can anyone tell how to connect websocket of html5 with weblogic server. Currently i am doing this thing with webbit NettyWebServer.
thanks in advanceHi Shajon --
Unfortunately, we're not permitted to give specific release dates/estimates - the best I can offer is that FMW 12c (which will contain WLS 12.1.2) is due to ship in CY 2013.
I can probably provide you with the GlassFish chat example we have running on WLS (v.minor changes in API) to give you a sense of what it looks like.
-steve-
Maybe you are looking for
-
Can I delete Receipts.pkg files? For Permissions repair, verify first?
I recently read that all *.bom (/Library/Receipts/boms/*.bom) files should be preserved so Mac os x knows what files an installer put into which location. But what about those large .pkg files (/Library/Receipts/*.pkg)? Those take up more than half a
-
Making a webdynpro through Web Service| VERY URGENT
Hi , I am having a problem in the scenario when I am trying to make a webdynpro application using a WSDL file . When I deploy the application in my first view which is a search view the field appears disabled and I am not able to input the values
-
AddOn Installation Failed On Terminal Server
Hello All, I have created a addon in SAP B1 2007 B and when i am trying to installed the addon on the Windows 2008 Terminal Server so that the client can log on to the AddOn through terminal server .But the addon is not getting installed and throwing
-
Logged-on user after client crash
Hi, Very often, after a crash of B1, if the user tries to log back on they get a message: 'Can't log on - user is already connected to B1'. Sometimes this is sorted by waiting a couple of minutes (which is a bit annoying), but sometimes it is much mo
-
Error in BAPI_OUTB_DELIVERY_CHANGE
HI All.. I developed a program to upload serial no's for a delivery no and the serial nos data will be in a text file. by passing this file we have to upload data.. program is working fine and it is uploading data into vl02n but for some times its th