Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-62468

At Windows, java.io.IOException is thrown continuously when PACL is activated

    Details

      Description

      When PACL is activated only at Windows environments, following exception is continuosly thrown:

      SEVERE: Security Init for context failed
      java.io.IOException: The filename, directory name, or volume label syntax is incorrect
      	at java.io.WinNTFileSystem.canonicalize0(Native Method)
      	at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:414)
      	at java.io.File.getCanonicalPath(File.java:618)
      	at java.io.File.getCanonicalFile(File.java:643)
      	at org.apache.jasper.compiler.JspRuntimeContext.initSecurity(JspRuntimeContext.java:551)
      	at org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:195)
      	at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:159)
      	at com.liferay.portal.servlet.jsp.compiler.JspServlet.init(JspServlet.java:218)
      	at com.liferay.portal.wab.extender.internal.WabBundleProcessor$JspServletWrapper.init(WabBundleProcessor.java:603)
      	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:95)
      	at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:561)
      

      It seems JSP Jasper compiler does not work because some issue related with PACL+Windows.
      This problem at Jasper compiler causes errors at almost all Liferay portlets, so system cannot be used.
      Following error is also displayed when opening Liferay page:

      An unexpected system error occurred.
      
      javax.servlet.jsp.JspException: com.liferay.portal.kernel.template.TemplateException: Unable to process template _SERVLET_CONTEXT_/classic/templates/portal_normal.ftl
      

      Reproduced at 7.0 Beta 4 and master.

      Steps to reproduce

      1. Configure Liferay at Windows
      2. Enable PACL at Liferay. For example at tomcat:
        1. Configure portal-ext.properties portal.security.manager.strategy=liferay
        2. Configure catalina.policy file
      3. Start Liferay with PACL activated. For example at tomcat: ./startup.sh -security
      4. Check start logs:
      5. - Wrong behaviour: A lot of exceptions are thrown at log:
        SEVERE: Security Init for context failed
        java.io.IOException: The filename, directory name, or volume label syntax is incorrect
        	at java.io.WinNTFileSystem.canonicalize0(Native Method)
        	at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:414)
        	at java.io.File.getCanonicalPath(File.java:618)
        	at java.io.File.getCanonicalFile(File.java:643)
        	at org.apache.jasper.compiler.JspRuntimeContext.initSecurity(JspRuntimeContext.java:551)
        	at org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:195)
        	at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:159)
        	at com.liferay.portal.servlet.jsp.compiler.JspServlet.init(JspServlet.java:218)
        	at com.liferay.portal.wab.extender.internal.WabBundleProcessor$JspServletWrapper.init(WabBundleProcessor.java:603)
        	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:95)
        	at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:561)
        	at org.eclipse.equinox.http.servlet.internal.context.ContextController.addServletRegistration(ContextController.java:447)
        	at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:55)
        	at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:1)
        	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
        	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
        	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
        	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
        	at org.eclipse.equinox.http.servlet.internal.context.ContextController.<init>(ContextController.java:163)
        	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.addingService(HttpServiceRuntimeImpl.java:110)
        	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.addingService(HttpServiceRuntimeImpl.java:1)
        	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
        	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
        	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
        	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
        	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.<init>(HttpServiceRuntimeImpl.java:73)
        	at org.eclipse.equinox.http.servlet.internal.Activator.addingService(Activator.java:149)
        	at org.eclipse.equinox.http.servlet.internal.Activator.addingService(Activator.java:1)
        	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
        	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
        	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
        	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$1.run(ServiceRegistry.java:805)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$1.run(ServiceRegistry.java:1)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:803)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
        	at com.liferay.portal.wab.extender.internal.adapter.HttpAdapter.activate(HttpAdapter.java:109)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:606)
        	at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
        	at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
        	at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
        	at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
        	at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
        	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:954)
        	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:915)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
        	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)
        	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
        	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$1.run(ServiceRegistry.java:805)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$1.run(ServiceRegistry.java:1)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:803)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
        	at com.liferay.registry.internal.RegistryImpl.registerService(RegistryImpl.java:268)
        	at com.liferay.portal.servlet.MainServlet.registerPortalInitialized(MainServlet.java:1311)
        	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:389)
        	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:606)
        	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:276)
        	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:273)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at javax.security.auth.Subject.doAsPrivileged(Subject.java:536)
        	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:308)
        	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:168)
        	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:122)
        	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1272)
        	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
        	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
        	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5266)
        	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5554)
        	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        	at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:133)
        	at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:156)
        	at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
        	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912)
        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        	at java.lang.Thread.run(Thread.java:744)
        

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 39 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.1 CE GA2