`
lichangwei
  • 浏览: 75754 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

weblogic summing-up for SIT

阅读更多
1.Cannot contain comments in tag-class when describe a tag.
<tag>
    <name>collection</name>
    <tag-class>
      <!--  com.XXX.XXX.extensions.taglib.iflow.CollectionTag-->
      com.XXX.iflow.tray.taglib.CollectionTag</tag-class>
    <body-content>JSP</body-content>
    <description>Defines the collection of task to retrieve.</description>
    <attribute>
    ....
    </attribute>
</tag>
This comment will cause 'The tag handler class was not found ""' under weblogic.

2.Remote debug(weblogic/eclipse)
(i)Add debug option in the start script of an existed domain. Add this sentence below in startWebLogic.cmd(.sh)(in weblogic9.2, just find the default setting 'set JAVA_DEBUG=' in setDomainEnv.cmd, update it. )
set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n
set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%
Note:8453 is the debug port.
(ii). Add a remote Java Application,input the Host and Port.

3. the usage of html:multibox in weblogic environment
Right:
<html:multibox property="tableSelection"><c:out value="${item.tableName}"/></html:multibox>
<html:text name="resultrow" property="expiryDate" size="10" styleClass="form_field" maxlength="10" />
Error:
<html:multibox property="tableSelection" value="${item.tableName}"/>
<html:text name="resultrow" property="expiryDate" size="10" styleClass="form_field" maxlength="10" value='${resultrow.expiryDateAsString}' />

Cannot digest '${item.tableName}' and take it as a string.
Can get the real value of 'resultrow.expiryDateAsString' automaticly.

4.java.util.ConcurrentModificationException
Enumeration<?> attrNames = request.getAttributeNames();
			while (attrNames.hasMoreElements()) {
				String attrName = (String) attrNames.nextElement();
				if (attrName
						.endsWith(PaginationConstants.PAGINATION_SORT_ORDER)) {
					request.setAttribute(attrName, null);
					if (logger.isDebugEnabled()) {
						logger.debug("[" + request.getServletPath()
								+ "] PaginationSortOrderData cleared: "
								+ attrName);
					}
				}
			}
java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:787)
        at java.util.HashMap$KeyIterator.next(HashMap.java:823)
        at weblogic.utils.enumerations.IteratorEnumerator.nextElement(IteratorEn
umerator.java:25)
        at com.XXX.XXX.extensions.taglib.pagination.PaginationFilterModule.ap
plyPagination(PaginationFilterModule.java:57)
        at com.XXX.XXX.extensions.taglib.pagination.PaginationFilterModule.ex
ecute(PaginationFilterModule.java:42)
Note:Seems this is OK. in tomcat,jboss,Sun application.

5. weblogic bundling an old version of Rhino inside weblogic.jar
java.lang.NoSuchMethodError: org.mozilla.javascript.Context.initStandardObjects()Lorg/mozilla/javascript/ScriptableObject;
This is caused by WebLogic bundling an old version of Rhino inside weblogic.jar (how horrible!!), and in this old version the org.mozilla.javascript.Context class does not have the method initStandardObjects().
The Rhino JAR used by Alfresco is currently rhino-js-1.6R4.jar (i.e. Rhino version 1.6R4).
It is not enough to place this JAR file inside your WebLogic domain's lib directory.
You have to force it on the front of WebLogic's CLASSPATH before it loads its own JARs. After trying a number of approaches, this was the only way I found to reliably fix the problem.
So, do the following to achieve this:
(i) Copy rhino-js-1.6R4.jar to your domain's lib directory (if it's not there already))
(ii) Change the following line in startWebLogic.cmd (in your WebLogic domain's bin directory) if you are using Windows ... similar idea if you are using Solaris
from ...
-------------
set CLASSPATH=%CLASSPATH%;%MEDREC_WEBLOGIC_CLASSPATH%
-------------
to ...
-------------
set CLASSPATH=C:\PROGRA~1\BEA\user_projects\domains\alfresco\lib\rhino-js-1.6R4.jar;%CLASSPATH%;%MEDREC_WEBLOGIC_CLASSPATH%
-------------
Note: C:\PROGRA~1\BEA\user_projects\domains\alfresco\lib\ is where my domain's lib directory is - yours will no doubt be different.
Stop and restart WebLogic using this modified script
The problem should go away as WebLogic should now be using Rhino 1.6R4 (the version required for Alfresco). Hooray!!

6.java.sql.Timestamp.compareTo(java.util.Date) the parameter is not a instance of java.sql.Timestamp.
java.sql.Timestamp.compareTo(java.util.Date)
It' OK under Tomcat+Sun JDK
But Bad under weblogic.
Caused by: java.lang.ClassCastException: java.util.Date
        at java.sql.Timestamp.compareTo(Timestamp.java:474)
        at com.XXX.iforge.timelog.service.AvWorkingHoursServiceImpl.prepareAvPer
iodList(AvWorkingHoursServiceImpl.java:65)
        at com.XXX.iforge.timelog.command.AvWorkingHoursCommand.getMonthlyTimelo
gPeriodList(AvWorkingHoursCommand.java:65)
        at com.XXX.iforge.timelog.command.AvWorkingHoursCommand.periodDisplay(Av
WorkingHoursCommand.java:43)
        ... 41 more

7. the usage of getRealPath(String)
event.getServletContext().getRealPath("WEB-INF/classes")
When I deploy my application as a folder, it'OK and retun 'D:\deploy package\codeadmin\WEB-INF\classes'. But it retuns null when deploying my application as a war packge.
There is no real Path concept for a packaged web application.
See API of ServletContext:
String getRealPath(String path)
Returns a String containing the real path for a given virtual path. For example, the path "/index.html" returns the absolute file path on the server's filesystem would be served by a request for "http://host/contextPath/index.html", where contextPath is the context path of this ServletContext..
The real path returned will be in a form appropriate to the computer and operating system on which the servlet container is running, including the proper path separators. This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive).
Parameters:
path - a String specifying a virtual path
Returns:
a String specifying the real path, or null if the translation cannot be performed

InputStream is = getServletContext(). 
          getResourceAsStream("/WEB-INF/log4j.properties"); 
        Properties props = new Properties(); 
        try { 
            props.load(is); 
        } catch (IOException e) { 
            System.err.println("Load log4j configuration failed"); 
        } 
        PropertyConfigurator.configure(props);

ServletContext.getResourceAsStream() is commendatory;


8. Caused by: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists:
"weblogic.j2ee.descriptor.ServletMappingBeanImpl@e30790b(/ServletMappings[weblogic.descriptor.internal.CompoundKey@ea2c6ca])" when I received an error similar to this, I had to delete duplicate tag declaration as below.
<taglib>
		<taglib-uri>/WEB-INF/tld/struts-html-el.tld</taglib-uri>
		<taglib-location>
			/WEB-INF/tld/struts-html-el.tld
		</taglib-location>
	</taglib>
	<taglib>
		<taglib-uri>/WEB-INF/tld/struts-html-el.tld</taglib-uri>
		<taglib-location>
			/WEB-INF/tld/struts-html-el.tld
		</taglib-location>
	</taglib>


9.Weblogic cannot support el properly.
<html:text property='<%="sqlClause.select["+rownum+"].alias"%>' readonly="true"><c:out value="${selectList.alias}"/></html:text>
//-->
<input type="text" name="sqlClause.select[0].alias" value="" readonly="readonly">
<html:hidden property='<%="sqlClause.select["+rownum+"].attribute"%>' value="${selectList.attribute}"/>
//-->
<input type="hidden" name="sqlClause.select[0].attribute" value="${selectList.attribute}"> 

These codes also tell us, we can submit a arraylist.(I didn't know it before)
<html:hidden property="<%="sqlClause.select["+rownum+"].attribute"%>" value="${selectList.attribute}"/>
The code above is OK. in tomcat, but bad in weblogic. Seems weblogic is strict.

Note: This may be a bug of weblogic and this code above is OK under weblogic 9.2 MP2.
See, http://edocs.bea.com/wls/docs92/issues/known_resolved.html#wp1143391
Change Request Number: CR300671 CR311505 
Expression Language (EL) was not getting substituted with values while using Struts-EL HTML tag.
This problem has been resolved. 
Foung in: 9.2  Fixed in: 9.2 MP2

Source: http://forums.bea.com/thread.jspa?threadID=400000764&start=15
Thank you. Although getting the MP2 upgrade took many calls and emails to tech support (broken links, misleading links), this fixed my problem (steps described below).

I don't know how reward points are awarded, but you deserve a whole bunch.

For anyone else who:
- has upgraded from WL8.x to WL9.2, and was using JSTL 1.0
- has WL9.2 installed but not WL9.2 MP2
- wants to make JSTL 1.0 work with WL 9.2 rather than upgrade to JSTL 1.1

here's what worked for me:
- login to bea.com. You will have to have a support level that allows you to download MP2.
- go to (tinyurl: http://tinyurl.com/3592vk) http://commerce.bea.com/support/supportversions.jsp?allversions=true&file=/managed_content/webapp/components/downloadcenter/products/weblogicserver/support/support.html
- click on "Maintenance Pack 2 Upgrade Installers for WebLogic Server 9.2"
- click the download link for your OS
- download the installer aka upgrader
- back up your commEnv.cmd if you've changed it (afaik that is the only file that is overwritten when you upgrade, but I'm not at all sure)
- run the upgrade program (this can take 30 mins)
- edit your web.xml and make the first two lines this (you may already have this):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

That's it. Now when you run weblogic, your *-el tag libraries should work as they did under WL8.x.
分享到:
评论

相关推荐

    weblogic CVE-2018-3191 exp(含weblogic-spring-jndi-10.3.6.0.jar)

    自用CVE-2018-3191 weblogic反序列化exp。

    WebLogic CVE-2019-2725补丁.zip

    weblogic反序列化补丁包

    关于禁用weblogic wls-wsat组件的步骤说明

    ### 关于禁用WebLogic WLS-WSAT组件的步骤说明 #### 一、概述 在WebLogic服务器中,WLS-WSAT (Web Services Atomic Transactions) 组件可能存在某些安全漏洞,为了保护系统免受潜在攻击,可以通过禁用此组件的方式...

    Weblogic-CVE-2019-2725补丁升级方法.docx

    《Weblogic-CVE-2019-2725补丁升级方法详解》 WebLogic Server是一款由甲骨文公司开发的企业级应用服务器,它为构建、部署和管理企业级Java应用程序提供了全面的平台。然而,随着技术的发展,安全漏洞的出现是不可...

    Weblogic9.2-for-Linux安装手册.doc

    WebLogic Server 9.2 是 Oracle 公司提供的一个企业级 Java 应用服务器,它支持J2EE标准,提供应用程序部署、管理和监控等功能。在Linux环境下安装WebLogic Server 9.2涉及到多个步骤和注意事项,以下是详细的安装...

    解决weblogic部署JAX-WS需要的配置文件

    在WebLogic服务器上部署JAX-WS服务时,可能会遇到一些配置问题。JAX-WS(Java API for XML Web Services)是Java平台上的一个标准,用于创建和部署Web服务。WebLogic作为一款强大的Java EE应用服务器,支持JAX-WS...

    weblogic CVE-2018-2628--exp

    weblogic CVE-2018-2628--exp

    Using Weblogic Server-Cluster

    Using Weblogic Server-Cluster

    Weblogic10.3.6-2204-2207补丁集

    Weblogic10.3.6-2204-2207补丁集 WLS PATCH SET UPDATE 10.3.6.0.220719 Patch 34009030 10.3.6.0.220419 Patch 33791826 10.3.6.0.220118 Patch 33494814 Patch 32973233 Coherence 3.7.1 Patch 22 (3.7.1.22) wls...

    Weblogic CVE-2018-2628补丁

    Weblogic是Oracle公司的一款企业级应用服务器,广泛用于部署各种企业应用程序和服务。CVE-2018-2628是Weblogic服务器中一个严重的安全漏洞,它涉及到Weblogic Server的WLS-Windows服务组件。这个漏洞允许未经身份...

    K8 weblogic-CVE-2018-2628-getshell

    【K8 weblogic-CVE-2018-2628-getshell】是一个针对Oracle WebLogic Server的渗透测试工具,主要用于检验系统是否存在CVE-2018-2628漏洞并利用该漏洞获取shell权限。这个工具的使用应该严格限制在合法的安全测试环境...

    weblogic12c-windows版下载

    weblogic12c-windows版下载

    Weblogic10.3.6-2019-4月更新后版本反序列化漏洞补丁.zip

    Weblogic10.3.6-64位-2019年4月更新后版本--linux系统--反序列化漏洞补丁

    weblogic10.36 CVE-2018-2893补丁文件

    weblogic10.36 CVE-2018-2893补丁文件 最新补丁文件,修复 WebLogic(CVE-2018-2893)安全漏洞预警,oracle官方发布了2018年4月份的关键补丁更新CPU(CriticalPatchUpdate),其中包含一个高危的Weblogic反序列化漏洞...

    weblogic cve_2019_2729.rar

    Oracle WebLogic Server Patch Set Update 10.3.6.0.190716 README ============================================================== This README provides information about how to apply Oracle WebLogic ...

    WebLogic CVE-2018-3191 payload

    WebLogic CVE-2018-3191 payload 检测工具。

    weblogic---Eclipse插件

    WebLogic是Oracle公司的一款强大的Java EE应用服务器,它提供了企业级的环境来部署、管理和运行基于Java的应用程序。而WebLogic Eclipse插件是专为Eclipse集成开发环境(IDE)设计的工具,使得开发者能够在Eclipse中...

    weblogic12c-linux12214

    weblogic12c-linux12214

    weblogic9-jms-applet 开发全过程和代码

    在本文中,我们将深入探讨如何进行`weblogic9-jms-applet`的开发,涵盖从Applet的基础知识到WebLogic 9.2的JMS配置,以及相关注意事项和一个简单的JNI实例。让我们逐步解析这个过程。 **1. Applet基础问题** ...

Global site tag (gtag.js) - Google Analytics