-->
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.  [ 3 posts ] 
Author Message
 Post subject: JonAS - Hibernate Search and Deployment !
PostPosted: Mon Aug 23, 2010 6:32 am 
Newbie

Joined: Mon Aug 23, 2010 5:18 am
Posts: 2
Hello there!

I'm stucking on a problem with Hibernate Search 3.2.1... maybe you can help me :)

I work on a little project with Hibernate 3.5 and JPA 1.1. I want to implement a search module, and Hibernate Search is a good solution.... but :

I'am getting this error during the deployment:

Code:
        at org.ow2.jonas.deployablemonitor.DeployableMonitor.detectNewArchives(DeployableMonitor.java:464)
        at org.ow2.jonas.deployablemonitor.DeployableMonitor.checkNewArchives(DeployableMonitor.java:265)
        at org.ow2.jonas.deployablemonitor.DeployableMonitor.run(DeployableMonitor.java:175)
Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/index/IndexWriter$MaxFieldLength
        at org.hibernate.search.store.DirectoryProviderHelper.createFSIndex(DirectoryProviderHelper.java:80)
        at org.hibernate.search.store.FSDirectoryProvider.initialize(FSDirectoryProvider.java:44)
        at org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:129)
        at org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProviders(DirectoryProviderFactory.java:63)
        at org.hibernate.search.impl.SearchFactoryImpl.initDocumentBuilders(SearchFactoryImpl.java:404)
        at org.hibernate.search.impl.SearchFactoryImpl.<init>(SearchFactoryImpl.java:119)
        at org.hibernate.search.event.ContextHolder.getOrBuildSearchFactory(ContextHolder.java:30)
        at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:79)
        at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
        at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
        at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
        at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1352)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
        at org.ow2.easybeans.persistence.JPersistenceContext.init(JPersistenceContext.java:72)
        at org.ow2.easybeans.persistence.JPersistenceContext.<init>(JPersistenceContext.java:65)
        at org.ow2.easybeans.persistence.PersistenceUnitManager.addExtraPersistenceUnitInfos(PersistenceUnitManager.java:88)
        at org.ow2.easybeans.persistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:64)
        at org.ow2.easybeans.persistence.xml.PersistenceXmlFileAnalyzer.analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:193)
        at org.ow2.jonas.ejb.easybeans.EasyBeansService.__getPersistenceUnitManager(EasyBeansService.java:802)
        at org.ow2.jonas.ejb.easybeans.EasyBeansService.getPersistenceUnitManager(EasyBeansService.java)
        at org.ow2.jonas.ear.internal.EarDeployer.doDeploy(EarDeployer.java:674)
        at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer$1.execute(AbsDeployer.java:96)
        at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer$1.execute(AbsDeployer.java:95)
        at org.ow2.util.execution.helper.RunnableHelper.execute(RunnableHelper.java:77)
        at org.ow2.util.ee.deploy.impl.deployer.AbsDeployer.deploy(AbsDeployer.java:94)
        at org.ow2.util.ee.deploy.impl.deployer.DeployerManager.deploy(DeployerManager.java:129)
        at org.ow2.jonas.deployablemonitor.DeployableMonitor.detectNewArchives(DeployableMonitor.java:443)
        ... 2 more


I just add library in my project (netbeans) and just set minimals properties in the persistence.xml (properties "hibernate.search.default.indexBase" and "hibernate.search.default.directory_provider").

lucence-core is added in ear and detected by JonAS ...

I'm lost ... :'(

any ideas ?

Thanks a lot !


Top
 Profile  
 
 Post subject: Re: JonAS - Hibernate Search and Deployment !
PostPosted: Mon Aug 23, 2010 5:26 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello and welcome,
you're either missing the Lucene dependency, or you're having an incompatible version of Lucene on your classpath, maybe in addition to the one bundled with Hibernate Search.
I have no experience with JonAS, is it possible it's bundling a Lucene jar in the common libraries? Or you have another application bundling it, in this case you should enable classloader isolation between applications.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: JonAS - Hibernate Search and Deployment !
PostPosted: Tue Aug 24, 2010 5:44 am 
Newbie

Joined: Mon Aug 23, 2010 5:18 am
Posts: 2
Thanks for your reply (and the welcome),

I'll try to investigate on the JonAS common bundle ... I think that it's a good run (and idea ;p)

See you later when I've solved this prob !

bye


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.