Hi Everyone!
I'm trying to enable the security manager with my portlet. I've solved many errors, but this one leaves me clueless:
115:53:26,278 INFO [DispatcherPortlet:98] Initializing portlet 'resourceEditor'
215:53:26,374 WARN [pool-2-thread-11][RuntimeChecker:256] Attempted to get environment name *
315:53:26,374 ERROR [pool-2-thread-11][PortletBagFactory:313] java.lang.SecurityException: Attempted to get environment name *
4java.lang.SecurityException: Attempted to get environment name *
5 at com.liferay.portal.security.pacl.checker.BaseChecker.throwSecurityException(BaseChecker.java:259)
6 at com.liferay.portal.security.pacl.checker.RuntimeChecker.checkPermission(RuntimeChecker.java:104)
7 at com.liferay.portal.security.pacl.ActivePACLPolicy.checkPermission(ActivePACLPolicy.java:55)
8 at com.liferay.portal.security.lang.PortalSecurityManager.checkPermission(PortalSecurityManager.java:103)
9 at com.liferay.portal.security.lang.PortalSecurityManager.checkPermission(PortalSecurityManager.java:74)
10 at java.lang.System.getenv(System.java:896)
11 at org.springframework.core.env.AbstractEnvironment.getSystemEnvironment(AbstractEnvironment.java:351)
12 at org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:79)
13 at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:118)
14 at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
15 at org.springframework.core.io.ResourceEditor.<init>(ResourceEditor.java:76)
16 at org.springframework.web.portlet.GenericPortletBean.init(GenericPortletBean.java:106)
17 at javax.portlet.GenericPortlet.init(GenericPortlet.java:107)
18 at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:256)
19 at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:221)
20 at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:140)
21 at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:41)
22 at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:310)
23 at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:546)
24 at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:321)
25 at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
26 at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
27 at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
28 at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
29 at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
30 at com.liferay.portal.kernel.servlet.SecurePluginContextListener.fireDeployEvent(SecurePluginContextListener.java:233)
31 at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
32 at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
33 at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
34 at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
35 at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
36 at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
37 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
38 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
39 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
40 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
41 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
42 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
43 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
44 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
45 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
46 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
47 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
48 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
49 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
50 at java.lang.Thread.run(Thread.java:679)
Here is my liferay-plugin-package.properties:
1name=Resource Editor
2module-group-id=liferay
3module-incremental-version=1
4tags=
5short-description=
6change-log=
7page-url=http://www.liferay.com
8author=Liferay, Inc.
9licenses=LGPL
10liferay-versions=6.1.1
11
12portal.dependency.jars=\
13 jstl-impl.jar,\
14 util-java.jar,\
15 slf4j-api.jar,\
16 slf4j-log4j12.jar,\
17 commons-collections.jar,\
18 commons-fileupload.jar,\
19 commons-httpclient.jar,\
20 commons-io.jar
21
22security-manager-enabled=true
23#security-manager-files-read=\
24# ../webapps/resourceEditor-portlet/WEB-INF/src/content/*,\
25# ../webapps/resourceEditor-portlet/WEB-INF/classes/content/*
26
27security-manager-class-loader-reference-ids=\
28 lr-i18n-editor-portlet
29
30security-manager-files-read=\
31${java.io.tmpdir}${file.separator}-,\
32${liferay.web.portal.dir}${file.separator}html${file.separator}taglib${file.separator}-,\
33${liferay.web.portal.dir}${file.separator}html${file.separator}themes${file.separator}-,\
34..${file.separator}webapps${file.separator}lr-i18n-editor-portlet${file.separator}WEB-INF${file.separator}classes${file.separator}service.properties,\
35..${file.separator}webapps${file.separator}lr-i18n-editor-portlet${file.separator}WEB-INF${file.separator}classes${file.separator}portlet.properties,\
36..${file.separator}webapps${file.separator}lr-i18n-editor-portlet${file.separator}WEB-INF${file.separator}classes${file.separator}portal-ext.properties,\
37../webapps/lr-i18n-editor-portlet/WEB-INF/*,\
38#../webapps/resourceEditor-portlet/WEB-INF/src/content/*,\
39#../webapps/resourceEditor-portlet/WEB-INF/classes/content/*
40
41security-manager-files-write=${java.io.tmpdir}${file.separator}-
42
43security-manager-search-engine-ids=\ SYSTEM_ENGINE
44
45security-manager-get-bean-property=\
46com.liferay.portal.kernel.language.LanguageUtil,\
47com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil,\
48com.liferay.portal.kernel.spring.util.SpringFactoryUtil,\
49com.liferay.portal.kernel.util.InfrastructureUtil,\
50com.liferay.portal.kernel.dao.db.DBFactoryUtil,\
51com.liferay.portal.kernel.cache.CacheRegistryUtil,\
52com.liferay.portal.kernel.dao.orm.FinderCacheUtil,\
53com.liferay.portal.kernel.dao.shard.ShardUtil
I've done a lot of copy-pasting, so there's probably something wrong there.
Can you help me to solve the problem?
TIA,
Flor.
Please sign in to flag this as inappropriate.