[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1902) Cannot use Seam EntitySecurityListener and MDBs
by Mike Pettypiece (JIRA)
Cannot use Seam EntitySecurityListener and MDBs
-----------------------------------------------
Key: JBSEAM-1902
URL: http://jira.jboss.com/jira/browse/JBSEAM-1902
Project: JBoss Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.0.0.BETA1
Reporter: Mike Pettypiece
After turning on Seam's EntitySecurityListener, the follow exception occurs when working with a @Restrict-annotated entity from a MDB.
java.lang.IllegalStateException: No active session context
at org.jboss.seam.security.Identity.instance(Identity.java:157)
at org.jboss.seam.security.EntitySecurityListener.postLoad(EntitySecurityListener.java:26)
...
There obviously isn't a session context in this case.
Seam probably shouldn't check security permissions when there is no active session context. As well it would be useful to be able to programatically turn off security on a per-Identity basis. Please see the referenced Forum link for more details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-808) StatckOverflowError if factory specifies it's component
by John Ray (JIRA)
StatckOverflowError if factory specifies it's component
-------------------------------------------------------
Key: JBSEAM-808
URL: http://jira.jboss.com/jira/browse/JBSEAM-808
Project: JBoss Seam
Issue Type: Bug
Environment: Latest from CVS
Reporter: John Ray
I accidently specified the name of my component instead of a context variable and this resulted in a StatckOverflowError. For example
@Stateful
@Name("foo")
@Scope(ScopeType.EVENT)
public class FooAction implements Foo {
@Out("bar")
private String bar;
@Factory("foo")
public void initBar() {
...
}
}
I'd sugest changing the code in org.jboss.seam.Component at line 490 to include an if/throw. I highlighted the 2 new lines with an asterisk
if ( method.isAnnotationPresent(org.jboss.seam.annotations.Factory.class) )
{
Init init = (Init) applicationContext.get( Seam.getComponentName(Init.class) ); //can't use Init.instance() here 'cos of unit tests
String contextVariable = toName( method.getAnnotation(org.jboss.seam.annotations.Factory.class).value(), method );
* if (contextVariable.equals(name))
* throw new IllegalStateException("@Factory method can not be for it's own component: " + name);
init.addFactoryMethod(contextVariable, method, this);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1770) Infinite loop when in some pages.xml configuration
by Richard Leherpeur (JIRA)
Infinite loop when in some pages.xml configuration
--------------------------------------------------
Key: JBSEAM-1770
URL: http://jira.jboss.com/jira/browse/JBSEAM-1770
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.BETA1
Environment: windows XP, RHEL 5.0
Reporter: Richard Leherpeur
You can download this example on the Seam web site: navigation.zip
I have the following classes:
Code:
@Name("user")
@Scope(ScopeType.CONVERSATION)
public class User implements Serializable {
private String pet;
public String getPet() {
return pet;
}
public void setPet(String pet) {
this.pet = pet;
}
}
Code:
@Name("navigation")
@Scope(ScopeType.CONVERSATION)
public class Navigation implements Serializable {
@In(required=true)
User user;
@Logger
private Log log;
public String animalOutcome(){
if (user == null){
return "Dog"; // Just to make sure we don't return null
}
log.info("********* Outcome: " + user.getPet());
return user.getPet();
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
}
Code:
@Name("animals")
public class AnimalList
{
private List<String> animals;
@Unwrap
public List<String> unwrap()
{
if (animals == null)
{
animals = new ArrayList<String>();
animals.add("Dog");
animals.add("Cat");
animals.add("Goldfish");
animals.add("Rabbit");
animals.add("Snake");
animals.add("Parrot");
}
return animals;
}
}
Pages.xhtml is defined as followed:
Code:
<pages xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
<page view-id="/pageOne.xhtml">
<begin-conversation join="true" pageflow="navigation" />
</page>
<page view-id="/animalPage.xhtml" action="#{navigation.animalOutcome}">
<navigation>
<rule if-outcome="Dog">
<redirect view-id="/animal/dog.xhtml"/>
</rule>
<rule if-outcome="Cat">
<redirect view-id="/animal/cat.xhtml"/>
</rule>
<rule if-outcome="Goldfish">
<redirect view-id="/animal/goldfish.xhtml"/>
</rule>
<rule if-outcome="Rabbit">
<redirect view-id="/animal/rabbit.xhtml"/>
</rule>
<rule if-outcome="Snake">
<redirect view-id="/animal/snake.xhtml"/>
</rule>
<rule if-outcome="Parrot">
<redirect view-id="/animal/parrot.xhtml"/>
</rule>
</navigation>
</page>
</pages>
The pageflow is defined as:
Code:
<pageflow-definition
xmlns="http://jboss.com/products/seam/pageflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
name="navigation">
<start-page name="displayChoice" view-id="/pageOne.xhtml">
<redirect/>
<transition name="next" to="animalPage" />
</start-page>
<page name="animalPage" view-id="/animalPage.xhtml">
<end-conversation/>
<redirect/>
</page>
</pageflow-definition>
And finally the pageOne.xhtml:
Code:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test Navigation</title>
</head>
<body>
<div id="container">
<h3>Choose an animal</h3>
<h:form>
<h:selectOneMenu value="#{user.pet}">
<s:selectItems value="#{animals}" var="animal" label="#{animal}" noSelectionLabel="Select your pet"/>
</h:selectOneMenu>
<h:commandButton value="Go To Pet Page" action="next" />
</h:form>
</div>
</body>
</html>
When I select an animal, I get the following stacktrace:
Code:
INFO: Added Library from: jar:file:/C:/Jboss/jboss-4.2.0.GA/server/default/tmp/d
eploy/tmp50163navigation.ear-contents/navigation-exp.war/WEB-INF/lib/jsf-facelet
s.jar!/META-INF/jstl-core.taglib.xml
13:23:07,046 INFO [Navigation] ********* Outcome: Cat
13:23:07,218 INFO [Navigation] ********* Outcome: Cat
13:23:07,281 INFO [Navigation] ********* Outcome: Cat
13:23:07,359 INFO [Navigation] ********* Outcome: Cat
13:23:07,437 INFO [Navigation] ********* Outcome: Cat
13:23:07,515 INFO [Navigation] ********* Outcome: Cat
13:23:07,609 INFO [Navigation] ********* Outcome: Cat
13:23:07,687 INFO [Navigation] ********* Outcome: Cat
13:23:07,781 INFO [Navigation] ********* Outcome: Cat
13:23:07,859 INFO [Navigation] ********* Outcome: Cat
1:
Code:
<page view-id="/animalPage.xhtml">
<navigation evaluate="#{navigation.outcome}">
...
where #{navigation.outcome} returns outcome
-> redirection to /animalPage.xhtml (which doesn't exist) because evaluate EL expression is never called
2:
Code:
<page view-id="/animalPage.xhtml" action="#{navigation.animalOutcome}">
<navigation evaluate="#{navigation.outcome}">
...
where #{navigation.animalOutcome} returns void and #{navigation.outcome} returns outcome
-> We enter a loop where action expression is called then evaluate expression is called, etc....
3:
Code:
<page view-id="/animalPage.xhtml" action="#{navigation.animalOutcome}">
<navigation from-action="#{navigation.animalOutcome}">
...
where #{navigation.animalOutcome} returns outcome
-> We enter a loop where action expression is called indefinitely
4:
Code:
<page view-id="/animalPage.xhtml" action="#{navigation.animalOutcome}">
<navigation>
...
where #{navigation.animalOutcome} returns outcome
-> We enter a loop where action expression is called indefinitely
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1747) SeamPhaseListener transaction debug log statements are misleading/confusing
by Matt Drees (JIRA)
SeamPhaseListener transaction debug log statements are misleading/confusing
---------------------------------------------------------------------------
Key: JBSEAM-1747
URL: http://jira.jboss.com/jira/browse/JBSEAM-1747
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.BETA1
Environment: 20070727.1142
Reporter: Matt Drees
Priority: Trivial
Debug logs from SeamPhaseListener look something like this on a non-faces request:
DEBUG 31-07 11:34:31,467 (org.jboss.seam.jsf.SeamPhaseListener:begin:573) beginning transaction prior to phase: RESTORE_VIEW 1
DEBUG 31-07 11:34:31,560 (org.jboss.seam.jsf.SeamPhaseListener:commitOrRollback:589) committing transaction after phase: RESTORE_VIEW 1
DEBUG 31-07 11:34:31,560 (org.jboss.seam.jsf.SeamPhaseListener:begin:573) beginning transaction prior to phase: RENDER_RESPONSE 6
DEBUG 31-07 11:34:31,576 (org.jboss.seam.jsf.SeamPhaseListener:commitOrRollback:589) committing transaction after phase: INVOKE_APPLICATION 5
DEBUG 31-07 11:34:31,592 (org.jboss.seam.jsf.SeamPhaseListener:begin:573) beginning transaction prior to phase: INVOKE_APPLICATION 5
DEBUG 31-07 11:34:33,731 (org.jboss.seam.jsf.SeamPhaseListener:commitOrRollback:589) committing transaction after phase: RENDER_RESPONSE 6
It's misleading. For one thing, there is no "INVOKE_APPLICATION" phase; but that phaseid is used for logging before and after page actions. For another, the "before" and "after" statements are backwards (semantically).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1832) Use of <a:support> tag breaks conversation in Seam-gen (and elsewhere)
by Vincent Latombe (JIRA)
Use of <a:support> tag breaks conversation in Seam-gen (and elsewhere)
----------------------------------------------------------------------
Key: JBSEAM-1832
URL: http://jira.jboss.com/jira/browse/JBSEAM-1832
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 2.0.0.BETA1
Environment: Jboss 4.2.0.GA
Reporter: Vincent Latombe
I've seen the problem from BETA1 to HEAD
To reproduce the bug, try the following :
Create some seam-gen based project and generate-entities.
Go to an edit page, fill some data, and click on the submit button, without clicking elsewhere (the focus must be on an edited field just before submit). Instead of validation error, or adding the new data, you should get the "The conversation ended, timed out or was processing another request" message. It seems that the validation triggered by the onblur event messes up with the validation.
I have also seen the bug occuring while I was switching from one field to another quite fast (fast enough to have many validation on queue in ajax4jsf). It seems that adding <s:conversationId/> to the a:support solves this part.
Here is the snippet I currently use
<a:support event="onblur" bypassUpdates="true" reRender="cityCodeDecoration">
<s:conversationId/>
</a:support>
I tried to upgrade ajax4jsf + richfaces 3.0.1 to richfaces 3.1.0 rc2, but it didn't change anything.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1183) Allow custom ExceptionHandler implementations to be inserted
by Mike Quilleash (JIRA)
Allow custom ExceptionHandler implementations to be inserted
------------------------------------------------------------
Key: JBSEAM-1183
URL: http://jira.jboss.com/jira/browse/JBSEAM-1183
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 1.1.6.GA
Environment: Any
Reporter: Mike Quilleash
Currently you can only configure a small subset of actions to occur on an exception (redirect, http-error etc). Enhancing the exception configuration xml to allow pluggable ExceptionHandler implementations would make this a lot more flexible.
e.g. pages.xml
<pages>
<!-- the current way, exception class + action -->
<exception class="javax.persistence.EntityNotFoundException">
<http-error error-code="404"/>
</exception>
<!-- proposed enhancement -->
<exception handlerClass="com.xxx.seam.CustomExceptionHandler"/>
</pages>
These should probably have higher precedence than standard configure-by-exception-class handlers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months