You are browsing the archive for Weblogic.

使用EM在应用运行时进行权限设置

一月 10, 2011 in Oracle 融合中间件

概述

在ADF/WC(WebCenter) Application中,如果使用了标准的ADF Security,则可以在设计时通过编辑配置文件进行安全性控制及权限设置,可以指定用户/组访问某个具体的页面/TaskFlow。通常来说,ADF Security可以满足大部分应用需求,但这样仅在设计时修改有一个比较明显的弊端,也就是进行权限修改之后,需要重新部署应用才能生效,但对企业级应用来说,一般要求至少6×24连续应用且对于权限的变化也是相对频繁的,因此需要提供可以在运行时能够修改权限的工具或接口,而Oracle正是基于这样的考虑,允许在运行时借助于Enterprise Manager对ADF/WC Application进行权限修改。

实现

在此,已经将logintest应用部署到了WebLogic中,并设置了设计时的权限控制,使用ADF Seuciry,预先创建了名为testrole的Application Role,设置该role的成员包括用户:1001&weblogic,那么接下来将借助EM看一下如何在运行时进行权限的修改与设置。

Read the rest of this entry →

解决WebLogic中Too many open files异常

九月 29, 2009 in Oracle 融合中间件

在经过近期的连续加班,项目最后阶段的开发终于完成,并于前天晚上顺利实施上线,上线后就凌晨2点钟了,虽然身体有些疲惫,心理却轻松了很多。可是没想到早晨来上班,刚走到客户公司楼下,就接到电话说正式环境的服务器当掉了,跑到楼上打开电脑下载正式环境的服务器日志,发现了如下异常信息:

<Sep 28, 2009 9:55:16 AM CST> <Critical> <Server> <BEA-002616> <Failed to listen on channel "Default" on ****.*.*.*:****, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>
<Sep 28, 2009 9:55:16 AM CST> <Error> <HTTP> <BEA-101019> <[weblogic.servlet.internal.WebAppServletContext@6c086c08 - appName: 'consoleapp', name: 'console', context-path: '/console', spec-version: '2.5'] Servlet failed with IOException
java.io.FileNotFoundException: /***/wlserver_10.3/server/lib/consoleapp/webapp/images/sort_up.gif (Too many open files)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:112)
    at weblogic.utils.classloaders.FileSource.getInputStream(FileSource.java:31)
    at weblogic.servlet.internal.WarSource.getInputStream(WarSource.java:65)
    at weblogic.servlet.FileServlet.sendFile(FileServlet.java:400)
    Truncated. see log file for complete stacktrace
>

Read the rest of this entry →

解决javax.xml.parsers.FactoryConfigurationError

九月 16, 2009 in Oracle 融合中间件

昨天在项目中遇到了一个非常棘手的异常,将开发好的应用发布到WebLogic中,发现日志中产生如下异常提示信息:

<Sep 15, 2009 9:44:17 AM IRKST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: javax.xml.parsers.FactoryConfigurationError: Provider com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl not found
javax.xml.parsers.FactoryConfigurationError: Provider com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl not found
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at org.apache.openjpa.lib.xml.XMLFactory.<clinit>(XMLFactory.java:60)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:352)
Truncated. see log file for complete stacktrace
>
<Sep 15, 2009 9:44:17 AM IRKST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<Sep 15, 2009 9:44:17 AM IRKST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<Sep 15, 2009 9:44:17 AM IRKST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>

Read the rest of this entry →

暂时解决Perm Space异常

九月 14, 2009 in Oracle 融合中间件

概述

本文主要描述在ADF开发中如何暂时解决Perm Space异常。

场景:

在J2EE应用开发过程中,相信很多开发人员都遇到过Perm Space Out of Memory异常,在使用Jdeveloper 11g与Weblogic进行ADF开发时,也遇到了该问题,该问题的原因是由于SUN 的JVM把内存分了不同的区,其中一个就是permenter区用来存放用得非常多的类和类描述。本来SUN设计的时候认为这个区域在JVM启动的时候就固定了,但其没有想到现在动态会用得这么广泛。而且这个区域有特殊的垃圾收回机制,现在的问题是动态加载类到这个区域后,却无法回收。这个问题在JDeveloper 11.1.1.0.1版本中尤为突出,在11.1.1.0.2版本中就已经有所缓解,其解决方法也是采用下面的方法二,并未根治该异常。

解决方法:

Read the rest of this entry →

解决org.xml.sax.SAXNotRecognizedException异常

九月 11, 2009 in Oracle 融合中间件

近日,在项目的实施过程中遇到了以下问题:

INFO: couldn’t set dynamic validation feature org.xml.sax.SAXNotRecognizedException: SAX feature ‘http://apache.org/xml/features/validation/dynamic’ not recognized. ……

仔细分析一下,发现该错误的原因是WebLogic 10.3版本中的XML解析器出了问题,在WebLogic Server 10.3中,weblogic.jar里的META-INF/services/javax.xml.parsers.SAXParserFactory指定了默认的SAX Parser类,即weblogic.xml.jaxp.RegistrySAXParserFactory。

Read the rest of this entry →