[JBoss Seam] - Document Store Servlet error (Seam PDF)
by mgrouch
I'm trying to use Document Store Servlet for PDF (per documentation)
when I enable
anonymous wrote :
|
| <filter-name>Seam Servlet Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
|
|
| <filter-mapping>
| <filter-name>Seam Servlet Filter</filter-name>
| <url-pattern>*.pdf</url-pattern>
| </filter-mapping>
|
I start getting this exception
anonymous wrote :
| javax.servlet.ServletException: java.lang.IllegalStateException: No active event context
| at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:67)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:59)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:126)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| 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)
| Caused by: java.lang.IllegalStateException: No active event context
| at org.jboss.seam.core.Manager.instance(Manager.java:265)
| at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:60)
| ... 36 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053285#4053285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053285
18Â years, 10Â months
[JBoss Seam] - Re: howto display the an enum object internationalized
by Smurfs
This is an example of an approach I have used for drop-down lists. Each constant is instantiated with the key defined in the messages properties file:
| public enum Salutation {
|
| MR("salutation-mr-label"),
| MRS("salutation-mrs-label"),
| MS("salutation-ms-label");
|
| private String labelKey;
|
| Salutation(String labelKey) {
| this.labelKey = labelKey;
| }
|
| public String getLabelKey() {
| return labelKey;
| }
| }
|
Need to create a factory to return array of enum values to view
| @Name("factories")
| public class Factories {
|
| @org.jboss.seam.annotations.Factory("salutationTypes")
| public Salutation[] getSalutationTypes() {
| return Salutation.values();
| }
| }
|
| <f:selectOneMenu id="salutations" value="#{backingBean.salutation}">
| <s:selectItems value="#{salutationTypes}" var="salutation" label="#{messages[salutation.labelKey]}"/>
| <s:convertEnum />
| </f:selectOneMenu>
|
I appreciate this doesn't answer your query directly but it may give you a few clues.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053282#4053282
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053282
18Â years, 10Â months
[JBoss Seam] - Re: Session context variable missing
by gmarcus
Thank you so much for your reply Peter.
Specifically helpful is the netiquette on posting.
>From now on, I will just include the important stuff.
I am still trying to wrap my head around bi-jection and scopes.
anonymous wrote :
| Also, you would probably have more luck if you actually outjected to the SESSION scope, rather than the CONVERSATION scope (by default you it outjects to the scope of it's parent).
|
Is it true that during injection, SEAM will lookup a named component in all scopes based on the well known precedence (STATELESS, EVENT, PAGE, ...)?
I thought that by default, SEAM will outject to the same scope that it injected from.
My thinking was that for every function call on my SFSB, SEAM would inject currentCategory from the SESSION,
let it be changed by the SFSB and outject it back to the SESSION.
I want whatever Category the user selects to be reflected in the session.
How about this approach?
| ...
| @DataModel
| private List<Category> categories;
|
| @DataModelSelection
| private Category selectedCategory;
|
| ...
|
| @Create
| public String init()
| {
| if (currentCategory == null)
| {
| currentCategory = (Category) em.createNamedQuery("Category.findRoot").getSingleResult();
| }
| return "success";
| }
|
| ...
|
| public void select()
| {
| currentCategory = selectedCategory;
| return;
| }
|
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053276#4053276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053276
18Â years, 10Â months
[EJB 3.0] - Cluster Stateful EJB 3.0 problems
by viniciuscarvalho
Hello there! I'm trying to get a SFSB in a jboss 4.2.0 cluster. It's a simple example. A bean that increments a value. My bean's interface and implementation:
| @Remote
| public interface Contador {
|
| public abstract int increase();
|
| public abstract int decrease();
|
| }
|
| @Stateful
| public class ContadorBean implements Contador {
| private int count;
|
| public int increase(){
| count++;
| System.out.println("Contador no valor: " + count);
| return count;
| }
|
| public int decrease(){
| count--;
| System.out.println("Contador no valor: " + count);
| return count;
| }
|
| @Remove
| public void destroy(){
|
| }
| }
|
| jndi properties for the client:
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=jnp://192.168.0.169:1100
|
| jboss.xml:
| <jboss>
| <enterprise-beans>
| <session>
| <ejb-name>ContadorBean</ejb-name>
| <clustered>True</clustered>
| </session>
| </enterprise-beans>
| </jboss>
|
|
Well, I startup 2 instances, deploy the package on the farm directory. and start the client. Things are just ok :)
So I decide to shutdown one of the nodes...
and I get this exception:
| Exception in thread "main" java.lang.RuntimeException: cluster invocation failed, last exception was:
| at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:166)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulClusteredProxy.invoke(StatefulClusteredProxy.java:108)
| at $Proxy2.increase(Unknown Source)
| at x.x.x.jboss.client.ContadorClient.execute(ContadorClient.java:27)
| at x.x.x.jboss.client.ContadorClient.main(ContadorClient.java:16)
| Caused by: org.jboss.aop.NotFoundInDispatcherException: Object with oid: jboss.j2ee:jar=increment.jar,name=ContadorBean,service=EJB3 was not found in the Dispatcher
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:85)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
| at org.jboss.remoting.Client.invoke(Client.java:1550)
| at org.jboss.remoting.Client.invoke(Client.java:530)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:77)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulClusteredProxy.invoke(StatefulClusteredProxy.java:108)
| at $Proxy2.increase(Unknown Source)
| at x.x.x.jboss.client.ContadorClient.execute(ContadorClient.java:27)
| at x.x.x.jboss.client.ContadorClient.main(ContadorClient.java:16)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:77)
| ... 11 more
|
|
Am I missing something here?
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053275#4053275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053275
18Â years, 10Â months