Oracle JDBC thick (OCI) driver
Hi!
Can someone point me where I can download oracle JDBC thick (OCI) driver. Thick JDBC is not installed by default in 10g. In the OTN download site I can find JDBC thin drivers to download.
Thanks
Rad.
Rad,
Allow me to elaborate on Mark's answer. Let's say you download the "ojdbc14.jar" file from the OTN Web site. Both the "thick" and "thin" drivers are in that one file. You indicate which driver you wish to use in your java code -- via the database connection URL, for example:
jdbc:oracle:thin:@//myhost:1521/orclThe above indicates you wish to use the "thin" driver, whereas
jdbc:oracle:oci:@myhost:1521:orclindicates you wish to use the "thick" driver.
[Notice the difference?]
You can find more details from the JDBC FAQ.
Good Luck,
Avi.
Similar Messages
-
I am running small SQLJ in a JSP to get the hang of it.
I am running on 920, and have downloaded the new runtime classes for 920 and tested per the instructions.
Using JDev 903, here is the private method for running a query ( It is from an article I found by Julie Basu at Oracle; I have played around with the empno/emp_no variable to convert it to an int):
<%! private String runQuery(String emp_no) throws java.sql.SQLException {
DefaultContext dctx =null;
String ename = null; double sal = 0.0; String hireDate=null;
StringBuffer sb = new StringBuffer();
//int emp_no = Integer.parseInt(emp_no);
try {
dctx =Oracle.getConnection("jdbc:oracle:oci8:@olap","scott","tiger");
#sql [dctx] { SELECT ename, sal, TO_CHAR(hiredate,'DD-MON-YYYY')
INTO :ename,:sal,:hireDate
FROM scott.emp WHERE empno=:emp_no
sb.append("<BLOCKQUOTE><BIG><B><PRE>\n");
sb.append("Name :"+ename+ "\n");
sb.append("Salary :"+sal+ "\n");
sb.append("Date hired :"+hireDate);
sb.append("</PRE></B>></BIG></BLOCKQUOTE>");
} catch (java.sql.SQLException e){
sb.append("<P> SQL Error: <pre> "+e+" </pre> </p>\n");
} finally {
if (dctx!=null) dctx.close();
return sb.toString();
%>
I keep getting the following error:
java.lang.NoSuchFieldError: oracle.jdbc.oci8.OCIEnv.envCharSetId
int oracle.jdbc.oci8.OCIEnv.get_env_handle()
native code
long oracle.jdbc.oci8.OCIEnv.getEnvHandle()
OCIEnv.java:70
oracle.jdbc.dbaccess.DBConversion oracle.jdbc.oci8.OCIDBAccess.logon(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
OCIDBAccess.java:390
void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
OracleConnection.java:361
java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
OracleDriver.java:485
java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
OracleDriver.java:337
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
DriverManager.java:517
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
DriverManager.java:177
void sqlj.runtime.ref.ConnectionContextImpl.<init>(sqlj.runtime.ref.ProfileGroup, java.lang.String, java.lang.String, java.lang.String, boolean)
ConnectionContextImpl.java:346
void sqlj.runtime.ref.DefaultContext.<init>(java.lang.String, java.lang.String, java.lang.String, boolean)
DefaultContext.java:172
sqlj.runtime.ref.DefaultContext oracle.sqlj.runtime.Oracle.getConnection(java.lang.String, java.lang.String, java.lang.String, boolean)
Oracle.java:580
sqlj.runtime.ref.DefaultContext oracle.sqlj.runtime.Oracle.getConnection(java.lang.String, java.lang.String, java.lang.String)
Oracle.java:609
java.lang.String _SQLJ.runQuery(java.lang.String)
[SQLJ.jsp]
SQLJ.jsp:42
void SQLJ.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
[SQLJ.jsp]
SQLJ.jsp:20
void com.orionserver[Oracle9iAS (9.0.3.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
OrionHttpJspPage.java:56
[SRC:/SQLJ.jsp]
void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
JspPageTable.java:317
void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
JspServlet.java:465
void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
JspServlet.java:379
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
HttpServlet.java:853
void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
ServletRequestDispatcher.java:721
void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
ServletRequestDispatcher.java:306
boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
HttpRequestHandler.java:767
void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
HttpRequestHandler.java:259
void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
HttpRequestHandler.java:106
void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
PooledExecutor.java:803
void java.lang.Thread.run()
Thread.java:484
When I run it using just JDBC with the thin Driver, I have no problems.
What could be the issue?
Thanks,
Scott RappoportFail to make OCI connection Using JDeveloper
-
Differences between Oracle JDBC Thin and Thick Drivers
If any body is looking for this information...
============================================================
I have a question concerning the Oracle JDBC thin vs. thick drivers
and how they might affect operations from an application perspective.
We're in a Solais 8/Oracle 8.1.7.2 environment. We have several
applications on several servers connecting to the Oracle database.
For redundancy, we're looking into setting up TAF (transparent
application failover). Currently, some of our apps use the Oracle
<B>JDBC thin</B> drivers to talk to the database, with a connection
string that like this:
<B> jdbc:oracle:thin:@host:port:ORACLE_SID </B>
In a disaster recovery mode, where we would switch the database
from one server to another, the host name in the above string
would become invalid. That means we have to shut down our application
servers and restart them with an updated string.
Using the Oracle <B>OCI (thick)</B> driver though, allows us to connect
to a Net8 service instead of a specific server:
<B> jdbc:oracle:oci8:@NET8_SERVICE_NAME </B>
Coupled with the FAILOVER=ON option configured in Net8, it is
then possible to direct a connection from the first server to
the failover database on another server. This is exactly what
we would like to do.
My question is, from an application perspective, how is the Oracle
thick driver different from the thin driver? If everything
else is "equal" (i.e. the thick driver is compatible with the
app servers) would there be something within the the thick/OCI
driver that could limit functionality vs. the thin driver?
My understand, which obviously is sketchy, is that the thick
driver is a superset of the thin driver. If this is the case,
and for example if all database connections were handled through
a configuration file with the above OCI connection string, then
theoretically the thick driver should work.
============================================================
<B>
In the case with the Oracle, they provide a thin driver that is a 100% Java driver for client-side use without the need of an Oracle installation (maybe that's why we need to input server name and port number of the database server). This is platform indipendent, and has good performance and some features.
The OCI driver on the other hand is not java, require Oracle installation, platform dependent, performance is faster, and has a complete list of all the features.
</B>
========================================================
I hope this is what you expect.
JDBC OCI client-side driver: This is a JDBC Type 2 driver that uses Java native methods to call entrypoints in an underlying C library. That C library, called OCI (Oracle Call Interface), interacts with an Oracle database. <B>The JDBC OCI driver requires an Oracle (7.3.4 or above) client installation (including SQL*Net v2.3 or above) and all other dependent files.</B> The use of native methods makes the JDBC OCI driver platform specific. Oracle supports Solaris, Windows, and many other platforms. This means that the Oracle JDBC OCI driver is not appropriate for Java applets, because it depends on a C library to be preinstalled.
JDBC Thin client-side driver: This is a JDBC Type 4 driver that uses Java to connect directly to Oracle. It emulates Oracle's SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket implementation. <B>The JDBC Thin driver does not require Oracle client software to be installed, but does require the server to be configured with a TCP/IP listener. Because it is written entirely in Java, this driver is platform-independent.</B> The JDBC Thin driver can be downloaded into any browser as part of a Java application. (Note that if running in a client browser, that browser must allow the applet to open a Java socket connection back to the server.
JDBC Thin server-side driver: This is another JDBC Type 4 driver that uses Java to connect directly to Oracle. This driver is used internally by the JServer within the Oracle server. This driver offers the same functionality as the client-side JDBC Thin driver (above), but runs inside an Oracle database and is used to access remote databases. Because it is written entirely in Java, this driver is platform-independent. There is no difference in your code between using the Thin driver from a client application or from inside a server.
======================================================
How does one connect with the JDBC Thin Driver?
The the JDBC thin driver provides the only way to access Oracle from the Web (applets). It is smaller and faster than the OCI drivers, and doesn't require a pre-installed version of the JDBC drivers.
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@qit-uq-cbiw:1526:orcl", "scott", "tiger");
// @machineName:port:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
How does one connect with the JDBC OCI Driver?
One must have Net8 (SQL*Net) installed and working before attempting to use one of the OCI drivers.
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
try {
Class.forName ("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
Connection conn = DriverManager.getConnection
("jdbc:oracle:oci8:@qit-uq-cbiw_orcl", "scott", "tiger");
// or oci7 @TNSNames_Entry, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
=================================================================Wow, not sure what your question was, but there sure was a lot of information there...
There really is only one case where failover occurs, and it would not normally be in a disaster recovery situation, where you define disaster recovery as the obliteration of your current server farm, network and concievably the operational support staff. This would require a rebuild of your server, network etc and isn't something done with software.
Fail over is normally used for high availablity that would take over in case of hardware server failure, or when your support staff wants to do maintenance on the primary server.
Using the thin and thick driver should have ZERO affect on a failover. Transparent failover will make the secondary server the same IP as the primary, therefore the hostname will still point to the appropriate server. If you are doing this wrong, then you will have to point all your applications to a new IP address. This should be something that you tell your management is UNACCEPTABLE in a fail-over situation, since it is almost sure to fail to fail-over.
You point out that you are providing the TNSNAME, rather than the HOSTNAME when using the thick driver. That's true within your application, but that name is resolved to either a HOSTNAME, or IP ADDRESS before it is sent to the appropriate Oracle server/instance. It is resolved using either a NAME server (same as DNS server but for Oracle), or by looking at a TNSNAMES file. Since the TNSNAMES files profilerate like rabbits within an organization you don't want a fail over that will make you find and switch all the entries, so you must come up with a fail over that does not require it.
So, the application should not be concerned with either the hostname, or the IP address changing during fail over. That makes use of the thin or thick client acceptable for fail over.
Don't know if this will help, but this shows the communication points.
THIN DRIVER
client --> dns --> server/port --> SID
THICK DRIVER
client --> names server --> dns --> server/port --> SID
client --> tnsnames --> dns --> server/port --> SID -
Exception with WLS 6.1.3 & Oracle 9.2 thin driver
I'm testing out an upgrade from the Oracle thin driver that ships with WLS
6.1
to the Oracle 9.2 thin driver. My database server is running Oracle 8.1.7.
The only configuration change I made was to put the 9.2 classes12.zip at the
beginning of ths classpath. The line of my code where the exception is
being
throw is the first attempt at performing a resultSet.getLong() call. Has
anyone
gotten this combination to work yet? Any ideas on the error? I'd really
like to test out the native LOB support in the new drivers.
TIA - Gordon
<Oct 14, 2002 2:59:02 PM EDT> <Error> <Audit> <- Login failed because
loginName:
buyerOrgAdmin1034621942027 was not found.
com.eoriginal.engine.core.session.bas
icAccess.OrgUserDataAccessSessionBean_rngrwj_Impl::findUserAccountInfo,
java.lan
g.ArrayIndexOutOfBoundsException
at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3181)
at oracle.sql.LnxLibThin.lnxsni(LnxLibThin.java:6571)
at oracle.sql.NUMBER.toLong(NUMBER.java:373)
at
oracle.jdbc.dbaccess.DBConversion.NumberBytesToLong(DBConversion.java
:2915)
at
oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:
4373)
at
oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.ja
va:529)
at
oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1540)
at weblogic.jdbc.jts.ResultSet.getLong(ResultSet.java:518)
at
weblogic.jdbc.rmi.internal.ResultSetImpl.getLong(ResultSetImpl.java:4
77)
at
weblogic.jdbc.rmi.internal.ResultSetStraightReader.getLong(ResultSetS
traightReader.java:142)
at
weblogic.jdbc.rmi.SerialResultSet.getLong(SerialResultSet.java:450)
at
com.eoriginal.engine.core.session.basicAccess.OrgUserDataAccessSessio
nBean.findUserAccountInfo(OrgUserDataAccessSessionBean.java:1272)
at
com.eoriginal.engine.core.session.basicAccess.OrgUserDataAccessSessio
nBean_rngrwj_EOImpl.findUserAccountInfo(OrgUserDataAccessSessionBean_rngrwj_
EOIm
pl.java:475)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean.valida
teLogin(LoginSessionBean.java:135)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean.valida
teLogin(LoginSessionBean.java:94)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean_moz7fh
EOImpl.validateLogin(LoginSessionBeanmoz7fh_EOImpl.java:37)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean_moz7fh
EOImplWLSkel.invoke(Unknown Source)
at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:274)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
(com.eoriginal.engine.core.session.basicAccess.LoginSessionBean_moz7fh_Impl:
:va
lidateLogin)>Have you tried the thick (oci) driver?
We're looking to upgrade too.
"Richard" <[email protected]> wrote:
>
I try to connect to an Oracle 9.2.0 on Windows XP with the jdbc thin
driver. I
use weblogic server 7.0 SP1 (same problem with weblogic server 7.0.0).
I try direct connection (without pool) or with the weblogic pool, and
I get the
same error :
java.lang.ArrayIndexOutOfBoundsException
at oracle.security.o3logon.C0.r(C0)
at oracle.security.o3logon.C0.l(C0)
at oracle.security.o3logon.C1.c(C1)
at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientH
elper)
at oracle.jdbc.ttc7.O3log.<init>(O3log.java:289)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:201)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:140)
at weblogic.jdbc.common.internal.ResourceAllocator.makeResources(Resourc
eAllocator.java:931)
at weblogic.jdbc.common.internal.ResourceAllocator.finishInit(ResourceAl
locator.java:457)
at weblogic.jdbc.common.internal.ResourceAllocator.<init>(ResourceAlloca
tor.java:316)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:292)
at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.
java:282)
at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.j
ava:270)
The same test works well with an Oracle 9.0 !
I have already try with this differents drivers :
8.1.7, 9.0 and 9.2 and I always have the same problem. -
How to use the Oracle 10g JDBC OCI driver in JBoss ?
Greetings,
I deployed ojdbc14.jar in JBoss and I created an Oracle datasource. I have the following questions:
1. In the datasource descriptor file I have:
<connection-url>jdbc:oracle:oci:@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=xe)))</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
Is it enough in order to use the Oracle 10g JDBC OCI driver ?
2. After having looked-up the datasource and created a connection, the classe of these objects are org.jboss.resource.adapter.jdbc.WrapperDataSource and, respectivelly, org.jboss.resource.adapter.jdbc.WrappedConnection. How can I have access to oracle.jdbc.oci and oracle.jdbc.pool packages ?
Many thanks in advance,
NicolasHello
We were banging our heads on a similar thing, maybe this will help
We needed to convert the wrapped connection to an OracleConnection so that we could do a proxy switch, but maybe you could apply it to your situation anyway
1-you have to convert the Connection object to an OracleConnection in order to use the method that does the proxy switch
The method to do this is getInnermostDelegate()
Once you call this method, you get a new Connection object that can be cast to an OracleConnection object
See below for the snippet of code
// now switch the user and reselect
if (conn instanceof DelegatingConnection) {
properties.put("PROXY_USER_NAME","peter/peter");
oraConn =((DelegatingConnection)conn).getInnermostDelegate();
if (oraConn == null)
out.println("oraConn is null\n");
((OracleConnection)oraConn).openProxySession(OracleConnection.PROXYTYPE_USER_NAME,properties);
2-you have to put a setting in the xml file in conf/Catalina/localhost that allows you to call the getInnermostDelegate() method
By default, Tomcat does not allow you to call this method, it will always return null
You have to change the xml to allow it to return an object
It seems that WebSphere and Tomcat both frown on vendor-specific methods that do not comply with the JDBC standards, but do allow it
Here is the setting:
<parameter>
<!-- NOTE: This is necessary to enable access to the Oracle connection object -->
<name>accessToUnderlyingConnectionAllowed</name>
<value>true</value>
</parameter>
Note, this setting was also put in the conf/server.xml file
Thanks
Peter -
Failed to call Oracle JDBC OCI driver
Hi - there,
I have just loaded JDBC classes for Oracle 8.0.5, which is running on Sun Solaris.
The Path setup for this driver is
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
LIBRARY_PATH=$ORACLE_HOME/jdbc/lib:$ORACLE_HOME/lib.
But I am not able to run any test programs and keep getting the error of
"java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
Someone can help me to jump-start this driver?
Thank a lot
CharlieTry to use Backslashes in the classpath.
It is a problem of your Classpath, because it don't find the class.
Regards,
Geri -
Help - Could not load 'oracle.jdbc.driver.OracleDriver ...
I'm using oci8 to connect to the Oracle database.
URL: jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(PORT=1527)(HOST=testhost)))(CONNECT_DATA=(SID=fnoe2pa)))
When I tried to start the weblogic server, I got the following errors:
Can you suggest what I should do next (step-wise)??? Thanks, Bobby
<Sleeping in createResource()>
####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
<main> <system> <> <001060> <Cannot startup connection pool
"pool/test_myapp" weblogic.common.ResourceException:
Could not load 'oracle.jdbc.driver.OracleDriver
If this is a type-4 JDBC driver, it could occur if the JDBC
driver is not in the system CLASSPATH.
If this is a type-2 JDBC driver, it may also indicate that
the Driver native layers(DBMS client lib or driver DLL)
have not been installed properly on your system
or in your PATH environment variable.
This is most likely caused by one of the following:
1. The native layer SO, SL, or DLL could not be found.
2. The file permissions on the native layer SO, SL, or DLL
have not been set properly.
3. The native layer SO, SL, or DLL exists, but is either
invalid or corrupted.
For more information, read the installation documentation
for your JDBC Driver, available from:
http://e-docs.bea.com
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:212)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:705)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:650)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:360)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:285)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:239)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:199)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy31.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2977)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:372)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy42.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
at weblogic.management.Admin.finish(Admin.java:644)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
at weblogic.Server.main(Server.java:35)
>
####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
<main> <system> <> <001082> <Creating Data Source named
jdbc/test_myapp for pool pool/test_myapp>
####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
<main> <system> <> <001070> <Checking existence of connection pool
pool/test_myapp requested by user system>
####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
<main> <system> <> <001059> <Error during Data Source creation:
weblogic.common.ResourceException: DataSource(jdbc/test_myapp) can't
be created with non-existent Pool (connection or multi)
(pool/test_myapp)>
####<15/08/2002 14:09:50> <Info> <EJB> <qawebmethods> <myserver>
<main> <system> <> <010008> <EJB Deploying file: myapp-ejb.jar>
####<15/08/2002 14:09:50> <Warning> <J2EE> <qawebmethods> <myserver>
<main> <system> <> <160007> <You are running WebLogic Server with J2EE
1.3 features enabled. The implementation of specific J2EE 1.3 features
(EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
in BEA WebLogic Server 6.1 is of a non-final version of the
appropriate specification. It is subject to change in future releases
once the specification becomes finalized. This may cause application
code developed for BEA WebLogic Server 6.1 that uses the new features
of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
future releases of BEA WebLogic Server.>
####<15/08/2002 14:09:59> <Error> <J2EE> <qawebmethods> <myserver>
<main> <system> <> <160001> <Error deploying application myapp-ejb:
Unable to deploy EJB: Counter from myapp-ejb.jar:
The DataSource with the JNDI name: jdbc/test_myapp could not be
located. Please ensure that the DataSource has been deployed
successfully and that the JNDI name in your EJB Deployment descriptor
is correct.
>
####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101053> <[HTTP myserver] Loading web app: myapp>
####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101059> <[myserver] Loading myapp from WAR file:
C:\bea\wlserver6.1\.\config\mydomain\applications\.wlnotdelete\wlap31483\myapp.war>
####<15/08/2002 14:09:59> <Warning> <J2EE> <qawebmethods> <myserver>
<main> <system> <> <160007> <You are running WebLogic Server with J2EE
1.3 features enabled. The implementation of specific J2EE 1.3 features
(EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
in BEA WebLogic Server 6.1 is of a non-final version of the
appropriate specification. It is subject to change in future releases
once the specification becomes finalized. This may cause application
code developed for BEA WebLogic Server 6.1 that uses the new features
of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
future releases of BEA WebLogic Server.>
####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101031>
<[WebAppServletContext(1412030,myapp,/myapp)] extracting classfiles to
C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp:>
####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101032>
<[WebAppServletContext(1412030,myapp,/myapp)] extracted classfiles
successfully...>
####<15/08/2002 14:10:04> <Info> <HTTP Session> <qawebmethods>
<myserver> <main> <system> <> <100037> <Creating SessionContext of
type: memory for webapp: /myapp>
####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101047>
<[WebAppServletContext(1412030,myapp,/myapp)] registering classpath
servlet with initArgs 'null'>
####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101047>
<[WebAppServletContext(1412030,myapp,/myapp)] registering getior
servlet with initArgs 'null'>
####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101047>
<[WebAppServletContext(1412030,myapp,/myapp)] registering tunneling
servlets with initArgs 'wl-dispatch-policy=direct'>
####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101047>
<[WebAppServletContext(1412030,myapp,/myapp)] registering JSPServlet
with initArgs '[JspConfig:
verbose=true,packagePrefix=jsp_servlet,-compiler=javac,compileFlags=,workingDir=C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp,pageCheckSeconds=1,superclass=null,keepgenerated=false,precompileContinue=false,compilerSupportsEncoding=true,encoding=null,defaultfilename=index.jsp,compilerclass=null,noTryBlocks=false]'>
####<15/08/2002 14:10:04> <Debug> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101097> <Registering ServletContext:
"myapp:/myapp">
####<15/08/2002 14:10:04> <Info> <J2EE> <qawebmethods> <myserver>
<main> <system> <> <160003> <Deployed : myapp>
####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
<main> <system> <> <101133> <Initializing WEB server myserver>
####<15/08/2002 14:10:04> <Notice> <Management> <qawebmethods>
<myserver> <main> <system> <> <141052> <Application Poller started for
development server.>
####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
<myserver> <ListenThread> <system> <> <000202> <ListenThread listening
on port 7001>
####<15/08/2002 14:10:04> <Info> <NT Performance Pack> <qawebmethods>
<myserver> <ListenThread> <system> <> <000000> <NATIVE: NTSocketMuxer
was built on Nov 1 2001 16:39:28
>
####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
<myserver> <SSLListenThread> <system> <> <000202> <SSLListenThread
listening on port 7002>
####<15/08/2002 14:10:05> <Notice> <Management> <qawebmethods>
<myserver> <main> <system> <> <141030> <Starting discovery of Managed
Server... This feature is on by default, you may turn this off by
passing -Dweblogic.management.discover=false>
####<15/08/2002 14:10:05> <Notice> <WebLogicServer> <qawebmethods>
<myserver> <main> <system> <> <000331> <Started WebLogic Admin Server
"myserver" for domain "mydomain" running in Development Mode>
####<15/08/2002 14:10:11> <Info> <NT Performance Pack> <qawebmethods>
<myserver> <ExecuteThread: '14' for queue: 'default'> <> <> <000000>
<Allocating: '2' NT reader threads>
####<15/08/2002 14:10:13> <Info> <HTTP> <qawebmethods> <myserver>
<ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
<> <101047> <[WebAppServletContext(5367844,console,/console)] actions:
init>
####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
<ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
<> <101047> <[WebAppServletContext(5367844,console,/console)]
FileServlet: init>
####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
<ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
<> <101047> <[WebAppServletContext(5367844,console,/console)]
FileServlet: Using standard I/O>"thorick" <[email protected]> wrote in message news:<[email protected]>...
Most likely, the OCI libraries could not be loaded.
Before continuing down this path, is there any reason
why you want to use an OCI based Driver as opposed to the
all Java Oracle thin driver ?There is indeed a valid reason for my choice.
I am currently connecting to the Oracle "Rdb" 7.0 database (located on
VMS) - not Oracle Oracle.
The SQL Service software we're currently using is version 7.1. This
version works well with the OCI8 driver (when connecting to the
database from Windows NT). This version of SQL Service however does
NOT work for the THIN driver (unless we upgrade the SQL Service to
version 7.1.5.5 - which we're not prepared to do so because it is not
stable enough from our previous test/trials). SQLSRV Version 7.1.5.5
works for THIN driver but it will result in uncommitted
transactions/unresolved connection/stopping of listener issues and
there is a need to restart the service from time to time. Oracle has
since confirmed that this is a bug that they have yet to resolve...
So we have to stick to OCI8 (THICK) for the time being. I would really
appreciate it very much if you can tell me the various OCI libraries
that I need to load (in terms of WebLogic Server config file settings
etc..).
By the way I have already installed the Oracle 8 client software on
the NT server (where WebLogic Server is) and I have also set up the
relevant SID (using the Net8 Assistant) that points to the Oracle Rdb
database on the VMS. I have also tried using SQL*Plus to connect to
the database and I can connect properly to the database. But WebLogic
simply doesn't seem to load the software.
Help...
Regards,
Bobby Brown, writing from Australia. -
NullPointerException in oracle.jdbc.driver.T2CConnection.logon
Hiya,
I know little about Java, so I'm a bit lost when I get this error:
java.lang.NullPointerException
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:325)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:347)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:139)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:79)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:549)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.somecorp.util.pool.DatabaseConnectionFactory.create(DatabaseConnectionFactory.java:62)
at com.somecorp.util.pool.Pool.create(Pool.java:348)
at com.somecorp.util.pool.Pool.retain(Pool.java:169)
at com.somecorp.util.pool.BoundedPool.retain(BoundedPool.java:137)
at com.somecorp.util.pool.DatabaseConnectionPool.retainConnection(DatabaseConnectionPool.java:68)
at com.somecorp.servlet.modservlet.db.DBModularServletContextFactory.loadContextBase(DBModularServletContextFactory.java:59)
at com.somecorp.servlet.modservlet.db.DBModularServletContextFactory.getServletContext(DBModularServletContextFactory.java:46)
at com.somecorp.servlet.modservlet.ModularServlet.init(ModularServlet.java:44)
at com.somecorp.transaction.admin.SomeSoftwareAdminServlet.init(SomeSoftwtareAdminServlet.java:33)
at javax.servlet.GenericServlet.init(GenericServlet.java:82)
at com.caucho.server.http.Application.createServlet(Application.java:3114)
at com.caucho.server.http.Application.loadServlet(Application.java:3065) at com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435)
at com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809)
at com.caucho.server.http.Application.buildFilterChain(Application.java:2765)
at com.caucho.server.http.Invocation.service(Invocation.java:313)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:253)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:534)
This is a Java servlet, running in resin. We're using the OCI drivers, Java2 SDK 1.4.2_11, on Solaris 9 x86 -- thick client version 10.1.0.3. Our database server is a RAC cluster, which is two Sparc boxes running Solaris 9 and 10gR2. I've done this:
JAVA_SYSTEM="-J-hotspot -J-Xmx256M -J-Xss7m -J-Dfile.encoding=UTF-8 -J-Duser.language=en_US -J-Duser.country=US -J-Duser.region=US -J-Djava.library.path=$LD_LIBRARY_PATH -J-DGlobalProperties.filename=$INSTANCE_DIR/conf/global.properties.$HOSTNAME -J-DGatewayContext.host=secure.some.corp -J-DGatewayContext.port=4430 -J-DGatewayContext.merchantId=somesoftware-test -J-DGatewayContext.merchantKey=somesoftware-test-key -J-Dii.system.environment=test -J-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol -J-Djava.library.path=${ORACLE_HOME}/lib"
JAVA_CLASSPATH=/usr/local/java/apps/resin/resin-ee-2.1.16/lib/dom.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:${ORACLE_HOME}/jdbc/lib/ojdbc14.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/ejb.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jaxp.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jdbc-mysql.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jdbc2_0-stdext.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jms.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jmx.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jndi.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jta_101.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/resin-ejb.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/resin.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/sax.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/webutil.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/j2sdk1.4.2_11/lib/tools.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/j2sdk1.4.2_11/jre/lib/rt.jar
JAVA_CLASSPATH=${JAVA_CLASSPATH}:/usr/local/java/apps/resin/resin-ee-2.1.16/lib/jsdk23.jar
unset CLASSPATH
unset LD_LIBRARY_PATH
JAVA_HOME=/usr/local/java/j2sdk1.4.2_11
export JAVA_HOME
LD_LIBRARY_PATH=$JAVA_LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ORACLE_HOME}/lib
export LD_LIBRARY_PATH
<start java>
Essentially, I set the LD_LIBRARY_PATH, make sure my user.country and user.language properties are set, include a known working version of ojdbc14.jar and everything should be happy, right? Except it's not.
Our oracle connection string is:
TDBConnectionPool.url=jdbc:oracle:oci:@someSID
TDBConnectionPool.username=someuser
TDBConnectionPool.password=somepassword
TDBConnectionPool.targetSize=8
TDBConnectionPool.maxSize=30
Has anyone else run into this issue? Is this an issue I can take up with Oracle support?I'm pretty sure that it was this:
# JAVA_SYSTEM="-J-hotspot -J-Xmx256M -J-Xss7m -J-Dfile.encoding=UTF-8 -J-Duser.language=en_US -J-Duser.country=US -J-Duser.region=US -J-DGatewayContext.host=some.corp -J-DGatewayContext.port=4430 -J-DGatewayContext.merchantId=somesoft-test -J-DGatewayContext.merchantKey=somesoft-test-key -J-Dii.system.environment=test -J-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol -J-Djava.library.path=${ORACLE_HOME}/lib"
# Everything else is either somecorp specific or deprecated. user.region, etc.
# probably isn't but we seem to get by.
JAVA_SYSTEM="-J-Xmx256M -J-Xss7m -J-Dfile.encoding=UTF-8" -
Error when trying to connect to a database.
oracle.jdbc.driver.T2CConnection.getLibraryVersion Number()I Vendor code 0
sqldeveloper3.0.04 with jre ....sqldeveloper2.1.1.64 works fine
oracle client 10.2.0
Thanks in advanceThere's a number of solutions, you can search the forum. It's probably using the unsupported 10g driver.
Make sure you have Preferences - Database - Advanced - Use OCI/Thick Driver unchecked, and maybe use Basic connections instead TNS. You can also install the 11.2 client or change your ORACLE_HOME.
Hope that helps,
K. -
I need to use the Oracle 9i thick driver in order to support Oracle Label Security.
Is it possible to configure WebLogic connection pools using this driver?
Has anyone else had experience with this?
Thanks,
DAve"David Mrozek" <[email protected]> wrote in message
news:3bfbcb30$[email protected]..
I need to use the Oracle 9i thick driver in order to support Oracle LabelSecurity.
Is it possible to configure WebLogic connection pools using this driver?Weblogic will work with any JDBC 2.0 compliant driver. I believe
there is no diffrenece in setting up an OCI coneection pool for
8.1.7 and 9. Post here an example of how you connect
to the DB via driver for oracle 9 and we will give you an idea
how to setup the pool.
Regards,
Slava Imeshev -
JDBC/OCI driver for JDK1.2
Hi,
I have an evaluation copy of Oracle8 version 8.0.3.0 and
downloaded the JDBC/OCI driver for JDK1.1 (classe111.zip). The
example I used was also taken from this site, which connects to
the database and lists ename from emp, using scott/tiger.
Everything worked fine under JDK1.1 but I can't get the code to
work with JDK 1.2
Does Oracle provide a JDBC/OCI driver that will work with JAVA
1.2 or am I missing something. Please note that I am not using
Oracle8i.
Any assistance would be greatly appreciated.
Karim
nullKarim,
Openlink Software (http://www.openlinksw.com) provides JDBC 2.0
drivers in version 3.2. This version will be hitting our public
web site next week, but you can get pre-release components from
ftp://ftp.openlinksw.com/pre-3.2/index.html
The JDK 1.2 drivers are all the way at the bottom under the
Windows section.
HTH,
Stephen
Karim (guest) wrote:
: Hi,
: I have an evaluation copy of Oracle8 version 8.0.3.0 and
: downloaded the JDBC/OCI driver for JDK1.1 (classe111.zip). The
: example I used was also taken from this site, which connects
to
: the database and lists ename from emp, using scott/tiger.
: Everything worked fine under JDK1.1 but I can't get the code
to
: work with JDK 1.2
: Does Oracle provide a JDBC/OCI driver that will work with JAVA
: 1.2 or am I missing something. Please note that I am not using
: Oracle8i.
: Any assistance would be greatly appreciated.
: Karim
null -
I'm using IBM's WebSphere JDBC connection pool to manage oracle
connections. While the code worked normally on Sun Solaris, I
get ORA-03123, ORA-03127 etc errors on AIX. I'm closing the
resultsets, the statement handles and releasing the connection
after each SQL execution. Is this an AIX JDBC OCI driver problem
or am I missing something.
Thanks,
Ravi
nullI found problem like you but on DIGITAL UNIX 4.0D It's an
AIO Consistency Error.. did you know some thing about this??
and For your question OCI7 driver to connect to ORACLE7.3.4 are
in liboci73.so or another extension depend on your OS (I don't
know what's one on AIX) but it must come with Oracle
Installation Package you can install on AIX :>
Prashant (guest) wrote:
: Hi:
: Does any one know where I could find JDBC/OCI level 2 driver
: for AIX (4.2) running Oracle (7.3.4). All I have been able to
: locate is the NT and Solaris. Both contains classes and shared
: libraries for that machine. I saw someone posted this question
: before, however, suggestions was to use dynamic library
generated
: for Solaris, this will not work. Does anyone have other
: suggestions.
: Any and all help is appreciated.
: Many Thanks
: Prashant.
null -
Hi all,
We have a setup accessing an Oracle-database (9.0.1 and 9i) from a
java program using an Oracle thin driver like this:
jdbc:oracle:thin:@host:port:sid
This works fine. Now we wanted to try the OCI-driver for speed
comparision (mainly bypassing socket communication).
jdbc:oracle:oci8:@host:port:sid
This didn't work. We use the classes12.zip for Oracle 9.0.1. downloaded
from OTN. The error is:
java.lang.NoSuchFieldError: OCIEnvHandle
at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:287)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:116)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
at de.otto.noa.standard.database.backend.ConnectionOracle.connect(ConnectionOracle.java:64)
The last line given is the first line in our own code.
The SHLIB_PATH points to the lib32 directories. If we set them to the lib directories
the error changes to :
java.lang.UnsatisfiedLinkError: /opt/oracle/app/oracle/product/9i/lib/libocijdbc9.sl: Exec format error
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:294)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:287)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:116)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
at de.otto.noa.standard.database.backend.ConnectionOracle.connect(ConnectionOracle.java:64)
Any suggestions on what to check up on?
Also I'd like to know whether it is correct that the Oracle 9 driver uses oci8?
regards,
Frieder SchenkeHi Elango,
One cannot connect to the database using host:port:sid when using OCI driver. Strange.
It has to be a TNSname or a url .
jdbc:oracle:oci8:@(description=(address=(host=myhost)(protocol=tcp)(port=1521))(connect_data=(sid=orcl)))I tried this (adapted to our database of course) and also (because we have tnsnames.ora setup too):
jdbc:oracle:oci8:@tns_name
With the same effects. ('tnsping tns_name' works)
I think the problem lies somewhere else. The system doesn't even try to actually connect
before it throws that exception. Some driver incompatibility, I guess. But I don't know,
what I did wrong or where to look. Especially that 'Exec format error' is suspicious,
because we'd like to use 64bit if possible.
Also, for when this starts to work, I'd like to know how to make sure there is no socket
connection being used. I vaguely remember something like
jdbc:oracle:oci8:@beqlocal:tns_name
but I don't know the exact syntax. There are several database on that machine, so just
beqlocal wouldn't be enough, unless it also uses the environment-variable
ORACLE_SID
regards,
Frieder Schenke
PS : Peter is my team chef, I'm using his OTN account -
Oracle OCI driver stops working after a while of disuse
I am using wl server 8.1, oracle oci driver (oracle 9i client), on solaris.
When i create a connection pool using the oci driver, it connects, and i
test it, and the tests run fine.
The Application works for a few days. Then eventually after disuse, say over
the weekend, I get exceptions in the log (the message is at end of email).
This is because it gives me a sql exception saying it cannot resolve the
service name. The database is up and running, confirmed.
I tried testing the connection pool manually through the console, and it
failed with the service name exception. But it would connect fine when i
used sqlplus to connect to the databse, using the same service name.
Why does this deteriorate over time? Is there a specific test that would
prevent this from happening?
Once i restart the weblogic server, the connection pool connects fine. But
this is not a solution, since I can't be restarting the server all the time.
Any one got any ideas?
-Ayan
------------WEBLOGIC MANAGED SERVER LOG----------
####<Mar 27, 2004 4:20:57 AM EST> <Error> <JDBC><<WLS Kernel>> <>
<BEA-001112> <Test "SELECT 1 FROM DUAL" set up for pool "CRCPool2" failed
with exception: "java.sql.SQLException: ORA-03113: end-of-file on
communication channel
".>
####<Mar 27, 2004 4:20:57 AM EST> <Info> <JDBC> <<WLS Kernel>> <>
<BEA-001128> <Connection for pool "CRCPool2" closed.>
---------- and then eventually this----------
####<Mar 28, 2004 4:33:11 AM EST> <Warning> <JDBC> <<WLS Kernel>> <>
<BEA-001129> <Received exception while creating connection for pool
"CRCPool2": ORA-12154: TNS:could not resolve service name
>Ayan wrote:
I am using wl server 8.1, oracle oci driver (oracle 9i client), on solaris.
When i create a connection pool using the oci driver, it connects, and i
test it, and the tests run fine.
The Application works for a few days. Then eventually after disuse, say over
the weekend, I get exceptions in the log (the message is at end of email).
This is because it gives me a sql exception saying it cannot resolve the
service name. The database is up and running, confirmed.
I tried testing the connection pool manually through the console, and it
failed with the service name exception. But it would connect fine when i
used sqlplus to connect to the databse, using the same service name.
Why does this deteriorate over time? Is there a specific test that would
prevent this from happening?
Once i restart the weblogic server, the connection pool connects fine. But
this is not a solution, since I can't be restarting the server all the time.
Any one got any ideas?
-AyanHi. Is there a firewall between the weblogic server and DBMS? There is
a problem with OCI losing connectivity to the DBMS. OCI may be keeping
a socket open as long as the process (weblogic) is running.
Joe
------------WEBLOGIC MANAGED SERVER LOG----------
####<Mar 27, 2004 4:20:57 AM EST> <Error> <JDBC><<WLS Kernel>> <>
<BEA-001112> <Test "SELECT 1 FROM DUAL" set up for pool "CRCPool2" failed
with exception: "java.sql.SQLException: ORA-03113: end-of-file on
communication channel
".>
####<Mar 27, 2004 4:20:57 AM EST> <Info> <JDBC> <<WLS Kernel>> <>
<BEA-001128> <Connection for pool "CRCPool2" closed.>
---------- and then eventually this----------
####<Mar 28, 2004 4:33:11 AM EST> <Warning> <JDBC> <<WLS Kernel>> <>
<BEA-001129> <Received exception while creating connection for pool
"CRCPool2": ORA-12154: TNS:could not resolve service name -
Oracle database Connectivity using OCI driver
I am getting the error only when ever I am using oci driver
oracle.url=jdbc:oracle:oci:@(description=(address=(host=url.name.com)(protocol=tcp)(port=1521))(connect_data=(sid=user)))
04:52:55,093 ERROR [STDERR] java.sql.SQLException: ???S???Y??x??
04:52:55,094 ERROR [STDERR] at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
04:52:55,094 ERROR [STDERR] at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
04:52:55,095 ERROR [STDERR] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
04:52:55,095 ERROR [STDERR] at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:650)
04:52:55,095 ERROR [STDERR] at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:338)
04:52:55,095 ERROR [STDERR] at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
04:52:55,095 ERROR [STDERR] at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:133)
04:52:55,096 ERROR [STDERR] at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
04:52:55,096 ERROR [STDERR] at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
04:52:55,096 ERROR [STDERR] at java.sql.DriverManager.getConnection(DriverManager.java:582)
04:52:55,096 ERROR [STDERR] at java.sql.DriverManager.getConnection(DriverManager.java:185)
04:52:55,097 ERROR [STDERR] at org.apache.jsp.index_jsp._jspService(index_jsp.java:68)
04:52:55,097 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
04:52:55,097 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
04:52:55,097 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
04:52:55,097 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
04:52:55,098 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
04:52:55,098 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
04:52:55,098 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
04:52:55,098 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
04:52:55,099 ERROR [STDERR] at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63)
04:52:55,099 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
04:52:55,099 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
04:52:55,099 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
04:52:55,099 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
04:52:55,100 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
04:52:55,100 ERROR [STDERR] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
04:52:55,100 ERROR [STDERR] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
04:52:55,100 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
04:52:55,101 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
04:52:55,101 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
04:52:55,101 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
04:52:55,101 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
04:52:55,101 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
04:52:55,102 ERROR [STDERR] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
04:52:55,102 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
04:52:55,102 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
04:52:55,102 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
04:52:55,102 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
04:52:55,103 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
04:52:55,105 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[Test].[jsp]] Servlet.service() for servlet jsp threw exception: java.sql.SQLException: ???S???Y??x??
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:650) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:338) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:133) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510) [ojdbc5.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at java.sql.DriverManager.getConnection(DriverManager.java:582) [:1.6.0_13]
at java.sql.DriverManager.getConnection(DriverManager.java:185) [:1.6.0_13]
at org.apache.jsp.index_jsp._jspService(index_jsp.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [:6.0.0.20100911-M5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Beta2]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [:6.0.0.20100911-M5]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [:6.0.0.20100911-M5]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [:6.0.0.20100911-M5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Beta2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.20100911-M5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100911-M5]
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63) [:6.0.0.20100911-M5]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.20100911-M5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.20100911-M5]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR3]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR3]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.20100911-M5]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.20100911-M5]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.20100911-M5]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.20100911-M5]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.20100911-M5]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:6.0.0.20100911-M5]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.20100911-M5]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]
When I am using thin driver, I am successful in connecting to the database
oracle.url=jdbc:oracle:thin:@(description=(address=(host=url.name.com)(protocol=tcp)(port=1521))(connect_data=(sid=user)))
I am using JBOSS 1.6 with oracle 11.1.0 and jdk 1.6
Please help me resolve the problem
Thanks,
KumarYou should confirm that you can connect to the DB with a simple Java class using the url that the code you posted is using.
This will show that the OCI client is installed and executing properly. If you can't connect externally you will need to fix that first.
Is the Oracle client installed on the same machine the JDBC code is running on?
Maybe you are looking for
-
Safari is not opening certain websites
it seems ever since the latest software updates on Safari and Security preferences a couple of weeks ago I have been having problems loading websites that have loaded before with out any problem. I put in the websites and they try and load and they j
-
Managing ldap sub tree with Solaris Mnagement Console
Hi, I'm using Sun ONE Directory Server 5.2 in Solaris 9 envronment. I want to use Solaris Management Console to manage my Ldap Name Service. On my ldap server I can display two scopes : Scope 1 file:/example/example Scope 2 ldap:/example/dc=example,d
-
Adding page actions by javascript
Hi, I know that acrobat holds the option to add "open/close page event", it can be done manually, like in this guide: http://acrobatusers.com/tutorials/print/entering-page-actions but i want something else, i want to know if there is a JavaScript com
-
my ipod touch battery died. tried recharging but nothing is happening. tried multiple chargers and usb ports. what do i do?
-
TS4006 what if the person that found my ipod restored it to factory setting?
will i still be able to locate my ipod using the Find My Phone?