Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-1885

BridgeFactory unable to create instances of custom bridges in a modular environment

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.5.1.Final
    • Fix Version/s: 5.9.0.CR1
    • Component/s: engine, integration
    • Labels:
      None

      Description

      Reported on version 4.5.1.Final but I suspect it still applies. This is triggered by deploying a WAR on WildFly, using a TikaBridge and having the application depend on a Tika module (even exporting it), or including the Tika dependencies directly:

      2015-06-01 22:07:03,296 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62) MSC000001: Failed to start service jboss.persistenceunit."artificer-server.war#Artificer": org.jboss.msc.service.StartException in service jboss.persistenceunit."artificer-server.war#Artificer": java.lang.NoClassDefFoundError: org/apache/tika/parser/Parser
      	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
      	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
      	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_45]
      	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
      	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
      	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
      	at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      Caused by: java.lang.NoClassDefFoundError: org/apache/tika/parser/Parser
      	at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.7.0_45]
      	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493) [rt.jar:1.7.0_45]
      	at java.lang.Class.getConstructor0(Class.java:2803) [rt.jar:1.7.0_45]
      	at java.lang.Class.newInstance(Class.java:345) [rt.jar:1.7.0_45]
      	at org.hibernate.search.bridge.impl.BridgeFactory.doExtractType(BridgeFactory.java:592) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.bridge.impl.BridgeFactory.doExtractType(BridgeFactory.java:578) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.bridge.impl.BridgeFactory.guessType(BridgeFactory.java:394) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.bindFieldAnnotation(AnnotationMetadataProvider.java:802) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.checkForField(AnnotationMetadataProvider.java:758) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeMemberLevelAnnotations(AnnotationMetadataProvider.java:643) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeClass(AnnotationMetadataProvider.java:331) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.getTypeMetadataFor(AnnotationMetadataProvider.java:119) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:373) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:219) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:143) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:74) [hibernate-search-orm-4.5.1.Final.jar:4.5.1.Final]
      	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:52) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
      	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:588) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
      	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
      	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
      	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
      	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
      	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
      	at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
      	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
      	... 8 more
      Caused by: java.lang.ClassNotFoundException: org.apache.tika.parser.Parser from [Module "org.hibernate.search.engine:main" from local module loader @665bf734 (finder: local module finder @1fc2ab6c (roots: /home/brmeyer/IdeaProjects/artificer/installer/target/wildfly-8.2.0.Final/modules,/home/brmeyer/IdeaProjects/artificer/installer/target/wildfly-8.2.0.Final/modules/system/layers/base))]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
      	... 33 more

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                sanne Sanne Grinovero
                Reporter:
                sanne Sanne Grinovero
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: