- Note: Most of the JBuilder connections to Oracle are caused by improper configuration of classpath.
- Connecting Oracle databases with non-XA methods
-
Be aware of two points when configuring Oracle_xa under Windows:
#ORACLE 10
Oracle_xa;xaosw;%o Racle_home% DBMS Oraxa10.lib%oracle_home%precompibmsvcorasql10.lib
#oracle 9
Oracle_xa;xaosw;%o Racle_home% DBMS Oraxa9.lib%oracle_home%precompibmsvcorasql9.lib
Under Unix
ORACLE_XA:XAOSW: .....
First: After Windows Oracle_xa and XAOSW are semicolon ";", not colon ":"
Second: The above Lib write on a line, the middle with a space apart, if not in the system environment variable set oracle_home, write absolute path.
- ' Java.sql.SQLException:IO exception, not in streaming mode ' when JDBC operates Oracle database
- With Oraclestatment, don't use java.sql.Statment.
- If Setautocommit fails for an existing connection, close the connection and re-establish a connection
- Download the latest JDBC Driver to the Oracle site, and if you operate the LOB type, Oracle-brought interfaces and classes
- WebLogic Connection Oracle Problem: The network Adapter could not establish the connection
-
May be the server's listening to stop, is the problem of the database, and the application is irrelevant; should first check whether Oracle is normal, with Sql*plus connection database, see whether normal connection;
- Considerations for using Oracle connection pooling and Oracle backups in WebLogic
-
Using Hp-unix,weblogic 8.1,oracle 9.2.0.5
Configured with a common connection pool, the driver uses Oracle's Oracle ' s Driver (Thin) version 9.0.1, 9.2.0
Error condition:
Results using database connection pool The times are wrong and say there is no connection pool resource. In fact, the database connection pool is completely idle, and the test is also true, Oracle is also normal to connect, use.
Problem Root:
Through the layers of error, found that the original backend in the use of Oracle's exp backup a only synonym users, resulting in the exp process zombie.
Unable to resolve the problem by killing Exp, restarting Oracle, and eventually restarting Unix, it is forbidden to back up only synonyms for users, problem solving.
Summarize:
should be ORACLE9 exp bug causes connection pooling problem, do not use exp to pour out synonyms
- The following exception was thrown when connecting to Oracle: Java.sql.SQLException:Io exception:the Network Adapter could not establish connection a cause
Oracle Database Connection (from oracle.com)
PROBLEM
You are are attempting to connect to a Oracle instance using JDBC and you are receiving the following error.
Java.sql.SQLException:Io Exception:
The network Adapter could not establish connection
Sqlexception:sqlstate (NULL) Vendor code (17002)
Any or all of the following conditions may also apply:
1 are able to establish a sql*plus connection from the same
Client to the same Oracle instance.
2 are able to establish a JDBC OCI connection, but not a Thin
Connection from the same client to the same Oracle instance.
3) The same JDBC application is able to connect from a different
Client to the same Oracle instance.
4) The same behavior applies whether the initial JDBC connection
string specifies a hostname or a IP address.
Rediscovery
To verify whether your are hitting this problem, verify whether the Oracle instance was configured for multithreaded Server (MTS). If The Oracle instance is isn't configured for MTS, you are probably encountering a different problem. Otherwise, continue. Try forcing the JDBC connection to use a dedicated server instead of a shared server. This can is accomplished in several ways. For JDBC OCI or Thin, this can do by reconfiguring to dedicated connections only. This is approach, however, May is feasible in many cases. In such cases, the following options apply:for JDBC OCI:
1) Add the (server=dedicated) property to the TNS connect string
stored in the Tnsnames.ora file on the client.
2) Set the User_dedicated_server=on in Sqlnet.ora on the client.
For JDBC Thin:
You are must specify a full name-value pair connect string (the same as it might appear in the Tnsnames.ora file) instead of T He-short JDBC Thin syntax. For example, instead of
"Jdbc:oracle:thin::p ort:sid"
You are would need to use a string of the form
"jdbc:oracle:thin:@ (description=) +
"(address_list=) +
"(Address= (protocol=tcp)" +
"(host=host)" + =
"(port=port)" +
")" +
")" +
"(connect_data=) +
"(SERVICE_NAME=SID)" +
"(server=dedicated)" +
")" +
")"
If The connection works fine after have made these are changes, it is very likely "this is" problem you are Ing. In this case, one of the last Test would help to verify this fact.
Log into the remote host on which the Oracle instance are running and execute the appropriate command to determine what the The server ' thinks ' its hostname is (i.e. the name of this was configured when the server was installed and configured). For example, on a Unix host the ' hostname ' command can is used for this purpose.
Using the name displayed (e.g. by the hostname command), exactly as it appeared (i.e. if the output from the hostname comm and had the domain name included, then include it), return to the client which is unable to connect and try pinging the S Erver.
Note:it is critical this you attempt to ping the server using exactly the same hostname you got from the server.
If you are are unable to ping the server via this hostname, then your almost certainly this hitting. If not, the May is a new issue, but at least your would have found a workaround (i.e. use a dedicated connection).
Explanation
To understand why this problem occurs, one must the "understand" in "how" differences listener, handles T o Shared servers versus dedicated servers.
When connecting to a dedicated server, the client connects to the listener (via hostname or IP address). The listener then spawns a dedicated server process and hands off the socket used to accept the client connection to that Server. The client and server then start communicating via the endpoints established by the initial connection. Note:there is only one connection in the case. When connecting to a shared server, the initial client connection to the listener is the same. However, with MTS, there are no need to spawn a new server process; A pool of shared processes already exists. Also, clients do not communicate directly with the server processes in MTS; Rather, they communicate with a dispatcher.
For this reason, when setting up an MTS connection, the listener sends a redirect message back to the client asking the CL Ient to close the connection to the listener and connect to a dispatcher. The information in this message includes the hostname and a port number for the appropriate dispatcher. The redirect message would ALWAYS specify a hostname, even if the client initially a IP address.
If, for all reason, the hostname provided to the listener (e.g. by the ' hostname ' or another command) doesn ' t agree and T He hostname by which the "server is" known on the client, the connection fails.
On the other hand, if "(server=dedicated)" already appears into the TNS connect string in Tnsnames.ora or if "use_dedicated_ Server=on "already appears in the Sqlnet.ora file, and you could find this sql*plus and/or JDBC OCI work fine, while JDBC Thin f Ails.
SOLUTION
Obviously, one solution is to use dedicated servers. However, this may isn't always be feasible.
The "key is" to "sure" hostname on both the client and server agree. This can is accomplished by reconfiguring either the client or the server but there are things to is aware of in both CAs Es.
If the server is configured to return a different hostname, then it is possible this other clients which used to work would Now fail.
In some cases, it may is feasible to reconfigure the client. For example, if the server version of the hostname does isn't include the domain, you would need to remove the domain Portio N of the hostname on the client; But, if the client needs to connect to the than one server with the same base name in different domains Possible, as the hostname may ambiguous.
REFERENCES
bug:1269734 java.sql.SQLException:Io exception:the Network Adapter could not be found.