[EJB 3.0] - Re: Lucene indexing + Entity beans
by jilles
"sergiu72" wrote : I'm trying to use the Lucene annotations @Indexed, @Keyword, @Text to annotate my EJB3 entity beans for indexing.
|
| I need to add;
|
|
| <hibernate-configuration>
| | ...
| | <event type="post-commit-update"
| | <listener
| | class="org.hibernate.lucene.event.LuceneEventListener"/>
| | </event>
| | <event type="post-commit-insert"
| | <listener
| | class="org.hibernate.lucene.event.LuceneEventListener"/>
| | </event>
| | <event type="post-commit-delete"
| | <listener
| | class="org.hibernate.lucene.event.LuceneEventListener"/>
| | </event>
| | </hibernate-configuration>
|
| To an xml file but I don't know where to put it?
|
| I'm running the EJB3's in standalone/embedded mode while testing.
|
| many thanks
|
I had a go at this yesterday and managed to get it to work. The xml bit you quote is from the hibernate configuration. If you are using ejb3, you will probably be using persistence.xml which is also the place pass hibernate specifics.
I provided these properties (in addition to the usual stuff) to get lucene going.
<property name="hibernate.lucene.default.directory_provider" value="org.hibernate.lucene.store.FSDirectoryProvider" />
| <property name="hibernate.lucene.default.indexBase" value="c:/testindex" />
| <property name="hibernate.ejb.event.post-insert" value="org.hibernate.ejb.event.EJB3PostInsertEventListener, org.hibernate.lucene.event.LuceneEventListener" />
| <property name="hibernate.ejb.event.post-update" value="org.hibernate.ejb.event.EJB3PostUpdateEventListener, org.hibernate.lucene.event.LuceneEventListener" />
| <property name="hibernate.ejb.event.post-delete" value="org.hibernate.ejb.event.EJB3PostDeleteEventListener, org.hibernate.lucene.event.LuceneEventListener" />
I couldn't get things to work in jboss 4.0.4 because that uses an older pre release version of hibernate. Upgrading to 4.0.5 fixed things for me. Note that you need to specify indexBase rather than indexDir (as the documentation still claims). Also you need to be sure to include the default EJB3 listenerers if you override these settings.
Other than that, all I did was dump the lucene 2.0 jar file in the lib dir of my server and (i.e. default/lib) and add some annotations similar to those in the hibernate lucene manual.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982309#3982309
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982309
17Â years, 5Â months
[O'Reilly JBoss 3.0/4.0 Workbook] - Re: Alternative class for the LocalTxConnectionManager in Jb
by dostcasper
"laxmanjava" wrote : i am getting an error, when i am migrating from the jboss 3.0.2 to jboss 4.0.2 . It is showing me the error as LocalTxConnectionManager is not found
|
| org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.resource.connectionma
| nager.LocalTxConnectionManager; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoade
| rs found for: org.jboss.resource.connectionmanager.LocalTxConnectionManager)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:143)
| at org.jboss.system.ServiceController.install(ServiceController.java:202)
| at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
|
| so plz reply anyone who can help in this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982306#3982306
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982306
17Â years, 5Â months
[JBoss Seam] - Problem running examples: javax.faces.el.EvaluationException
by guava
Hi,
I'm trying seam 1.0.1 GA on JBossAS 4.0.4GA with ejb3 profile. Almost all the seam example that I tried throw exception like the following. Any help will be great.
javax.servlet.ServletException: /register.xhtml @67,80 value="#{register.verify}": $Proxy220
javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.faces.el.EvaluationException: /register.xhtml @67,80 value="#{register.verify}": $Proxy220
com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60)
javax.faces.component.UIOutput.getValue(UIOutput.java:75)
javax.faces.component.UIInput.validate(UIInput.java:273)
javax.faces.component.UIInput.processValidators(UIInput.java:144)
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:417)
javax.faces.component.UIForm.processValidators(UIForm.java:68)
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:417)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:142)
org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:240)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982301#3982301
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982301
17Â years, 5Â months