[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2544) Exception handling for javax.persistence.OptimisticLockException fails the second time
by Christian Bauer (JIRA)
Exception handling for javax.persistence.OptimisticLockException fails the second time
--------------------------------------------------------------------------------------
Key: JBSEAM-2544
URL: http://jira.jboss.com/jira/browse/JBSEAM-2544
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.1.CR2
Reporter: Christian Bauer
Priority: Blocker
Install the wiki, run it in dev profile.
<exception class="javax.persistence.OptimisticLockException">
<end-conversation/>
<!-- TODO: This fails randomly, it works only once and then we don't get the message anymore?! -->
<redirect view-id="/message.xhtml">
<message severity="WARN">#{messages['lacewiki.msg.OptimisticLockError']}</message>
</redirect>
</exception>
Generate this exception by editing directory 'BBB' in two browser tabs, click Update in one of them, then click Update in the other.
If you are lucky, you will now be on the message page with a proper error message. If you don't have a message, that's the bug.
If you get a message, try again and repeat the concurrent update procedure. It will fail at some point, I needed no more than three attempts. Occasionally I get this exception (always doing the same clicks!):
javax.el.ELException: /message.xhtml: Property 'handledException' not found on type org.jboss.seam.Namespace
com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
Once you get that exception, it will never work again and you will always get this exception (I think).
There are several open issues related to exception handling and message passing, this probably duplicates them. My guess is that we have a serious race condition somewhere in the exception handling code.
--
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, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2583) <s:conversationPropagation type="join" /> seems not creating aq new conversation
by Tomas Cerny (JIRA)
<s:conversationPropagation type="join" /> seems not creating aq new conversation
--------------------------------------------------------------------------------
Key: JBSEAM-2583
URL: http://jira.jboss.com/jira/browse/JBSEAM-2583
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.1.GA
Environment: Linux, FireFox
Reporter: Tomas Cerny
Priority: Minor
Fix For: 2.0.2.GA
Assuming you will take a look in JBoss Forum Reference
I have a search table and from table entry starting new explicit conversation (natural).
My conversationName is defined in pages.xml
when I use
<h:commandLink
styleClass="left clearBoth"
action="#{teamManager.select(teamItem)}" value="select">
<s:conversationName value="teamHome"/>
<s:conversationPropagation type="join" />
</h:commandLink>
link invokes method but is not redirecting to entryHome (should start pageFlow defined on method)
if I will remove <s:conversationPropagation type="join" />
then redirection to entryHome works but of course without joining.
--
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, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2484) async:quartz-dispatcher + serializied fields in an entity = java.lang.ClassNotFoundException: No ClassLoaders found
by Adam Warski (JIRA)
async:quartz-dispatcher + serializied fields in an entity = java.lang.ClassNotFoundException: No ClassLoaders found
-------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-2484
URL: http://jira.jboss.com/jira/browse/JBSEAM-2484
Project: JBoss Seam
Issue Type: Bug
Components: Async
Affects Versions: 2.0.1.CR1, 2.0.0.GA
Environment: JBoss AS 4.2.2.GA, Seam 2.0.1.CR1 and 2.0.0.GA
Reporter: Adam Warski
When an asynchronous method is called, which reads entities from the DB which have serializable fields (with just an @Basic annotation), and the quartz dispatcher is used, a java.lang.ClassNotFoundException is thrown, when trying to read the entities.
I attach a demo app (it is built using seam-gen 2.0.1.cr1, and has the lib directory removed).
The application has the following classes:
- SimpleEntity - an entity which just one property of class: SimpleSerializable - this is the serializable property
- AsyncService / AsyncServiceImpl - this is the stateless bean that has the asynchronous method. The method simple reads all SimpleEntities from the database.
To run the example, deploy it, open in the browser http://localhost:8080/serialization_test and click "Add new simple entity".
This invokes an action, which persists a new SimpleEntity to the DB and invokes the asynchronous method.
An exception then appears in the log, coming from the asynchronously called method:
09:50:25,745 ERROR [ErrorLogger] Job (DEFAULT.614f04c4:117680a919e:-7ffe threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize]
at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
* Nested Exception (Underlying Cause) ---------------
javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
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:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
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:110)
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.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
at $Proxy96.asyncMethod(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:50)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
at org.javassist.tmp.java.lang.Object_$$_javassist_2.asyncMethod(Object_$$_javassist_2.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.async.AsynchronousInvocation.call(AsynchronousInvocation.java:52)
at org.jboss.seam.async.Asynchronous.executeInContexts(Asynchronous.java:76)
at org.jboss.seam.async.Asynchronous.execute(Asynchronous.java:45)
at org.jboss.seam.async.QuartzDispatcher$QuartzJob.execute(QuartzDispatcher.java:240)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:75)
at com.mydomain.test2.AsyncServiceImpl.asyncMethod(AsyncServiceImpl.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
... 42 more
Caused by: org.hibernate.type.SerializationException: could not deserialize
at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:214)
at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:240)
at org.hibernate.type.SerializableType.fromBytes(SerializableType.java:82)
at org.hibernate.type.SerializableType.get(SerializableType.java:39)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2096)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
at org.hibernate.loader.Loader.getRow(Loader.java:1206)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
at org.hibernate.loader.Loader.doQuery(Loader.java:701)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
... 75 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.mydomain.test2.SimpleSerializable
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:585)
at org.hibernate.util.SerializationHelper$CustomObjectInputStream.resolveClass(SerializationHelper.java:268)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:210)
... 97 more
--
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, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2306) Can't create Quartz Cron job at startup
by NSA (JIRA)
Can't create Quartz Cron job at startup
---------------------------------------
Key: JBSEAM-2306
URL: http://jira.jboss.com/jira/browse/JBSEAM-2306
Project: JBoss Seam
Issue Type: Bug
Components: Async
Affects Versions: 2.0.0.GA
Environment: Windows, JBoss 4.2.1 GA
Reporter: NSA
I've set up an ObserveInitilization class as suggested by Pete Muir here: http://in.relation.to/Bloggers/DoingSomethingAtStartupWithSeam
It looks like this:
@Name("observeInitialization")
public class ObserveInitialization {
@In(create=true)
Updater updater;
@Observer("org.jboss.seam.postInitialization")
public void start() {
initialize(30 * 1000l);
}
@Asynchronous
public void initialize(@Duration long durationInMilliseconds) {
updater.update(new Date(), "0 0/3 * * * ?");
}
}
The Updater class looks like this:
@Name("updater")
public class Updater {
@In
private EntityManager entityManager;
@Logger
private Log log;
@Asynchronous
public void update(@Expiration Date start, @IntervalCron String cron) {
//...
}
}
The issue is this code calls ThreadPoolDispatcher.scheduleWithExecutorService, which casts the return value of createSchedule to a TimerSchedule.
Because I'm using an @IntervalCron the return value of createSchedule is a CronSchedule which extends Schedule, but not TimerSchedule, so I get a ClassCastException:
09:14:59,387 ERROR [[/admin]] Exception sending context initialized event to listener instance of cl
ass org.jboss.seam.servlet.SeamListener
java.lang.ClassCastException: org.jboss.seam.async.CronSchedule
at org.jboss.seam.async.ThreadPoolDispatcher.scheduleInvocation(ThreadPoolDispatcher.java:47)
at org.jboss.seam.async.ThreadPoolDispatcher.scheduleInvocation(ThreadPoolDispatcher.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
at org.jboss.seam.async.ThreadPoolDispatcher_$$_javassist_6.scheduleInvocation(ThreadPoolDispatcher
_$$_javassist_6.java)
at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:38)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
at com.company.Updater_$$_javassist_5.update(Updater_$$_javassist_5.java)
at com.company.ObserveInitialization.initialize(ObserveInitialization.java:29)
I compared this to the Quartz example packaged with Seam.
That example also calls createSchedule but as a parameter to QuartzDispatcher.scheduleWithQuartzService which accepts a Schedule, thus no ClassCastException.
--
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, 9 months