users@glassfish.java.net

Re: Glassfish Connection Pool Problem

From: Steve Essery <Steve.Essery_at_Sun.COM>
Date: Thu, 31 Jul 2008 11:50:31 +0100

Hi,

If you called Oracle they would have told you what you are trying to do
is no longer supported as 8i is no longer supported by them.

The fact you got an error about ocijdbc9 (libocijdbc9.so) not being in
your library path simply means either, you've not set the environment
variable LD_LIBRARY_PATH to point to $ORACLE_HOME/lib on the machine
glassfish is on or you've not set the native library path prefix in the
glassfish configuration. (Configurations->config-name->JVM
Settings->Path Settings)

You should be aware that Type-2 JDBC drivers require access to Oracle's
native shared libraries - you should also have the ORACLE_HOME
environment variable set to point to your 9i Oracle installation as
there are other resources the driver will need to load. Its the Oracle
driver that is calling java.lang.System.loadLibrary() to load the shared
library it calls via JNI.

ocijdbc9 is from Oracle 9i - there was a time when Oracle would have
certified its use against 8i, but since 8i has been desupported its
something they would no longer support/allow (even if it did work).

You can see the current supported matrix at:

http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html

The 8.1.7 JDBC drivers are still downloadable from Oracle's TechNet site:

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc817.html

But I wouldn't use those there is a very nasty dead lock issue in the
driver that is easily exposed when running in any code that maintains a
connection pool that wasn't fixed until 8.1.7.4. Support for XA is
another problem area in 8i - you have to have Oracle's JServer installed
in the database and the appropriate JAVA_XA packages installed - plus
the database's shared pool's configured to be large enough. Again this
was flakey until at least 8.1.7.4.

Oracle's Type-4 JDBC driver emulates the Oracle Net protocol their
native libraries use to communicate between clients and servers. For
this reason its possible that between certain releases you can have
problems - usually though its when you are trying to use an older JDBC
client against a more recent database server.

Honestly you'd be in a better position using at least Oracle 9.2
(9.2.0.8 or later) as both the database and client in what you are
trying to do.

Regards,
Steve

glassfish_at_javadesktop.org wrote:
> Problem solved!
>
> The problem was that I had problems with the thin driver because the db doesn't support it. In the java application I used the oci driver.
> But when I tried to ping with the oci driver I got another error:
> no ocijdbc9 in java.library.path
>
> Then I checked all of the enviroment variables but there were no failures.
> Then I checked the asadmin.bat and I think I found an error:
>
> @echo off
> REM
> REM Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
> REM Use is subject to license terms.
> REM
>
> setlocal
> call "C:\Programme\Sun\AppServer\config\asenv.bat"
> set Path=%AS_INSTALL%\bin;%AS_ICU_LIB%;%PATH%
>
> "%AS_JAVA%\bin\java" -Dcom.sun.aas.instanceName=server [b]-Djava.library.path="%AS_INSTALL%\bin";"%AS_ICU_LIB%" [/b]-Dcom.sun.aas.configRoot="%AS_CONFIG%" -Djava.endorsed.dirs="%AS_INSTALL%\lib\endorsed" -Dcom.sun.aas.processLauncher="SE" -cp "%AS_DERBY_INSTALL%\lib\derby.jar";"%AS_INSTALL%\jbi\lib\jbi-admin-cli.jar";"%AS_INSTALL%\jbi\lib\jbi-admin-common.jar";"%AS_INSTALL%\lib\appserv-rt.jar";"%AS_INSTALL%\lib\appserv-ext.jar";"%AS_INSTALL%\lib\javaee.jar";"%AS_INSTALL%\lib\appserv-se.jar";"%AS_INSTALL%\lib\admin-cli.jar";"%AS_INSTALL%\lib\appserv-admin.jar";"%AS_INSTALL%\lib\commons-launcher.jar";"%AS_INSTALL%\lib\install\applications\jmsra\imqjmsra.jar" -Dcom.sun.appserv.admin.pluggable.features=com.sun.enterprise.ee.admin.pluggable.EEClientPluggableFeatureImpl com.sun.enterprise.cli.framework.CLIMain %*
> endlocal
>
> The interesting part is the bold one. Why do I initialize a variable when I don't use it?
> So I changed this part to:
> -Djava.library.path="%PATH%"
>
> estarted the server and now it works.
> It really took me some time to find the error so I hope this helps someone who has also problems with thze OCI driver and can't use the thin one because of his database.
> [Message sent by forum member 'thellos' (thellos)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290522
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>