1 3 4 5 6 7 Previous Next 96 Replies Latest reply on Jan 26, 2011 6:32 AM by carsi Go to original post
      • 60. Re: Excel for Seam preview
        baz

        Hi Nicklas




        Hmmm, that one is obsolete, cleaned it up in faces-config.xml. The new jar can be downloaded here. Wonder why I didn't run into that...


        With this jar files we get classloading errors:


        11:55:34,978 ERROR [[/prunus]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
        javax.faces.FacesException: java.lang.ClassNotFoundException: org.jboss.seam.excel.DocumentStorePhaseListener
                at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:387)
                at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
                at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:585)



        The jar from 20080606 does not have this issue.
        Perhaps i am missing something, but what?
        Ciao,

        • 61. Re: Excel for Seam preview
          nickarls

          Strange since the file is obviously present in the JAR and I don't see any difference in the file structure when comparing the versions either. Could it be some sort of caching issue?

          • 62. Re: Excel for Seam preview
            baz

            Hi Nicklas,
            yes, very strange. if i use the new file, i get the CNFE when starrting the server.
            After stopping the server, deleting of the jar file and copying the jar from 06.06 the CNFE is not ptesent.
            If i stop the server, delete the jar from 06.06 and copy the new jar again. The CNFE is present. The same holds for a completly new instance of JBAS. So i do not believe in a caching issue.
            Any ideas?
            Ciao,
            Carsten

            • 63. Re: Excel for Seam preview
              nickarls

              From the department of long shots in the dark, try this.


              I might have compiled it with jdk6, this is a recompile for jdk5. Although I think there would be a separate error for version mismatch and not CNFE...

              • 64. Re: Excel for Seam preview
                baz

                Thanks for the fast reaction. It is working again.

                • 65. Re: Excel for Seam preview
                  nickarls

                  Good to hear. If the file really was there, I would have expected a java.lang.UnsupportedClassVersionError, perhaps there is a catch-all-rethrow-as-CNFE somewhere in the classloading code.

                  • 66. Re: Excel for Seam preview
                    clarkchrisp

                    Hello,


                    Sorry to add to an already long list, I've just started using SEAM and JSF and so far I'm very happy with it but can't get anywhere with this. I've downloaded the latest excel api and everything seems to be ok. I'm trying to use the simple excelExport functionality but keep getting the same exception:-


                    Exception during request processing:



                    Caused by javax.servlet.ServletException with message: "#{org.jboss.seam.excel.excelExporter.export('investorSearchForm:investorAccountTable')}: org.jboss.seam.excel.ExcelWorkbookException: Could not find data table with id investorSearchForm:investorAccountTable" 



                    This is some of the xhtml...



                    <h:form id="investorSearchForm">  
                            <rich:dataTable id="investorAccountTable" value="#{investorAccounts}"
                                    var="invAccount" rows="10">
                    .
                    .
                    .
                    .
                       </rich:table>
                      <h:commandButton value="Export" action="#{org.jboss.seam.excel.excelExporter.export('investorSearchForm:investorAccountTable')}"/>
                    </h:form>




                    Is there any obvious reason why this won't work? I've tried all obvious combination's but to no avail..


                    Please help!!


                    Thanks


                    • 67. Re: Excel for Seam preview
                      nickarls

                      Have a look at the HTML source of the page, what is the id of the datatable? If it is OK then I have to look if there is anything extra with richfaces datatables...

                      • 68. Re: Excel for Seam preview
                        baz

                        I have tested it yesterday with a rich:dataTable and it works perfectly. The only difference is, i use a link:


                            <h:commandLink value="Export" action="#{org.jboss.seam.excel.excelExporter.export('form:taxonnameList')}"/>
                        



                        And some minor notes:


                        The list was generated with generate entitys (from jboss tools). So every content of a cell is rendered with pure el expression.


                        #{taxonname.taxonName}



                        This content does not make it into the excel file:-(


                        So i have to change it into


                        <h:outputText value="#{taxonname.taxonName}" />


                        This works. And there are other reasons why this (with outputText) is the better style (eq. international chars etc.) so this is more or less an issue with seamgen not seam-exel:-)


                         

                        • 69. Re: Excel for Seam preview
                          nickarls


                          I have tested it yesterday with a rich:dataTable and it works perfectly. The only difference is, i use a link:

                              <h:commandLink value="Export" action="#{org.jboss.seam.excel.excelExporter.export('form:taxonnameList')}"/>
                          




                          Actually, I've always used commandLink too, have to see if there is an issue with button execution (not that I can think of why).



                          The list was generated with generate entitys (from jboss tools). So every content of a cell is rendered with pure el expression.

                          #{taxonname.taxonName}



                          This content does not make it into the excel file:-(

                          So i have to change it into

                          <h:outputText value="#{taxonname.taxonName}" />


                          This works. And there are other reasons why this (with outputText) is the better style (eq. international chars etc.) so this is more or less an issue with seamgen not seam-exel:-)


                          Currently I'm looking for descendants of UIOutput, perhaps we can make it more generic by accepting pure EL expressions also.

                          • 70. Re: Excel for Seam preview
                            nickarls

                            BTW, there is an Excel module in JIRA nowadays so you can file a feature request ;-)

                            • 71. Re: Excel for Seam preview
                              clarkchrisp

                              Thanks heaps for the quick response, I did what you said and checked the generated html and sure enough the id of the table was different to what I thought it would be, sorry should of checked this before writing! However I know get this exception.



                              23:49:28,783 WARN  [JXLTemplates] Could not find cell template data, try 
                              23:49:29,346 ERROR [ContextualHttpServletRequest] ended request due to exception
                              java.lang.IllegalStateException: No active event context





                              I'm sure I've configured something wrong


                              Will have a play tomorrow.


                              Thanks again


                              Chris

                              • 72. Re: Excel for Seam preview

                                Code and xhtml please! :-)

                                • 73. Re: Excel for Seam preview
                                  nickarls

                                  ...and full stack trace (if there is any) and war/ear layout.


                                  The warning is dummy (I'll remove it when using the exporter)...

                                  • 74. Re: Excel for Seam preview
                                    clarkchrisp

                                    Ok I figured/guessed out what I had done wrong. I followed the instructions of how to set up a documentStore and one of the instructions was to edit the components.xml file so I did substituting excel for PDF. So I had this: -


                                    xmlns:excel="http://jboss.com/products/seam/excel"




                                    xsi:schemaLocation="....
                                    http://jboss.com/products/seam/excel http://jboss.com/products/seam/excel-2.1.xsd"




                                    <excel:documentStore useExtensions="true"/>



                                    However this seems like it's not required? I've removed it and sure enough it all appears to be working, hurray!


                                    Thanks


                                    Chris


                                    1 3 4 5 6 7 Previous Next