Vue combinée Vue Plate Arborescence
toggle
Laxman Rana
PACL ERROR while deploying portlet : Attempted to get environment name *
7 janvier 2013 01:49
Réponse

Laxman Rana

Rang: Youngling

Publications: 0

Date d'inscription: 29 février 2012

Publications Récentes

Hello friends,

I have developed a portlet. I have enabled the security manager.
While deploying the portlet I am getting a PACL error.

13:42:56,069 ERROR [pool-2-thread-9][HotDeployImpl:191] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for xxxxxxxxxxx-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for xxxxxxxxxxx-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:123)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.fireDeployEvent(SecurePluginContextListener.java:233)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.SecurityException: Attempted to get environment name *
at com.liferay.portal.security.pacl.checker.BaseChecker.throwSecurityException(BaseChecker.java:259)
at com.liferay.portal.security.pacl.checker.RuntimeChecker.checkPermission(RuntimeChecker.java:104)
at com.liferay.portal.security.pacl.ActivePACLPolicy.checkPermission(ActivePACLPolicy.java:55)
at com.liferay.portal.security.lang.PortalSecurityManager.checkPermission(PortalSecurityManager.java:103)
at com.liferay.portal.security.lang.PortalSecurityManager.checkPermission(PortalSecurityManager.java:74)
at java.lang.System.getenv(System.java:877)
at org.springframework.core.env.AbstractEnvironment.getSystemEnvironment(AbstractEnvironment.java:304)
at org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:79)
at org.springframework.web.portlet.context.StandardPortletEnvironment.customizePropertySources(StandardPortletEnvironment.java:89)
at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:101)
at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
at org.springframework.web.portlet.context.StandardPortletEnvironment.<init>(StandardPortletEnvironment.java:46)
at org.springframework.web.portlet.GenericPortletBean.<init>(GenericPortletBean.java:79)
at org.springframework.web.portlet.FrameworkPortlet.<init>(FrameworkPortlet.java:103)
at org.springframework.web.portlet.DispatcherPortlet.<init>(DispatcherPortlet.java:136)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:131)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:546)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:321)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)


This is a blocker.
Please post your views.

Thank you !!!
Hitoshi Ozawa
RE: PACL ERROR while deploying portlet : Attempted to get environment name
7 janvier 2013 04:27
Réponse

Hitoshi Ozawa

Rang: Youngling

Publications: 0

Date d'inscription: 23 mars 2010

Publications Récentes

Seems like you're having the same problem as the thread below. Looking at the dates and not seeing any response from liferay.com, seems like liferay.com is not able to resolve the problem. Maybe, it'll be better for a community to setup a different site to host liferay plugins if liferay.com is not able to support Marketplace.

http://www.liferay.com/community/forums/-/message_boards/message/18367741

http://www.liferay.com/community/forums/-/message_boards/message/17199493

Notice from liferay.com dated November. It's January already and there's no further activity on the thread. Have to just say this is very disappointing.
http://www.liferay.com/community/forums/-/message_boards/message/17666043
Raymond Augé
RE: PACL ERROR while deploying portlet : Attempted to get environment name
7 janvier 2013 05:03
Réponse

Raymond Augé

Rang: Youngling

Publications: 0

Date d'inscription: 7 février 2005

Publications Récentes

I'll try to replicate this and give feedback ASAP.

Appologies for the delay.
Raymond Augé
RE: PACL ERROR while deploying portlet : Attempted to get environment name
7 janvier 2013 17:13
Réponse

Raymond Augé

Rang: Youngling

Publications: 0

Date d'inscription: 7 février 2005

Publications Récentes

Ok, so early feedback is that this stems from any attempt to call:

System.getenv(); (which results in a permission check using RuntimePermission("getenv.*") )

along with

System.getenv(String name); (which results in a permission check using RuntimePermission("getenv."+name) )

It looks like this problem will require a patch to PACL emoticon .
Raymond Augé
RE: PACL ERROR while deploying portlet : Attempted to get environment name
7 janvier 2013 17:59
Réponse

Raymond Augé

Rang: Youngling

Publications: 0

Date d'inscription: 7 février 2005

Publications Récentes

The good news is that the fix is relatively simpe and won't take us very long to get out a fix.

The fix looks like this: https://gist.github.com/4480407

The second listing shown is simply the profile properties required to declare for env access. In the cases where the underlying libary is calling System.getenv(); (like spring, etc.) you''ll have to just declare '*'.
Raymond Augé
RE: PACL ERROR while deploying portlet : Attempted to get environment name
7 janvier 2013 18:09
Réponse

Raymond Augé

Rang: Youngling

Publications: 0

Date d'inscription: 7 février 2005

Publications Récentes

I've created http://issues.liferay.com/browse/LPS-32137 and will be submitting a fix very soon.
Raymond Augé
RE: PACL ERROR while deploying portlet : Attempted to get environment name
7 janvier 2013 18:21
Réponse

Raymond Augé

Rang: Youngling

Publications: 0

Date d'inscription: 7 février 2005

Publications Récentes

The pull request has been sent, so it's in a peer rewiewers queue and should be processed shortly.
Raymond Augé
RE: PACL ERROR while deploying portlet : Attempted to get environment name
8 janvier 2013 08:01
Réponse

Raymond Augé

Rang: Youngling

Publications: 0

Date d'inscription: 7 février 2005

Publications Récentes

Laxman, can you also mark this thread as answered if that be the case (I think so)?

Sorry, different issue!

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.