[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2111) coerceToType / javaassist error when converting types for multi selection
by Damian Harvey (JIRA)
coerceToType / javaassist error when converting types for multi selection
-------------------------------------------------------------------------
Key: JBSEAM-2111
URL: http://jira.jboss.com/jira/browse/JBSEAM-2111
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.CR2
Environment: Mac OSX. Jboss 4.2.1, Java 1.5
Reporter: Damian Harvey
When trying to display values in an h:selectManyCheckbox I get an error:
java.lang.IllegalArgumentException: Cannot convert com.locuslive.odyssey.entity.Groups@3960f3 of typ
e class com.locuslive.odyssey.entity.Groups to class com.locuslive.odyssey.entity.Groups_$$_javassis
t_219
I have created a very basic project with PERSON, GROUP and PERSONGROUP entities. I've attached it after emptying the lib directory.
Essentially on the PersonEdit page I want to be able to select which Groups the Person may belong to. This is done with the selectManyCheckbox. The checkbox is populated with a list of GROUPs from a GroupList. It is bound to a variable in the PersonHome called 'groups'. This is a list of Groups that is extracted from the PersonGroup table for that user.
The stacktrace is in the forum post. I have also generated the attached project under Seam 1.2.1.GA and the problem is not there.
--
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, 6 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2264) @Observer with PostSetVariable produces Concurrent exceptions in a conversation scoped stateful bean
by Dan Hinojosa (JIRA)
@Observer with PostSetVariable produces Concurrent exceptions in a conversation scoped stateful bean
----------------------------------------------------------------------------------------------------
Key: JBSEAM-2264
URL: http://jira.jboss.com/jira/browse/JBSEAM-2264
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.GA
Environment: java 6_u03, jboss-4.2.1GA, jboss-seam-2.0.0.GA
Reporter: Dan Hinojosa
A method with an @Observer that listens to a postSetVariable event:
@Name("myModule")
@Scope(ScopeType.CONVERSATION)
@Stateful
public class MyModule implements ModuleLocal, ModuleRemote {
@Observer("org.jboss.seam.postSetVariable.foo")
public void process() {
/* Do something */
}
}
produces a stack trace:
[SeamPhaseListener] uncaught exception
javax.el.ELException: javax.ejb.EJBTransactionRolledbackException: no concurrent calls on stateful bean 'jboss.j2ee:service=EJB3,name=MyModule' (EJB3 4.3.13)
According to 3.1.10. Concurrency model of the 2.0.0 documentation:
Finally, Seam enforces a single thread /per conversation per process/ model for the conversation context by serializing concurrent requests in the same long-running conversation context.
The two 'per' is kind of confusing, but it seems that since Seam is serializing concurrent requests, this issue should not occur.
Will create demo app shortly.
--
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, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2243) org.jboss.seam.persistence.HibernateSessionProxy does not implement org.hibernate.event.EventSource
by Bojan Cekrlic (JIRA)
org.jboss.seam.persistence.HibernateSessionProxy does not implement org.hibernate.event.EventSource
---------------------------------------------------------------------------------------------------
Key: JBSEAM-2243
URL: http://jira.jboss.com/jira/browse/JBSEAM-2243
Project: JBoss Seam
Issue Type: Patch
Components: Core, EJB3
Affects Versions: 2.0.0.GA
Reporter: Bojan Cekrlic
When using the following search pattern:
FullTextEntityManager fullTextEntityManager = org.hibernate.search.jpa.Search.createFullTextEntityManager(em);
MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[]{"username", "description"}, new SloAnalyzer());
org.apache.lucene.search.Query query = parser.parse( this.qs );
javax.persistence.Query hibQuery = fullTextEntityManager.createFullTextQuery( query, User.class );
The code dies with something in the lines of "FullTextHibernateSessionProxy cannot be cast to EventSource".
This happens because of constructor in org.hibernate.search.impl.FullTextSessionImpl:
public FullTextSessionImpl(org.hibernate.Session session) {
this.session = (Session) session;
this.eventSource = (EventSource) session;
this.sessionImplementor = (SessionImplementor) session;
}
The quick solution is to fix org.jboss.seam.persistence.HibernateSessionProxy (which is extended by FullTextHibernateSessionProxy) to implement org.hibernate.event.EventSource and add the following code:
public void delete(String arg0, Object arg1, boolean arg2, Set arg3) {
((EventSource) delegate).delete(arg0, arg1, arg2, arg3);
}
public void forceFlush(EntityEntry arg0) throws HibernateException {
((EventSource) delegate).forceFlush(arg0);
}
public ActionQueue getActionQueue() {
return ((EventSource) delegate).getActionQueue();
}
public Object instantiate(EntityPersister arg0, Serializable arg1)
throws HibernateException {
return ((EventSource) delegate).instantiate(arg0, arg1);
}
public void merge(String arg0, Object arg1, Map arg2)
throws HibernateException {
((EventSource) delegate).merge(arg0, arg1, arg2);
}
public void persist(String arg0, Object arg1, Map arg2)
throws HibernateException {
((EventSource) delegate).persist(arg0, arg1, arg2);
}
public void persistOnFlush(String arg0, Object arg1, Map arg2) {
((EventSource) delegate).persistOnFlush(arg0, arg1, arg2);
}
public void refresh(Object arg0, Map arg1) throws HibernateException {
((EventSource) delegate).refresh(arg0, arg1);
}
public void saveOrUpdateCopy(String arg0, Object arg1, Map arg2)
throws HibernateException {
((EventSource) delegate).saveOrUpdateCopy(arg0, arg1, arg2);
}
I have not gone into details if any of these methods need to do EL interpolation or not, but my first hunch tells me that either no or it's not important for this usage scenario.
--
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, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2244) SpringTransaction doesn't pass the exception stack to the exception handler
by dapeng wang (JIRA)
SpringTransaction doesn't pass the exception stack to the exception handler
---------------------------------------------------------------------------
Key: JBSEAM-2244
URL: http://jira.jboss.com/jira/browse/JBSEAM-2244
Project: JBoss Seam
Issue Type: Feature Request
Components: Spring
Affects Versions: 2.0.0.GA
Reporter: dapeng wang
Fix For: 2.0.1.GA
currently if a tx will be rollbacked, the SpringTransaction class kind of swallow the root cause in the following code
Code:
catch (TransactionSystemException e)
{
log.error("Exception cause:", e);
throw new SystemException(e.getMessage());
}
catch (UnexpectedRollbackException e)
{
log.error("Exception cause:", e);
throw new RollbackException(e.getMessage());
}
The problem is that the SystemException and RollbackException defined in JTA seem not to be able to take the case exception. But it is essential to pass the whole cause exception in SystemException and RollbackException instead of only a text message.
My use case is the following:
JSF delete action method tries to delete a row in the db. When the tx commits, it discovers the row can not be deleted because of foreign key constraint. I would like to have the ConstraintViolationException wrapped in the RollbackException, so that I have a chance to handle this exception later with the exception handler.
In the current implmenetation, the RollbacklException with only text message and no cause stack will later be wrapped as an IllegalStateException, which is not helpful for exception handling at all.
Please make the cause exception somehow accessible (ThreadLocal, or Seam Event Context), so that the error handling mechanism has a chance to do an exception handling.
--
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, 7 months