ejb项目发布注意事项
部署ejb的服务建好后,找到ejb部署的服务的启动文件:如D:\Oracle\Middleware\user_projects\domains\wssscx\bin\startWebLogic.cmd,使用记事本打开startWebLogic.cmd。找到下面这一行:
set CLASSPATH=%SAVE_CLASSPATH%;
将其改为以下:
set CLASSPATH=%SAVE_CLASSPATH%;%WL_HOME%\server\lib\lib\cglib-full-2.0.2.jar;%WL_HOME%\server\lib\lib\commons-beanutils.jar;%WL_HOME%\server\lib\lib\commons-betwixt-1.0-alpha-1.jar;%WL_HOME%\server\lib\lib\commons-collections.jar;%WL_HOME%\server\lib\lib\commons-configuration-1.6.jar;%WL_HOME%\server\lib\lib\commons-digester.jar;%WL_HOME%\server\lib\lib\commons-io-1.4.jar;%WL_HOME%\server\lib\lib\commons-lang-2.4.jar;%WL_HOME%\server\lib\lib\commons-lang.jar;%WL_HOME%\server\lib\lib\commons-logging-1.0.4.jar;%WL_HOME%\server\lib\lib\commons-logging.jar;%WL_HOME%\server\lib\lib\commons-validator.jar;%WL_HOME%\server\lib\lib\dom4j-1.6.1.jar;%WL_HOME%\server\lib\lib\j2ee.jar;%WL_HOME%\server\lib\lib\jakarta-oro.jar;%WL_HOME%\server\lib\lib\jcommon-1.0.0-pre2.jar;%WL_HOME%\server\lib\lib\jdom-1.0.jar;%WL_HOME%\server\lib\lib\log4j-1.2.8.jar;%WL_HOME%\server\lib\lib\msutil.jar;%WL_HOME%\server\lib\lib\MyBuildLib.jar;%WL_HOME%\server\lib\lib\nls_charset12.jar;%WL_HOME%\server\lib\lib\ojdbc6.jar;%WL_HOME%\server\lib\lib\public.jar;%WL_HOME%\server\lib\lib\resoftClient.jar;%WL_HOME%\server\lib\lib\servlet-api.jar;%WL_HOME%\server\lib\lib\xbean.jar;%WL_HOME%\server\lib\lib\xercesImpl.jar;%WL_HOME%\server\lib\lib\xfire-core-1.2.6.jar;%WL_HOME%\server\lib\lib\xmlParserAPIs.jar;
红色标识部分是EJB项目中lib中jar包放的位置及jar名称(weblogic.jar 除外)。
需要将这些jar包添加到指定本机的路径下。
上述写法 是把lib文件夹及内容放到了weblogic安装文件夹里面的server\lib下(例如:
D:\Oracle\Middleware\wlserver_10.3\server\lib\lib)