[jboss-user] [JBoss Seam] - Calling merge/persist even not called....

m.shinde do-not-reply at jboss.com
Thu May 17 09:39:24 EDT 2007


hi
I have manageOrders.xhtml file showing one list box of articles and my requirement is after selection of one article , my page should get populated with article information. So I have written code like 

  | xhtml code.....
  | <h:selectOneMenu value="#{article}" id="articleId" rendered="true" immediate="true">
  | <s:selectItems value="#{articles}" var="articleId"
  | label="#{articleId.name}" noSelectionLabel="[Please Select...]" />
  | <ec:convertEntity 
  | entityClass="de.bonprix.orderstarter.model.entity.Article" />
  | </h:selectOneMenu>
  | 
  | 
  | <h:commandButton value="Go" type="submit" action="#{manageOrders.callAction}"/>
  | 
  | Java code.....
  | 
  | @Stateful
  | @Name("manageOrders")
  | @Scope(ScopeType.CONVERSATION)
  | @Interceptors(org.jboss.seam.ejb.SeamInterceptor.class)
  | @Intercept(InterceptionType.ALWAYS)
  | public class ManageOrders implements IManagerOrder {
  | 
  | 	@In
  | 	private EntityManager entityManager;
  | 
  | 	@In(required = false,create=true)
  | 	@Out(required = false)
  | 	private Article article;
  | 
  | 	public String callAction() {
  | 	log.info("this.article.getArticleId() :" + this.article);
  | 	this.article = (Article) entityityManager.createNamedQuery(
  | 	"findArticleById").setParameter("id",
  | 	this.article.getArticleId()).getSingleResult();
  | 	return "/manageOrders.xhtml";
  |                 }
  | 
  | 

But while calling this callAction method I am getting following error....
I am unable to understand I am not calling merge/persist method still it is calling for updation of article. 

Please suggest. Getting stuck.

 
  | 18:55:53,755 WARN  [JDBCExceptionReporter] SQL Error: 1407, SQLState: 72000
  | 18:55:53,755 ERROR [JDBCExceptionReporter] ORA-01407: cannot update ("EXTRANET_MISC"."ORDERSTARTER_ART"."ART_NR") to NULL
  | 
  | 18:55:53,771 WARN  [JDBCExceptionReporter] SQL Error: 1407, SQLState: 72000
  | 18:55:53,771 ERROR [JDBCExceptionReporter] ORA-01407: cannot update ("EXTRANET_MISC"."ORDERSTARTER_ART"."ART_NR") to NULL
  | 
  | 18:55:53,786 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
  | org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  |         at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
  |         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
  |         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  |         at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
  |         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
  |         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
  |         at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
  |         at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
  |         at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
  |         at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
  |         at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:116)
  |         at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:241)
  |         at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
  |         at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
  |         at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1204)
  |         at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
  |         at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
  |         at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
  |         at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
  |         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:105)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
  |         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:204)
  |         at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
  |         at $Proxy675.callAction(Unknown Source)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046487#4046487

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046487



More information about the jboss-user mailing list