-
1. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
sergeysmirnov Jun 5, 2008 8:36 PM (in response to igor_d)1. JSF 1.2 spec instead of JSF 1.1 spec requires to throw an exception if the session could not be restored. That is way you have no exception is 3.1.4, but have in 3.2.1. Missing exception does not mean missing problems in general.
2. something wrong with page or two versions of the same lib work simultaneously.
However, the info you provided is not enough to make a accurate suggestion. -
2. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
igor_d Jun 6, 2008 3:33 AM (in response to igor_d)Ok, so for the 1) we can catch the exception and redirect to the login page, or should we wait for 3.2.2 release?
2) here is an example:
web-app has 1 xhtml:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://test/test" xmlns:rich="http://richfaces.org/rich"> <body> <a4j:form> <a4j:outputPanel ajaxRendered="true"> <h:messages errorClass="error" warnClass="warning" infoClass="info"/> </a4j:outputPanel> <a4j:outputPanel layout="block" id="thePage"> <table> <a4j:repeat value="#{testController.beans}" var="bean"> <tr> <td> <t:helpImage/> </td> </tr> </a4j:repeat> </table> </a4j:outputPanel> <ui:include src="modalPanel.xhtml" /> </a4j:form> </body> </html>
as you see it has a custom tag <t:helpImage/>. If this tag is located in the same web-app - it works ok, but if in the separate jar file (tag-library.jar), then I got:
17:25:14,223 ERROR [STDERR] 6/06/2008 17:25:14 com.sun.facelets.impl.DefaultFacelet refresh
INFO: Facelet[/file:/C:/LocalDev/jboss-4.2.2.GA/server/default/tmp/deploy/tmp21909test-taglib-webapp-1.0.0-exp.war/WEB-INF/lib/test-taglib-1.0.0.jar!/tags/helpImage.xhtml] was modified @ 17:25:14, flushing component applied @ 17:25:10
helpImage.xhtml:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:rich="http://richfaces.org/rich"> <body> <ui:composition> <a4j:region> <a4j:commandButton rendered="${bean.helpText ne null}" ajaxSingle="true" limitToList="true" status="helpstatus" reRender="helpOut" onclick="Richfaces.showModalPanel('helpModalPanel');" alt="Help" name="Help" width="21" height="21" border="0" image="button_q_mark_small.jpg"> <a4j:actionparam name="help" value="#{bean.helpCode}" assignTo="#{testController.beanCode}" /> </a4j:commandButton> <br/> </a4j:region> </ui:composition> </body> </html>
test.taglib.xml:<?xml version="1.0"?> <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd"> <facelet-taglib> <namespace>http://test/test</namespace> <tag> <tag-name>helpImage</tag-name> <source>/tags/helpImage.xhtml</source> </tag> </facelet-taglib>
-
3. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
igor_d Jun 6, 2008 3:40 AM (in response to igor_d)As I said I have 1 web ap and 1 taglib jar file. here are their poms:
test.taglib.jar pom.xml:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <version>1.0.0</version> <groupId>test</groupId> <artifactId>test-taglib</artifactId> <packaging>jar</packaging> <name>Test Tag Library</name> <url>http://maven.apache.org</url> <description>Facelets tag library</description> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>1.2_03</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> <version>1.1.14</version> </dependency> <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.7.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <eclipse.useProjectReferences> true </eclipse.useProjectReferences> </configuration> </plugin> </plugins> </build> </project>
web-app pom.xml:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <version>1.0.0</version> <groupId>test</groupId> <artifactId>test-taglib-webapp</artifactId> <packaging>war</packaging> <name>Questionnaire Taglib Sample Webapp</name> <url>http://maven.apache.org</url> <description>Demonstration application for Test tags</description> <dependencies> <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.7.0</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>commons-digester</groupId> <artifactId>commons-digester</artifactId> <version>1.6</version> </dependency> <dependency> <groupId>commons-el</groupId> <artifactId>commons-el</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>org.richfaces.ui</groupId> <artifactId>richfaces-ui</artifactId> <version>3.2.1-GA</version> </dependency> <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-api</artifactId> <version>3.2.1-GA</version> </dependency> <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-impl</artifactId> <version>3.2.1-GA</version> </dependency> <dependency> <groupId>opensymphony</groupId> <artifactId>oscache</artifactId> <version>2.3.2</version> </dependency> <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> <version>1.1.14</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>1.2_03</version> <scope>provided</scope> </dependency> <dependency> <groupId>test</groupId> <artifactId>test-taglib</artifactId> <version>${version}</version> </dependency> <dependency> <groupId>jboss.drools</groupId> <artifactId>drools-compiler</artifactId> <version>4.0.3</version> </dependency> <dependency> <groupId>jboss.drools</groupId> <artifactId>drools-core</artifactId> <version>4.0.3</version> </dependency> <dependency> <groupId>antlr</groupId> <artifactId>antlr-runtime</artifactId> <version>3.0</version> </dependency> <dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.el</groupId> <artifactId>el-ri</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-pdf</artifactId> <version>2.0.1.GA</version> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam</artifactId> <version>2.0.1.GA</version> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-ui</artifactId> <version>2.0.1.GA</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.1</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.1</version> <scope>test</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <wtpversion>1.5</wtpversion> <wtpContextName>test</wtpContextName> <eclipse.useProjectReferences>true</eclipse.useProjectReferences> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <eclipse.useProjectReferences> true </eclipse.useProjectReferences> </configuration> </plugin> </plugins> </build> </project>
-
4. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
igor_d Jun 6, 2008 3:42 AM (in response to igor_d)and one last file modalPanel.xhtml:
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <style> .dr-mpnl-pnl-b { padding: 0px; } .pnl-body { height:255px; overflow:auto; } </style> <!-- Help ModalPanel --> <a4j:region> <rich:modalPanel id="helpModalPanel" resizeable="false" height="300" width="600" onhide="updateHelpCode('')"> <f:facet name="header"> <h:outputText value="Help" /> </f:facet> <f:facet name="controls"> <h:graphicImage value="close.jpg" alt="Close" style="cursor:pointer" onclick="Richfaces.hideModalPanel('helpModalPanel')" /> </f:facet> <rich:panel bodyClass="pnl-body"> <a4j:status id="helpstatus" forceid="true" startText="Please wait..."/><br/> <h:outputText id="helpOut" value="${bean.helpText}" escape="false"/> </rich:panel> </rich:modalPanel> <a4j:jsFunction name="updateHelpCode" reRender="helpOut"> <a4j:actionparam name="param1" assignTo="${testController.beanCode}" /> </a4j:jsFunction> </a4j:region> </ui:composition>
Thank you very much and sorry for the long explanations.
Igor -
5. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
igor_d Jun 6, 2008 3:46 AM (in response to igor_d)Sorry, also java beans:
TestBean.java:public class TestBean { private int helpCode; public TestBean(int helpCode) { this.helpCode = helpCode; } public int getHelpCode() { return helpCode; } public void setHelpCode(int helpCode) { this.helpCode = helpCode; } public String getHelpText() { if (helpCode == 1) { return "First help"; } return "Some other help"; } }
TestController.javaimport java.util.ArrayList; import java.util.List; public class TestController { private List<TestBean> beans; private int beanCode; public int getBeanCode() { return beanCode; } public void setBeanCode(int beanCode) { this.beanCode = beanCode; } public List<TestBean> getBeans() { return beans; } public TestController() { beans = new ArrayList<TestBean>(); beans.add(new TestBean(1)); beans.add(new TestBean(2)); beans.add(new TestBean(3)); } }
and, of course their references in faces-config.xml -
6. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
nbelaevski Jun 6, 2008 12:12 PM (in response to igor_d)Igor,
Could you please your add web.xml here?
Or maybe it is possible to get example war file demonstrating the issue? That will significantly shorten time required for investigation. You can send the file to
nbelaevski at exadel dot com . -
7. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
igor_d Jun 9, 2008 10:33 PM (in response to igor_d)Hi Nick,
I've sent an email with the war file attached. Please send your comments here.
thanks,
Igor -
8. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
nbelaevski Jun 11, 2008 2:26 PM (in response to igor_d)Igor,
Thank you for the example application! I've created JIRA case for the problem: http://jira.jboss.com/jira/browse/RF-3685 -
9. Re: problems with migration from 3.1.4.GA to 3.2.1.GA
abelevich Jun 30, 2008 2:54 PM (in response to igor_d)Hi Igor,
Error in server log because of facelets bug https://facelets.dev.java.net/issues/show_bug.cgi?id=286, our bug in the response body has been fixed. Thanks :)