Custom error-page(401) causes “Must call associate() before calling activate()”
up vote
0
down vote
favorite
I'm developing javaee aplication with JSF/Primefaces.
I needed to secure my application. I did that with:
<security-constraint>
<web-resource-collection>
<web-resource-name>APP</web-resource-name>
<url-pattern>*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>MYROLE desc</description>
<role-name>MYROLEAccess</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
However when I defined a custom error-page for error 401
<error-page>
<error-code>401</error-code>
<location>/error/401.xhtml</location>
</error-page>
I got:
Problem occurred while serving the error page.
java.lang.IllegalStateException: Must call associate() before calling activate()
at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:196)
at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:108)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:85)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
Truncated. see log file for complete stacktrace
`
and the browser presents HTTP ERROR 500.
I'm using weblogic 12.1.3 and java 7.
I tried with weblogic 12.2.x and java 8 and it works.
What's wrong here?
Can you help me? If I don't map the error it asks for the credentials, otherwise it goes imediately into Error-500.
java security web.xml weblogic12c custom-error-pages
add a comment |
up vote
0
down vote
favorite
I'm developing javaee aplication with JSF/Primefaces.
I needed to secure my application. I did that with:
<security-constraint>
<web-resource-collection>
<web-resource-name>APP</web-resource-name>
<url-pattern>*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>MYROLE desc</description>
<role-name>MYROLEAccess</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
However when I defined a custom error-page for error 401
<error-page>
<error-code>401</error-code>
<location>/error/401.xhtml</location>
</error-page>
I got:
Problem occurred while serving the error page.
java.lang.IllegalStateException: Must call associate() before calling activate()
at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:196)
at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:108)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:85)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
Truncated. see log file for complete stacktrace
`
and the browser presents HTTP ERROR 500.
I'm using weblogic 12.1.3 and java 7.
I tried with weblogic 12.2.x and java 8 and it works.
What's wrong here?
Can you help me? If I don't map the error it asks for the credentials, otherwise it goes imediately into Error-500.
java security web.xml weblogic12c custom-error-pages
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm developing javaee aplication with JSF/Primefaces.
I needed to secure my application. I did that with:
<security-constraint>
<web-resource-collection>
<web-resource-name>APP</web-resource-name>
<url-pattern>*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>MYROLE desc</description>
<role-name>MYROLEAccess</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
However when I defined a custom error-page for error 401
<error-page>
<error-code>401</error-code>
<location>/error/401.xhtml</location>
</error-page>
I got:
Problem occurred while serving the error page.
java.lang.IllegalStateException: Must call associate() before calling activate()
at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:196)
at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:108)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:85)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
Truncated. see log file for complete stacktrace
`
and the browser presents HTTP ERROR 500.
I'm using weblogic 12.1.3 and java 7.
I tried with weblogic 12.2.x and java 8 and it works.
What's wrong here?
Can you help me? If I don't map the error it asks for the credentials, otherwise it goes imediately into Error-500.
java security web.xml weblogic12c custom-error-pages
I'm developing javaee aplication with JSF/Primefaces.
I needed to secure my application. I did that with:
<security-constraint>
<web-resource-collection>
<web-resource-name>APP</web-resource-name>
<url-pattern>*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>MYROLE desc</description>
<role-name>MYROLEAccess</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
However when I defined a custom error-page for error 401
<error-page>
<error-code>401</error-code>
<location>/error/401.xhtml</location>
</error-page>
I got:
Problem occurred while serving the error page.
java.lang.IllegalStateException: Must call associate() before calling activate()
at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:196)
at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:108)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:85)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
Truncated. see log file for complete stacktrace
`
and the browser presents HTTP ERROR 500.
I'm using weblogic 12.1.3 and java 7.
I tried with weblogic 12.2.x and java 8 and it works.
What's wrong here?
Can you help me? If I don't map the error it asks for the credentials, otherwise it goes imediately into Error-500.
java security web.xml weblogic12c custom-error-pages
java security web.xml weblogic12c custom-error-pages
asked Nov 8 at 16:46
rui
63
63
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53212391%2fcustom-error-page401-causes-must-call-associate-before-calling-activate%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown