to super: 我加了,但是不行呀。 在日志里是说找不到驱动,连接池的设置应该没错,唉,烦死了。帮帮忙呀!
没办法了。把你的startweblogic.cmd贴出来吧,让大家看看。
@echo off @rem $Id: //depot/dev/src510p/startWebLogic.cmd#4 $@rem This script can be used to start WebLogic Server. It contains @rem following variables: @rem @rem JAVA_HOME - Determines the version of Java used to start @rem WebLogic Server. This variable must point to the @rem root directory of a JDK or JRE installation. See @rem the WebLogic platform support page @rem (http://www.weblogic.com/docs51/platforms/index.html) @rem for an up-to-date list of supported JVMs on Windows NT. @rem Because of packaging differences between versions of Java, @rem this script will not work with a JRE 1.1.7 installation. @rem PRE_CLASSPATH - Use this variable to prepend jar files or directories to @rem the WEBLOGIC_CLASSPATH. @rem POST_CLASSPATH - Use this variable to append jar files or directories to @rem the end of the WEBLOGIC_CLASSPATH. @rem @rem When setting these variables below, please use short file names (8.3). @rem To display short (MS-DOS) filenames, use "dir /x". File names with @rem spaces will break this script. @rem @rem jDriver for Oracle users: This script assumes that native libraries @rem required for jDriver for Oracle have been installed in the proper @rem location and that your system PATH variable has been set appropriately. @rem For additional information, refer to Installing and Setting up WebLogic @rem Server (/install/index.html in your local documentation set or on the @rem Internet at http://www.weblogic.com/docs51/install/index.html). SETLOCAL@rem Set user-defined variables. Note that JAVA_HOME will be taken @rem from the environment, if it is already defined. if "%JAVA_HOME%" == "" set JAVA_HOME=.\jre1_2\jre @rem if "%JAVA_HOME%" == "" set JAVA_HOME=\progra~1\micros~1.2 set PRE_CLASSPATH= set POST_CLASSPATH=@rem Check that script is being run from WebLogic root directory if not exist license\WebLogicLicense.xml goto wrongplace if not exist weblogic.policy goto wrongplace goto checkJRE:wrongplace echo startWebLogic.cmd: must be run from the WebLogic installation directory. 1>&2 goto finish:checkJRE if exist %JAVA_HOME%\lib\nul goto whichJRE if exist %JAVA_HOME%\classes\nul goto whichJRE echo. echo The JRE wasn't found in directory %JAVA_HOME%. echo Please edit the startWebLogic.cmd script so that the JAVA_HOME echo variable points to the root directory of your Java installation. goto finish:whichJRE echo on set PATH=.\bin;%PATH% @if exist %JAVA_HOME%\Bin\JView.exe goto runWebLogicJview @if exist %JAVA_HOME%\..\JView.exe goto runWebLogicJview @if exist %JAVA_HOME%\lib\classes.zip goto setJava117 set JAVA_CLASSPATH=.\lib\weblogic510sp9boot.jar;.\classes\boot;.\eval\cloudscape\lib\cloudscape.jar;E:\Oracle\Ora81\jdbc\lib\classes12.zip goto runWebLogicJava:setJava117 set JAVA_CLASSPATH=%JAVA_HOME%\lib\classes.zip;.\lib\weblogic510sp9boot.jar;.\classes\boot;.\eval\cloudscape\lib\cloudscape.jar;E:\Oracle\Ora81\jdbc\lib\classes12.zip goto runWebLogicJava:runWebLogicJava set WEBLOGIC_CLASSPATH=.\license;.\lib\weblogic510sp9.jar;.\classes;.\lib\weblogicaux.jar;.\myserver\serverclassesif "%PRE_CLASSPATH%" NEQ "" set WEBLOGIC_CLASSPATH=%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%if "%POST_CLASSPATH%" NEQ "" set WEBLOGIC_CLASSPATH=%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%%JAVA_HOME%\bin\java -ms64m -mx64m -classpath %JAVA_CLASSPATH% -Dweblogic.class.path=%WEBLOGIC_CLASSPATH% -Dweblogic.home=. -Djava.security.manager -Djava.security.policy==.\weblogic.policy weblogic.Server goto finish:runWebLogicJview set CLASSPATH=%windir%\Java\Classes\classes.zipif "%PRE_CLASSPATH%" NEQ "" set CLASSPATH=%CLASSPATH%;%PRE_CLASSPATH%set CLASSPATH=%CLASSPATH%;.\license;.\lib\weblogic510sp9boot.jar;.\classes\boot;.\lib\weblogic510sp9.jar;.\classes;.\lib\weblogicaux.jar;.\myserver\serverclasses;.\eval\cloudscape\lib\cloudscape.jar;E:\Oracle\Ora81\jdbc\lib\classes12.zip;.\lib\rmiForMs.zipif "%POST_CLASSPATH%" NEQ "" set CLASSPATH=%CLASSPATH%;%POST_CLASSPATH%if not exist %JAVA_HOME%\bin\jview.exe goto winntJview %JAVA_HOME%\bin\jview /d:weblogic.system.disableWeblogicClassPath=true weblogic.Server goto finish:winntJview %JAVA_HOME%\..\..\winnt\jview /d:weblogic.system.disableWeblogicClassPath=true weblogic.Server:finish ENDLOCAL
在第一个set JAVA_CLASSPATH的末尾加上oracle的驱动(classes12.zip).
另外,确保weblogic.properties文件中关于连接池的设置是正确的。
我加了,但是不行呀。
在日志里是说找不到驱动,连接池的设置应该没错,唉,烦死了。帮帮忙呀!
@rem $Id: //depot/dev/src510p/startWebLogic.cmd#4 $@rem This script can be used to start WebLogic Server. It contains
@rem following variables:
@rem
@rem JAVA_HOME - Determines the version of Java used to start
@rem WebLogic Server. This variable must point to the
@rem root directory of a JDK or JRE installation. See
@rem the WebLogic platform support page
@rem (http://www.weblogic.com/docs51/platforms/index.html)
@rem for an up-to-date list of supported JVMs on Windows NT.
@rem Because of packaging differences between versions of Java,
@rem this script will not work with a JRE 1.1.7 installation.
@rem PRE_CLASSPATH - Use this variable to prepend jar files or directories to
@rem the WEBLOGIC_CLASSPATH.
@rem POST_CLASSPATH - Use this variable to append jar files or directories to
@rem the end of the WEBLOGIC_CLASSPATH.
@rem
@rem When setting these variables below, please use short file names (8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File names with
@rem spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (/install/index.html in your local documentation set or on the
@rem Internet at http://www.weblogic.com/docs51/install/index.html). SETLOCAL@rem Set user-defined variables. Note that JAVA_HOME will be taken
@rem from the environment, if it is already defined.
if "%JAVA_HOME%" == "" set JAVA_HOME=.\jre1_2\jre
@rem if "%JAVA_HOME%" == "" set JAVA_HOME=\progra~1\micros~1.2
set PRE_CLASSPATH=
set POST_CLASSPATH=@rem Check that script is being run from WebLogic root directory
if not exist license\WebLogicLicense.xml goto wrongplace
if not exist weblogic.policy goto wrongplace
goto checkJRE:wrongplace
echo startWebLogic.cmd: must be run from the WebLogic installation directory. 1>&2
goto finish:checkJRE
if exist %JAVA_HOME%\lib\nul goto whichJRE
if exist %JAVA_HOME%\classes\nul goto whichJRE
echo.
echo The JRE wasn't found in directory %JAVA_HOME%.
echo Please edit the startWebLogic.cmd script so that the JAVA_HOME
echo variable points to the root directory of your Java installation.
goto finish:whichJRE
echo on
set PATH=.\bin;%PATH%
@if exist %JAVA_HOME%\Bin\JView.exe goto runWebLogicJview
@if exist %JAVA_HOME%\..\JView.exe goto runWebLogicJview
@if exist %JAVA_HOME%\lib\classes.zip goto setJava117
set JAVA_CLASSPATH=.\lib\weblogic510sp9boot.jar;.\classes\boot;.\eval\cloudscape\lib\cloudscape.jar;E:\Oracle\Ora81\jdbc\lib\classes12.zip
goto runWebLogicJava:setJava117
set JAVA_CLASSPATH=%JAVA_HOME%\lib\classes.zip;.\lib\weblogic510sp9boot.jar;.\classes\boot;.\eval\cloudscape\lib\cloudscape.jar;E:\Oracle\Ora81\jdbc\lib\classes12.zip
goto runWebLogicJava:runWebLogicJava
set WEBLOGIC_CLASSPATH=.\license;.\lib\weblogic510sp9.jar;.\classes;.\lib\weblogicaux.jar;.\myserver\serverclassesif "%PRE_CLASSPATH%" NEQ "" set WEBLOGIC_CLASSPATH=%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%if "%POST_CLASSPATH%" NEQ "" set WEBLOGIC_CLASSPATH=%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%%JAVA_HOME%\bin\java -ms64m -mx64m -classpath %JAVA_CLASSPATH% -Dweblogic.class.path=%WEBLOGIC_CLASSPATH% -Dweblogic.home=. -Djava.security.manager -Djava.security.policy==.\weblogic.policy weblogic.Server
goto finish:runWebLogicJview
set CLASSPATH=%windir%\Java\Classes\classes.zipif "%PRE_CLASSPATH%" NEQ "" set CLASSPATH=%CLASSPATH%;%PRE_CLASSPATH%set CLASSPATH=%CLASSPATH%;.\license;.\lib\weblogic510sp9boot.jar;.\classes\boot;.\lib\weblogic510sp9.jar;.\classes;.\lib\weblogicaux.jar;.\myserver\serverclasses;.\eval\cloudscape\lib\cloudscape.jar;E:\Oracle\Ora81\jdbc\lib\classes12.zip;.\lib\rmiForMs.zipif "%POST_CLASSPATH%" NEQ "" set CLASSPATH=%CLASSPATH%;%POST_CLASSPATH%if not exist %JAVA_HOME%\bin\jview.exe goto winntJview
%JAVA_HOME%\bin\jview /d:weblogic.system.disableWeblogicClassPath=true weblogic.Server
goto finish:winntJview
%JAVA_HOME%\..\..\winnt\jview /d:weblogic.system.disableWeblogicClassPath=true weblogic.Server:finish
ENDLOCAL
需要注意:把sp9.jar放在path的第一位(当然这与你的问题很可能没关系)。
另外,你说的没用是指weblogic启动时报exception吗?
如果是的话就该是在java_path那里设置的。
等待高手回答吧。
把把startweblogic.cmd删掉,根本不影响server启动,????
我是从命令行启动的。
你的问题我无能为力了。
很抱歉,浪费了您的宝贵时间。
或者你的属性文件里的驱动程序没设对。
1.确实是在startWebLogic.cmd中配置oracle的路径,确定路径..\Oracle\Ora81\jdbc\lib2.将上路径中的包解压到jdk的lib下就可以了(这种方法比较繁).
再次确定你在weblogic配置文件对建立pool的描述
但我在做连接池的时候出现以下错误:
weblogic.common.ResourceException: weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: Io 异常: SO Exception was generated
配置如下:
weblogic.jdbc.connectionPool.oraclePool= url=jdbc:oracle:thin:@192.168.0.1:1521:ora1, driver=oracle.jdbc.driver.OracleDriver, loginDelaySecs=1, initialCapacity=4, maxCapacity=10, capacityIncrement=2, allowShrinking=true, shrinkPeriodMins=15, refreshMinutes=10, testTable=cabin, props=user=system;password=manager;server=ora1
weblogic.jdbc.TXDataSource.demoDataSource=oraclePool