Home » Developer & Programmer » JDeveloper, Java & XML » Java Oracle Connectivity
Java Oracle Connectivity [message #91713] Sun, 19 January 2003 04:48 Go to next message
Rajiv Mehta
Messages: 2
Registered: January 2003
Junior Member
I am working on a standalone pc with Oracle8i and
Java installed on it . Every time i run my JAVA Code
i get the following runtime exception Network Adapter
could not establish the connection. SID which i had used was ORCL . Could anybody of you please send to me via
email detail procedure to establish a connection between java and oracle my email is bbombay123@rediffmail.com.
Re: Java Oracle Connectivity [message #91716 is a reply to message #91713] Sun, 19 January 2003 20:40 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
first,
check whether you can establish a connection from
an oracle cleint( just sqlplus), using the same connect string.
IF u can, are u using the compatible JDBC driver?
else
post your tnsnames.ora entries and exact error message.
Re: Java Oracle Connectivity [message #91971 is a reply to message #91713] Wed, 07 January 2004 03:39 Go to previous messageGo to next message
md.swapon
Messages: 1
Registered: January 2004
Junior Member
I want to know about java oracle connectivity.
please send details.
Re: Java Oracle Connectivity [message #91979 is a reply to message #91971] Thu, 08 January 2004 17:19 Go to previous messageGo to next message
Sunil Telkar
Messages: 1
Registered: January 2004
Junior Member
These are my setting's of sqlnet.ora,tnsnames.ora and
listener.ora for oracle8i .Hope this helps you
in solving you're problem . You will get ample of
documentation's on these if you search the keywords using search engine like Google .
In this case you're SID is ORCL .

SQLNET.ORA
-----------
TRACE_LEVEL_CLIENT = OFF
names.directory_path = (TNSNAMES)
names.default_domain = world
name.default_zone = world
names.default_domain=world

LISTENER.ORA
--------------

LISTENER-SID =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = telkar)
(PORT = 1521)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORCL)
(ORACLE_HOME=/private/app/oracle/product/8.0.3)
)
)

# Start of configuration parameters.
TRACE_LEVEL_LISTENER=OFF
TRACE_FILE_LISTENER = "listener"
LOG_FILE_LISTENER = "listener"
CONNECT_TIMEOUT_LISTENER = 10
STOP_LISTENER = YES
DBA_GROUP = dba

TNSNAMES.ORA
----------------

ORCL.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = telkar)
(Port = 1521)
)
)
(CONNECT_DATA = (SID = ORCL)
)
)
Re: Java Oracle Connectivity [message #92099 is a reply to message #91713] Tue, 09 March 2004 23:15 Go to previous messageGo to next message
M.Ramesh Kumar
Messages: 1
Registered: March 2004
Junior Member
For Java/Oracle better we can use Type 1 Driver.

1.Create Data Source Name
a. Goto Control Panel
b. Select 32bit odbc
c.Create new DSN with the
Username,password="scott/tiger"
Ex:DSN="ramesh"
2.Please follow the below java coding for Java/Oracle Connectivity.
Class.forname("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection
("jdbc:odbc:ramesh"); // Here Ramesh is DSN.
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from student");//Here Student is the Table Name.

// Using Result set we can print results
while(rs.next())
{
System.out.println("Name"+rs.getString(1));
}
Re: Java Oracle Connectivity [message #92367 is a reply to message #91716] Thu, 17 June 2004 01:51 Go to previous messageGo to next message
PANKAJ
Messages: 24
Registered: June 2001
Junior Member
i am not using compitable jdbc driver. send complet conectivity code
Re: Java Oracle Connectivity [message #92386 is a reply to message #92099] Wed, 23 June 2004 03:25 Go to previous messageGo to next message
Sohan kumar
Messages: 1
Registered: June 2004
Junior Member
Thank you for a good code.I will be obliged for u forever.
Re: Java Oracle Connectivity [message #92415 is a reply to message #91716] Mon, 05 July 2004 04:52 Go to previous messageGo to next message
Deepak kumar
Messages: 2
Registered: June 2004
Junior Member
when i make connection with oracle
the system report some message.
some of which aregiven below
1:the specified module OCI.DLL not found
2:the odbc driver(1114) can not loaded due to system error
Re: Java Oracle Connectivity [message #92519 is a reply to message #91713] Sun, 29 August 2004 21:57 Go to previous messageGo to next message
sunil srivastava
Messages: 1
Registered: August 2004
Junior Member
how can i connect java(front end) with oracle(back end)(database) . Pls send me detail information about my quiery
thank you
Re: Java Oracle Connectivity [message #92597 is a reply to message #92519] Mon, 04 October 2004 01:39 Go to previous messageGo to next message
vaishali yadav
Messages: 1
Registered: October 2004
Junior Member
please send me all information of connectivity of java (front end) with oracle8i(backend) in detail as which class path to be seted and where, also if possible send all information of java and mysql connectivity information also send how to run servlets in tomcat4.1 server also send information how to create the .exe file of my project for executing the project
Re: Java Oracle Connectivity [message #92691 is a reply to message #92519] Thu, 25 November 2004 00:18 Go to previous message
anish kumar singh
Messages: 1
Registered: November 2004
Junior Member
send code for java oracle connectivity
Previous Topic: OracleJSP: oracle.jsp.provider.JspCompileException:
Next Topic: URGENT:-XML parsing error
Goto Forum:
  


Current Time: Thu Mar 28 13:28:55 CDT 2024