2 Replies Latest reply on May 30, 2008 5:40 PM by Robert Morse

    Wiki Example

    Robert Morse Apprentice

      Hello, I'm looking at the Wiki example in Seam 2.0.2.GA, and in an attempt to learn a few things, I'm attempting to build it using Maven 2, and package it as an EAR.  I'm doing this because I'd like to use the Wiki as a starting example to build a different application.   In any case, everything seems to build and deploy, and JBoss 4.2.2.GA starts up without complaints.  When I navigate to docDisplay.seam (or any other page for that matter), an exception is thrown:  Could not instantiate Seam component:  help.  However the underlying exception is a HibernateException saying the accessLevelFilter is not configured.  The exception is below.  I'm guessing I have a simple configuration problem, but I'm not sure what things to check.  The accessLevelFilter is configured in the components.xml file exactly as in the example.  I'd appreciate any suggestions or ideas.  Thanks.



      Caused by: org.hibernate.HibernateException: No such filter configured [accessLevelFilter]
           at org.hibernate.impl.SessionFactoryImpl.getFilterDefinition(SessionFactoryImpl.java:965)
           at org.hibernate.impl.SessionImpl.enableFilter(SessionImpl.java:1032)
           at org.hibernate.search.impl.FullTextSessionImpl.enableFilter(FullTextSessionImpl.java:323)
           at org.jboss.seam.persistence.HibernateSessionProxy.enableFilter(HibernateSessionProxy.java:171)
           at org.hibernate.search.impl.FullTextSessionImpl.enableFilter(FullTextSessionImpl.java:323)
           at org.jboss.seam.persistence.HibernateSessionProxy.enableFilter(HibernateSessionProxy.java:171)
           at org.jboss.seam.persistence.HibernatePersistenceProvider.enableFilter(HibernatePersistenceProvider.java:203)
           at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:88)
           at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:108)
           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.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           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:107)
           at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
           at org.jboss.seam.wiki.core.dao.WikiManagedPersistenceContext_$$_javassist_25.getEntityManager(WikiManagedPersistenceContext_$$_javassist_25.java)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        • 1. Re: Wiki Example
          Christian Bauer Master

          First, the wiki example code changed like 30% since 2.0.2. I really recommend nightly snapshots there, I work on it almost every day.


          Second, you definitely do not want to use the Wiki as a starting point. It's a complex and complicated application, not really a re-usable example. And the directory and deployment structure is totally WAR oriented. A much better idea is to use the EAR that seam-gen produces.

          • 2. Re: Wiki Example
            Robert Morse Apprentice

            Hello Christian!
            Thanks for the quick reply.  I will certainly grab the nightly build and look at it.  The Wiki example is indeed complex, but there are a few things in it I was hoping to incorporate.  Rather than starting with the Wiki and trying to modify it, I'll start with a new project and try to incorporate some of the things you've built.  Nice job on the Wiki, by the way, and thanks again for the reply.