简体   繁体   English

WELD-001303范围类型javax.faces.flow.FlowScoped没有活动上下文

[英]WELD-001303 No active contexts for scope type javax.faces.flow.FlowScoped

I implement a faces flow for a registration process, but I get this error when I annotate the bean "CreateBn" with @FlowScoped, and when I use CDI: SessionScoped it works: 我为注册过程实现了一个人流,但是当我使用@FlowScoped注释bean“ CreateBn”时,以及当我使用CDI:SessionScoped时,都会出现此错误:

2014-09-01T10:47:58.010+0000|Avertissement: JSF1063 : AVERTISSEMENT ! D�finition d�une valeur 
d�attribut non-s�rialisable dans HttpSession (cl� : 0d4116bdc7f306730f3ea26b84ab:0_flowStack, classe de la valeur : com.sun.faces.flow.FlowHandlerImpl$FlowDeque).
2014-09-01T10:47:58.013+0000|Grave: Error Rendering View[/inscription/inscription.xhtml]
javax.el.ELException: /inscription/inscription.xhtml @12,60 value="#{createBn.user.email}": org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.faces.flow.FlowScoped
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)

and here is the bean: 这是豆子:

@Named
@FlowScoped("inscription")
public class CreateBn implements Serializable{

private static final long serialVersionUID = 1L;

private static final String INSCRIPTION_RETURN = "inscription_return";  

private User user;
...

and I'm sure that there is no file naming error: flow folder, xxx-flow.xml, xxx-return.xhtml. 并且我确定没有文件命名错误:流文件夹,xxx-flow.xml,xxx-return.xhtml。 Help please 请帮助

I'm not sure but it might be fixed by editing your xml config file and place there a code like: 我不确定,但是可以通过编辑xml配置文件并在其中放置以下代码来解决该问题:

<faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
              http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">

    <flow-definition id="inscription">
    </flow-definition>
</faces-config>

if that not helps, check if you are not context.xml in your WEB-INF folder with content 如果那没有帮助,请检查您的WEB-INF文件夹中是否不是context.xml内容

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/PROJEST_NAME"/>

I had similar problem but doing one of them or both (i dont rememeber) i had problem solved. 我遇到了类似的问题,但同时解决了其中一个问题或两者兼有(我不记得)。

If that was any help (or not), please give a note with was it. 如果有什么帮助(或没有帮助),请附带注释。 I'm trying to learn flows myself and found few obstacles (this was one of them). 我正在尝试自己学习流量,发现很少的障碍(这就是其中之一)。

Was getting this when i had a graphicImage viewer or documentViewer that binds to a value in a view scoped bean. 当我有一个绑定到视图作用域bean中的值的graphicImage Viewer或documentViewer时,此问题得到了解决。 So I moved the value/contact of what needs to be on the graphicImage viewer and documentViewer to a new managed bean which is session scoped and set cached to false on the graphicviewer. 因此,我将图形图像查看器和documentViewer上需要的值/联系移动到了一个新的托管bean,该bean的作用域是会话范围,并在graphicviewer上设置为false。 I know it's just a work around but it works pretty well. 我知道这只是一个解决方法,但是效果很好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 EAR文件中打包了带有JSF流的WELD-001303-WELD-001303:作用域类型javax.faces.flow.FlowScoped没有活动上下文 - WELD-001303 with JSF Flows Packaged in EAR File - WELD-001303: No active contexts for scope type javax.faces.flow.FlowScoped WELD-001303:范围类型javax.faces.flow.FlowScoped没有活动上下文 - WELD-001303: No active contexts for scope type javax.faces.flow.FlowScoped WELD-001303在直接访问时没有作用域类型javax.faces.flow.FlowScope的活动上下文 - WELD-001303 No active contexts for scope type javax.faces.flow.FlowScoped on direct access WELD-001303范围类型javax.faces.view.ViewScoped没有活动的上下文 - WELD-001303 No active contexts for scope type javax.faces.view.ViewScoped Wildflt 13 WELD-001304:scope 类型 javax.enterprise.context.SessionScoped 的多个上下文处于活动状态 - Wildflt 13 WELD-001304: More than one context active for scope type javax.enterprise.context.SessionScoped WELD-001437:普通范围的bean类javax.faces.component.UIViewRoot是不可代理的,因为类型是final或包含final方法 - WELD-001437: Normal scoped bean class javax.faces.component.UIViewRoot is not proxyable because the type is final or it contains a final method EJB服务中的作用域没有活动上下文 - No active contexts for scope in EJB service 无法获取com.sun.faces.flow.FlowDiscoveryCDIExtension。 使用javax.faces.flow.builder.FlowDefinition描述的流不可用 - Unable to obtain com.sun.faces.flow.FlowDiscoveryCDIExtension. Flows described with javax.faces.flow.builder.FlowDefinition are unavailable Javax Faces的搜索解决方案 - Search Solution for javax faces 查看范围:java.io.NotSerializableException:javax.faces.component.html.HtmlInputText - View scope: java.io.NotSerializableException: javax.faces.component.html.HtmlInputText
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM