组合视图 统一视图 树状图
toggle
Marcelo Aberastain
Enabling Security Manager Plugin & PACL ... again
2012年10月30日 下午12:37
答复

Marcelo Aberastain

等级: Youngling

帖子: 0

加入日期: 2011年12月12日

最近的帖子

Hi All,

I am working on making some portlets "Market place compatible" but as you could have seen in other posts i am having many problems with the Security Manager Plugin. Here I have a new questions...

After working for a while i was able to fix some security exceptions related to JNDI doing the following:

1security-manager-enabled=true
2security-manager-jndi-names=\
3java:comp/env/ClientStateSavingPassword,\
4java:comp/env/jsf/ProjectStage


When i started thinking i was in the right path, i got a new problem i couldn't solve..

 1...
 2Oct 30, 2012 6:16:12 PM org.apache.catalina.core.ApplicationContext log
 3INFO: Initializing Spring root WebApplicationContext
 418:16:15,506 ERROR [pool-2-thread-7][BasePortalLifecycle:45] java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
 5java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
 6    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:967)
 7    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316)
 8    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
 9    at com.liferay.portal.kernel.servlet.SecureServlet.doPortalInit(SecureServlet.java:95)
10    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
11    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
12    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
13    at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
14    at com.liferay.portal.kernel.servlet.SecureServlet.init(SecureServlet.java:68)
15    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
16    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
17    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
18    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
19    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
20    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
21    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
22    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
23    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
24    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
25    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
26    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
27    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
28    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
29    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
30    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
31    at java.lang.Thread.run(Thread.java:662)
32Oct 30, 2012 6:16:15 PM org.apache.catalina.core.ApplicationContext log
33SEVERE: StandardWrapper.Throwable
34java.lang.IllegalStateException: Unable to initialize portal
35    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:47)
36    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
37    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
38    at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
39    at com.liferay.portal.kernel.servlet.SecureServlet.init(SecureServlet.java:68)
40    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
41    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
42    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
43    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
44    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
45    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
46    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
47    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
48    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
49    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
50    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
51    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
52    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
53    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
54    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
55    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
56    at java.lang.Thread.run(Thread.java:662)
57Caused by: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
58    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:967)
59    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316)
60    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
61    at com.liferay.portal.kernel.servlet.SecureServlet.doPortalInit(SecureServlet.java:95)
62    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
63    ... 21 more
64Oct 30, 2012 6:16:15 PM org.apache.catalina.core.StandardContext loadOnStartup
65SEVERE: Servlet /newsletter-portlet threw load() exception
66java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
67    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:967)
68    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316)
69    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
70    at com.liferay.portal.kernel.servlet.SecureServlet.doPortalInit(SecureServlet.java:95)
71    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
72    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
73    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
74    at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
75    at com.liferay.portal.kernel.servlet.SecureServlet.init(SecureServlet.java:68)
76    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
77    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
78    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
79    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
80    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
81    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
82    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
83    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
84    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
85    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
86    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
87    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
88    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
89    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
90    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
91    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
92    at java.lang.Thread.run(Thread.java:662)


I have tried many things but i still don't find how to set the security manager to avoid this error. Any clue in what to do?

TIA,
Marcelo
Gustavo Genovese
RE: Enabling Security Manager Plugin & PACL ... again
2013年1月23日 上午7:20
答复

Gustavo Genovese

等级: Youngling

帖子: 0

加入日期: 2012年1月17日

最近的帖子

I'm having the same issue, this is (part of) my liferay-plugin-package.properties file

security-manager-enabled=true

security-manager-files-read=\
${java.io.tmpdir}${file.separator}-,\
${liferay.web.portal.dir}${file.separator}html${file.separator}taglib${file.separator}-,\
${liferay.web.portal.dir}${file.separator}html${file.separator}themes${file.separator}-\
..${file.separator}webapps${file.separator}marketplace-portlet${file.separator}WEB-INF${file.separator}classes${file.separator}service.properties

security-manager-files-write=${java.io.tmpdir}${file.separator}-

security-manager-class-loader-reference-ids=\
com.liferay.portal.kernel.servlet.PortalClassLoaderFilter

security-manager-get-bean-property=\
javax.faces.FactoryFinder,\
javax.faces.context.FacesContextFactory

security-manager-jndi-names=\
java:comp/env/ClientStateSavingPassword,\
java:comp/env/jsf/ProjectStage


I'm getting the same exception as Marcelo's:
Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory

Any ideas on how to proceed to fix/workaround this issue?
Raymond Augé
RE: Enabling Security Manager Plugin & PACL ... again
2013年1月24日 上午8:57
答复

Raymond Augé

等级: Youngling

帖子: 0

加入日期: 2005年2月7日

最近的帖子

I'm pretty sure this has something to do again with reflection since Faces will attempt to dynamically locale factories and services.

What I need is a minimal test case to work with. Someone willing to donate one for the cause?
Neil Griffin
RE: Enabling Security Manager Plugin & PACL ... again
2013年1月25日 下午3:25
答复

Neil Griffin

等级: Youngling

帖子: 0

加入日期: 2005年7月26日

最近的帖子

I've reproduced several PACL issues with JSF and I'm working on it.
Marcelo Aberastain
RE: Enabling Security Manager Plugin & PACL ... again
2013年1月28日 上午3:56
答复

Marcelo Aberastain

等级: Youngling

帖子: 0

加入日期: 2011年12月12日

最近的帖子

Excellent news!!!
Neil Griffin
RE: Enabling Security Manager Plugin & PACL ... again
2013年1月28日 上午6:50
答复

Neil Griffin

等级: Youngling

帖子: 0

加入日期: 2005年7月26日

最近的帖子

Here are the issues I've identified, and I'm working on fixes:
LPS-32623 (Mac OS X related)
LPS-32624 (JSF related)

Forums

To access the Developer Forum, please login to your Liferay.com account if you are already a registered developer or register to become a developer.