-
1. Re: NoSuchMethodFound createFullTextQuery()
momochone11 Aug 17, 2007 5:49 PM (in response to momochone11)I also have tried this method
public void testSessionWrapper() throws Exception {
FullTextSession s = Search.createFullTextSession((org.Hibernate.Session)getEntityManager().getDele
gate());
QueryParser parser = new QueryParser( "title", new StopAnalyzer() );
Query query = parser.parse( "summary:noword" );
FullTextQuery hibQuery = s.createFullTextQuery( query, Location.class);
}
and still say, no such method. -
2. Re: NoSuchMethodFound createFullTextQuery()
momochone11 Aug 17, 2007 6:03 PM (in response to momochone11)Also, I also tried WITHOUT using Search.createFullTextSession() as suggested by documentation.. I have another method that looks like this and still end up with the same exception.
public List getSearchResults() { if(searchPattern == null) return null; if("".equals(searchPattern)) { searchPattern = null; return getEntityManager().createQuery("select be from Location be order by date desc").getResultList(); } Map boostPerField = new HashMap(); boostPerField.put("identifier", 4f); String productFields[] = { "identifier" }; QueryParser parser = new MultiFieldQueryParser(productFields, new StandardAnalyzer(), boostPerField); parser.setAllowLeadingWildcard(true); org.apache.lucene.search.Query luceneQuery = null; try { luceneQuery = parser.parse(searchPattern); } catch(Exception e) { } FullTextSession session = (FullTextSession)getEntityManager().getDelegate(); org.hibernate.Query query = session.createFullTextQuery(luceneQuery, Location.class); return query.list(); }
I am quite lost, I followed the example, and the jars are being loaded. I don't understand why it keeps on saying NoSuchMethodFound..
any help is appreciated! -
3. Re: NoSuchMethodFound createFullTextQuery()
momochone11 Aug 20, 2007 12:36 PM (in response to momochone11)did anyone run into the same problem?
-
4. Re: NoSuchMethodFound createFullTextQuery()
epbernard Aug 20, 2007 7:15 PM (in response to momochone11)Without using the Search.createFullTextSession is the right way to do it, regardless of your problem.
What is strange is that it seems FullTextSession.createFullTextQuery() expect to return o.h.Query where it should really return org.hibernate.search.FullTextQuery.
Which version of Seam are you using? The latest 2.0 release?
Can you give a try with the Hibernate Search version that is bundled with the Seam distribution. -
5. Re: NoSuchMethodFound createFullTextQuery()
momochone11 Aug 21, 2007 9:42 AM (in response to momochone11)I am using the Seam 2.0 beta that resides on CVS repositoriy, ie. not the 2.0 beta that is on the homepage, and yes I did try using Hibernate Search that comes with Seam 2.0.
The weird problem is that it works in the seam examples but not on my own app. That's why I am wondering if anyone else has the same problem -
6. Re: NoSuchMethodFound createFullTextQuery()
momochone11 Aug 23, 2007 5:58 PM (in response to momochone11)I copied the dvd example's FullSearchAction class to my project and there is indeed a warning message for the createFullTextQuery() line, I have captured a screen shot and here it is:
[img]http://img169.imageshack.us/img169/3862/idecf1.gif[/img]
strangely enough though, I open the very same class in the dvdexample project and it doesn't have that error on that line... anyone has any ideas? -
7. Re: NoSuchMethodFound createFullTextQuery()
srpantano Sep 4, 2007 3:25 PM (in response to momochone11)Please momochone11, you resolved the "createFullTextQuery()" problem, because I am with the same problem and I can´t fix it.
thanks. -
8. Re: NoSuchMethodFound createFullTextQuery()
momochone11 Sep 5, 2007 11:34 AM (in response to momochone11)I have not found a solution yet, but I am working on other parts of my app right now.
-
9. Re: NoSuchMethodFound createFullTextQuery()
mrmimo Sep 24, 2007 4:41 PM (in response to momochone11)This problem is related to hibernate-search dependencies. For me it works when I took the libraries from it's lib dir, and replaced apropriate jboss libraries with those from hibernate-search. I had to upgrade hibernate3.jar to resolve introduced dependencies.
The bottom line is - current hibernate search is not compatible with current JBoss AS. -
10. Re: NoSuchMethodFound createFullTextQuery()
momochone11 Sep 25, 2007 2:32 PM (in response to momochone11)Thanks for your reply mrmimo, I will give that a try
-
11. Re: NoSuchMethodFound createFullTextQuery()
epbernard Sep 26, 2007 3:51 PM (in response to momochone11)"mrmimo" wrote:
This problem is related to hibernate-search dependencies. For me it works when I took the libraries from it's lib dir, and replaced apropriate jboss libraries with those from hibernate-search. I had to upgrade hibernate3.jar to resolve introduced dependencies.
The bottom line is - current hibernate search is not compatible with current JBoss AS.
I beg to differ, I would like to reproduce the issue you guys are having but I have not been able to do it so far.
Hibernate Search is compatible with JBoss Seam 2.0 and JBoss AS 4.2 (vanilla), the DVDStore demo run in this configuration.
If you upgrade Hibernate Annotations / EntityManager to 3.3.x, then you no longer need to define the events, -
12. Re: NoSuchMethodFound createFullTextQuery()
chrisky Oct 26, 2007 4:28 AM (in response to momochone11)I have the same problem
JBoss 4.2.1 with Hibernate 3.0.0 without using SEAM(in EJB)org.hibernate.Session origSession = (org.hibernate.Session)em.getDelegate(); FullTextSession session = Search.createFullTextSession(origSession); org.hibernate.Query query; if(searchString.length() > 0) { try { MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[] {"name", "note"}, new StandardAnalyzer()); query = session.createFullTextQuery(parser.parse(searchString), Task.class); tasks = query.list(); } catch (ParseException e) { log.error(e.getLocalizedMessage(), e); tasks = null; } } else { tasks = executeQuery(Task.class, "from Task"); }
javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.hibernate.search.FullTextSession.createFullTextQuery(Lorg/apache/lucene/search/Query;[Ljava/lang/Class;)Lorg/hibernate/Query; 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:76) 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.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166) at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:108) 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:106) 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.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
-
13. Re: NoSuchMethodFound createFullTextQuery()
chrisky Oct 26, 2007 5:15 AM (in response to momochone11)Ok I got it working...
It happens that you have to copy the hiberaten-search.jar and the dependency jars to the jboss lib folder. it wont work if you got it in EAR (even i have include the jar in the application.xml)"chrisky" wrote:
I have the same problem
JBoss 4.2.1 with Hibernate 3.0.0 without using SEAM(in EJB)org.hibernate.Session origSession = (org.hibernate.Session)em.getDelegate(); FullTextSession session = Search.createFullTextSession(origSession); org.hibernate.Query query; if(searchString.length() > 0) { try { MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[] {"name", "note"}, new StandardAnalyzer()); query = session.createFullTextQuery(parser.parse(searchString), Task.class); tasks = query.list(); } catch (ParseException e) { log.error(e.getLocalizedMessage(), e); tasks = null; } } else { tasks = executeQuery(Task.class, "from Task"); }
javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.hibernate.search.FullTextSession.createFullTextQuery(Lorg/apache/lucene/search/Query;[Ljava/lang/Class;)Lorg/hibernate/Query; 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:76) 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.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166) at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:108) 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:106) 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.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
-
14. Re: NoSuchMethodFound createFullTextQuery()
chrisky Oct 26, 2007 6:25 AM (in response to momochone11)Well, it does not work... Although it fixed the search by copy the jar to jboss lib folder, it break the adding index part...
javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.lucene.document.Document.add(Lorg/apache/lucene/document/Field;)V 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:76) 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.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166) at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:108) 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:106) 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.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)