[jboss-user] [JBoss Seam] - Re: Batch Index using Hibernate Search and Seam
mat
do-not-reply at jboss.com
Sun Nov 4 04:38:02 EST 2007
Hi Pete,
When calling
| EntityManager em = (EntityManager) Component.getInstance("entityManager");
|
I get the following Exception:
| 07:55:26,593 ERROR [STDERR] org.hibernate.HibernateException: Filter [accessCompanyFilter] parameter [currentAccessCompany] value not set
| at org.hibernate.impl.FilterImpl.validate(FilterImpl.java:145)
| at org.jboss.seam.persistence.HibernatePersistenceProvider.enableFilter(HibernatePersistenceProvider.java:151)
| at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:88)
| at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:108)
| at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2083)
| at org.jboss.seam.Component.unwrap(Component.java:2109)
| at org.jboss.seam.Component.getInstance(Component.java:1888)
| at org.jboss.seam.Component.getInstance(Component.java:1841)
| at org.jboss.seam.Component.getInstance(Component.java:1835)
| at com.cheetah.seam.modules.admin.IndexManagerBean.buildIndex(IndexManagerBean.java:248)
| 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:597)
| 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.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.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 com.cheetah.seam.modules.admin.IndexManagerBean_$$_javassist_7.buildIndex(IndexManagerBean_$$_javassist_7.jav
| a)
| 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:597)
| 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.ThreadPoolDispatcher$RunnableAsynchronous.run(ThreadPoolDispatcher.java:114)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
| at java.util.concurrent.FutureTask.run(FutureTask.java:138)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.j
| ava:98)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207
| )
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
| at java.lang.Thread.run(Thread.java:619)
|
|
|
|
| The "currentAccessCompany" is set to int values corresponding to companyId in the AuthenticatorAction bean:
| @Name("authenticator")
| public class AuthenticatorActionBean
| {
| ...
| Contexts.getSessionContext().set("currentAccessCompany", companyId);
| ...
|
| }
|
For some reason the "value not set" error occurs due to the @Asynchronous;
Thank you and appreciate your feedback;
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101568#4101568
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101568
More information about the jboss-user
mailing list