-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate ORM 4.3.0Beta5 Sessionfactory Help
PostPosted: Fri Nov 15, 2013 1:14 am 
Newbie

Joined: Sun Sep 15, 2013 1:17 pm
Posts: 6
Jboss AS 7.1.1
JDK 7
Eclipse Kepler with m2e 1.4

hibernate-core 4.3.0beta5
hibernate-search 4.3.0Final

compiled hibernate orm git repo with gradle.
added hibernate core jar to .m2 file structure, updated POM.xml with corresponding dependency.(jar successfully is pulled in to WEB-INF/lib)

I have tried several ways to build my session factory;
Eclipse shows that

serviceRegistry = new ServiceRegistryBuilder().applySettings(
configuration.getProperties()).buildServiceRegistry();
is deprecated.
and in the repo under
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java

BootstrapServiceRegistry is also deprecated?
from this session factory method which is parted and pieced from the git repo junit /junit4/BaseCoreFunctionalTestCase.java
Code:
private SessionFactoryImplementor configureSessionFactory() throws HibernateException{
      Configuration configuration = new Configuration().configure();
      
      @SuppressWarnings("deprecation")
      final BootstrapServiceRegistryBuilder builder = new BootstrapServiceRegistryBuilder();
      
      BootstrapServiceRegistry bootRegistry = builder.build();
      Properties properties = new Properties();
      properties.putAll( configuration.getProperties() );
      ConfigurationHelper.resolvePlaceHolders( properties );

      StandardServiceRegistryBuilder registryBuilder = new StandardServiceRegistryBuilder( bootRegistry ).applySettings( properties );
   
         
      serviceRegistry = (StandardServiceRegistryImpl) registryBuilder.build();
      
      
      sessionFactory = ( SessionFactoryImplementor ) configuration.buildSessionFactory( serviceRegistry );
      return sessionFactory;
   }


When i run with either implementation I get the following errors:

Code:
17:31:06,496 WARN  [org.jboss.modules] (http-localhost-127.0.0.1-8080-1) Failed to define class org.hibernate.search.hcore.impl.MassIndexerFactoryIntegrator in Module "deployment.PlatformUI.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/hibernate/search/hcore/impl/MassIndexerFactoryIntegrator (Module "deployment.PlatformUI.war:main" from Service Module Loader)
   at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
   at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
   at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
   at org.jboss.modules.Module.loadModuleClass(Module.java:517)
   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
   at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
   at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:222) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at java.lang.ClassLoader.loadClass(Unknown Source) [rt.jar:1.7.0_40]
   at java.lang.ClassLoader.loadClass(Unknown Source) [rt.jar:1.7.0_40]
   at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_40]
   at java.lang.Class.forName(Unknown Source) [rt.jar:1.7.0_40]
   at java.util.ServiceLoader$LazyIterator.next(Unknown Source) [rt.jar:1.7.0_40]
   at java.util.ServiceLoader$1.next(Unknown Source) [rt.jar:1.7.0_40]
   at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:338) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:57) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:215) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at org.hibernate.service.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:71) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at dal.DAL.configureSessionFactory(DAL.java:94) [classes:]
   at dal.DAL.sessionManager(DAL.java:117) [classes:]
   at dal.DAL.loginUser(DAL.java:441) [classes:]
   at login.login.executeLogin(login.java:118) [classes:]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_40]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_40]
   at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_40]
   at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.13.Final.jar:]
   at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
   at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
   at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
   at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_40]
Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/spi/BasicServiceInitiator
   at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_40]
   at java.lang.ClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0_40]
   at java.security.SecureClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0_40]
   at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
   at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
   ... 58 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.service.spi.BasicServiceInitiator from [Module "deployment.PlatformUI.war:main" from Service Module Loader]
   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
   at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
   ... 63 more

17:31:06,578 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http-localhost-127.0.0.1-8080-1) #{auth.executeLogin}: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.MassIndexerFactoryIntegrator not found: javax.faces.FacesException: #{auth.executeLogin}: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.MassIndexerFactoryIntegrator not found
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
   at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_40]
Caused by: javax.faces.el.EvaluationException: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.MassIndexerFactoryIntegrator not found
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]
   ... 24 more
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.MassIndexerFactoryIntegrator not found
   at java.util.ServiceLoader.fail(Unknown Source) [rt.jar:1.7.0_40]
   at java.util.ServiceLoader.access$300(Unknown Source) [rt.jar:1.7.0_40]
   at java.util.ServiceLoader$LazyIterator.next(Unknown Source) [rt.jar:1.7.0_40]
   at java.util.ServiceLoader$1.next(Unknown Source) [rt.jar:1.7.0_40]
   at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:338) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:57) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:215) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at org.hibernate.service.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:71) [hibernate-core-4.3.0.Beta5.jar:4.3.0.Beta5]
   at dal.DAL.configureSessionFactory(DAL.java:94) [classes:]
   at dal.DAL.sessionManager(DAL.java:117) [classes:]
   at dal.DAL.loginUser(DAL.java:441) [classes:]
   at login.login.executeLogin(login.java:118) [classes:]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_40]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_40]
   at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_40]
   at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.13.Final.jar:]
   at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]
   at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
   at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
   at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
   ... 25 more





Any help is appreciated..
Thank you for your diligence.


Top
 Profile  
 
 Post subject: Re: Hibernate ORM 4.3.0Beta5 Sessionfactory Help
PostPosted: Fri Nov 15, 2013 2:04 am 
Newbie

Joined: Sun Sep 15, 2013 1:17 pm
Posts: 6
Duh.. I had to update the hibernate search had nothing to do with my session factory..
Updated search to 4.4.0Final
good news!


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