-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: NoSuchMethodError : FullTextSession.createFullTextQuery
PostPosted: Sat Sep 20, 2008 10:52 am 
Newbie

Joined: Fri Sep 19, 2008 10:26 am
Posts: 8
Hi,
I have a dipendency problem with hibernate search 3.0.1 and jboss 4.2.2 GA.

Actually I tried all possible jars combinations:

--------------------------------------------------------
In server/default/lib:
hibernate-3.2.6/3.3.1
hibernate-annotations-3.3.1/3.4.0
hibernate-entitymanager-3.3.0/3.3.1/3.3.2/3.4.0
hibernate-validator-3.0.0/3.1.0
hibernate-commons-annotations-3.0.0

---------------------------------------------------------
In WEB-INF/lib:
lucene-core-2.30/2.3.1/2.3.2
hibernate-search-3.0.1/3.1.0

---------------------------------------------------------

I also tried the new hibernate-search beta release but still the same problem.

this is the stacktrace:

Code:
java.lang.NoSuchMethodError: org.hibernate.search.FullTextSession.createFullTextQuery(Lorg/apache/lucene/search/Query;[Ljava/lang/Class;)Lorg/hibernate/Query;
   at it.ror.search.Searcher.getSearch(Searcher.java:55)
   at it.rortutor.servlet.ServletLuceneTest.processRequest(ServletLuceneTest.java:43)
   at it.rortutor.servlet.ServletLuceneTest.doGet(ServletLuceneTest.java:72)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
   at java.lang.Thread.run(Unknown Source)


I guess there is something I am forgetting.

I have no problems indexing my data.
Problems only comes when I try to perform a search with the following code :

Code:
AnnotationConfiguration h8Conf= new AnnotationConfiguration();
      h8Conf.configure();
h8Conf.getProperties().put(org.hibernate.search.Environment.ANALYZER_CLASS, StandardAnalyzer.class.getName());
      SessionFactory sessionFactory=h8Conf.buildSessionFactory();
      Session s= sessionFactory.openSession();
      FullTextSession fullTextSession= Search.createFullTextSession(s);
      Transaction tx=fullTextSession.beginTransaction();
MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[]{"idParagrafo.nome", "testo"},
            new StandardAnalyzer());
      org.apache.lucene.search.Query q=parser.parse(param);
      Query h8Query=fullTextSession.createFullTextQuery(q, Contenuti.class);


Thank you so much for any help

Violix


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 23, 2008 11:44 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

it is most definitely a classpath problem. Check the Hibernate Search FAQ - http://hibernate.org/446.html.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 23, 2008 12:07 pm 
Newbie

Joined: Fri Sep 19, 2008 10:26 am
Posts: 8
Thanks for your reply!

I already checked the Hibernate Search FAQ and tried all that jar combinations...
I solved the problem using JPA ... no exception with EntityManager but I couldn't put it to work using hibernate session.
I've read somewhere the problems comes becouse projects that was part of annotation project are now indipendents (like hibernate search) and others will be part of hibernate-core.
It's like JBoss look for that method in the wrong place or maybe it only depends on jboss classloader.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 23, 2008 12:07 pm 
Newbie

Joined: Fri Sep 19, 2008 10:26 am
Posts: 8
Thanks for your reply!

I already checked the Hibernate Search FAQ and tried all that jar combinations...
I solved the problem using JPA ... no exception with EntityManager but I couldn't put it to work using hibernate session.
I've read somewhere the problems comes becouse projects that was part of annotation project are now indipendents (like hibernate search) and others will be part of hibernate-core.
It's like JBoss look for that method in the wrong place or maybe it only depends on jboss classloader.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 23, 2008 2:01 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Interesting, could you maybe explain in more detais how you resolved the problem?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2008 3:50 am 
Newbie

Joined: Fri Sep 19, 2008 10:26 am
Posts: 8
I mapped my pojo with annotation instead of xml... and I used a persistence.xml instead of hibernate.cfg.xml... than I used EntityManager instead of hibernate session.
In few words I used hibernate jpa implementation.

see you


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.