Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 5134 invoked from network); 26 Jun 2007 19:36:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jun 2007 19:36:05 -0000 Received: (qmail 92273 invoked by uid 500); 26 Jun 2007 19:36:03 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 91984 invoked by uid 500); 26 Jun 2007 19:36:01 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 91973 invoked by uid 99); 26 Jun 2007 19:36:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2007 12:36:01 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of wmkeicher@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2007 12:35:57 -0700 Received: by ug-out-1314.google.com with SMTP id t30so214075ugc for ; Tue, 26 Jun 2007 12:35:35 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=cLmTuKblU9gsNGvmbiw06e9+DfqrOjwxI7kqVitC1TXRtJls4GyvYtAJqoRXhKJNXySim0RenGbE9PRzUsG8Agot3fCjQfL50+cK8d0Fb/GaupGawZxQ6Gf/ltbSevSDcCvocQN/g+ggkgtxrAPPDL7gEqbSjNpCgLhIIJmtn0I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=YETjF5mBN9G0nIiJuRtGBqWpayXWL2N/qMUO4f+qyr3e2etOY06FvUMEXMZ5z2N3icvsvW6hXYQhFBO1kS1UHMq8oNM9613eqTW4r8LdjNNr9IjdafVNeFTunv6G0RiJaGu23V27EGtXOW7xe67cpLZ5NYy26RibvZrpnM5JnIw= Received: by 10.78.138.6 with SMTP id l6mr3316281hud.1182886535145; Tue, 26 Jun 2007 12:35:35 -0700 (PDT) Received: by 10.78.11.7 with HTTP; Tue, 26 Jun 2007 12:35:35 -0700 (PDT) Message-ID: <2affc33c0706261235j6454804fle8f74bf8044ef4e4@mail.gmail.com> Date: Tue, 26 Jun 2007 15:35:35 -0400 From: "William Keicher" To: "MyFaces Discussion" Subject: Re: [Trinidad] chart.svg Not well-formed? In-Reply-To: <5a7bfd370706261026h69a80f72s495d454e4077399d@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21340_7853291.1182886535100" References: <5a7bfd370706260655v6ae0db71hce9259d32ab10b8@mail.gmail.com> <2affc33c0706260715n279fdda7xcfe886862b25345b@mail.gmail.com> <5a7bfd370706260718h3caf80c5w85166a0b12283efd@mail.gmail.com> <2affc33c0706260744y1a5a30d2q60efc802efa98fbb@mail.gmail.com> <5a7bfd370706260822j4284c563g9431b57cc9d5c2dc@mail.gmail.com> <5a7bfd370706261026h69a80f72s495d454e4077399d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_21340_7853291.1182886535100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm not sure if that's the best solution to the issue. If you look at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.ChartRenderer you'll see the different code paths you take by playing with the templateSource attribute: protected String getTemplateSource(FacesBean bean) { Object ret =3D bean.getProperty(_templateSourceKey); String uri; if (ret=3D=3Dnull) { if(isGradientsUsed(bean)) uri =3D _TEMPLATE_DOC; else uri =3D _TEMPLATE_DOC_NOGRADIENT; } else { uri =3D toString(ret); } return toUri(uri); } ... private static final String _TEMPLATE_DOC =3D "/adf/svg/chart.svg"; private static final String _TEMPLATE_DOC_NOGRADIENT =3D "/adf/svg/chartNoGradient.svg"; You could set break points here to probe further. Although I still suspect the container has the bug, after all tr:chart seems to work fine in other containers and appservers. Bill On 6/26/07, Wesley Hales wrote: > > When in doubt, read the domentation... > > templateSource=3D"chart.svg" > > Just add that as an attribute and point it to a working svg > > On 6/26/07, Wesley Hales wrote: > > > > I just discovered that this only happens when I use the gradients > > option... If I uncheck the box, the chart displays fine. I'm still > > troubleshooting it > > > > On 6/26/07, William Keicher wrote: > > > > > > Unfortunately I never found out what the bug was...I speculated that > > > there was junk leftover in a response buffer coming from the server. = It is > > > suspicious though that this problem reproduced in two different > > > environments... > > > > > > In lieu of a better answer, you may want to try downgrading your > > > tomcat to something in the 5.x series. Another option is to try > > > debugging with the tomcat 6 and trinidad sources available. > > > > > > Bill > > > > > > On 6/26/07, Wesley Hales wrote: > > > > > > > > Awesome, thanks... So I am on Tomcat 6.0.13 (which is the latest) - > > > > Any ideas on what the problem actually was? I don't think I have a = choice to > > > > go any higher. > > > > > > > > On 6/26/07, William Keicher wrote: > > > > > > > > > > Hi Wesley, > > > > > > > > > > I saw the same exact problem when I used an older version of Sun > > > > > Java Application Server/Glassfish. The problem disappeared when = I upgraded > > > > > the appserver to a more recent version. > > > > > > > > > > Hope that helps, > > > > > Bill > > > > > > > > > > On 6/26/07, Wesley Hales < wesleyhales@gmail.com> wrote: > > > > > > > > > > > > I copied the chart demo code from the trinidad-demo in the > > > > > > Apache subversion repo to my current Seam 1.3 cvs app. > > > > > > Everything works and renders fine, but the charts don't actuall= y show up. > > > > > > All the adf resources and javascript data are showing up correc= tly on the > > > > > > app server also. So I tried to open the actual svg/xml file in = my browser ( > > > > > > http://myapp/adf/svg/chart.svg) and I get... > > > > > > Quote: > > > > > > > > > > > > XML Parsing Error: not well-formed > > > > > > Location: http://localhost:8080/freedom/adf/svg/chart.svg > > > > > > Line Number 1, Column 2:=EF=BB=BF > > > > > > > > > > > You can view the well formed svg document in the trinidad live > > > > > > demo here: http://www.irian.at/trinidad-demo/adf/svg/chart.svg > > > > > > > > > > > > Notice the 3 characters in front of the first < sign...Would > > > > > > this be a issue with one of the filters? > > > > > > here is my web.xml: > > > > > > > > > > > > > > > > > > > org.jboss.seam.servlet.SeamListener > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Seam Resource Servlet > > > > > > > org.jboss.seam.servlet.ResourceServlet > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Seam Resource Servlet > > > > > > > /seam/resource/* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Seam Filter > > > > > > > org.jboss.seam.web.SeamFilter > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Seam Filter > > > > > > > /* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > javax.faces.STATE_SAVING_METHOD > > > > > > > client > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > javax.faces.DEFAULT_SUFFIX > > > > > > > > > > > > > > .xhtml > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > facelets.DEVELOPMENT > > > > > > > true > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Faces Servlet > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > javax.faces.webapp.FacesServlet > > > > > > > 1 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Faces Servlet > > > > > > > > > > > > > > > > > > > > > *.seam > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.myfaces.trinidad.ALTERNATE_VIE= W_HANDLER > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > com.sun.facelets.FaceletViewHandler > > > > > > > > > > > > > > > > > > > > > > > > > > > > Trinidad > > > > > > > > > > > > > > org.apache.myfaces.trinidad.webapp.TrinidadFilter > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Trinidad > > > > > > > *.seam > > > > > > > > > > > > > > REQUEST > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > FORWARD > > > > > > > INCLUDE > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.myfaces.trinidad.CACHE_VIEW_ROOT > > > > > > > > > > > > > > false > > > > > > > > > > > > > > > > > > > > > > > > > > > > Trinidad Resources > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.myfaces.trinidad.webapp.Res= ourceServlet > > > > > > > > > > > > > > > > > > > > > > > > > > > > Trinidad Resources > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /adf/* > > > > > > > > > > > > > > > > > > > > > > > > > > > > com.sun.faces.config.ConfigureListene= r > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 10 > > > > > > > > > > > > > > =09 > > > > > > > This message has also been posted to the Seam forum: > > > > > > http://www.jboss.com/index.html?module=3Dbb&op=3Dviewtopic&t=3D= 111873 > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > > > > > > > > > > > > > > > ------=_Part_21340_7853291.1182886535100 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm not sure if that's the best solution to the issue.  If you= look at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.ChartRe= nderer
you'll see the different code paths you take by playing with = the templateSource attribute:

protected String getTemplateSource(FacesBean bean)
  {
&= nbsp;   Object ret =3D bean.getProperty(_templateSourceKey);
&= nbsp;   String uri;
    if (ret=3D=3Dnull)
&= nbsp;   {     
   &nb= sp;  if(isGradientsUsed(bean))
      =   uri =3D _TEMPLATE_DOC;
      else
     &n= bsp;  uri =3D _TEMPLATE_DOC_NOGRADIENT;
    }
&nb= sp;   else
    {
    &nb= sp; uri =3D toString(ret);
    }
    re= turn toUri(uri);
  }
...
private static final String _TEMPLAT= E_DOC =3D "/adf/svg/chart.svg";
private static final String _TEMPLATE_DOC_NOGRADIENT =3D "/adf/svg= /chartNoGradient.svg";

You could set break points here to probe= further.  Although I still suspect the container has the bug, after a= ll tr:chart seems to work fine in other containers and appservers.

Bill

On 6/26/07, Wesley Hales <wesleyhales@gmail.com> wrote:
When in doubt, read the domentation...

templateSource=3D"chart.= svg"

Just add that as an attribute and point it to a working sv= g


On 6/26/07, Wesley Hales <wesleyhales@g= mail.com> wrote:
I just discovered that this only happens when I use the gradients option...= If I uncheck the box, the chart displays fine. I'm still troubleshooti= ng it


On 6/26/07, William Keicher <wmkeicher@gm= ail.com> wrote:
Unfortunately I never found out what the bug was...I speculated that there = was junk leftover in a response buffer coming from the server.  It is = suspicious though that this problem reproduced in two different environment= s...

In lieu of a better answer, you may want to try downgrading your to= mcat to something in the 5.x series.  Another option is to try debuggi= ng with the tomcat 6 and trinidad sources available.


Bill

On 6/26/07, Wesle= y Hales <wesleyhales@gmail.= com > wrote:
Awesome, thanks... So I am on Tomcat 6.0.13 (which is the latest) - Any ide= as on what the problem actually was? I don't think I have a choice to g= o any higher.


On 6/26/07, William Keicher <wmkeicher@gm= ail.com> wrote:
Hi Wesley,

I saw the same exact problem when I used an older version= of Sun Java Application Server/Glassfish.  The problem disappeared wh= en I upgraded the appserver to a more recent version.

Hope that help= s,
Bill


On 6/26/07, Wesley Hales < wesleyhales@gmail.com> wrote:
I copied the chart demo code from the trinidad-demo in the Apache subversio= n repo to my current Seam 1.3 cvs app. Everything works and renders fine, b= ut the charts don't actually show up. All the adf resources and javascr= ipt data are showing up correctly on the app server also. So I tried to ope= n the actual svg/xml file in my browser ( http://myapp/adf/svg/chart.svg) and I get...
Quote:

XML Parsing Error: not well-f= ormed
Location:
http://localhost:8080/freedom/adf/svg/chart.svg
Line Number 1, Colum= n 2:=EF=BB=BF<?xml version=3D"1.0" encoding=3D"UTF-8"= ;?
You can view the well formed svg document in the trinida= d live demo here:=20 http://www.= irian.at/trinidad-demo/adf/svg/chart.svg

Notice the 3 characters= in front of the first < sign...Would this be a issue with one of the fi= lters?
here is my web.xml:

<listener>
<listener-class>org= .jboss.seam.servlet.SeamListener





</listener-class>
</listener>
<servlet>
<servlet-name>Seam Resource Servl= et</servlet-name>
<servlet-class>org.jboss.seam.serv= let.ResourceServlet




</servlet-class>

</servlet>
<= br> <servlet-mapping>
<servlet-name>Seam Resource= Servlet</servlet-name>
<url-pattern>/seam/resource/= *</url-pattern>





</servlet-mapping>


<fil= ter>
<filter-name>Seam Filter</filter-name>
= <filter-class>org.jboss.seam.web.SeamFilter</filter-class>= ;

</filter>




<filter-mapping>

= <filter-name>Seam Filter</filter-name>
<url= -pattern>/*</url-pattern>
</filter-mapping>

<!-- JSF -->


<context-param>
<param-name>
javax.faces.STAT= E_SAVING_METHOD</param-name>
<param-value>client<= /param-value>
</context-param>

<context-param= >





<param-name>javax.faces.DEFAULT_SUFFI= X
</param-name>
<param-value>.xhtml</param-val= ue>
</context-param>

<context-param>
<param-name>




facelets.DEVELOPMENT</para= m-name>
<param-value>true</param-value>

= </context-param>

<servlet>
<servlet-= name>Faces Servlet</servlet-name>





<servlet-class>javax.faces.webapp.Fac= esServlet</servlet-class>
<load-on-startup>1</loa= d-on-startup>

</servlet>

<servlet-mapping= >


<servlet-name>Faces Servlet</servlet-name>


= <url-pattern>*.seam</url-pattern>
</servlet-ma= pping>

<!-- Trinidad - as suggested by a4j-trinidad example-->

= <context-param>
<param-name>org.apache.myfaces.tri= nidad.ALTERNATE_VIEW_HANDLER</param-name>
<param-value&= gt;





com.sun.facelets.FaceletViewHandler</param-value= >
</context-param>

<filter>
<= ;filter-name>Trinidad</filter-name>
<filter-class>= ;
org.apache.myfaces.trinidad.webapp.TrinidadFilter




&l= t;/filter-class>
</filter>

<filter-mapping>= ;
<filter-name>Trinidad</filter-name>
<= ;url-pattern>*.seam</url-pattern>

<dispatcher>REQUEST</dispatcher>




<dispatcher>FORWARD</dispatcher>
&l= t;dispatcher>INCLUDE</dispatcher>
</filter-mapping>

<context-param>
<param-name>




org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
= </param-name>
<param-value>false</param-value= >
</context-param>

<servlet>
&l= t;servlet-name>Trinidad Resources</servlet-name>






<servlet-class>org.apache.myfaces= .trinidad.webapp.ResourceServlet</servlet-class>
</servlet&= gt;

<servlet-mapping>
<servlet-name>Trini= dad Resources</servlet-name>






<url-pattern>/adf/*</url-patte= rn>
</servlet-mapping>

<listener>
= <listener-class>com.sun.faces.config.ConfigureListener</listene= r-class>



</listener>



<session-config>
= <session-timeout>10</session-timeout>
</session-confi= g>
=09
This message has also been posted to the Sea= m forum:
http://www.jboss.com/index.html?module=3Dbb&op=3Dviewtopic&t=3D1118= 73

Any ideas?






------=_Part_21340_7853291.1182886535100--