[JBoss Seam] - hidden exception issue?
by gsegura
Hello, I'm having this problem with a scenario similar to seamspace registration. This exception is happening:
java.lang.IllegalStateException: begin method invoked from a long running conversation, try using @Begin(join=true)
it throws every time I request register.xhtml, it doesn't render since the first request to the page.
It happens even if I just request that page directly from a fresh browser (I mean, no previous navegation in the application was performed)
The problem disappears if I delete any reference to newMember object. To make it less confusing here is the actual code:
The SFSB:
@Stateful
| @Name("register")
| public class RegistroAction implements Register {
|
| @Logger Log log ;
|
| @In EntityManager entityManager ;
|
| @In(required = false)
| private User newUser ;
|
| @In
| private Identity identity;
|
| @Factory("newUser") @Begin
| public void start() {
| newUser = new User();
| }
|
| private String repassword;
|
| public String getRepassword() {
| return this.repassword;
| }
|
| public void setRepassword(String repassword) {
| this.repassword = repassword;
| }
| ...
|
The page:
<ui:define name="body">
| <h:messages globalOnly="true" styleClass="message" />
| <h:form>
| <s:validateAll>
| <div>Nombre: <h:inputText value="#{newUser.name}" required="true" /> </div>
| </s:validateAll>
| <div class="actionButtons">
| <h:commandButton value="Next" action="#{register.next}" />
| </div>
| </h:form>
| </ui:define>
Note that If I just remove #{newUser.name} the page is loaded properly
The entity bean declaration:
@Entity
| @Table(name = "user")
| @NamedQueries( {
| @NamedQuery(name = "User.findById", query = "SELECT p FROM User p WHERE p.id = :id"),
| @NamedQuery(name = "User.findByName", query = "SELECT p FROM User p WHERE p.name = :name"),
| @NamedQuery(name = "User.findByEmail", query = "SELECT p FROM User p WHERE p.email = :email"),
| @NamedQuery(name = "User.findByLoginAndPassword", query = "SELECT p FROM User p WHERE p.login = :login and p.password = :password")
| })
| public class User implements Serializable {
|
| @Id
| @GeneratedValue(strategy = GenerationType.AUTO)
| @Column(name = "id", nullable = false)
| private Integer id;
|
| @Column(name = "name", nullable = false)
| @NotNull
| @Length(max=150)
| private String name;
|
| @Column(name = "email", nullable = false)
| @NotNull
| @Email
| @Length(max=50)
| private String email;
|
| @Column(name = "login", nullable = false)
| @NotNull
| @Length(max=50)
| private String login;
|
| @Column(name = "password", nullable = false)
| @NotNull
| @Length(min=5,max=50)
| private String password;
|
| @OneToOne(cascade = CascadeType.ALL, mappedBy = "contact")
| private Club club ;
|
| @JoinColumn(name = "clientId", referencedColumnName = "id")
| @ManyToOne
| private Client client;
|
| @Version public int version ;
|
| public User() {
| }
|
| public User(Integer id) { this.id = id; }
|
| /** id */
| public Integer getId() { return this.id; }
|
| public void setId(Integer id) { this.id = id; }
|
| /** nombre */
| public String getNombre() { return this.name; }
|
| public void setNombre(String name) { this.name = name; }
|
| /** email */
| public String getEmail() { return this.email; }
|
| public void setEmail(String email) { this.email = email; }
|
| /** login */
| public String getLogin() { return this.login; }
|
| public void setLogin(String login) { this.login = login; }
|
| /** password */
| public String getPassword() { return this.password; }
|
| public void setPassword(String password) { this.password = password; }
|
| /** client */
| public Client getClient() { return this.client; }
|
| public void setClient(Client client) { this.client = client; }
|
| /** club */
| public Club getClub() { return club ; }
|
| public void setClub(Club club) { this.club = club ; }
|
| @Override
| public int hashCode() {
| int hash = 0;
| hash += (this.id != null ? this.id.hashCode() : 0);
| return hash;
| }
|
| @Override
| public boolean equals(Object object) {
| // TODO: Warning - this method won't work in the case the id fields are not set
| if (!(object instanceof User)) {
| return false;
| }
| User other = (User)object;
| if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) return false;
| return true;
| }
|
| @Override
| public String toString() {
| return getId() + ":" + getNombre() ;
| }
|
| }
finally an excerpt of stack trace:
GRAVE: Error Rendering View[/register.xhtml]
| javax.ejb.EJBException: java.lang.IllegalStateException: begin method invoked from a long running conversation, try using @Begin(join=true)
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy109.start(Unknown Source)
| at mx.test2.seam.Register$$FastClassByCGLIB$$4f33a91c.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
I can't see why the reference to #{newUser.name} is throwing this kind of exception.
I found this post
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87167 that seems similar but my EL expression is very simple.
If I assign values to the newUser properties in the start method (annotated @Factory) nothing changes so makes me think is the EL expression, but again, how so?
I deeply appreciate any help to trace where my error is.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016508#4016508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016508
19Â years, 2Â months
[JBoss Seam] - Re: problem with 1.1.6GA ? duplicate factory for: actor
by shasho
Searching the project for @Factory( "actor" ) yield nothing. It is worth mentioning that I use icefaces in my project
Here is my component.xml
| <!DOCTYPE components PUBLIC
| "-//JBoss/Seam Component Configuration DTD 1.1//EN"
| "http://jboss.com/products/seam/components-1.1.dtd">
|
| <components>
|
| <component name="org.jboss.seam.core.init">
| <property name="debug">true</property>
| <property name="jndiPattern">sellbuy/#{ejbName}/local</property>
| </component>
|
| <component name="org.jboss.seam.core.manager">
| <!-- half second wait for conversation lock on concurrent requests -->
| <property name="concurrentRequestTimeout">500</property>
| <!-- 120 second conversation timeout -->
| <property name="conversationTimeout">120000</property>
| <property name="conversationIdParameter">cid</property>
| <property name="conversationIsLongRunningParameter">clr</property>
| </component>
|
| <component name="org.jboss.seam.core.pages">
| <property name="noConversationViewId">/main.xhtml</property>
| </component>
|
| <component class="org.jboss.seam.core.Ejb"
| installed="false"/>
|
| </components>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016506#4016506
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016506
19Â years, 2Â months
[JBossCache] - Merge replication?
by supi
Hello,
We are currently considering using JBossCache in one of our projects. It should be able to do the following:
--
There are several producer nodes. Each node collects data that it keeps in memory. Producers read, update, write their own data. They don't need to know (and shouldn't) about other nodes and their data.
Then there are consumers. They need to see all data combined for processing and/or visualization. Lookups must be possible. Consumers must be able to sync immediately after connection loss or crash.
--
So what's the best way to go about this?
Is it possible to create one big cache and configure regions that are shared by a subset of members only?
Is it possible to set up several caches, one for each producer, which are merged into a single cache or something that looks and behaves like one on consumer nodes? Consumers shouldn't have to worry about multiple cache instances and about where to look for specific data.
What kind of communication overhead is to be expected if we were simply using one cache among all producer and consumer nodes? (10-20 producers, 2-5 consumers)
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016503#4016503
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016503
19Â years, 2Â months
[JBoss Portal] - Re: JBoss Portal 2.6 Alpha 2 Release
by swestbom
Warping the project to the tool. I know what you mean, it does force a format on your project layouts and a way of assembling. Like all leverage there is a price to be paid. But it usually is correct from a technical and practical point of view. Right now I am sorting out how to build JBoss Portal.
I have also used Jetspeed 2 (maven 1) and it was a breeze to set up and work on, it bootstrapped its dependencies, and the enforced layouts etc made it a snap to set up because I knew exactly what to expect. Maven 2 is a big improvement if the project is set up well and its dependencies are as well (when they are not they are squeaky wheels and get plenty of grease).
Besides you can always create your own project types (other than the standard war, ear, jar, pom etc.
If I can find some spare cycles I will try it on your project.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016501#4016501
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016501
19Â years, 2Â months