about Specify The Oracle JDBC Driver in J2EE Server.

Discussions

EJB programming & troubleshooting: about Specify The Oracle JDBC Driver in J2EE Server.

  1. I'm using the Java 2 SDK, Enterprise Edition (J2EE(TM)).
    And I'v a problem about Specify The Oracle JDBC Driver

    I'm try to specify the driver of Oracle JDBC by
    set J2EE_CLASSPATH=C:\j2sdkee1.3.1\lib;C:\Oracle\Ora81\jdbc\lib\classes12.zip
    But it does not work!!!

    This is my startup file
    ========== j2ee.bat ==============
    @echo off

    rem Set JAVA_HOME and J2EE_HOME before running this script.
    rem
    rem set JAVA_HOME to the path where you have Java 2 (JDK1.2) installed.
    rem
    rem set J2EE_HOME to the path where you have installed this package (EJB server).
    rem

    call C:\j2sdkee1.3.1\bin\setpath.bat

    if not "%J2EE_HOME%" == "" goto CONT0
    echo ERROR: Set J2EE_HOME before running this script.
    goto END
    :CONT0

    if EXIST "%J2EE_HOME%\bin\setenv.bat" goto CONT1
    echo ERROR: Set J2EE_HOME to the path of a valid j2sdkee.
    goto END
    :CONT1
    call %J2EE_HOME%\bin\setenv.bat
    if not "%JAVA_HOME%" == "" goto CONT2
    echo ERROR: Set JAVA_HOME before running this script.
    goto END
    :CONT2
    if EXIST "%JAVA_HOME%\bin\java.exe" goto CONT3
    echo ERROR: Set JAVA_HOME to the path of a valid jdk.
    goto END
    :CONT3

    %JAVACMD% %SSL_OPTIONS%=%SSL_OPTIONS1% %JAAS_OPTIONS%=%JAAS_OPTIONS1% %LISTEN_OPTIONS%=%LISTEN_OPTIONS1% -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Djms.home=%JMS_HOME% -Dcom.sun.jms.service.jdbc.dbpath=%JMS_DB_PATH% -Djms.properties=%J2EE_HOME%\config\jms_service.properties -Djava.security.policy==%J2EE_HOME%\lib\security\server.policy -Djava.security.auth.login.config=%J2EE_HOME%\lib\security\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% com.sun.enterprise.server.J2EEServer %1 %2

    :END

    ========== setenv.bat ===========
    rem Set JAVA_HOME and J2EE_HOME before running this script.
    rem first include user-specified definitions.
    call %J2EE_HOME%\bin\userconfig.bat
    if "%JMS_HOME%" == "" set JMS_HOME=%J2EE_HOME%
    set LIBDIR=%J2EE_HOME%\lib
    set LOCALEDIR=%J2EE_HOME%\lib\locale
    set CLOUDSCAPE_INSTALL=%LIBDIR%\cloudscape
    set CLASSESDIR=%LIBDIR%\classes
    set JMS_CLASSESDIR=%JMS_HOME%\classes
    set J2EEJARS=%LIBDIR%\j2ee.jar
    set JAVATOOLS=%JAVA_HOME%\lib\tools.jar
    set JAVAHELPJARS=%LIBDIR%\jhall.jar

    set J2EE_CLASSPATH=C:\j2sdkee1.3.1\lib;C:\Oracle\Ora81\jdbc\lib\classes12.zip

    rem JMS DB PATH must end in slash to specify a directory
    set JMS_DB_PATH=%J2EE_HOME%\repository\%COMPUTERNAME%\db\
    set SYSTEM_LIB_DIR=%LIBDIR%\system
    set JMS_RI_JDBC=%SYSTEM_LIB_DIR%\cloudscape.jar;%SYSTEM_LIB_DIR%\tools.jar
    set CLOUDJARS=%JMS_RI_JDBC%;%CLOUDSCAPE_INSTALL%\RmiJdbc.jar;%CLOUDSCAPE_INSTALL%\cloudclient.jar
    set J2EETOOL_CLASSES=%LIBDIR%\toolclasses
    set J2EETOOL_JAR=%LIBDIR%\j2eetools.jar

    set CPATH=%CLOUDJARS%;%CLASSESDIR%;%JMS_CLASSESDIR%;%J2EEJARS%;%J2EETOOL_CLASSES%;%J2EETOOL_JAR%;%LOCALEDIR%;%J2EE_CLASSPATH%;%JAVATOOLS%;%JAVAHELPJARS%

    set JAAS_OPTIONS=-Djava.security.auth.policy
    set JAAS_OPTIONS1=%J2EE_HOME%\lib\security\jaas.policy
    set SSL_OPTIONS=-Djavax.net.ssl.trustStore
    set SSL_OPTIONS1=%J2EE_HOME%\lib\security\cacerts.jks
    set LISTEN_OPTIONS=-Dcom.sun.CORBA.connection.ORBListenSocket
    set LISTEN_OPTIONS1=SSL:0,SSL_MUTUALAUTH:0,PERSISTENT_SSL:1060

    set CLASSPATH=%CLASSPATH%;%CPATH%
    set JAVACMD=%JAVA_HOME%\bin\java -Xmx128m



    Thank. :-)
  2. I guess you should copy classes12.zip to ur webapps lib folder
    thatz WEB-INF\lib withing ur application folder ....
    that way it is for sure that the zip is in classpath and should not have problem