Issue Details (XML | Word | Printable)

Key: GLASSFISH-11348
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: kumarjayanti
Reporter: averagegeeker
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

Error in linking security policy for myapp -- Inconsistent Module State

Created: 21/Dec/09 11:33 AM   Updated: 12/Feb/14 03:06 AM   Resolved: 12/Feb/14 03:06 AM
Component/s: security
Affects Version/s: V3
Fix Version/s: 4.0.1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive GLASSFISH-11348_fix_patch.zip (0.4 kB) 28/Jan/14 01:33 AM - Jeremy_Lv

Environment:

Operating System: All
Platform: PC


Issuezilla Id: 11,348
Tags:
Participants: arungupta, averagegeeker, Hong Zhang, Jeremy_Lv, kumarjayanti, ljnelson and Nithya Ramakrishnan


 Description  « Hide

I tried to deploy ear file through "Local Packaged File or Directory That Is
Accessible from the Enterprise Server" and Status check box enabled. Other check
boxes like precompile, run verifier, force redeploy and java webstart not checked.

This application is built on Struts 1.2, Spring, Hibernate and Acegi. I saw
similar bug that has EJB in it. But I don't have any EJB part of my application.

I am getting Exception while loading the app :
org.glassfish.deployment.common.DeploymentException: Error in linking security
policy for myapp – Inconsistent Module State

Here is the full stack trace:

[#|2009-12-21T13:30:37.126-0600|SEVERE|glassfishv3.0|javax.enterprise.system.cor
e.com.sun.enterprise.v3.server|_ThreadID=29;_ThreadName=http-thread-pool-4848-(2
);|Exception while loading the app
org.glassfish.deployment.common.DeploymentException: Error in linking security p
olicy for myapp – Inconsistent Module State
at com.sun.enterprise.security.SecurityUtil.linkPolicyFile(SecurityUtil.
java:329)
at com.sun.enterprise.security.SecurityDeployer.linkPolicies(SecurityDep
loyer.java:259)
at com.sun.enterprise.security.SecurityDeployer.access$100(SecurityDeplo
yer.java:63)
at com.sun.enterprise.security.SecurityDeployer$AppDeployEventListener.e
vent(SecurityDeployer.java:96)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java
:224)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:338)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.ja
va:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunner
Impl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunne
rImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execut
e(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execut
e(CommandRunnerImpl.java:1224)
at org.glassfish.admingui.common.util.LocalDeploymentFacility$LocalDFCom
mandRunner.run(LocalDeploymentFacility.java:138)
at org.glassfish.deployment.client.AbstractDeploymentFacility.deploy(Abs
tractDeploymentFacility.java:350)
at org.glassfish.admingui.common.util.DeployUtil.invokeDeploymentFacilit
y(DeployUtil.java:89)
at org.glassfish.admingui.common.util.DeployUtil.deploy(DeployUtil.java:
66)
at org.glassfish.admingui.common.handlers.DeploymentHandler.deploy(Deplo
ymentHandler.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handl
er.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHa
ndlers(LayoutElementBase.java:420)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHa
ndlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.event.CommandActionListener.invokeComman
dHandlers(CommandActionListener.java:150)
at com.sun.jsftemplating.layout.event.CommandActionListener.processActio
n(CommandActionListener.java:98)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:
772)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:
160)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)

at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
ionPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java
:1523)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:215)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:229)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:277)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESess
ionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.j
ava:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:233)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container
Mapper.java:239)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:7
91)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFil
ter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro
tocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java
:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT
ask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.
java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP
ool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool
.java:309)
at java.lang.Thread.run(Thread.java:619)

#]


Hong Zhang added a comment - 21/Dec/09 05:09 PM

assign to security team for initial evaluation


Nithya Ramakrishnan added a comment - 22/Dec/09 12:13 AM

Could you please attach the test archive which is causing this issue?


kumarjayanti added a comment - 07/Jul/10 12:48 AM

marking as worksforme. Please try with latest V3.1 builds and report back with a
testcase if it still fails.


ljnelson added a comment - 04/Sep/13 04:57 PM

This still occurs regularly but not deterministically on GlassFish 3.1.2.2. The solution/workaround is to stop the server and remove all contents under the generated directory. The almost-root cause is that a security policy file gets partially generated, and any deployment error that occurs at the right time will cause this security policy file in its partially generated state to stick around. I haven't investigated further.


arungupta added a comment - 04/Sep/13 07:44 PM

Reopening the issue based upon Laird's request.


Jeremy_Lv added a comment - 28/Jan/14 01:32 AM

Here's the detailed discussion between me and Hong Zhang:
https://java.net/projects/glassfish/lists/dev/archive/2014-01/message/11


Jeremy_Lv added a comment - 28/Jan/14 01:33 AM

Attached the patch to fix this issue.


Jeremy_Lv added a comment - 12/Feb/14 03:06 AM

The patch has been checked in as r63087