错误 无法访问所选应用程序。
错误 org.hyperic.sigar.SigarException
错误 org.hyperic.sigar.SigarException
错误 org.hyperic.sigar.SigarException
查看日志记录:
C:\Oracle\Middleware\Oracle_Home\user_projects\domains***Domain\servers\AdminServer\logs***Domain.log
关键内容为:
####<2018-8-21 上午08时37分33,151秒 CST> <Warning> <Munger> <sunpeihe00> <AdminServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <35576438-6e41-4ece-939b-bed797dfac93-00000018> <1534811853151> <[severity-value: 16] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-2156203> <A version attribute was not found in element "web-app" in the deployment descriptor D:\code\gl_jk_code20160422\TsmMS\WebRoot/WEB-INF/web.xml. A version attribute is required, but this version of the WebLogic Server will assume that the latest version is used. Future versions of WebLogic Server will reject descriptors that do not specify the Java EE version. To eliminate this warning, add an appropriate "version=" to element "web-app" in the deployment descriptor.>
####<2018-8-21 上午08时37分34,741秒 CST> <Error> <J2EE> <sunpeihe00> <AdminServer> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <35576438-6e41-4ece-939b-bed797dfac93-00000019> <1534811854741> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-160248> <Unable to parse class file: zip:C:/Oracle/Middleware/Oracle_Home/user_projects/domains/TSMDomain/servers/AdminServer/tmp/.appmergegen_1534811838932/WebRoot/tpo1a/war/WEB-INF/lib/db2jcc.jar!/COM/ibm/db2os390/sqlj/custom/DB2SQLJCustomizer.class. >
####<2018-8-21 上午08时37分34,772秒 CST> <Error> <J2EE> <sunpeihe00> <AdminServer> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <35576438-6e41-4ece-939b-bed797dfac93-00000019> <1534811854772> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-160248> <Unable to parse class file: zip:C:/Oracle/Middleware/Oracle_Home/user_projects/domains/TSMDomain/servers/AdminServer/tmp/.appmergegen_1534811838932/WebRoot/tpo1a/war/WEB-INF/lib/db2jcc.jar!/COM/ibm/db2os390/sqlj/custom/DB2SQLJEntryInfo.class. >
####<2018-8-21 上午08时37分34,787秒 CST> <Error> <J2EE> <sunpeihe00> <AdminServer> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <35576438-6e41-4ece-939b-bed797dfac93-00000019> <1534811854787> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-160248> <Unable to parse class file: zip:C:/Oracle/Middleware/Oracle_Home/user_projects/domains/TSMDomain/servers/AdminServer/tmp/.appmergegen_1534811838932/WebRoot/tpo1a/war/WEB-INF/lib/db2jcc.jar!/COM/ibm/db2os390/sqlj/custom/DB2SQLJProfile.class. >
####<2018-8-21 上午08时37分38,375秒 CST> <Error> <J2EE> <sunpeihe00> <AdminServer> <[STANDBY] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <35576438-6e41-4ece-939b-bed797dfac93-0000001a> <1534811858375> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-160248> <Unable to parse class file: zip:C:/Oracle/Middleware/Oracle_Home/user_projects/domains/TSMDomain/servers/AdminServer/tmp/.appmergegen_1534811838932/WebRoot/tpo1a/war/WEB-INF/lib/db2jcc.jar!/COM/ibm/db2os390/sqlj/custom/DB2SQLJCustomizer.class. >
####<2018-8-21 上午08时37分38,380秒 CST> <Error> <J2EE> <sunpeihe00> <AdminServer> <[STANDBY] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <35576438-6e41-4ece-939b-bed797dfac93-0000001a> <1534811858380> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-160248> <Unable to parse class file: zip:C:/Oracle/Middleware/Oracle_Home/user_projects/domains/TSMDomain/servers/AdminServer/tmp/.appmergegen_1534811838932/WebRoot/tpo1a/war/WEB-INF/lib/db2jcc.jar!/COM/ibm/db2os390/sqlj/custom/DB2SQLJEntryInfo.class. >
####<2018-8-21 上午08时37分38,383秒 CST> <Error> <J2EE> <sunpeihe00> <AdminServer> <[STANDBY] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <35576438-6e41-4ece-939b-bed797dfac93-0000001a> <1534811858383> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-160248> <Unable to parse class file: zip:C:/Oracle/Middleware/Oracle_Home/user_projects/domains/TSMDomain/servers/AdminServer/tmp/.appmergegen_1534811838932/WebRoot/tpo1a/war/WEB-INF/lib/db2jcc.jar!/COM/ibm/db2os390/sqlj/custom/DB2SQLJProfile.class. >
####<2018-8-21 上午08时37分41,256秒 CST> <Error> <J2EE> <sunpeihe00> <AdminServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <35576438-6e41-4ece-939b-bed797dfac93-00000018> <1534811861256> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-160228> <AppMerge failed to merge your application. If you are running AppMerge on the command-line, merge again with the -verbose option for more details. See the error message(s) below.>
其中一处:
A version attribute was not found in element “web-app” in the deployment descriptor D:\code\project\WebRoot/WEB-INF/web.xml. A version attribute is required, but this version of the WebLogic Server will assume that the latest version is used. Future versions of WebLogic Server will reject descriptors that do not specify the Java EE version. To eliminate this warning, add an appropriate “version=” to element “web-app” in the deployment descriptor.
需要在WebRoot/WEB-INF/web.xml文件中的标签中添加version属性设置。此处虽然级别为Warning,但由于使用较新版本的weblogic,如果不指定version版本的话默认将项目理解为最新版本的Java EE的版本,可能会造成不兼容问题。此处我的项目是旧版本—2.4。
<web-app version="2.4" ...>
另外,注意到最后有一句:
AppMerge failed to merge your application.
这是因为weblogic会缓存每次部署的项目内容,相同项目部署多次会造成无法合并。因此要先清理缓存,再部署项目。
找到缓存目录:
C:\Oracle\Middleware\Oracle_Home\user_projects\domains***Domain\servers\AdminServer\tmp
发现有多个版本,可能是冲突了。

因此关掉weblogic,删除tmp下的所有文件,重新部署项目,成功了。
总结:
1.在web.xml中中添加version属性。
2.部署项目前删除temp缓存.
在部署weblogic项目时遇到'org.hyperic.sigar.SigarException'错误,导致无法访问应用程序。错误日志提示web.xml缺少version属性,虽然警告级别,但可能引发兼容性问题。解决方案包括在web.xml中添加适当的version属性,以及在部署前清理weblogic服务器的tmp目录下缓存文件,避免冲突。遵循这两步操作后,项目成功部署。

487

被折叠的 条评论
为什么被折叠?



