gpt4 book ai didi

java - Glassfish v3 的表单例份验证异常

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:28:14 24 4
gpt4 key购买 nike

我在很多地方看到过这个问题,但似乎没有解决方案。因此,我在这里试试运气。我正在使用带有 Java EE 6 框架的 Glassfish 3.0.1 b.22。
这是我在 Login.jsf

中的表单例份验证
    <form action="j_security_check">
<h:panelGrid columns="2" bgcolor="#eff5fa" cellspacing="5" frame="box" styleClass="center">
<h:outputLabel value="User ID:"/>
<h:inputText id="j_username" tabindex="1" />
<h:outputLabel value="Password:"/>
<h:inputSecret id="j_password"/>
<h:outputLabel value=""/>
<h:commandButton id="login" value="Login"/>
</h:panelGrid>
</form>

每次到达此页面时,我都会遇到此异常。该程序仍然可以正常运行,但是遇到这个问题很烦人。

Session event listener threw exception org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:679)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:138)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:100)
at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
at org.jboss.weld.servlet.HttpSessionManager_$$_javassist_341.setSession(HttpSessionManager_$$_javassist_341.java)
at org.jboss.weld.servlet.ServletLifecycle.restoreSessionContext(ServletLifecycle.java:148)
at org.jboss.weld.servlet.ServletLifecycle.beginSession(ServletLifecycle.java:71)
at org.jboss.weld.servlet.WeldListener.sessionCreated(WeldListener.java:126)
at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:411)
at org.apache.catalina.session.StandardSession.setId(StandardSession.java:391)
at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:803)
at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:326)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2868)
at org.apache.catalina.connector.Request.getSession(Request.java:2566)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:919)
at org.apache.catalina.authenticator.AuthenticatorBase.getSession(AuthenticatorBase.java:859)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:233)
at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1187)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:619)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:615)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:637)

查看异常,GlassFish 的设计是否基于 JBossTomcat

最佳答案

Every time it get to this page, I got this exception. Now the program will work fine, but it annoys to have this problem

我没有这部分的答案。

Looking at the exception, does GlassFish base their design on JBoss and Tomcat?

GlassFish Web 容器是 Tomcat (Tomcat 5.5 IIRC) 的一个分支。而GlassFish使用的CDI实现是JBoss Weld(CDI的注册机)。

关于java - Glassfish v3 的表单例份验证异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3638023/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com