[JBoss Seam] - Seam + Ajax4Jsf == Exception?
by bkyrlach
I'm trying to get a simple example app that uses ajax4jsf and seam together, but I'm getting a rather odd exception. Here's my xhtml snippet...
<h:form>
<h:inputText value="#{schoolListBean.name}">
<a:support event="onkeyup" reRender="rep"/>
</h:inputText>
<a:outputPanel id="rep">
#{schoolListBean.name}
</a:outputPanel>
</h:form>
Here's the bean...
@Stateful
@Name("schoolListBean")
@Scope(ScopeType.SESSION)
@Interceptors(SeamInterceptor.class)
public class SchoolListBeanImpl implements SchoolListBean, Serializable
{
@PersistenceContext(unitName="schoolDatabase")
EntityManager em;
private String name;
public List getSchools()
{
return em.createNativeQuery("SELECT * FROM WEBFRONT.COLLEGE_SEARCH_ENTITY WHERE COLLEGE_NAME LIKE '?%'").setParameter(1, name).getResultList();
}
public void setName(String name)
{
System.out.println("Setting name: " + name);
this.name = name;
}
public String getName()
{
System.out.println("Getting name: " + this.name);
return this.name;
}
@Remove @Destroy
public void remove()
{
}
}
Everything works, but after every ajax request, the following is thrown to the console...
09:54:04,390 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
java.lang.IllegalStateException: No active application context
at org.jboss.seam.core.Pages.instance(Pages.java:298)
at org.jboss.seam.jsf.SeamStateManager.saveSerializedView(SeamStateManager.java:47)
at org.ajax4jsf.framework.ajax.AjaxStateManager.saveSerializedView(AjaxStateManager.java:83)
at org.ajax4jsf.framework.ajax.AjaxContext.saveViewState(AjaxContext.java:417)
at org.ajax4jsf.framework.renderer.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:103)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:390)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
I'm completly at a loss. Anyone have any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981305#3981305
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981305
19 years, 6 months
[Beginners Corner] - Logging question: how to do 'local' and 'global' logging tog
by marcus.klein
Hi,
I have a question regarding logging with log4j. I used the example repositoryselector.zip (http://wiki.jboss.org/wiki/Wiki.jsp?page=Logging) from the Wiki Knowledge Base to enable logging on a per-webapp basis, i.e. now I can use a log4j.xml file for each deployment I have. This works fine so far. The problem I have now is that all logging messages are written to the appenders I specified in those 'local' log4j.xml file. How would I be able to specify that only some logging messages are written to the 'local' logging-file while others are still written, say, to the server.log?
To make it a bit more precise, say, I have two classes A and B deployed as mydeployment application. Within the log4j.xml file below mydeployment I would like to specify that logging msgs from class A are written to a 'local' log-file (say classA.log), while logging messages from class B are written to the server.log. The example in repositoryselector.zip shows me only how to log either all msgs to server.log or to the 'local' specified log-file. Please note that the logging messages should appear only once, i.e. either in the server.log file xor in the 'local' log-file.
Thank you very much for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981304#3981304
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981304
19 years, 6 months
[JBoss Portal] - JBoss Portal vs. Tiles + Alfresco
by walbar
Hi,
We are evaluating portlets in general and JBoss Portal in particular. We need a CMS with good staging capabilities, and a flexible layout mechanism. All three are quite weak in JBoss Portal (version 2.6 is getting better on the last one). The other alternative is not to use portlets and go with Tiles + Alfresco. This would give us an advanced CMS and Staging facilities with a simple programming model. On the other hand this approach would lack the richness of programming using portlets.
Another constraint we have is the use of Maven and Continuous Integration, as we see neither portlets nor portals go well with this environment.
Would you give us some feedback on this?. Any opinion would be of great value.
Thanks in advance,
Waldemar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981296#3981296
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981296
19 years, 6 months
[JBoss Seam] - Re: Creating RSS feed ?
by lcoetzee
Strange how writing things down helps the mind :-)
I see in the blog example that the faces servlet is mapped to: <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>/seam/*</url-pattern>
| </servlet-mapping>
|
while I use: <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.jsf</url-pattern>
| </servlet-mapping>
and the important one
<context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
My rss file had an rss extension, with the above in mind the rss extension never got the Faces servlet involved. Renaming my file to have an xhtml extension solved the problem.
L
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981294#3981294
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981294
19 years, 6 months