5 Replies Latest reply on Aug 14, 2007 2:53 AM by haoues01

    Error send script to client for resource org.ajax4jsf.javas

    haoues01

      Hello!

      I had to update the richfaces framework to the 3.1.0 due to many problems of
      "OutOfMemory " in IE6 and to use the news components... but I'm struggling to understand this error when I'm connecting to my application. I've recently changed from richfaces-3.0.2 to 3.1.0 (SNAPSHOT from SVN)... below the stack trace :

      [ScriptRenderer] Error send script to client for resource org.ajax4jsf.javascript.PrototypeScript
      org.ajax4jsf.javascript.JSMin$UnterminatedStringLiteralException
      at org.ajax4jsf.javascript.JSMin.action(JSMin.java:191)
      at org.ajax4jsf.javascript.JSMin.jsmin(JSMin.java:289)
      at org.ajax4jsf.resource.ScriptRenderer.send(ScriptRenderer.java:94)
      at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:373)
      at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:89)
      at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:336)
      at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)
      at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)
      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:198)
      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:259)
      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:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:595)

      Sometimes before it worked but a4j:support not. This is my menu :




      <rich:dropDownMenu value="Members" jointPoint="bl">
      <f:facet name="label">
      <h:panelGrid cellpadding="0" cellspacing="0" columns="2" style="vertical-align:middle">
      <h:graphicImage value="images/member.jpg"/>
      <h:outputText value="Members" />
      </h:panelGrid>
      </f:facet>
      <rich:menuItem value="Add" action="admin_member-edit" actionListener="#{memberEdit.load}">
      <a4j:actionparam name="member_id" value="0" />
      <a4j:actionparam name="member_role_id" value="0" />
      <a4j:support event="onclick" actionListener="#{panelBarMgr.loadParams}">
      <a4j:actionparam name="panel_reset" value="true" />
      <a4j:actionparam name="panel_selected" value="panel0" />
      <a4j:actionparam name="panel_param" value="panel0@label=Add Member" />
      <a4j:actionparam name="panel_param" value="panel1@label=Add Roles" />
      <a4j:actionparam name="panel_param" value="panel0@disabled=false" />
      <a4j:actionparam name="panel_param" value="panel1@disabled=false" />
      </a4j:support>
      </rich:menuItem>
      ....
      </rich:dropDownMenu>

      Thank you in advance for help....

        • 1. Re:  Error send script to client for resource org.ajax4jsf.j

          Known issue with js compressor risen just after upgrading prototype.js. Compressor is fixed already.
          Take the latest 3.1.0 snapshot.

          • 2. Re:  Error send script to client for resource org.ajax4jsf.j
            haoues01

            Thanks Sergey!

            Now the problem is about a4j:support ... doesn't work anymore ! And I don't know how to add many listener when a link/command or item is clicked... Do you have any idea? Below a sample :

            <rich:menuItem value="Add" action="admin_member-edit" actionListener="#{memberEdit.load}">
            <a4j:actionparam name="member_id" value="0" />
            <a4j:actionparam name="member_role_id" value="0" />
            <a4j:support event="onclick" actionListener="#{panelBarMgr.loadParams}">
            <a4j:actionparam name="panel_reset" value="true" />
            <a4j:actionparam name="panel_selected" value="panel0" />
            <a4j:actionparam name="panel_param" value="panel0@label=Add Member" />
            <a4j:actionparam name="panel_param" value="panel1@label=Add Roles" />
            <a4j:actionparam name="panel_param" value="panel0@disabled=false" />
            <a4j:actionparam name="panel_param" value="panel1@disabled=false" />
            </a4j:support>

            </rich:menuItem>
            ....

            Thanks in advance.

            • 3. Re:  Error send script to client for resource org.ajax4jsf.j

              What and how you upgraded?
              I am working on RichFaces demo last two weeks and never met any serious glitches yet except correlation between two kind of rich:column in rich:dataTable.

              To add many listeners use many f:actionListener . Using actionListener is an old style.

              The a4j:actionparam set you have looks very strange. Where you took the idea to use them like that?

              • 4. Re:  Error send script to client for resource org.ajax4jsf.j
                haoues01


                I replaced theses libraries richfaces-3.0.2.jar and jax4jsf-1.1.2-SNAPSHOT.jar by richfaces-ui-3.1.0-SNAPSHOT.jar, richfaces-impl-3.1.0-SNAPSHOT.jar and richfaces-api-3.1.0-SNAPSHOT.jar.

                Now the a4j:support doesn't call the listener when it's combined with actionParam. The initial idea was to reuse the same panaelBar manager to manage the panel title, event etc ... throught the screens.

                • 5. Re:  Error send script to client for resource org.ajax4jsf.j
                  haoues01


                  OK, I solved it!
                  The problem was about the event... when we select an item it's a "onselect" event that is fired, not a "onclick" event. Sorry for the trouble!

                  Thanks again for all.