Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    problem with FileAssembly

    Hi there,

    We are using your FileAssembly component and, for some reason, we are seeing the following exception when trying to load a file generated by the FileAssembly component. It seems to work on some browsers and not on others. I am seeing intermittent problems with Firefox 4. And, I am seeing problems with IE8 as well. But,for some browsers, it correctly assembles and displays the file with no issues. Here is what a failure looks like below. Any ideas why this is happening?

    This is happening with SmartClient 6.5.1 and has some urgency because it is impacting our current production users.

    Code:
    com.isomorphic.servlet.FileAssembly top-level exception
    
    java.io.FileNotFoundException: /programs/deploy/discern.war/isomorphicCache/stripped/js/at_atproperties.js (Permission denied)
    	at java.io.FileOutputStream.open(Native Method)
    	at java.io.FileOutputStream.(FileOutputStream.java:179)
    	at java.io.FileOutputStream.(FileOutputStream.java:70)
    	at java.io.FileWriter.(FileWriter.java:46)
    	at com.isomorphic.assembly.FileAssembler.stripJSFile(FileAssembler.java:1446)
    	at com.isomorphic.assembly.FileAssembler.getStrippedFile(FileAssembler.java:1017)
    	at com.isomorphic.assembly.FileAssembler$FileComponent.getOutput(FileAssembler.java:619)
    	at com.isomorphic.assembly.FileAssembler.assemble(FileAssembler.java:437)
    	at com.isomorphic.assembly.FileAssembler.assembleFile(FileAssembler.java:339)
    	at com.isomorphic.assembly.FileAssembler.assembleFile(FileAssembler.java:315)
    	at com.isomorphic.servlet.FileAssembly.doGet(FileAssembly.java:86)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:248)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
    	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
    	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
    	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    	at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
    	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
    	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
    	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    	at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
    	at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
    	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
    	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
    	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    	at java.lang.Thread.run(Thread.java:662)

    #2
    Assuming this is not a legitimate error (eg, you're running the server process in such a way that it really can't read/write to these files), then this looks like a bogus warning related to some kind of filesystem issue. Is this server running Windows? What version if so?

    Have you considered setting up a script so that all assembled files are created in advance (if this is possible, eg, no user-dependent files)?

    Comment


      #3
      No, this is a Linux server. And, we've successfully used FileAssembly for years in many different environments. And, it is oddly working properly in some cases right now but not in others.

      It is definitely not a bogus warning though. I am looking at the content being delivered to the browser for the uri defined in FileAssembly like this:

      Code:
            <FileAssemblyEntry uri="/js/at_js_public_static.js">
                   <compress>true</compress>
                   <components>
                        <component>
                           <type>file</type>
                           <fileName>/js/at_atproperties.js</fileName>
                           <jsStripping>full</jsStripping>
                           <jsObfuscation>1</jsObfuscation>
                       </component>
                       ...
      and, it is returning that error message I pasted.

      I'm not sure what you mean by setting up a script. Do you mean copying all of the files into the isomorphicCache/stripped directory via script rather than having your component do it at runtime?

      Comment


        #4
        What we meant by a "bogus warning" is whether it could possibly be legitimate that Java / the OS are reporting "Permission Denied" here. Unless the files are not writeable by the Unix userId that's running the server process, this error condition should be impossible, and is probably masking some other, real cause.

        Are you seeing anything other than "Permission denied" as the error message when this happens?

        Are you using any kind of unusual filesystem - NFS or something that might not support synchronous saves?

        By using a script, we mean writing a simple Java program that would invoke the FileAssembler manually to cause all the files to be generated, so you could just deploy the already-assembled files with your application.

        Comment


          #5
          Well, looking closely at the logs, I see that one of our two servers is responsible for all of these exceptions. And, it is throwing this warning in the logs right before it throws the exception originally pasted

          2011-04-06 17:52:56,698 INFO [STDOUT] === 2011-04-06 17:52:56,698 [0-12] WARN FileAssembler - js/at_atproperties.js requests obfuscation level 1 - but this package is not capable of obfuscation - NOT OBFUSCATING

          So, does that suggest this server has some permission problems? Or, perhaps there is a corrupt deploy on this one server?

          I guess an easy fix would perhaps be to remove the obfuscation setting as well?

          Comment


            #6
            The different behavior certainly suggests a corrupt deployment. Perhaps you've got different server.properties settings in each deployment?

            You should remove settings for jsObfuscation unless you're deeply familiar with this - it doesn't make much of a file size difference and it puts some subtle constraints on your JavaScript code.

            Comment


              #7
              I really appreciate the prompt help. We should be able to figure it out from here.

              Comment

              Working...
              X